l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

commit e139f8e5e3351b33f8fe2842e4b9c63192772b57
parent cc1c020adf93bda2ae2d3c7d7d686f56b4289b95
Author: l0bsterz <hide4653@gmail.com>
Date:   Mon,  5 Oct 2020 20:51:28 -0400

added npm packages

Diffstat:
Anode_modules/.bin/esparse | 2++
Anode_modules/.bin/esvalidate | 2++
Anode_modules/.bin/js-yaml | 2++
Anode_modules/.bin/marked | 2++
Anode_modules/argparse/CHANGELOG.md | 185+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/LICENSE | 21+++++++++++++++++++++
Anode_modules/argparse/README.md | 257+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/index.js | 3+++
Anode_modules/argparse/lib/action.js | 146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/append.js | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/append/constant.js | 47+++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/count.js | 40++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/help.js | 47+++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/store.js | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/store/constant.js | 43+++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/store/false.js | 27+++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/store/true.js | 26++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/subparsers.js | 149+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action/version.js | 47+++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/action_container.js | 482+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/argparse.js | 14++++++++++++++
Anode_modules/argparse/lib/argument/error.js | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/argument/exclusive.js | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/argument/group.js | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/argument_parser.js | 1161+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/const.js | 21+++++++++++++++++++++
Anode_modules/argparse/lib/help/added_formatters.js | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/help/formatter.js | 795+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/namespace.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/lib/utils.js | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/argparse/package.json | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/esprima/ChangeLog | 235+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/esprima/LICENSE.BSD | 21+++++++++++++++++++++
Anode_modules/esprima/README.md | 47+++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/esprima/bin/esparse.js | 139+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/esprima/bin/esvalidate.js | 236+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/esprima/dist/esprima.js | 6710+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/esprima/package.json | 137+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/front-matter/LICENSE | 10++++++++++
Anode_modules/front-matter/README.md | 162+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/front-matter/index.d.ts | 23+++++++++++++++++++++++
Anode_modules/front-matter/index.js | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/front-matter/package.json | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/LICENSE | 29+++++++++++++++++++++++++++++
Anode_modules/highlight.js/README.md | 313+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/core.js | 2198+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/highlight.js | 2++
Anode_modules/highlight.js/lib/index.js | 195+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/1c.js | 521+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/abnf.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/accesslog.js | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/actionscript.js | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ada.js | 185+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/angelscript.js | 117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/apache.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/applescript.js | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/arcade.js | 148+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/arduino.js | 112+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/armasm.js | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/asciidoc.js | 200+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/aspectj.js | 155+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/autohotkey.js | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/autoit.js | 146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/avrasm.js | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/awk.js | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/axapta.js | 41+++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/bash.js | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/basic.js | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/bnf.js | 36++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/brainfuck.js | 46++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/c-like.js | 242+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/c.js | 23+++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/cal.js | 90+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/capnproto.js | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ceylon.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/clean.js | 37+++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/clojure-repl.js | 27+++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/clojure.js | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/cmake.js | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/coffeescript.js | 317+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/coq.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/cos.js | 134+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/cpp.js | 18++++++++++++++++++
Anode_modules/highlight.js/lib/languages/crmsh.js | 105+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/crystal.js | 197+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/csharp.js | 227+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/csp.js | 34++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/css.js | 134+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/d.js | 270+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dart.js | 178+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/delphi.js | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/diff.js | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/django.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dns.js | 39+++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dockerfile.js | 33+++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dos.js | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dsconfig.js | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dts.js | 134+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/dust.js | 43+++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ebnf.js | 48++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/elixir.js | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/elm.js | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/erb.js | 27+++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/erlang-repl.js | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/erlang.js | 157+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/excel.js | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/fix.js | 36++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/flix.js | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/fortran.js | 107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/fsharp.js | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/gams.js | 165+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/gauss.js | 300+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/gcode.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/gherkin.js | 46++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/glsl.js | 127+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/gml.js | 883+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/go.js | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/golo.js | 32++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/gradle.js | 44++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/groovy.js | 159+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/haml.js | 117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/handlebars.js | 270+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/haskell.js | 132+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/haxe.js | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/hsp.js | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/htmlbars.js | 298+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/http.js | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/hy.js | 107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/inform7.js | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ini.js | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/irpf90.js | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/isbl.js | 3180+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/java.js | 192+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/javascript.js | 454+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/javascript.old.js | 8++++++++
Anode_modules/highlight.js/lib/languages/jboss-cli.js | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/json.js | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/julia-repl.js | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/julia.js | 173+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/kotlin.js | 226+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/lasso.js | 171+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/latex.js | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ldif.js | 31+++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/leaf.js | 48++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/less.js | 150+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/lisp.js | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/livecodeserver.js | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/livescript.js | 335+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/llvm.js | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/lsl.js | 94+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/lua.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/makefile.js | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/markdown.js | 157+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/mathematica.js | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/matlab.js | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/maxima.js | 415+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/mel.js | 235+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/mercury.js | 93+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/mipsasm.js | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/mizar.js | 29+++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/mojolicious.js | 35+++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/monkey.js | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/moonscript.js | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/n1ql.js | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/nginx.js | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/nim.js | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/nix.js | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/nsis.js | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/objectivec.js | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ocaml.js | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/openscad.js | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/oxygene.js | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/parser3.js | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/perl.js | 168+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/pf.js | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/pgsql.js | 506+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/php-template.js | 32++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/php.js | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/plaintext.js | 16++++++++++++++++
Anode_modules/highlight.js/lib/languages/pony.js | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/powershell.js | 243+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/processing.js | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/profile.js | 38++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/prolog.js | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/properties.js | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/protobuf.js | 47+++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/puppet.js | 124+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/purebasic.js | 95+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/python-repl.js | 31+++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/python.js | 139+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/q.js | 32++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/qml.js | 181+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/r.js | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/reasonml.js | 309+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/rib.js | 37+++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/roboconf.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/routeros.js | 156+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/rsl.js | 46++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ruby.js | 196+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/ruleslanguage.js | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/rust.js | 118+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/sas.js | 134+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/scala.js | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/scheme.js | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/scilab.js | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/scss.js | 124+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/shell.js | 24++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/smali.js | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/smalltalk.js | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/sml.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/sqf.js | 438+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/sql.js | 170+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/stan.js | 230+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/stata.js | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/step21.js | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/stylus.js | 455+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/subunit.js | 42++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/swift.js | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/taggerscript.js | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/tap.js | 46++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/tcl.js | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/thrift.js | 45+++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/tp.js | 93+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/twig.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/typescript.js | 368+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/vala.js | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/vbnet.js | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/vbscript-html.js | 23+++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/vbscript.js | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/verilog.js | 110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/vhdl.js | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/vim.js | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/x86asm.js | 146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/xl.js | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/xml.js | 141+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/xquery.js | 174+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/yaml.js | 176+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/lib/languages/zephir.js | 119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/package.json | 1213+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/a11y-dark.scss | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/a11y-light.scss | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/agate.scss | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/an-old-hope.scss | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/androidstudio.scss | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/arduino-light.scss | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/arta.scss | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/ascetic.scss | 45+++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-cave-dark.scss | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-cave-light.scss | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-dune-dark.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-dune-light.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-estuary-dark.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-estuary-light.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-forest-dark.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-forest-light.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-heath-dark.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-heath-light.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-lakeside-dark.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-lakeside-light.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-plateau-dark.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-plateau-light.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-savanna-dark.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-savanna-light.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-seaside-dark.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-seaside-light.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-sulphurpool-dark.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atelier-sulphurpool-light.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atom-one-dark-reasonable.scss | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atom-one-dark.scss | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/atom-one-light.scss | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/brown-paper.scss | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/brown-papersq.png | 0
Anode_modules/highlight.js/scss/codepen-embed.scss | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/color-brewer.scss | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/darcula.scss | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/dark.scss | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/default.scss | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/docco.scss | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/dracula.scss | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/far.scss | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/foundation.scss | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/github-gist.scss | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/github.scss | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/gml.scss | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/googlecode.scss | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/gradient-dark.scss | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/gradient-light.scss | 130+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/grayscale.scss | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/gruvbox-dark.scss | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/gruvbox-light.scss | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/hopscotch.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/hybrid.scss | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/idea.scss | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/ir-black.scss | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/isbl-editor-dark.scss | 112+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/isbl-editor-light.scss | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/kimbie.dark.scss | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/kimbie.light.scss | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/lightfair.scss | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/lioshi.scss | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/magula.scss | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/mono-blue.scss | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/monokai-sublime.scss | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/monokai.scss | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/night-owl.scss | 182+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/nnfx-dark.scss | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/nnfx.scss | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/nord.scss | 309+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/obsidian.scss | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/ocean.scss | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/paraiso-dark.scss | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/paraiso-light.scss | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/pojoaque.jpg | 0
Anode_modules/highlight.js/scss/pojoaque.scss | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/purebasic.scss | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/qtcreator_dark.scss | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/qtcreator_light.scss | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/railscasts.scss | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/rainbow.scss | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/routeros.scss | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/school-book.png | 0
Anode_modules/highlight.js/scss/school-book.scss | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/shades-of-purple.scss | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/solarized-dark.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/solarized-light.scss | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/srcery.scss | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/sunburst.scss | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/tomorrow-night-blue.scss | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/tomorrow-night-bright.scss | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/tomorrow-night-eighties.scss | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/tomorrow-night.scss | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/tomorrow.scss | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/vs.scss | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/vs2015.scss | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/xcode.scss | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/xt256.scss | 92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/scss/zenburn.scss | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/a11y-dark.css | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/a11y-light.css | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/agate.css | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/an-old-hope.css | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/androidstudio.css | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/arduino-light.css | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/arta.css | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/ascetic.css | 45+++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-cave-dark.css | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-cave-light.css | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-dune-dark.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-dune-light.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-estuary-dark.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-estuary-light.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-forest-dark.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-forest-light.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-heath-dark.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-heath-light.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-lakeside-dark.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-lakeside-light.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-plateau-dark.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-plateau-light.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-savanna-dark.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-savanna-light.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-seaside-dark.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-seaside-light.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-sulphurpool-dark.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atelier-sulphurpool-light.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atom-one-dark-reasonable.css | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atom-one-dark.css | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/atom-one-light.css | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/brown-paper.css | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/brown-papersq.png | 0
Anode_modules/highlight.js/styles/codepen-embed.css | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/color-brewer.css | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/darcula.css | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/dark.css | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/default.css | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/docco.css | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/dracula.css | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/far.css | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/foundation.css | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/github-gist.css | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/github.css | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/gml.css | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/googlecode.css | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/gradient-dark.css | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/gradient-light.css | 130+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/grayscale.css | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/gruvbox-dark.css | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/gruvbox-light.css | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/hopscotch.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/hybrid.css | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/idea.css | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/ir-black.css | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/isbl-editor-dark.css | 112+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/isbl-editor-light.css | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/kimbie.dark.css | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/kimbie.light.css | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/lightfair.css | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/lioshi.css | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/magula.css | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/mono-blue.css | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/monokai-sublime.css | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/monokai.css | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/night-owl.css | 182+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/nnfx-dark.css | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/nnfx.css | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/nord.css | 309+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/obsidian.css | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/ocean.css | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/paraiso-dark.css | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/paraiso-light.css | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/pojoaque.css | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/pojoaque.jpg | 0
Anode_modules/highlight.js/styles/purebasic.css | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/qtcreator_dark.css | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/qtcreator_light.css | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/railscasts.css | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/rainbow.css | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/routeros.css | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/school-book.css | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/school-book.png | 0
Anode_modules/highlight.js/styles/shades-of-purple.css | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/solarized-dark.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/solarized-light.css | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/srcery.css | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/sunburst.css | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/tomorrow-night-blue.css | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/tomorrow-night-bright.css | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/tomorrow-night-eighties.css | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/tomorrow-night.css | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/tomorrow.css | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/vs.css | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/vs2015.css | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/xcode.css | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/xt256.css | 92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/styles/zenburn.css | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/highlight.js/types/index.d.ts | 235+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/CHANGELOG.md | 551+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/LICENSE | 21+++++++++++++++++++++
Anode_modules/js-yaml/README.md | 299+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/bin/js-yaml.js | 132+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/dist/js-yaml.js | 3989+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/dist/js-yaml.min.js | 1+
Anode_modules/js-yaml/index.js | 7+++++++
Anode_modules/js-yaml/lib/js-yaml.js | 39+++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/common.js | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/dumper.js | 850+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/exception.js | 43+++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/loader.js | 1644+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/mark.js | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/schema.js | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/schema/core.js | 18++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/schema/default_full.js | 25+++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/schema/default_safe.js | 28++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/schema/failsafe.js | 17+++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/schema/json.js | 25+++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type.js | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/binary.js | 138+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/bool.js | 35+++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/float.js | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/int.js | 173+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/js/function.js | 93+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/js/regexp.js | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/js/undefined.js | 28++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/map.js | 8++++++++
Anode_modules/js-yaml/lib/js-yaml/type/merge.js | 12++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/null.js | 34++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/omap.js | 44++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/pairs.js | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/seq.js | 8++++++++
Anode_modules/js-yaml/lib/js-yaml/type/set.js | 29+++++++++++++++++++++++++++++
Anode_modules/js-yaml/lib/js-yaml/type/str.js | 8++++++++
Anode_modules/js-yaml/lib/js-yaml/type/timestamp.js | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/js-yaml/package.json | 95+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/LICENSE.md | 43+++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/README.md | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/bin/marked | 215+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/lib/marked.esm.js | 2539+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/lib/marked.js | 2678+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/man/marked.1 | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/man/marked.1.txt | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/marked.min.js | 7+++++++
Anode_modules/marked/package.json | 117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/Lexer.js | 463+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/Parser.js | 263+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/Renderer.js | 164+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/Slugger.js | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/TextRenderer.js | 42++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/Tokenizer.js | 659+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/defaults.js | 32++++++++++++++++++++++++++++++++
Anode_modules/marked/src/helpers.js | 243+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/marked.js | 267+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/marked/src/rules.js | 339+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/sprintf-js/.npmignore | 2++
Anode_modules/sprintf-js/LICENSE | 24++++++++++++++++++++++++
Anode_modules/sprintf-js/README.md | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/sprintf-js/bower.json | 14++++++++++++++
Anode_modules/sprintf-js/demo/angular.html | 20++++++++++++++++++++
Anode_modules/sprintf-js/dist/angular-sprintf.min.js | 5+++++
Anode_modules/sprintf-js/dist/angular-sprintf.min.js.map | 2++
Anode_modules/sprintf-js/dist/angular-sprintf.min.map | 2++
Anode_modules/sprintf-js/dist/sprintf.min.js | 5+++++
Anode_modules/sprintf-js/dist/sprintf.min.js.map | 2++
Anode_modules/sprintf-js/dist/sprintf.min.map | 2++
Anode_modules/sprintf-js/gruntfile.js | 36++++++++++++++++++++++++++++++++++++
Anode_modules/sprintf-js/package.json | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/sprintf-js/src/angular-sprintf.js | 18++++++++++++++++++
Anode_modules/sprintf-js/src/sprintf.js | 208+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anode_modules/sprintf-js/test/test.js | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackage-lock.json | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpackage.json | 7++++++-
510 files changed, 76542 insertions(+), 1 deletion(-)

diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse @@ -0,0 +1 @@ +../esprima/bin/esparse.js+ \ No newline at end of file diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate @@ -0,0 +1 @@ +../esprima/bin/esvalidate.js+ \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js+ \ No newline at end of file diff --git a/node_modules/.bin/marked b/node_modules/.bin/marked @@ -0,0 +1 @@ +../marked/bin/marked+ \ No newline at end of file diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,185 @@ +1.0.10 / 2018-02-15 +------------------ + +- Use .concat instead of + for arrays, #122. + + +1.0.9 / 2016-09-29 +------------------ + +- Rerelease after 1.0.8 - deps cleanup. + + +1.0.8 / 2016-09-29 +------------------ + +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +1.0.7 / 2016-03-17 +------------------ + +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +1.0.6 / 2016-02-06 +------------------ + +- Maintenance: moved to eslint & updated CS. + + +1.0.5 / 2016-02-05 +------------------ + +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +1.0.4 / 2016-01-17 +------------------ + +- Maintenance: lodash update to 4.0.0. + + +1.0.3 / 2015-10-27 +------------------ + +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +1.0.2 / 2015-03-22 +------------------ + +- Relaxed lodash version dependency. + + +1.0.1 / 2015-02-20 +------------------ + +- Changed dependencies to be compatible with ancient nodejs. + + +1.0.0 / 2015-02-19 +------------------ + +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +0.1.16 / 2013-12-01 +------------------- + +- Maintenance release. Updated dependencies and docs. + + +0.1.15 / 2013-05-13 +------------------- + +- Fixed #55, @trebor89 + + +0.1.14 / 2013-05-12 +------------------- + +- Fixed #62, @maxtaco + + +0.1.13 / 2013-04-08 +------------------- + +- Added `.npmignore` to reduce package size + + +0.1.12 / 2013-02-10 +------------------- + +- Fixed conflictHandler (#46), @hpaulj + + +0.1.11 / 2013-02-07 +------------------- + +- Multiple bugfixes, @hpaulj +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + + +0.1.10 / 2012-12-30 +------------------- + +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +0.1.9 / 2012-12-27 +------------------ + +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Imrove negative argument parsing, thanks to @hpaulj + + +0.1.8 / 2012-12-01 +------------------ + +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +0.1.7 / 2012-10-14 +------------------ + +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +0.1.6 / 2012-09-09 +------------------ + +- Fixed check for conflict of options (thanks to @tomxtobin) + + +0.1.5 / 2012-09-03 +------------------ + +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +0.1.4 / 2012-07-30 +------------------ + +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +0.1.3 / 2012-06-27 +------------------ + +- Fixed formatter api name: Formatter -> HelpFormatter + + +0.1.2 / 2012-05-29 +------------------ + +- Added basic tests +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + + +0.1.1 / 2012-05-23 +------------------ + +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +0.1.0 / 2012-05-16 +------------------ + +- First release. diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE @@ -0,0 +1,21 @@ +(The MIT License) + +Copyright (C) 2012 by Vitaly Puzrin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/argparse/README.md b/node_modules/argparse/README.md @@ -0,0 +1,257 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js. Javascript port of python's +[argparse](http://docs.python.org/dev/library/argparse.html) module +(original version 3.2). That's a full port, except some very rare options, +recorded in issue tracker. + +**NB. Difference with original.** + +- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). +- Use `defaultValue` instead of `default`. +- Use `argparse.Const.REMAINDER` instead of `argparse.REMAINDER`, and + similarly for constant values `OPTIONAL`, `ZERO_OR_MORE`, and `ONE_OR_MORE` + (aliases for `nargs` values `'?'`, `'*'`, `'+'`, respectively), and + `SUPPRESS`. + + +Example +======= + +test.js file: + +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse example' +}); +parser.addArgument( + [ '-f', '--foo' ], + { + help: 'foo bar' + } +); +parser.addArgument( + [ '-b', '--bar' ], + { + help: 'bar foo' + } +); +parser.addArgument( + '--baz', + { + help: 'baz bar' + } +); +var args = parser.parseArgs(); +console.dir(args); +``` + +Display help: + +``` +$ ./test.js -h +usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + +More [examples](https://github.com/nodeca/argparse/tree/master/examples). + + +ArgumentParser objects +====================== + +``` +new ArgumentParser({parameters hash}); +``` + +Creates a new ArgumentParser object. + +**Supported params:** + +- ```description``` - Text to display before the argument help. +- ```epilog``` - Text to display after the argument help. +- ```addHelp``` - Add a -h/–help option to the parser. (default: true) +- ```argumentDefault``` - Set the global default value for arguments. (default: null) +- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. +- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) +- ```formatterClass``` - A class for customizing the help output. +- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) +- ```usage``` - The string describing the program usage (default: generated) +- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. + +**Not supported yet** + +- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. + + +Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) + + +addArgument() method +==================== + +``` +ArgumentParser.addArgument(name or flag or [name] or [flags...], {options}) +``` + +Defines how a single command-line argument should be parsed. + +- ```name or flag or [name] or [flags...]``` - Either a positional name + (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array + of a single positional name (e.g., `['foo']`), or an array of options + (e.g., `['-f', '--foo']`). + +Options: + +- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. +- ```nargs```- The number of command-line arguments that should be consumed. +- ```constant``` - A constant value required by some action and nargs selections. +- ```defaultValue``` - The value produced if the argument is absent from the command line. +- ```type``` - The type to which the command-line argument should be converted. +- ```choices``` - A container of the allowable values for the argument. +- ```required``` - Whether or not the command-line option may be omitted (optionals only). +- ```help``` - A brief description of what the argument does. +- ```metavar``` - A name for the argument in usage messages. +- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). + +Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) + + +Action (some details) +================ + +ArgumentParser objects associate command-line arguments with actions. +These actions can do just about anything with the command-line arguments associated +with them, though most actions simply add an attribute to the object returned by +parseArgs(). The action keyword argument specifies how the command-line arguments +should be handled. The supported actions are: + +- ```store``` - Just stores the argument’s value. This is the default action. +- ```storeConst``` - Stores value, specified by the const keyword argument. + (Note that the const keyword argument defaults to the rather unhelpful None.) + The 'storeConst' action is most commonly used with optional arguments, that + specify some sort of flag. +- ```storeTrue``` and ```storeFalse``` - Stores values True and False + respectively. These are special cases of 'storeConst'. +- ```append``` - Stores a list, and appends each argument value to the list. + This is useful to allow an option to be specified multiple times. +- ```appendConst``` - Stores a list, and appends value, specified by the + const keyword argument to the list. (Note, that the const keyword argument defaults + is None.) The 'appendConst' action is typically used when multiple arguments need + to store constants to the same list. +- ```count``` - Counts the number of times a keyword argument occurs. For example, + used for increasing verbosity levels. +- ```help``` - Prints a complete help message for all the options in the current + parser and then exits. By default a help action is automatically added to the parser. + See ArgumentParser for details of how the output is created. +- ```version``` - Prints version information and exit. Expects a `version=` + keyword argument in the addArgument() call. + +Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) + + +Sub-commands +============ + +ArgumentParser.addSubparsers() + +Many programs split their functionality into a number of sub-commands, for +example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, +and `svn commit`. Splitting up functionality this way can be a particularly good +idea when a program performs several different functions which require different +kinds of command-line arguments. `ArgumentParser` supports creation of such +sub-commands with `addSubparsers()` method. The `addSubparsers()` method is +normally called with no arguments and returns an special action object. +This object has a single method `addParser()`, which takes a command name and +any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object +that can be modified as usual. + +Example: + +sub_commands.js +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse examples: sub-commands', +}); + +var subparsers = parser.addSubparsers({ + title:'subcommands', + dest:"subcommand_name" +}); + +var bar = subparsers.addParser('c1', {addHelp:true}); +bar.addArgument( + [ '-f', '--foo' ], + { + action: 'store', + help: 'foo3 bar3' + } +); +var bar = subparsers.addParser( + 'c2', + {aliases:['co'], addHelp:true} +); +bar.addArgument( + [ '-b', '--bar' ], + { + action: 'store', + type: 'int', + help: 'foo3 bar3' + } +); + +var args = parser.parseArgs(); +console.dir(args); + +``` + +Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) + + +Contributors +============ + +- [Eugene Shkuropat](https://github.com/shkuropat) +- [Paul Jacobson](https://github.com/hpaulj) + +[others](https://github.com/nodeca/argparse/graphs/contributors) + +License +======= + +Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). +Released under the MIT license. See +[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. + + diff --git a/node_modules/argparse/index.js b/node_modules/argparse/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/argparse'); diff --git a/node_modules/argparse/lib/action.js b/node_modules/argparse/lib/action.js @@ -0,0 +1,146 @@ +/** + * class Action + * + * Base class for all actions + * Do not call in your code, use this class only for inherits your own action + * + * Information about how to convert command line strings to Javascript objects. + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the command + * line. The keyword arguments to the Action constructor are also all attributes + * of Action instances. + * + * ##### Allowed keywords: + * + * - `store` + * - `storeConstant` + * - `storeTrue` + * - `storeFalse` + * - `append` + * - `appendConstant` + * - `count` + * - `help` + * - `version` + * + * Information about action options see [[Action.new]] + * + * See also [original guide](http://docs.python.org/dev/library/argparse.html#action) + * + **/ + +'use strict'; + + +// Constants +var c = require('./const'); + + +/** + * new Action(options) + * + * Base class for all actions. Used only for inherits + * + * + * ##### Options: + * + * - `optionStrings` A list of command-line option strings for the action. + * - `dest` Attribute to hold the created object(s) + * - `nargs` The number of command-line arguments that should be consumed. + * By default, one argument will be consumed and a single value will be + * produced. + * - `constant` Default value for an action with no value. + * - `defaultValue` The value to be produced if the option is not specified. + * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If + * None, 'string'. + * - `choices` The choices available. + * - `required` True if the action must always be specified at the command + * line. + * - `help` The help describing the argument. + * - `metavar` The name to be used for the option's argument with the help + * string. If None, the 'dest' value will be used as the name. + * + * ##### nargs supported values: + * + * - `N` (an integer) consumes N arguments (and produces a list) + * - `?` consumes zero or one arguments + * - `*` consumes zero or more arguments (and produces a list) + * - `+` consumes one or more arguments (and produces a list) + * + * Note: that the difference between the default and nargs=1 is that with the + * default, a single value will be produced, while with nargs=1, a list + * containing a single value will be produced. + **/ +var Action = module.exports = function Action(options) { + options = options || {}; + this.optionStrings = options.optionStrings || []; + this.dest = options.dest; + this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null; + this.constant = typeof options.constant !== 'undefined' ? options.constant : null; + this.defaultValue = options.defaultValue; + this.type = typeof options.type !== 'undefined' ? options.type : null; + this.choices = typeof options.choices !== 'undefined' ? options.choices : null; + this.required = typeof options.required !== 'undefined' ? options.required : false; + this.help = typeof options.help !== 'undefined' ? options.help : null; + this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null; + + if (!(this.optionStrings instanceof Array)) { + throw new Error('optionStrings should be an array'); + } + if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') { + throw new Error('required should be a boolean'); + } +}; + +/** + * Action#getName -> String + * + * Tells action name + **/ +Action.prototype.getName = function () { + if (this.optionStrings.length > 0) { + return this.optionStrings.join('/'); + } else if (this.metavar !== null && this.metavar !== c.SUPPRESS) { + return this.metavar; + } else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) { + return this.dest; + } + return null; +}; + +/** + * Action#isOptional -> Boolean + * + * Return true if optional + **/ +Action.prototype.isOptional = function () { + return !this.isPositional(); +}; + +/** + * Action#isPositional -> Boolean + * + * Return true if positional + **/ +Action.prototype.isPositional = function () { + return (this.optionStrings.length === 0); +}; + +/** + * Action#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Should be implemented in inherited classes + * + * ##### Example + * + * ActionCount.prototype.call = function (parser, namespace, values, optionString) { + * namespace.set(this.dest, (namespace[this.dest] || 0) + 1); + * }; + * + **/ +Action.prototype.call = function () { + throw new Error('.call() not defined');// Not Implemented error +}; diff --git a/node_modules/argparse/lib/action/append.js b/node_modules/argparse/lib/action/append.js @@ -0,0 +1,53 @@ +/*:nodoc:* + * class ActionAppend + * + * This action stores a list, and appends each argument value to the list. + * This is useful to allow an option to be specified multiple times. + * This class inherided from [[Action]] + * + **/ + +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +/*:nodoc:* + * new ActionAppend(options) + * - options (object): options hash see [[Action.new]] + * + * Note: options.nargs should be optional for constants + * and more then zero for other + **/ +var ActionAppend = module.exports = function ActionAppend(options) { + options = options || {}; + if (this.nargs <= 0) { + throw new Error('nargs for append actions must be > 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate'); + } + if (!!this.constant && this.nargs !== c.OPTIONAL) { + throw new Error('nargs must be OPTIONAL to supply const'); + } + Action.call(this, options); +}; +util.inherits(ActionAppend, Action); + +/*:nodoc:* + * ActionAppend#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionAppend.prototype.call = function (parser, namespace, values) { + var items = (namespace[this.dest] || []).slice(); + items.push(values); + namespace.set(this.dest, items); +}; diff --git a/node_modules/argparse/lib/action/append/constant.js b/node_modules/argparse/lib/action/append/constant.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionAppendConstant + * + * This stores a list, and appends the value specified by + * the const keyword argument to the list. + * (Note that the const keyword argument defaults to null.) + * The 'appendConst' action is typically useful when multiple + * arguments need to store constants to the same list. + * + * This class inherited from [[Action]] + **/ + +'use strict'; + +var util = require('util'); + +var Action = require('../../action'); + +/*:nodoc:* + * new ActionAppendConstant(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { + options = options || {}; + options.nargs = 0; + if (typeof options.constant === 'undefined') { + throw new Error('constant option is required for appendAction'); + } + Action.call(this, options); +}; +util.inherits(ActionAppendConstant, Action); + +/*:nodoc:* + * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionAppendConstant.prototype.call = function (parser, namespace) { + var items = [].concat(namespace[this.dest] || []); + items.push(this.constant); + namespace.set(this.dest, items); +}; diff --git a/node_modules/argparse/lib/action/count.js b/node_modules/argparse/lib/action/count.js @@ -0,0 +1,40 @@ +/*:nodoc:* + * class ActionCount + * + * This counts the number of times a keyword argument occurs. + * For example, this is useful for increasing verbosity levels + * + * This class inherided from [[Action]] + * + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +/*:nodoc:* + * new ActionCount(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionCount = module.exports = function ActionCount(options) { + options = options || {}; + options.nargs = 0; + + Action.call(this, options); +}; +util.inherits(ActionCount, Action); + +/*:nodoc:* + * ActionCount#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionCount.prototype.call = function (parser, namespace) { + namespace.set(this.dest, (namespace[this.dest] || 0) + 1); +}; diff --git a/node_modules/argparse/lib/action/help.js b/node_modules/argparse/lib/action/help.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionHelp + * + * Support action for printing help + * This class inherided from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +/*:nodoc:* + * new ActionHelp(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionHelp = module.exports = function ActionHelp(options) { + options = options || {}; + if (options.defaultValue !== null) { + options.defaultValue = options.defaultValue; + } else { + options.defaultValue = c.SUPPRESS; + } + options.dest = (options.dest !== null ? options.dest : c.SUPPRESS); + options.nargs = 0; + Action.call(this, options); + +}; +util.inherits(ActionHelp, Action); + +/*:nodoc:* + * ActionHelp#call(parser, namespace, values, optionString) + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Print help and exit + **/ +ActionHelp.prototype.call = function (parser) { + parser.printHelp(); + parser.exit(); +}; diff --git a/node_modules/argparse/lib/action/store.js b/node_modules/argparse/lib/action/store.js @@ -0,0 +1,50 @@ +/*:nodoc:* + * class ActionStore + * + * This action just stores the argument’s value. This is the default action. + * + * This class inherited from [[Action]] + * + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + + +/*:nodoc:* + * new ActionStore(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStore = module.exports = function ActionStore(options) { + options = options || {}; + if (this.nargs <= 0) { + throw new Error('nargs for store actions must be > 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate'); + + } + if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) { + throw new Error('nargs must be OPTIONAL to supply const'); + } + Action.call(this, options); +}; +util.inherits(ActionStore, Action); + +/*:nodoc:* + * ActionStore#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionStore.prototype.call = function (parser, namespace, values) { + namespace.set(this.dest, values); +}; diff --git a/node_modules/argparse/lib/action/store/constant.js b/node_modules/argparse/lib/action/store/constant.js @@ -0,0 +1,43 @@ +/*:nodoc:* + * class ActionStoreConstant + * + * This action stores the value specified by the const keyword argument. + * (Note that the const keyword argument defaults to the rather unhelpful null.) + * The 'store_const' action is most commonly used with optional + * arguments that specify some sort of flag. + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../../action'); + +/*:nodoc:* + * new ActionStoreConstant(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { + options = options || {}; + options.nargs = 0; + if (typeof options.constant === 'undefined') { + throw new Error('constant option is required for storeAction'); + } + Action.call(this, options); +}; +util.inherits(ActionStoreConstant, Action); + +/*:nodoc:* + * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionStoreConstant.prototype.call = function (parser, namespace) { + namespace.set(this.dest, this.constant); +}; diff --git a/node_modules/argparse/lib/action/store/false.js b/node_modules/argparse/lib/action/store/false.js @@ -0,0 +1,27 @@ +/*:nodoc:* + * class ActionStoreFalse + * + * This action store the values False respectively. + * This is special cases of 'storeConst' + * + * This class inherited from [[Action]] + **/ + +'use strict'; + +var util = require('util'); + +var ActionStoreConstant = require('./constant'); + +/*:nodoc:* + * new ActionStoreFalse(options) + * - options (object): hash of options see [[Action.new]] + * + **/ +var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { + options = options || {}; + options.constant = false; + options.defaultValue = options.defaultValue !== null ? options.defaultValue : true; + ActionStoreConstant.call(this, options); +}; +util.inherits(ActionStoreFalse, ActionStoreConstant); diff --git a/node_modules/argparse/lib/action/store/true.js b/node_modules/argparse/lib/action/store/true.js @@ -0,0 +1,26 @@ +/*:nodoc:* + * class ActionStoreTrue + * + * This action store the values True respectively. + * This isspecial cases of 'storeConst' + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var ActionStoreConstant = require('./constant'); + +/*:nodoc:* + * new ActionStoreTrue(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { + options = options || {}; + options.constant = true; + options.defaultValue = options.defaultValue !== null ? options.defaultValue : false; + ActionStoreConstant.call(this, options); +}; +util.inherits(ActionStoreTrue, ActionStoreConstant); diff --git a/node_modules/argparse/lib/action/subparsers.js b/node_modules/argparse/lib/action/subparsers.js @@ -0,0 +1,149 @@ +/** internal + * class ActionSubparsers + * + * Support the creation of such sub-commands with the addSubparsers() + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); +var format = require('util').format; + + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +// Errors +var argumentErrorHelper = require('../argument/error'); + + +/*:nodoc:* + * new ChoicesPseudoAction(name, help) + * + * Create pseudo action for correct help text + * + **/ +function ChoicesPseudoAction(name, help) { + var options = { + optionStrings: [], + dest: name, + help: help + }; + + Action.call(this, options); +} + +util.inherits(ChoicesPseudoAction, Action); + +/** + * new ActionSubparsers(options) + * - options (object): options hash see [[Action.new]] + * + **/ +function ActionSubparsers(options) { + options = options || {}; + options.dest = options.dest || c.SUPPRESS; + options.nargs = c.PARSER; + + this.debug = (options.debug === true); + + this._progPrefix = options.prog; + this._parserClass = options.parserClass; + this._nameParserMap = {}; + this._choicesActions = []; + + options.choices = this._nameParserMap; + Action.call(this, options); +} + +util.inherits(ActionSubparsers, Action); + +/*:nodoc:* + * ActionSubparsers#addParser(name, options) -> ArgumentParser + * - name (string): sub-command name + * - options (object): see [[ArgumentParser.new]] + * + * Note: + * addParser supports an additional aliases option, + * which allows multiple strings to refer to the same subparser. + * This example, like svn, aliases co as a shorthand for checkout + * + **/ +ActionSubparsers.prototype.addParser = function (name, options) { + var parser; + + var self = this; + + options = options || {}; + + options.debug = (this.debug === true); + + // set program from the existing prefix + if (!options.prog) { + options.prog = this._progPrefix + ' ' + name; + } + + var aliases = options.aliases || []; + + // create a pseudo-action to hold the choice help + if (!!options.help || typeof options.help === 'string') { + var help = options.help; + delete options.help; + + var choiceAction = new ChoicesPseudoAction(name, help); + this._choicesActions.push(choiceAction); + } + + // create the parser and add it to the map + parser = new this._parserClass(options); + this._nameParserMap[name] = parser; + + // make parser available under aliases also + aliases.forEach(function (alias) { + self._nameParserMap[alias] = parser; + }); + + return parser; +}; + +ActionSubparsers.prototype._getSubactions = function () { + return this._choicesActions; +}; + +/*:nodoc:* + * ActionSubparsers#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Parse input aguments + **/ +ActionSubparsers.prototype.call = function (parser, namespace, values) { + var parserName = values[0]; + var argStrings = values.slice(1); + + // set the parser name if requested + if (this.dest !== c.SUPPRESS) { + namespace[this.dest] = parserName; + } + + // select the parser + if (this._nameParserMap[parserName]) { + parser = this._nameParserMap[parserName]; + } else { + throw argumentErrorHelper(format( + 'Unknown parser "%s" (choices: [%s]).', + parserName, + Object.keys(this._nameParserMap).join(', ') + )); + } + + // parse all the remaining options into the namespace + parser.parseArgs(argStrings, namespace); +}; + +module.exports = ActionSubparsers; diff --git a/node_modules/argparse/lib/action/version.js b/node_modules/argparse/lib/action/version.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionVersion + * + * Support action for printing program version + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// +// Constants +// +var c = require('../const'); + +/*:nodoc:* + * new ActionVersion(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionVersion = module.exports = function ActionVersion(options) { + options = options || {}; + options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS); + options.dest = (options.dest || c.SUPPRESS); + options.nargs = 0; + this.version = options.version; + Action.call(this, options); +}; +util.inherits(ActionVersion, Action); + +/*:nodoc:* + * ActionVersion#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Print version and exit + **/ +ActionVersion.prototype.call = function (parser) { + var version = this.version || parser.version; + var formatter = parser._getFormatter(); + formatter.addText(version); + parser.exit(0, formatter.formatHelp()); +}; diff --git a/node_modules/argparse/lib/action_container.js b/node_modules/argparse/lib/action_container.js @@ -0,0 +1,482 @@ +/** internal + * class ActionContainer + * + * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] + **/ + +'use strict'; + +var format = require('util').format; + +// Constants +var c = require('./const'); + +var $$ = require('./utils'); + +//Actions +var ActionHelp = require('./action/help'); +var ActionAppend = require('./action/append'); +var ActionAppendConstant = require('./action/append/constant'); +var ActionCount = require('./action/count'); +var ActionStore = require('./action/store'); +var ActionStoreConstant = require('./action/store/constant'); +var ActionStoreTrue = require('./action/store/true'); +var ActionStoreFalse = require('./action/store/false'); +var ActionVersion = require('./action/version'); +var ActionSubparsers = require('./action/subparsers'); + +// Errors +var argumentErrorHelper = require('./argument/error'); + +/** + * new ActionContainer(options) + * + * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] + * + * ##### Options: + * + * - `description` -- A description of what the program does + * - `prefixChars` -- Characters that prefix optional arguments + * - `argumentDefault` -- The default value for all arguments + * - `conflictHandler` -- The conflict handler to use for duplicate arguments + **/ +var ActionContainer = module.exports = function ActionContainer(options) { + options = options || {}; + + this.description = options.description; + this.argumentDefault = options.argumentDefault; + this.prefixChars = options.prefixChars || ''; + this.conflictHandler = options.conflictHandler; + + // set up registries + this._registries = {}; + + // register actions + this.register('action', null, ActionStore); + this.register('action', 'store', ActionStore); + this.register('action', 'storeConst', ActionStoreConstant); + this.register('action', 'storeTrue', ActionStoreTrue); + this.register('action', 'storeFalse', ActionStoreFalse); + this.register('action', 'append', ActionAppend); + this.register('action', 'appendConst', ActionAppendConstant); + this.register('action', 'count', ActionCount); + this.register('action', 'help', ActionHelp); + this.register('action', 'version', ActionVersion); + this.register('action', 'parsers', ActionSubparsers); + + // raise an exception if the conflict handler is invalid + this._getHandler(); + + // action storage + this._actions = []; + this._optionStringActions = {}; + + // groups + this._actionGroups = []; + this._mutuallyExclusiveGroups = []; + + // defaults storage + this._defaults = {}; + + // determines whether an "option" looks like a negative number + // -1, -1.5 -5e+4 + this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$'); + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._hasNegativeNumberOptionals = []; +}; + +// Groups must be required, then ActionContainer already defined +var ArgumentGroup = require('./argument/group'); +var MutuallyExclusiveGroup = require('./argument/exclusive'); + +// +// Registration methods +// + +/** + * ActionContainer#register(registryName, value, object) -> Void + * - registryName (String) : object type action|type + * - value (string) : keyword + * - object (Object|Function) : handler + * + * Register handlers + **/ +ActionContainer.prototype.register = function (registryName, value, object) { + this._registries[registryName] = this._registries[registryName] || {}; + this._registries[registryName][value] = object; +}; + +ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { + if (arguments.length < 3) { + defaultValue = null; + } + return this._registries[registryName][value] || defaultValue; +}; + +// +// Namespace default accessor methods +// + +/** + * ActionContainer#setDefaults(options) -> Void + * - options (object):hash of options see [[Action.new]] + * + * Set defaults + **/ +ActionContainer.prototype.setDefaults = function (options) { + options = options || {}; + for (var property in options) { + if ($$.has(options, property)) { + this._defaults[property] = options[property]; + } + } + + // if these defaults match any existing arguments, replace the previous + // default on the object with the new one + this._actions.forEach(function (action) { + if ($$.has(options, action.dest)) { + action.defaultValue = options[action.dest]; + } + }); +}; + +/** + * ActionContainer#getDefault(dest) -> Mixed + * - dest (string): action destination + * + * Return action default value + **/ +ActionContainer.prototype.getDefault = function (dest) { + var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null; + + this._actions.forEach(function (action) { + if (action.dest === dest && $$.has(action, 'defaultValue')) { + result = action.defaultValue; + } + }); + + return result; +}; +// +// Adding argument actions +// + +/** + * ActionContainer#addArgument(args, options) -> Object + * - args (String|Array): argument key, or array of argument keys + * - options (Object): action objects see [[Action.new]] + * + * #### Examples + * - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... }) + * - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... }) + * - addArgument('--baz', { action: 'store', nargs: 1, ... }) + **/ +ActionContainer.prototype.addArgument = function (args, options) { + args = args; + options = options || {}; + + if (typeof args === 'string') { + args = [ args ]; + } + if (!Array.isArray(args)) { + throw new TypeError('addArgument first argument should be a string or an array'); + } + if (typeof options !== 'object' || Array.isArray(options)) { + throw new TypeError('addArgument second argument should be a hash'); + } + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional argument + if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { + if (args && !!options.dest) { + throw new Error('dest supplied twice for positional argument'); + } + options = this._getPositional(args, options); + + // otherwise, we're adding an optional argument + } else { + options = this._getOptional(args, options); + } + + // if no default was supplied, use the parser-level default + if (typeof options.defaultValue === 'undefined') { + var dest = options.dest; + if ($$.has(this._defaults, dest)) { + options.defaultValue = this._defaults[dest]; + } else if (typeof this.argumentDefault !== 'undefined') { + options.defaultValue = this.argumentDefault; + } + } + + // create the action object, and add it to the parser + var ActionClass = this._popActionClass(options); + if (typeof ActionClass !== 'function') { + throw new Error(format('Unknown action "%s".', ActionClass)); + } + var action = new ActionClass(options); + + // throw an error if the action type is not callable + var typeFunction = this._registryGet('type', action.type, action.type); + if (typeof typeFunction !== 'function') { + throw new Error(format('"%s" is not callable', typeFunction)); + } + + return this._addAction(action); +}; + +/** + * ActionContainer#addArgumentGroup(options) -> ArgumentGroup + * - options (Object): hash of options see [[ArgumentGroup.new]] + * + * Create new arguments groups + **/ +ActionContainer.prototype.addArgumentGroup = function (options) { + var group = new ArgumentGroup(this, options); + this._actionGroups.push(group); + return group; +}; + +/** + * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup + * - options (Object): {required: false} + * + * Create new mutual exclusive groups + **/ +ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { + var group = new MutuallyExclusiveGroup(this, options); + this._mutuallyExclusiveGroups.push(group); + return group; +}; + +ActionContainer.prototype._addAction = function (action) { + var self = this; + + // resolve any conflicts + this._checkConflict(action); + + // add to actions list + this._actions.push(action); + action.container = this; + + // index the action by any option strings it has + action.optionStrings.forEach(function (optionString) { + self._optionStringActions[optionString] = action; + }); + + // set the flag if any option strings look like negative numbers + action.optionStrings.forEach(function (optionString) { + if (optionString.match(self._regexpNegativeNumber)) { + if (!self._hasNegativeNumberOptionals.some(Boolean)) { + self._hasNegativeNumberOptionals.push(true); + } + } + }); + + // return the created action + return action; +}; + +ActionContainer.prototype._removeAction = function (action) { + var actionIndex = this._actions.indexOf(action); + if (actionIndex >= 0) { + this._actions.splice(actionIndex, 1); + } +}; + +ActionContainer.prototype._addContainerActions = function (container) { + // collect groups by titles + var titleGroupMap = {}; + this._actionGroups.forEach(function (group) { + if (titleGroupMap[group.title]) { + throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title)); + } + titleGroupMap[group.title] = group; + }); + + // map each action to its group + var groupMap = {}; + function actionHash(action) { + // unique (hopefully?) string suitable as dictionary key + return action.getName(); + } + container._actionGroups.forEach(function (group) { + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!titleGroupMap[group.title]) { + titleGroupMap[group.title] = this.addArgumentGroup({ + title: group.title, + description: group.description + }); + } + + // map the actions to their new group + group._groupActions.forEach(function (action) { + groupMap[actionHash(action)] = titleGroupMap[group.title]; + }); + }, this); + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + var mutexGroup; + container._mutuallyExclusiveGroups.forEach(function (group) { + mutexGroup = this.addMutuallyExclusiveGroup({ + required: group.required + }); + // map the actions to their new mutex group + group._groupActions.forEach(function (action) { + groupMap[actionHash(action)] = mutexGroup; + }); + }, this); // forEach takes a 'this' argument + + // add all actions to this container or their group + container._actions.forEach(function (action) { + var key = actionHash(action); + if (groupMap[key]) { + groupMap[key]._addAction(action); + } else { + this._addAction(action); + } + }); +}; + +ActionContainer.prototype._getPositional = function (dest, options) { + if (Array.isArray(dest)) { + dest = dest[0]; + } + // make sure required is not specified + if (options.required) { + throw new Error('"required" is an invalid argument for positionals.'); + } + + // mark positional arguments as required if at least one is + // always required + if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) { + options.required = true; + } + if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') { + options.required = true; + } + + // return the keyword arguments with no option strings + options.dest = dest; + options.optionStrings = []; + return options; +}; + +ActionContainer.prototype._getOptional = function (args, options) { + var prefixChars = this.prefixChars; + var optionStrings = []; + var optionStringsLong = []; + + // determine short and long option strings + args.forEach(function (optionString) { + // error on strings that don't start with an appropriate prefix + if (prefixChars.indexOf(optionString[0]) < 0) { + throw new Error(format('Invalid option string "%s": must start with a "%s".', + optionString, + prefixChars + )); + } + + // strings starting with two prefix characters are long options + optionStrings.push(optionString); + if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { + optionStringsLong.push(optionString); + } + }); + + // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + var dest = options.dest || null; + delete options.dest; + + if (!dest) { + var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0]; + dest = $$.trimChars(optionStringDest, this.prefixChars); + + if (dest.length === 0) { + throw new Error( + format('dest= is required for options like "%s"', optionStrings.join(', ')) + ); + } + dest = dest.replace(/-/g, '_'); + } + + // return the updated keyword arguments + options.dest = dest; + options.optionStrings = optionStrings; + + return options; +}; + +ActionContainer.prototype._popActionClass = function (options, defaultValue) { + defaultValue = defaultValue || null; + + var action = (options.action || defaultValue); + delete options.action; + + var actionClass = this._registryGet('action', action, action); + return actionClass; +}; + +ActionContainer.prototype._getHandler = function () { + var handlerString = this.conflictHandler; + var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString); + var func = this[handlerFuncName]; + if (typeof func === 'undefined') { + var msg = 'invalid conflict resolution value: ' + handlerString; + throw new Error(msg); + } else { + return func; + } +}; + +ActionContainer.prototype._checkConflict = function (action) { + var optionStringActions = this._optionStringActions; + var conflictOptionals = []; + + // find all options that conflict with this option + // collect pairs, the string, and an existing action that it conflicts with + action.optionStrings.forEach(function (optionString) { + var conflOptional = optionStringActions[optionString]; + if (typeof conflOptional !== 'undefined') { + conflictOptionals.push([ optionString, conflOptional ]); + } + }); + + if (conflictOptionals.length > 0) { + var conflictHandler = this._getHandler(); + conflictHandler.call(this, action, conflictOptionals); + } +}; + +ActionContainer.prototype._handleConflictError = function (action, conflOptionals) { + var conflicts = conflOptionals.map(function (pair) { return pair[0]; }); + conflicts = conflicts.join(', '); + throw argumentErrorHelper( + action, + format('Conflicting option string(s): %s', conflicts) + ); +}; + +ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) { + // remove all conflicting options + var self = this; + conflOptionals.forEach(function (pair) { + var optionString = pair[0]; + var conflictingAction = pair[1]; + // remove the conflicting option string + var i = conflictingAction.optionStrings.indexOf(optionString); + if (i >= 0) { + conflictingAction.optionStrings.splice(i, 1); + } + delete self._optionStringActions[optionString]; + // if the option now has no option string, remove it from the + // container holding it + if (conflictingAction.optionStrings.length === 0) { + conflictingAction.container._removeAction(conflictingAction); + } + }); +}; diff --git a/node_modules/argparse/lib/argparse.js b/node_modules/argparse/lib/argparse.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports.ArgumentParser = require('./argument_parser.js'); +module.exports.Namespace = require('./namespace'); +module.exports.Action = require('./action'); +module.exports.HelpFormatter = require('./help/formatter.js'); +module.exports.Const = require('./const.js'); + +module.exports.ArgumentDefaultsHelpFormatter = + require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; +module.exports.RawDescriptionHelpFormatter = + require('./help/added_formatters.js').RawDescriptionHelpFormatter; +module.exports.RawTextHelpFormatter = + require('./help/added_formatters.js').RawTextHelpFormatter; diff --git a/node_modules/argparse/lib/argument/error.js b/node_modules/argparse/lib/argument/error.js @@ -0,0 +1,50 @@ +'use strict'; + + +var format = require('util').format; + + +var ERR_CODE = 'ARGError'; + +/*:nodoc:* + * argumentError(argument, message) -> TypeError + * - argument (Object): action with broken argument + * - message (String): error message + * + * Error format helper. An error from creating or using an argument + * (optional or positional). The string value of this exception + * is the message, augmented with information + * about the argument that caused it. + * + * #####Example + * + * var argumentErrorHelper = require('./argument/error'); + * if (conflictOptionals.length > 0) { + * throw argumentErrorHelper( + * action, + * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) + * ); + * } + * + **/ +module.exports = function (argument, message) { + var argumentName = null; + var errMessage; + var err; + + if (argument.getName) { + argumentName = argument.getName(); + } else { + argumentName = '' + argument; + } + + if (!argumentName) { + errMessage = message; + } else { + errMessage = format('argument "%s": %s', argumentName, message); + } + + err = new TypeError(errMessage); + err.code = ERR_CODE; + return err; +}; diff --git a/node_modules/argparse/lib/argument/exclusive.js b/node_modules/argparse/lib/argument/exclusive.js @@ -0,0 +1,54 @@ +/** internal + * class MutuallyExclusiveGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments” and “optional arguments” + * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ArgumentGroup = require('./group'); + +/** + * new MutuallyExclusiveGroup(container, options) + * - container (object): main container + * - options (object): options.required -> true/false + * + * `required` could be an argument itself, but making it a property of + * the options argument is more consistent with the JS adaptation of the Python) + **/ +var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { + var required; + options = options || {}; + required = options.required || false; + ArgumentGroup.call(this, container); + this.required = required; + +}; +util.inherits(MutuallyExclusiveGroup, ArgumentGroup); + + +MutuallyExclusiveGroup.prototype._addAction = function (action) { + var msg; + if (action.required) { + msg = 'mutually exclusive arguments must be optional'; + throw new Error(msg); + } + action = this._container._addAction(action); + this._groupActions.push(action); + return action; +}; + + +MutuallyExclusiveGroup.prototype._removeAction = function (action) { + this._container._removeAction(action); + this._groupActions.remove(action); +}; + diff --git a/node_modules/argparse/lib/argument/group.js b/node_modules/argparse/lib/argument/group.js @@ -0,0 +1,75 @@ +/** internal + * class ArgumentGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments” and “optional arguments” + * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ActionContainer = require('../action_container'); + + +/** + * new ArgumentGroup(container, options) + * - container (object): main container + * - options (object): hash of group options + * + * #### options + * - **prefixChars** group name prefix + * - **argumentDefault** default argument value + * - **title** group title + * - **description** group description + * + **/ +var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { + + options = options || {}; + + // add any missing keyword arguments by checking the container + options.conflictHandler = (options.conflictHandler || container.conflictHandler); + options.prefixChars = (options.prefixChars || container.prefixChars); + options.argumentDefault = (options.argumentDefault || container.argumentDefault); + + ActionContainer.call(this, options); + + // group attributes + this.title = options.title; + this._groupActions = []; + + // share most attributes with the container + this._container = container; + this._registries = container._registries; + this._actions = container._actions; + this._optionStringActions = container._optionStringActions; + this._defaults = container._defaults; + this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; + this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; +}; +util.inherits(ArgumentGroup, ActionContainer); + + +ArgumentGroup.prototype._addAction = function (action) { + // Parent add action + action = ActionContainer.prototype._addAction.call(this, action); + this._groupActions.push(action); + return action; +}; + + +ArgumentGroup.prototype._removeAction = function (action) { + // Parent remove action + ActionContainer.prototype._removeAction.call(this, action); + var actionIndex = this._groupActions.indexOf(action); + if (actionIndex >= 0) { + this._groupActions.splice(actionIndex, 1); + } +}; + diff --git a/node_modules/argparse/lib/argument_parser.js b/node_modules/argparse/lib/argument_parser.js @@ -0,0 +1,1161 @@ +/** + * class ArgumentParser + * + * Object for parsing command line strings into js objects. + * + * Inherited from [[ActionContainer]] + **/ +'use strict'; + +var util = require('util'); +var format = require('util').format; +var Path = require('path'); +var sprintf = require('sprintf-js').sprintf; + +// Constants +var c = require('./const'); + +var $$ = require('./utils'); + +var ActionContainer = require('./action_container'); + +// Errors +var argumentErrorHelper = require('./argument/error'); + +var HelpFormatter = require('./help/formatter'); + +var Namespace = require('./namespace'); + + +/** + * new ArgumentParser(options) + * + * Create a new ArgumentParser object. + * + * ##### Options: + * - `prog` The name of the program (default: Path.basename(process.argv[1])) + * - `usage` A usage message (default: auto-generated from arguments) + * - `description` A description of what the program does + * - `epilog` Text following the argument descriptions + * - `parents` Parsers whose arguments should be copied into this one + * - `formatterClass` HelpFormatter class for printing help messages + * - `prefixChars` Characters that prefix optional arguments + * - `fromfilePrefixChars` Characters that prefix files containing additional arguments + * - `argumentDefault` The default value for all arguments + * - `addHelp` Add a -h/-help option + * - `conflictHandler` Specifies how to handle conflicting argument names + * - `debug` Enable debug mode. Argument errors throw exception in + * debug mode and process.exit in normal. Used for development and + * testing (default: false) + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects + **/ +function ArgumentParser(options) { + if (!(this instanceof ArgumentParser)) { + return new ArgumentParser(options); + } + var self = this; + options = options || {}; + + options.description = (options.description || null); + options.argumentDefault = (options.argumentDefault || null); + options.prefixChars = (options.prefixChars || '-'); + options.conflictHandler = (options.conflictHandler || 'error'); + ActionContainer.call(this, options); + + options.addHelp = typeof options.addHelp === 'undefined' || !!options.addHelp; + options.parents = options.parents || []; + // default program name + options.prog = (options.prog || Path.basename(process.argv[1])); + this.prog = options.prog; + this.usage = options.usage; + this.epilog = options.epilog; + this.version = options.version; + + this.debug = (options.debug === true); + + this.formatterClass = (options.formatterClass || HelpFormatter); + this.fromfilePrefixChars = options.fromfilePrefixChars || null; + this._positionals = this.addArgumentGroup({ title: 'Positional arguments' }); + this._optionals = this.addArgumentGroup({ title: 'Optional arguments' }); + this._subparsers = null; + + // register types + function FUNCTION_IDENTITY(o) { + return o; + } + this.register('type', 'auto', FUNCTION_IDENTITY); + this.register('type', null, FUNCTION_IDENTITY); + this.register('type', 'int', function (x) { + var result = parseInt(x, 10); + if (isNaN(result)) { + throw new Error(x + ' is not a valid integer.'); + } + return result; + }); + this.register('type', 'float', function (x) { + var result = parseFloat(x); + if (isNaN(result)) { + throw new Error(x + ' is not a valid float.'); + } + return result; + }); + this.register('type', 'string', function (x) { + return '' + x; + }); + + // add help and version arguments if necessary + var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0]; + if (options.addHelp) { + this.addArgument( + [ defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help' ], + { + action: 'help', + defaultValue: c.SUPPRESS, + help: 'Show this help message and exit.' + } + ); + } + if (typeof this.version !== 'undefined') { + this.addArgument( + [ defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version' ], + { + action: 'version', + version: this.version, + defaultValue: c.SUPPRESS, + help: "Show program's version number and exit." + } + ); + } + + // add parent arguments and defaults + options.parents.forEach(function (parent) { + self._addContainerActions(parent); + if (typeof parent._defaults !== 'undefined') { + for (var defaultKey in parent._defaults) { + if (parent._defaults.hasOwnProperty(defaultKey)) { + self._defaults[defaultKey] = parent._defaults[defaultKey]; + } + } + } + }); +} + +util.inherits(ArgumentParser, ActionContainer); + +/** + * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]] + * - options (object): hash of options see [[ActionSubparsers.new]] + * + * See also [subcommands][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands + **/ +ArgumentParser.prototype.addSubparsers = function (options) { + if (this._subparsers) { + this.error('Cannot have multiple subparser arguments.'); + } + + options = options || {}; + options.debug = (this.debug === true); + options.optionStrings = []; + options.parserClass = (options.parserClass || ArgumentParser); + + + if (!!options.title || !!options.description) { + + this._subparsers = this.addArgumentGroup({ + title: (options.title || 'subcommands'), + description: options.description + }); + delete options.title; + delete options.description; + + } else { + this._subparsers = this._positionals; + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (!options.prog) { + var formatter = this._getFormatter(); + var positionals = this._getPositionalActions(); + var groups = this._mutuallyExclusiveGroups; + formatter.addUsage(this.usage, positionals, groups, ''); + options.prog = formatter.formatHelp().trim(); + } + + // create the parsers action and add it to the positionals list + var ParsersClass = this._popActionClass(options, 'parsers'); + var action = new ParsersClass(options); + this._subparsers._addAction(action); + + // return the created parsers action + return action; +}; + +ArgumentParser.prototype._addAction = function (action) { + if (action.isOptional()) { + this._optionals._addAction(action); + } else { + this._positionals._addAction(action); + } + return action; +}; + +ArgumentParser.prototype._getOptionalActions = function () { + return this._actions.filter(function (action) { + return action.isOptional(); + }); +}; + +ArgumentParser.prototype._getPositionalActions = function () { + return this._actions.filter(function (action) { + return action.isPositional(); + }); +}; + + +/** + * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object + * - args (array): input elements + * - namespace (Namespace|Object): result object + * + * Parsed args and throws error if some arguments are not recognized + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method + **/ +ArgumentParser.prototype.parseArgs = function (args, namespace) { + var argv; + var result = this.parseKnownArgs(args, namespace); + + args = result[0]; + argv = result[1]; + if (argv && argv.length > 0) { + this.error( + format('Unrecognized arguments: %s.', argv.join(' ')) + ); + } + return args; +}; + +/** + * ArgumentParser#parseKnownArgs(args, namespace) -> array + * - args (array): input options + * - namespace (Namespace|Object): result object + * + * Parse known arguments and return tuple of result object + * and unknown args + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing + **/ +ArgumentParser.prototype.parseKnownArgs = function (args, namespace) { + var self = this; + + // args default to the system args + args = args || process.argv.slice(2); + + // default Namespace built from parser defaults + namespace = namespace || new Namespace(); + + self._actions.forEach(function (action) { + if (action.dest !== c.SUPPRESS) { + if (!$$.has(namespace, action.dest)) { + if (action.defaultValue !== c.SUPPRESS) { + var defaultValue = action.defaultValue; + if (typeof action.defaultValue === 'string') { + defaultValue = self._getValue(action, defaultValue); + } + namespace[action.dest] = defaultValue; + } + } + } + }); + + Object.keys(self._defaults).forEach(function (dest) { + namespace[dest] = self._defaults[dest]; + }); + + // parse the arguments and exit if there are any errors + try { + var res = this._parseKnownArgs(args, namespace); + + namespace = res[0]; + args = res[1]; + if ($$.has(namespace, c._UNRECOGNIZED_ARGS_ATTR)) { + args = $$.arrayUnion(args, namespace[c._UNRECOGNIZED_ARGS_ATTR]); + delete namespace[c._UNRECOGNIZED_ARGS_ATTR]; + } + return [ namespace, args ]; + } catch (e) { + this.error(e); + } +}; + +ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) { + var self = this; + + var extras = []; + + // replace arg strings that are file references + if (this.fromfilePrefixChars !== null) { + argStrings = this._readArgsFromFiles(argStrings); + } + // map all mutually exclusive arguments to the other arguments + // they can't occur with + // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])' + // though I can't conceive of a way in which an action could be a member + // of two different mutually exclusive groups. + + function actionHash(action) { + // some sort of hashable key for this action + // action itself cannot be a key in actionConflicts + // I think getName() (join of optionStrings) is unique enough + return action.getName(); + } + + var conflicts, key; + var actionConflicts = {}; + + this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { + mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { + key = actionHash(mutexAction); + if (!$$.has(actionConflicts, key)) { + actionConflicts[key] = []; + } + conflicts = actionConflicts[key]; + conflicts.push.apply(conflicts, groupActions.slice(0, i)); + conflicts.push.apply(conflicts, groupActions.slice(i + 1)); + }); + }); + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + var optionStringIndices = {}; + + var argStringPatternParts = []; + + argStrings.forEach(function (argString, argStringIndex) { + if (argString === '--') { + argStringPatternParts.push('-'); + while (argStringIndex < argStrings.length) { + argStringPatternParts.push('A'); + argStringIndex++; + } + } else { + // otherwise, add the arg to the arg strings + // and note the index if it was an option + var pattern; + var optionTuple = self._parseOptional(argString); + if (!optionTuple) { + pattern = 'A'; + } else { + optionStringIndices[argStringIndex] = optionTuple; + pattern = 'O'; + } + argStringPatternParts.push(pattern); + } + }); + var argStringsPattern = argStringPatternParts.join(''); + + var seenActions = []; + var seenNonDefaultActions = []; + + + function takeAction(action, argumentStrings, optionString) { + seenActions.push(action); + var argumentValues = self._getValues(action, argumentStrings); + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argumentValues !== action.defaultValue) { + seenNonDefaultActions.push(action); + if (actionConflicts[actionHash(action)]) { + actionConflicts[actionHash(action)].forEach(function (actionConflict) { + if (seenNonDefaultActions.indexOf(actionConflict) >= 0) { + throw argumentErrorHelper( + action, + format('Not allowed with argument "%s".', actionConflict.getName()) + ); + } + }); + } + } + + if (argumentValues !== c.SUPPRESS) { + action.call(self, namespace, argumentValues, optionString); + } + } + + function consumeOptional(startIndex) { + // get the optional identified at this index + var optionTuple = optionStringIndices[startIndex]; + var action = optionTuple[0]; + var optionString = optionTuple[1]; + var explicitArg = optionTuple[2]; + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + var actionTuples = []; + + var args, argCount, start, stop; + + for (;;) { + if (!action) { + extras.push(argStrings[startIndex]); + return startIndex + 1; + } + if (explicitArg) { + argCount = self._matchArgument(action, 'A'); + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + var chars = self.prefixChars; + if (argCount === 0 && chars.indexOf(optionString[1]) < 0) { + actionTuples.push([ action, [], optionString ]); + optionString = optionString[0] + explicitArg[0]; + var newExplicitArg = explicitArg.slice(1) || null; + var optionalsMap = self._optionStringActions; + + if (Object.keys(optionalsMap).indexOf(optionString) >= 0) { + action = optionalsMap[optionString]; + explicitArg = newExplicitArg; + } else { + throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); + } + } else if (argCount === 1) { + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + stop = startIndex + 1; + args = [ explicitArg ]; + actionTuples.push([ action, args, optionString ]); + break; + } else { + // error if a double-dash option did not use the + // explicit argument + throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); + } + } else { + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + + start = startIndex + 1; + var selectedPatterns = argStringsPattern.substr(start); + + argCount = self._matchArgument(action, selectedPatterns); + stop = start + argCount; + + + args = argStrings.slice(start, stop); + + actionTuples.push([ action, args, optionString ]); + break; + } + + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + if (actionTuples.length < 1) { + throw new Error('length should be > 0'); + } + for (var i = 0; i < actionTuples.length; i++) { + takeAction.apply(self, actionTuples[i]); + } + return stop; + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + var positionals = self._getPositionalActions(); + + function consumePositionals(startIndex) { + // match as many Positionals as possible + var selectedPattern = argStringsPattern.substr(startIndex); + var argCounts = self._matchArgumentsPartial(positionals, selectedPattern); + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (var i = 0; i < positionals.length; i++) { + var action = positionals[i]; + var argCount = argCounts[i]; + if (typeof argCount === 'undefined') { + continue; + } + var args = argStrings.slice(startIndex, startIndex + argCount); + + startIndex += argCount; + takeAction(action, args); + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(argCounts.length); + return startIndex; + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + var startIndex = 0; + var position; + + var maxOptionStringIndex = -1; + + Object.keys(optionStringIndices).forEach(function (position) { + maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); + }); + + var positionalsEndIndex, nextOptionStringIndex; + + while (startIndex <= maxOptionStringIndex) { + // consume any Positionals preceding the next option + nextOptionStringIndex = null; + for (position in optionStringIndices) { + if (!optionStringIndices.hasOwnProperty(position)) { continue; } + + position = parseInt(position, 10); + if (position >= startIndex) { + if (nextOptionStringIndex !== null) { + nextOptionStringIndex = Math.min(nextOptionStringIndex, position); + } else { + nextOptionStringIndex = position; + } + } + } + + if (startIndex !== nextOptionStringIndex) { + positionalsEndIndex = consumePositionals(startIndex); + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionalsEndIndex > startIndex) { + startIndex = positionalsEndIndex; + continue; + } else { + startIndex = positionalsEndIndex; + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!optionStringIndices[startIndex]) { + var strings = argStrings.slice(startIndex, nextOptionStringIndex); + extras = extras.concat(strings); + startIndex = nextOptionStringIndex; + } + // consume the next optional and any arguments for it + startIndex = consumeOptional(startIndex); + } + + // consume any positionals following the last Optional + var stopIndex = consumePositionals(startIndex); + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(argStrings.slice(stopIndex)); + + // if we didn't use all the Positional objects, there were too few + // arg strings supplied. + if (positionals.length > 0) { + self.error('too few arguments'); + } + + // make sure all required actions were present + self._actions.forEach(function (action) { + if (action.required) { + if (seenActions.indexOf(action) < 0) { + self.error(format('Argument "%s" is required', action.getName())); + } + } + }); + + // make sure all required groups have one option present + var actionUsed = false; + self._mutuallyExclusiveGroups.forEach(function (group) { + if (group.required) { + actionUsed = group._groupActions.some(function (action) { + return seenNonDefaultActions.indexOf(action) !== -1; + }); + + // if no actions were used, report the error + if (!actionUsed) { + var names = []; + group._groupActions.forEach(function (action) { + if (action.help !== c.SUPPRESS) { + names.push(action.getName()); + } + }); + names = names.join(' '); + var msg = 'one of the arguments ' + names + ' is required'; + self.error(msg); + } + } + }); + + // return the updated namespace and the extra arguments + return [ namespace, extras ]; +}; + +ArgumentParser.prototype._readArgsFromFiles = function (argStrings) { + // expand arguments referencing files + var self = this; + var fs = require('fs'); + var newArgStrings = []; + argStrings.forEach(function (argString) { + if (self.fromfilePrefixChars.indexOf(argString[0]) < 0) { + // for regular arguments, just add them back into the list + newArgStrings.push(argString); + } else { + // replace arguments referencing files with the file content + try { + var argstrs = []; + var filename = argString.slice(1); + var content = fs.readFileSync(filename, 'utf8'); + content = content.trim().split('\n'); + content.forEach(function (argLine) { + self.convertArgLineToArgs(argLine).forEach(function (arg) { + argstrs.push(arg); + }); + argstrs = self._readArgsFromFiles(argstrs); + }); + newArgStrings.push.apply(newArgStrings, argstrs); + } catch (error) { + return self.error(error.message); + } + } + }); + return newArgStrings; +}; + +ArgumentParser.prototype.convertArgLineToArgs = function (argLine) { + return [ argLine ]; +}; + +ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) { + + // match the pattern for this action to the arg strings + var regexpNargs = new RegExp('^' + this._getNargsPattern(action)); + var matches = regexpArgStrings.match(regexpNargs); + var message; + + // throw an exception if we weren't able to find a match + if (!matches) { + switch (action.nargs) { + /*eslint-disable no-undefined*/ + case undefined: + case null: + message = 'Expected one argument.'; + break; + case c.OPTIONAL: + message = 'Expected at most one argument.'; + break; + case c.ONE_OR_MORE: + message = 'Expected at least one argument.'; + break; + default: + message = 'Expected %s argument(s)'; + } + + throw argumentErrorHelper( + action, + format(message, action.nargs) + ); + } + // return the number of arguments matched + return matches[1].length; +}; + +ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + var self = this; + var result = []; + var actionSlice, pattern, matches; + var i, j; + + function getLength(string) { + return string.length; + } + + for (i = actions.length; i > 0; i--) { + pattern = ''; + actionSlice = actions.slice(0, i); + for (j = 0; j < actionSlice.length; j++) { + pattern += self._getNargsPattern(actionSlice[j]); + } + + pattern = new RegExp('^' + pattern); + matches = regexpArgStrings.match(pattern); + + if (matches && matches.length > 0) { + // need only groups + matches = matches.splice(1); + result = result.concat(matches.map(getLength)); + break; + } + } + + // return the list of arg string counts + return result; +}; + +ArgumentParser.prototype._parseOptional = function (argString) { + var action, optionString, argExplicit, optionTuples; + + // if it's an empty string, it was meant to be a positional + if (!argString) { + return null; + } + + // if it doesn't start with a prefix, it was meant to be positional + if (this.prefixChars.indexOf(argString[0]) < 0) { + return null; + } + + // if the option string is present in the parser, return the action + if (this._optionStringActions[argString]) { + return [ this._optionStringActions[argString], argString, null ]; + } + + // if it's just a single character, it was meant to be positional + if (argString.length === 1) { + return null; + } + + // if the option string before the "=" is present, return the action + if (argString.indexOf('=') >= 0) { + optionString = argString.split('=', 1)[0]; + argExplicit = argString.slice(optionString.length + 1); + + if (this._optionStringActions[optionString]) { + action = this._optionStringActions[optionString]; + return [ action, optionString, argExplicit ]; + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + optionTuples = this._getOptionTuples(argString); + + // if multiple actions match, the option string was ambiguous + if (optionTuples.length > 1) { + var optionStrings = optionTuples.map(function (optionTuple) { + return optionTuple[1]; + }); + this.error(format( + 'Ambiguous option: "%s" could match %s.', + argString, optionStrings.join(', ') + )); + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (optionTuples.length === 1) { + return optionTuples[0]; + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (argString.match(this._regexpNegativeNumber)) { + if (!this._hasNegativeNumberOptionals.some(Boolean)) { + return null; + } + } + // if it contains a space, it was meant to be a positional + if (argString.search(' ') >= 0) { + return null; + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ null, argString, null ]; +}; + +ArgumentParser.prototype._getOptionTuples = function (optionString) { + var result = []; + var chars = this.prefixChars; + var optionPrefix; + var argExplicit; + var action; + var actionOptionString; + + // option strings starting with two prefix characters are only split at + // the '=' + if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) { + if (optionString.indexOf('=') >= 0) { + var optionStringSplit = optionString.split('=', 1); + + optionPrefix = optionStringSplit[0]; + argExplicit = optionStringSplit[1]; + } else { + optionPrefix = optionString; + argExplicit = null; + } + + for (actionOptionString in this._optionStringActions) { + if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { + action = this._optionStringActions[actionOptionString]; + result.push([ action, actionOptionString, argExplicit ]); + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) { + optionPrefix = optionString; + argExplicit = null; + var optionPrefixShort = optionString.substr(0, 2); + var argExplicitShort = optionString.substr(2); + + for (actionOptionString in this._optionStringActions) { + if (!$$.has(this._optionStringActions, actionOptionString)) continue; + + action = this._optionStringActions[actionOptionString]; + if (actionOptionString === optionPrefixShort) { + result.push([ action, actionOptionString, argExplicitShort ]); + } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { + result.push([ action, actionOptionString, argExplicit ]); + } + } + + // shouldn't ever get here + } else { + throw new Error(format('Unexpected option string: %s.', optionString)); + } + // return the collected option tuples + return result; +}; + +ArgumentParser.prototype._getNargsPattern = function (action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + var regexpNargs; + + switch (action.nargs) { + // the default (null) is assumed to be a single argument + case undefined: + case null: + regexpNargs = '(-*A-*)'; + break; + // allow zero or more arguments + case c.OPTIONAL: + regexpNargs = '(-*A?-*)'; + break; + // allow zero or more arguments + case c.ZERO_OR_MORE: + regexpNargs = '(-*[A-]*)'; + break; + // allow one or more arguments + case c.ONE_OR_MORE: + regexpNargs = '(-*A[A-]*)'; + break; + // allow any number of options or arguments + case c.REMAINDER: + regexpNargs = '([-AO]*)'; + break; + // allow one argument followed by any number of options or arguments + case c.PARSER: + regexpNargs = '(-*A[-AO]*)'; + break; + // all others should be integers + default: + regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)'; + } + + // if this is an optional action, -- is not allowed + if (action.isOptional()) { + regexpNargs = regexpNargs.replace(/-\*/g, ''); + regexpNargs = regexpNargs.replace(/-/g, ''); + } + + // return the pattern + return regexpNargs; +}; + +// +// Value conversion methods +// + +ArgumentParser.prototype._getValues = function (action, argStrings) { + var self = this; + + // for everything but PARSER args, strip out '--' + if (action.nargs !== c.PARSER && action.nargs !== c.REMAINDER) { + argStrings = argStrings.filter(function (arrayElement) { + return arrayElement !== '--'; + }); + } + + var value, argString; + + // optional argument produces a default when not present + if (argStrings.length === 0 && action.nargs === c.OPTIONAL) { + + value = (action.isOptional()) ? action.constant : action.defaultValue; + + if (typeof (value) === 'string') { + value = this._getValue(action, value); + this._checkValue(action, value); + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (argStrings.length === 0 && action.nargs === c.ZERO_OR_MORE && + action.optionStrings.length === 0) { + + value = (action.defaultValue || argStrings); + this._checkValue(action, value); + + // single argument or optional argument produces a single value + } else if (argStrings.length === 1 && + (!action.nargs || action.nargs === c.OPTIONAL)) { + + argString = argStrings[0]; + value = this._getValue(action, argString); + this._checkValue(action, value); + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === c.REMAINDER) { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === c.PARSER) { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + this._checkValue(action, value[0]); + + // all other types of nargs produce a list + } else { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + value.forEach(function (v) { + self._checkValue(action, v); + }); + } + + // return the converted value + return value; +}; + +ArgumentParser.prototype._getValue = function (action, argString) { + var result; + + var typeFunction = this._registryGet('type', action.type, action.type); + if (typeof typeFunction !== 'function') { + var message = format('%s is not callable', typeFunction); + throw argumentErrorHelper(action, message); + } + + // convert the value to the appropriate type + try { + result = typeFunction(argString); + + // ArgumentTypeErrors indicate errors + // If action.type is not a registered string, it is a function + // Try to deduce its name for inclusion in the error message + // Failing that, include the error message it raised. + } catch (e) { + var name = null; + if (typeof action.type === 'string') { + name = action.type; + } else { + name = action.type.name || action.type.displayName || '<function>'; + } + var msg = format('Invalid %s value: %s', name, argString); + if (name === '<function>') { msg += '\n' + e.message; } + throw argumentErrorHelper(action, msg); + } + // return the converted value + return result; +}; + +ArgumentParser.prototype._checkValue = function (action, value) { + // converted value must be one of the choices (if specified) + var choices = action.choices; + if (choices) { + // choise for argument can by array or string + if ((typeof choices === 'string' || Array.isArray(choices)) && + choices.indexOf(value) !== -1) { + return; + } + // choise for subparsers can by only hash + if (typeof choices === 'object' && !Array.isArray(choices) && choices[value]) { + return; + } + + if (typeof choices === 'string') { + choices = choices.split('').join(', '); + } else if (Array.isArray(choices)) { + choices = choices.join(', '); + } else { + choices = Object.keys(choices).join(', '); + } + var message = format('Invalid choice: %s (choose from [%s])', value, choices); + throw argumentErrorHelper(action, message); + } +}; + +// +// Help formatting methods +// + +/** + * ArgumentParser#formatUsage -> string + * + * Return usage string + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.formatUsage = function () { + var formatter = this._getFormatter(); + formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); + return formatter.formatHelp(); +}; + +/** + * ArgumentParser#formatHelp -> string + * + * Return help + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.formatHelp = function () { + var formatter = this._getFormatter(); + + // usage + formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); + + // description + formatter.addText(this.description); + + // positionals, optionals and user-defined groups + this._actionGroups.forEach(function (actionGroup) { + formatter.startSection(actionGroup.title); + formatter.addText(actionGroup.description); + formatter.addArguments(actionGroup._groupActions); + formatter.endSection(); + }); + + // epilog + formatter.addText(this.epilog); + + // determine help from format above + return formatter.formatHelp(); +}; + +ArgumentParser.prototype._getFormatter = function () { + var FormatterClass = this.formatterClass; + var formatter = new FormatterClass({ prog: this.prog }); + return formatter; +}; + +// +// Print functions +// + +/** + * ArgumentParser#printUsage() -> Void + * + * Print usage + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.printUsage = function () { + this._printMessage(this.formatUsage()); +}; + +/** + * ArgumentParser#printHelp() -> Void + * + * Print help + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.printHelp = function () { + this._printMessage(this.formatHelp()); +}; + +ArgumentParser.prototype._printMessage = function (message, stream) { + if (!stream) { + stream = process.stdout; + } + if (message) { + stream.write('' + message); + } +}; + +// +// Exit functions +// + +/** + * ArgumentParser#exit(status=0, message) -> Void + * - status (int): exit status + * - message (string): message + * + * Print message in stderr/stdout and exit program + **/ +ArgumentParser.prototype.exit = function (status, message) { + if (message) { + if (status === 0) { + this._printMessage(message); + } else { + this._printMessage(message, process.stderr); + } + } + + process.exit(status); +}; + +/** + * ArgumentParser#error(message) -> Void + * - err (Error|string): message + * + * Error method Prints a usage message incorporating the message to stderr and + * exits. If you override this in a subclass, + * it should not return -- it should + * either exit or throw an exception. + * + **/ +ArgumentParser.prototype.error = function (err) { + var message; + if (err instanceof Error) { + if (this.debug === true) { + throw err; + } + message = err.message; + } else { + message = err; + } + var msg = format('%s: error: %s', this.prog, message) + c.EOL; + + if (this.debug === true) { + throw new Error(msg); + } + + this.printUsage(process.stderr); + + return this.exit(2, msg); +}; + +module.exports = ArgumentParser; diff --git a/node_modules/argparse/lib/const.js b/node_modules/argparse/lib/const.js @@ -0,0 +1,21 @@ +// +// Constants +// + +'use strict'; + +module.exports.EOL = '\n'; + +module.exports.SUPPRESS = '==SUPPRESS=='; + +module.exports.OPTIONAL = '?'; + +module.exports.ZERO_OR_MORE = '*'; + +module.exports.ONE_OR_MORE = '+'; + +module.exports.PARSER = 'A...'; + +module.exports.REMAINDER = '...'; + +module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; diff --git a/node_modules/argparse/lib/help/added_formatters.js b/node_modules/argparse/lib/help/added_formatters.js @@ -0,0 +1,87 @@ +'use strict'; + +var util = require('util'); + +// Constants +var c = require('../const'); + +var $$ = require('../utils'); +var HelpFormatter = require('./formatter.js'); + +/** + * new RawDescriptionHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) + * + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function ArgumentDefaultsHelpFormatter(options) { + HelpFormatter.call(this, options); +} + +util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); + +ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { + var help = action.help; + if (action.help.indexOf('%(defaultValue)s') === -1) { + if (action.defaultValue !== c.SUPPRESS) { + var defaulting_nargs = [ c.OPTIONAL, c.ZERO_OR_MORE ]; + if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { + help += ' (default: %(defaultValue)s)'; + } + } + } + return help; +}; + +module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; + +/** + * new RawDescriptionHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) + * + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function RawDescriptionHelpFormatter(options) { + HelpFormatter.call(this, options); +} + +util.inherits(RawDescriptionHelpFormatter, HelpFormatter); + +RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { + var lines = text.split('\n'); + lines = lines.map(function (line) { + return $$.trimEnd(indent + line); + }); + return lines.join('\n'); +}; +module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; + +/** + * new RawTextHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) + * + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function RawTextHelpFormatter(options) { + RawDescriptionHelpFormatter.call(this, options); +} + +util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); + +RawTextHelpFormatter.prototype._splitLines = function (text) { + return text.split('\n'); +}; + +module.exports.RawTextHelpFormatter = RawTextHelpFormatter; diff --git a/node_modules/argparse/lib/help/formatter.js b/node_modules/argparse/lib/help/formatter.js @@ -0,0 +1,795 @@ +/** + * class HelpFormatter + * + * Formatter for generating usage messages and argument help strings. Only the + * name of this class is considered a public API. All the methods provided by + * the class are considered an implementation detail. + * + * Do not call in your code, use this class only for inherits your own forvatter + * + * ToDo add [additonal formatters][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class + **/ +'use strict'; + +var sprintf = require('sprintf-js').sprintf; + +// Constants +var c = require('../const'); + +var $$ = require('../utils'); + + +/*:nodoc:* internal + * new Support(parent, heding) + * - parent (object): parent section + * - heading (string): header string + * + **/ +function Section(parent, heading) { + this._parent = parent; + this._heading = heading; + this._items = []; +} + +/*:nodoc:* internal + * Section#addItem(callback) -> Void + * - callback (array): tuple with function and args + * + * Add function for single element + **/ +Section.prototype.addItem = function (callback) { + this._items.push(callback); +}; + +/*:nodoc:* internal + * Section#formatHelp(formatter) -> string + * - formatter (HelpFormatter): current formatter + * + * Form help section string + * + **/ +Section.prototype.formatHelp = function (formatter) { + var itemHelp, heading; + + // format the indented section + if (this._parent) { + formatter._indent(); + } + + itemHelp = this._items.map(function (item) { + var obj, func, args; + + obj = formatter; + func = item[0]; + args = item[1]; + return func.apply(obj, args); + }); + itemHelp = formatter._joinParts(itemHelp); + + if (this._parent) { + formatter._dedent(); + } + + // return nothing if the section was empty + if (!itemHelp) { + return ''; + } + + // add the heading if the section was non-empty + heading = ''; + if (this._heading && this._heading !== c.SUPPRESS) { + var currentIndent = formatter.currentIndent; + heading = $$.repeat(' ', currentIndent) + this._heading + ':' + c.EOL; + } + + // join the section-initialize newline, the heading and the help + return formatter._joinParts([ c.EOL, heading, itemHelp, c.EOL ]); +}; + +/** + * new HelpFormatter(options) + * + * #### Options: + * - `prog`: program name + * - `indentIncriment`: indent step, default value 2 + * - `maxHelpPosition`: max help position, default value = 24 + * - `width`: line width + * + **/ +var HelpFormatter = module.exports = function HelpFormatter(options) { + options = options || {}; + + this._prog = options.prog; + + this._maxHelpPosition = options.maxHelpPosition || 24; + this._width = (options.width || ((process.env.COLUMNS || 80) - 2)); + + this._currentIndent = 0; + this._indentIncriment = options.indentIncriment || 2; + this._level = 0; + this._actionMaxLength = 0; + + this._rootSection = new Section(null); + this._currentSection = this._rootSection; + + this._whitespaceMatcher = new RegExp('\\s+', 'g'); + this._longBreakMatcher = new RegExp(c.EOL + c.EOL + c.EOL + '+', 'g'); +}; + +HelpFormatter.prototype._indent = function () { + this._currentIndent += this._indentIncriment; + this._level += 1; +}; + +HelpFormatter.prototype._dedent = function () { + this._currentIndent -= this._indentIncriment; + this._level -= 1; + if (this._currentIndent < 0) { + throw new Error('Indent decreased below 0.'); + } +}; + +HelpFormatter.prototype._addItem = function (func, args) { + this._currentSection.addItem([ func, args ]); +}; + +// +// Message building methods +// + +/** + * HelpFormatter#startSection(heading) -> Void + * - heading (string): header string + * + * Start new help section + * + * See alse [code example][1] + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.startSection = function (heading) { + this._indent(); + var section = new Section(this._currentSection, heading); + var func = section.formatHelp.bind(section); + this._addItem(func, [ this ]); + this._currentSection = section; +}; + +/** + * HelpFormatter#endSection -> Void + * + * End help section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + **/ +HelpFormatter.prototype.endSection = function () { + this._currentSection = this._currentSection._parent; + this._dedent(); +}; + +/** + * HelpFormatter#addText(text) -> Void + * - text (string): plain text + * + * Add plain text into current section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.addText = function (text) { + if (text && text !== c.SUPPRESS) { + this._addItem(this._formatText, [ text ]); + } +}; + +/** + * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void + * - usage (string): usage text + * - actions (array): actions list + * - groups (array): groups list + * - prefix (string): usage prefix + * + * Add usage data into current section + * + * ##### Example + * + * formatter.addUsage(this.usage, this._actions, []); + * return formatter.formatHelp(); + * + **/ +HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) { + if (usage !== c.SUPPRESS) { + this._addItem(this._formatUsage, [ usage, actions, groups, prefix ]); + } +}; + +/** + * HelpFormatter#addArgument(action) -> Void + * - action (object): action + * + * Add argument into current section + * + * Single variant of [[HelpFormatter#addArguments]] + **/ +HelpFormatter.prototype.addArgument = function (action) { + if (action.help !== c.SUPPRESS) { + var self = this; + + // find all invocations + var invocations = [ this._formatActionInvocation(action) ]; + var invocationLength = invocations[0].length; + + var actionLength; + + if (action._getSubactions) { + this._indent(); + action._getSubactions().forEach(function (subaction) { + + var invocationNew = self._formatActionInvocation(subaction); + invocations.push(invocationNew); + invocationLength = Math.max(invocationLength, invocationNew.length); + + }); + this._dedent(); + } + + // update the maximum item length + actionLength = invocationLength + this._currentIndent; + this._actionMaxLength = Math.max(this._actionMaxLength, actionLength); + + // add the item to the list + this._addItem(this._formatAction, [ action ]); + } +}; + +/** + * HelpFormatter#addArguments(actions) -> Void + * - actions (array): actions list + * + * Mass add arguments into current section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.addArguments = function (actions) { + var self = this; + actions.forEach(function (action) { + self.addArgument(action); + }); +}; + +// +// Help-formatting methods +// + +/** + * HelpFormatter#formatHelp -> string + * + * Format help + * + * ##### Example + * + * formatter.addText(this.epilog); + * return formatter.formatHelp(); + * + **/ +HelpFormatter.prototype.formatHelp = function () { + var help = this._rootSection.formatHelp(this); + if (help) { + help = help.replace(this._longBreakMatcher, c.EOL + c.EOL); + help = $$.trimChars(help, c.EOL) + c.EOL; + } + return help; +}; + +HelpFormatter.prototype._joinParts = function (partStrings) { + return partStrings.filter(function (part) { + return (part && part !== c.SUPPRESS); + }).join(''); +}; + +HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) { + if (!prefix && typeof prefix !== 'string') { + prefix = 'usage: '; + } + + actions = actions || []; + groups = groups || []; + + + // if usage is specified, use that + if (usage) { + usage = sprintf(usage, { prog: this._prog }); + + // if no optionals or positionals are available, usage is just prog + } else if (!usage && actions.length === 0) { + usage = this._prog; + + // if optionals and positionals are available, calculate usage + } else if (!usage) { + var prog = this._prog; + var optionals = []; + var positionals = []; + var actionUsage; + var textWidth; + + // split optionals from positionals + actions.forEach(function (action) { + if (action.isOptional()) { + optionals.push(action); + } else { + positionals.push(action); + } + }); + + // build full usage string + actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups); + usage = [ prog, actionUsage ].join(' '); + + // wrap the usage parts if it's too long + textWidth = this._width - this._currentIndent; + if ((prefix.length + usage.length) > textWidth) { + + // break usage into wrappable parts + var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g'); + var optionalUsage = this._formatActionsUsage(optionals, groups); + var positionalUsage = this._formatActionsUsage(positionals, groups); + + + var optionalParts = optionalUsage.match(regexpPart); + var positionalParts = positionalUsage.match(regexpPart) || []; + + if (optionalParts.join(' ') !== optionalUsage) { + throw new Error('assert "optionalParts.join(\' \') === optionalUsage"'); + } + if (positionalParts.join(' ') !== positionalUsage) { + throw new Error('assert "positionalParts.join(\' \') === positionalUsage"'); + } + + // helper for wrapping lines + /*eslint-disable func-style*/ // node 0.10 compat + var _getLines = function (parts, indent, prefix) { + var lines = []; + var line = []; + + var lineLength = prefix ? prefix.length - 1 : indent.length - 1; + + parts.forEach(function (part) { + if (lineLength + 1 + part.length > textWidth) { + lines.push(indent + line.join(' ')); + line = []; + lineLength = indent.length - 1; + } + line.push(part); + lineLength += part.length + 1; + }); + + if (line) { + lines.push(indent + line.join(' ')); + } + if (prefix) { + lines[0] = lines[0].substr(indent.length); + } + return lines; + }; + + var lines, indent, parts; + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * textWidth) { + indent = $$.repeat(' ', (prefix.length + prog.length + 1)); + if (optionalParts) { + lines = [].concat( + _getLines([ prog ].concat(optionalParts), indent, prefix), + _getLines(positionalParts, indent) + ); + } else if (positionalParts) { + lines = _getLines([ prog ].concat(positionalParts), indent, prefix); + } else { + lines = [ prog ]; + } + + // if prog is long, put it on its own line + } else { + indent = $$.repeat(' ', prefix.length); + parts = optionalParts.concat(positionalParts); + lines = _getLines(parts, indent); + if (lines.length > 1) { + lines = [].concat( + _getLines(optionalParts, indent), + _getLines(positionalParts, indent) + ); + } + lines = [ prog ].concat(lines); + } + // join lines into usage + usage = lines.join(c.EOL); + } + } + + // prefix with 'usage:' + return prefix + usage + c.EOL + c.EOL; +}; + +HelpFormatter.prototype._formatActionsUsage = function (actions, groups) { + // find group indices and identify actions in groups + var groupActions = []; + var inserts = []; + var self = this; + + groups.forEach(function (group) { + var end; + var i; + + var start = actions.indexOf(group._groupActions[0]); + if (start >= 0) { + end = start + group._groupActions.length; + + //if (actions.slice(start, end) === group._groupActions) { + if ($$.arrayEqual(actions.slice(start, end), group._groupActions)) { + group._groupActions.forEach(function (action) { + groupActions.push(action); + }); + + if (!group.required) { + if (inserts[start]) { + inserts[start] += ' ['; + } else { + inserts[start] = '['; + } + inserts[end] = ']'; + } else { + if (inserts[start]) { + inserts[start] += ' ('; + } else { + inserts[start] = '('; + } + inserts[end] = ')'; + } + for (i = start + 1; i < end; i += 1) { + inserts[i] = '|'; + } + } + } + }); + + // collect all actions format strings + var parts = []; + + actions.forEach(function (action, actionIndex) { + var part; + var optionString; + var argsDefault; + var argsString; + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === c.SUPPRESS) { + parts.push(null); + if (inserts[actionIndex] === '|') { + inserts.splice(actionIndex, actionIndex); + } else if (inserts[actionIndex + 1] === '|') { + inserts.splice(actionIndex + 1, actionIndex + 1); + } + + // produce all arg strings + } else if (!action.isOptional()) { + part = self._formatArgs(action, action.dest); + + // if it's in a group, strip the outer [] + if (groupActions.indexOf(action) >= 0) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1); + } + } + // add the action string to the list + parts.push(part); + + // produce the first way to invoke the option in brackets + } else { + optionString = action.optionStrings[0]; + + // if the Optional doesn't take a value, format is: -s or --long + if (action.nargs === 0) { + part = '' + optionString; + + // if the Optional takes a value, format is: -s ARGS or --long ARGS + } else { + argsDefault = action.dest.toUpperCase(); + argsString = self._formatArgs(action, argsDefault); + part = optionString + ' ' + argsString; + } + // make it look optional if it's not required or in a group + if (!action.required && groupActions.indexOf(action) < 0) { + part = '[' + part + ']'; + } + // add the action string to the list + parts.push(part); + } + }); + + // insert things at the necessary indices + for (var i = inserts.length - 1; i >= 0; --i) { + if (inserts[i] !== null) { + parts.splice(i, 0, inserts[i]); + } + } + + // join all the action items with spaces + var text = parts.filter(function (part) { + return !!part; + }).join(' '); + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1'); // remove spaces + text = text.replace(/ ([\])])/g, '$1'); + text = text.replace(/\[ *\]/g, ''); // remove empty groups + text = text.replace(/\( *\)/g, ''); + text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups + + text = text.trim(); + + // return the text + return text; +}; + +HelpFormatter.prototype._formatText = function (text) { + text = sprintf(text, { prog: this._prog }); + var textWidth = this._width - this._currentIndent; + var indentIncriment = $$.repeat(' ', this._currentIndent); + return this._fillText(text, textWidth, indentIncriment) + c.EOL + c.EOL; +}; + +HelpFormatter.prototype._formatAction = function (action) { + var self = this; + + var helpText; + var helpLines; + var parts; + var indentFirst; + + // determine the required width and the entry label + var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition); + var helpWidth = this._width - helpPosition; + var actionWidth = helpPosition - this._currentIndent - 2; + var actionHeader = this._formatActionInvocation(action); + + // no help; start on same line and add a final newline + if (!action.help) { + actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; + + // short action name; start on the same line and pad two spaces + } else if (actionHeader.length <= actionWidth) { + actionHeader = $$.repeat(' ', this._currentIndent) + + actionHeader + + ' ' + + $$.repeat(' ', actionWidth - actionHeader.length); + indentFirst = 0; + + // long action name; start on the next line + } else { + actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; + indentFirst = helpPosition; + } + + // collect the pieces of the action help + parts = [ actionHeader ]; + + // if there was help for the action, add lines of help text + if (action.help) { + helpText = this._expandHelp(action); + helpLines = this._splitLines(helpText, helpWidth); + parts.push($$.repeat(' ', indentFirst) + helpLines[0] + c.EOL); + helpLines.slice(1).forEach(function (line) { + parts.push($$.repeat(' ', helpPosition) + line + c.EOL); + }); + + // or add a newline if the description doesn't end with one + } else if (actionHeader.charAt(actionHeader.length - 1) !== c.EOL) { + parts.push(c.EOL); + } + // if there are any sub-actions, add their help as well + if (action._getSubactions) { + this._indent(); + action._getSubactions().forEach(function (subaction) { + parts.push(self._formatAction(subaction)); + }); + this._dedent(); + } + // return a single string + return this._joinParts(parts); +}; + +HelpFormatter.prototype._formatActionInvocation = function (action) { + if (!action.isOptional()) { + var format_func = this._metavarFormatter(action, action.dest); + var metavars = format_func(1); + return metavars[0]; + } + + var parts = []; + var argsDefault; + var argsString; + + // if the Optional doesn't take a value, format is: -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.optionStrings); + + // if the Optional takes a value, format is: -s ARGS, --long ARGS + } else { + argsDefault = action.dest.toUpperCase(); + argsString = this._formatArgs(action, argsDefault); + action.optionStrings.forEach(function (optionString) { + parts.push(optionString + ' ' + argsString); + }); + } + return parts.join(', '); +}; + +HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) { + var result; + + if (action.metavar || action.metavar === '') { + result = action.metavar; + } else if (action.choices) { + var choices = action.choices; + + if (typeof choices === 'string') { + choices = choices.split('').join(', '); + } else if (Array.isArray(choices)) { + choices = choices.join(','); + } else { + choices = Object.keys(choices).join(','); + } + result = '{' + choices + '}'; + } else { + result = metavarDefault; + } + + return function (size) { + if (Array.isArray(result)) { + return result; + } + + var metavars = []; + for (var i = 0; i < size; i += 1) { + metavars.push(result); + } + return metavars; + }; +}; + +HelpFormatter.prototype._formatArgs = function (action, metavarDefault) { + var result; + var metavars; + + var buildMetavar = this._metavarFormatter(action, metavarDefault); + + switch (action.nargs) { + /*eslint-disable no-undefined*/ + case undefined: + case null: + metavars = buildMetavar(1); + result = '' + metavars[0]; + break; + case c.OPTIONAL: + metavars = buildMetavar(1); + result = '[' + metavars[0] + ']'; + break; + case c.ZERO_OR_MORE: + metavars = buildMetavar(2); + result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]'; + break; + case c.ONE_OR_MORE: + metavars = buildMetavar(2); + result = '' + metavars[0] + ' [' + metavars[1] + ' ...]'; + break; + case c.REMAINDER: + result = '...'; + break; + case c.PARSER: + metavars = buildMetavar(1); + result = metavars[0] + ' ...'; + break; + default: + metavars = buildMetavar(action.nargs); + result = metavars.join(' '); + } + return result; +}; + +HelpFormatter.prototype._expandHelp = function (action) { + var params = { prog: this._prog }; + + Object.keys(action).forEach(function (actionProperty) { + var actionValue = action[actionProperty]; + + if (actionValue !== c.SUPPRESS) { + params[actionProperty] = actionValue; + } + }); + + if (params.choices) { + if (typeof params.choices === 'string') { + params.choices = params.choices.split('').join(', '); + } else if (Array.isArray(params.choices)) { + params.choices = params.choices.join(', '); + } else { + params.choices = Object.keys(params.choices).join(', '); + } + } + + return sprintf(this._getHelpString(action), params); +}; + +HelpFormatter.prototype._splitLines = function (text, width) { + var lines = []; + var delimiters = [ ' ', '.', ',', '!', '?' ]; + var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$'); + + text = text.replace(/[\n\|\t]/g, ' '); + + text = text.trim(); + text = text.replace(this._whitespaceMatcher, ' '); + + // Wraps the single paragraph in text (a string) so every line + // is at most width characters long. + text.split(c.EOL).forEach(function (line) { + if (width >= line.length) { + lines.push(line); + return; + } + + var wrapStart = 0; + var wrapEnd = width; + var delimiterIndex = 0; + while (wrapEnd <= line.length) { + if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) { + delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index; + wrapEnd = wrapStart + delimiterIndex + 1; + } + lines.push(line.substring(wrapStart, wrapEnd)); + wrapStart = wrapEnd; + wrapEnd += width; + } + if (wrapStart < line.length) { + lines.push(line.substring(wrapStart, wrapEnd)); + } + }); + + return lines; +}; + +HelpFormatter.prototype._fillText = function (text, width, indent) { + var lines = this._splitLines(text, width); + lines = lines.map(function (line) { + return indent + line; + }); + return lines.join(c.EOL); +}; + +HelpFormatter.prototype._getHelpString = function (action) { + return action.help; +}; diff --git a/node_modules/argparse/lib/namespace.js b/node_modules/argparse/lib/namespace.js @@ -0,0 +1,76 @@ +/** + * class Namespace + * + * Simple object for storing attributes. Implements equality by attribute names + * and values, and provides a simple string representation. + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object + **/ +'use strict'; + +var $$ = require('./utils'); + +/** + * new Namespace(options) + * - options(object): predefined propertis for result object + * + **/ +var Namespace = module.exports = function Namespace(options) { + $$.extend(this, options); +}; + +/** + * Namespace#isset(key) -> Boolean + * - key (string|number): property name + * + * Tells whenever `namespace` contains given `key` or not. + **/ +Namespace.prototype.isset = function (key) { + return $$.has(this, key); +}; + +/** + * Namespace#set(key, value) -> self + * -key (string|number|object): propery name + * -value (mixed): new property value + * + * Set the property named key with value. + * If key object then set all key properties to namespace object + **/ +Namespace.prototype.set = function (key, value) { + if (typeof (key) === 'object') { + $$.extend(this, key); + } else { + this[key] = value; + } + return this; +}; + +/** + * Namespace#get(key, defaultValue) -> mixed + * - key (string|number): property name + * - defaultValue (mixed): default value + * + * Return the property key or defaulValue if not set + **/ +Namespace.prototype.get = function (key, defaultValue) { + return !this[key] ? defaultValue : this[key]; +}; + +/** + * Namespace#unset(key, defaultValue) -> mixed + * - key (string|number): property name + * - defaultValue (mixed): default value + * + * Return data[key](and delete it) or defaultValue + **/ +Namespace.prototype.unset = function (key, defaultValue) { + var value = this[key]; + if (value !== null) { + delete this[key]; + return value; + } + return defaultValue; +}; diff --git a/node_modules/argparse/lib/utils.js b/node_modules/argparse/lib/utils.js @@ -0,0 +1,57 @@ +'use strict'; + +exports.repeat = function (str, num) { + var result = ''; + for (var i = 0; i < num; i++) { result += str; } + return result; +}; + +exports.arrayEqual = function (a, b) { + if (a.length !== b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; +}; + +exports.trimChars = function (str, chars) { + var start = 0; + var end = str.length - 1; + while (chars.indexOf(str.charAt(start)) >= 0) { start++; } + while (chars.indexOf(str.charAt(end)) >= 0) { end--; } + return str.slice(start, end + 1); +}; + +exports.capitalize = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +exports.arrayUnion = function () { + var result = []; + for (var i = 0, values = {}; i < arguments.length; i++) { + var arr = arguments[i]; + for (var j = 0; j < arr.length; j++) { + if (!values[arr[j]]) { + values[arr[j]] = true; + result.push(arr[j]); + } + } + } + return result; +}; + +function has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.has = has; + +exports.extend = function (dest, src) { + for (var i in src) { + if (has(src, i)) { dest[i] = src[i]; } + } +}; + +exports.trimEnd = function (str) { + return str.replace(/\s+$/g, ''); +}; diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json @@ -0,0 +1,70 @@ +{ + "_from": "argparse@^1.0.7", + "_id": "argparse@1.0.10", + "_inBundle": false, + "_integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "_location": "/argparse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "argparse@^1.0.7", + "name": "argparse", + "escapedName": "argparse", + "rawSpec": "^1.0.7", + "saveSpec": null, + "fetchSpec": "^1.0.7" + }, + "_requiredBy": [ + "/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "_shasum": "bcd6791ea5ae09725e17e5ad988134cd40b3d911", + "_spec": "argparse@^1.0.7", + "_where": "/home/l0bster/Documents/l0bsterSSG/node_modules/js-yaml", + "bugs": { + "url": "https://github.com/nodeca/argparse/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Eugene Shkuropat" + }, + { + "name": "Paul Jacobson" + } + ], + "dependencies": { + "sprintf-js": "~1.0.2" + }, + "deprecated": false, + "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", + "devDependencies": { + "eslint": "^2.13.1", + "istanbul": "^0.4.5", + "mocha": "^3.1.0", + "ndoc": "^5.0.1" + }, + "files": [ + "index.js", + "lib/" + ], + "homepage": "https://github.com/nodeca/argparse#readme", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "license": "MIT", + "name": "argparse", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/argparse.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.0.10" +} diff --git a/node_modules/esprima/ChangeLog b/node_modules/esprima/ChangeLog @@ -0,0 +1,235 @@ +2018-06-17: Version 4.0.1 + + * Fix parsing async get/set in a class (issue 1861, 1875) + * Account for different return statement argument (issue 1829, 1897, 1928) + * Correct the handling of HTML comment when parsing a module (issue 1841) + * Fix incorrect parse async with proto-identifier-shorthand (issue 1847) + * Fix negative column in binary expression (issue 1844) + * Fix incorrect YieldExpression in object methods (issue 1834) + * Various documentation fixes + +2017-06-10: Version 4.0.0 + + * Support ES2017 async function and await expression (issue 1079) + * Support ES2017 trailing commas in function parameters (issue 1550) + * Explicitly distinguish parsing a module vs a script (issue 1576) + * Fix JSX non-empty container (issue 1786) + * Allow JSX element in a yield expression (issue 1765) + * Allow `in` expression in a concise body with a function body (issue 1793) + * Setter function argument must not be a rest parameter (issue 1693) + * Limit strict mode directive to functions with a simple parameter list (issue 1677) + * Prohibit any escape sequence in a reserved word (issue 1612) + * Only permit hex digits in hex escape sequence (issue 1619) + * Prohibit labelled class/generator/function declaration (issue 1484) + * Limit function declaration as if statement clause only in non-strict mode (issue 1657) + * Tolerate missing ) in a with and do-while statement (issue 1481) + +2016-12-22: Version 3.1.3 + + * Support binding patterns as rest element (issue 1681) + * Account for different possible arguments of a yield expression (issue 1469) + +2016-11-24: Version 3.1.2 + + * Ensure that import specifier is more restrictive (issue 1615) + * Fix duplicated JSX tokens (issue 1613) + * Scan template literal in a JSX expression container (issue 1622) + * Improve XHTML entity scanning in JSX (issue 1629) + +2016-10-31: Version 3.1.1 + + * Fix assignment expression problem in an export declaration (issue 1596) + * Fix incorrect tokenization of hex digits (issue 1605) + +2016-10-09: Version 3.1.0 + + * Do not implicitly collect comments when comment attachment is specified (issue 1553) + * Fix incorrect handling of duplicated proto shorthand fields (issue 1485) + * Prohibit initialization in some variants of for statements (issue 1309, 1561) + * Fix incorrect parsing of export specifier (issue 1578) + * Fix ESTree compatibility for assignment pattern (issue 1575) + +2016-09-03: Version 3.0.0 + + * Support ES2016 exponentiation expression (issue 1490) + * Support JSX syntax (issue 1467) + * Use the latest Unicode 8.0 (issue 1475) + * Add the support for syntax node delegate (issue 1435) + * Fix ESTree compatibility on meta property (issue 1338) + * Fix ESTree compatibility on default parameter value (issue 1081) + * Fix ESTree compatibility on try handler (issue 1030) + +2016-08-23: Version 2.7.3 + + * Fix tokenizer confusion with a comment (issue 1493, 1516) + +2016-02-02: Version 2.7.2 + + * Fix out-of-bound error location in an invalid string literal (issue 1457) + * Fix shorthand object destructuring defaults in variable declarations (issue 1459) + +2015-12-10: Version 2.7.1 + + * Do not allow trailing comma in a variable declaration (issue 1360) + * Fix assignment to `let` in non-strict mode (issue 1376) + * Fix missing delegate property in YieldExpression (issue 1407) + +2015-10-22: Version 2.7.0 + + * Fix the handling of semicolon in a break statement (issue 1044) + * Run the test suite with major web browsers (issue 1259, 1317) + * Allow `let` as an identifier in non-strict mode (issue 1289) + * Attach orphaned comments as `innerComments` (issue 1328) + * Add the support for token delegator (issue 1332) + +2015-09-01: Version 2.6.0 + + * Properly allow or prohibit `let` in a binding identifier/pattern (issue 1048, 1098) + * Add sourceType field for Program node (issue 1159) + * Ensure that strict mode reserved word binding throw an error (issue 1171) + * Run the test suite with Node.js and IE 11 on Windows (issue 1294) + * Allow binding pattern with no initializer in a for statement (issue 1301) + +2015-07-31: Version 2.5.0 + + * Run the test suite in a browser environment (issue 1004) + * Ensure a comma between imported default binding and named imports (issue 1046) + * Distinguish `yield` as a keyword vs an identifier (issue 1186) + * Support ES6 meta property `new.target` (issue 1203) + * Fix the syntax node for yield with expression (issue 1223) + * Fix the check of duplicated proto in property names (issue 1225) + * Fix ES6 Unicode escape in identifier name (issue 1229) + * Support ES6 IdentifierStart and IdentifierPart (issue 1232) + * Treat await as a reserved word when parsing as a module (issue 1234) + * Recognize identifier characters from Unicode SMP (issue 1244) + * Ensure that export and import can be followed by a comma (issue 1250) + * Fix yield operator precedence (issue 1262) + +2015-07-01: Version 2.4.1 + + * Fix some cases of comment attachment (issue 1071, 1175) + * Fix the handling of destructuring in function arguments (issue 1193) + * Fix invalid ranges in assignment expression (issue 1201) + +2015-06-26: Version 2.4.0 + + * Support ES6 for-of iteration (issue 1047) + * Support ES6 spread arguments (issue 1169) + * Minimize npm payload (issue 1191) + +2015-06-16: Version 2.3.0 + + * Support ES6 generator (issue 1033) + * Improve parsing of regular expressions with `u` flag (issue 1179) + +2015-04-17: Version 2.2.0 + + * Support ES6 import and export declarations (issue 1000) + * Fix line terminator before arrow not recognized as error (issue 1009) + * Support ES6 destructuring (issue 1045) + * Support ES6 template literal (issue 1074) + * Fix the handling of invalid/incomplete string escape sequences (issue 1106) + * Fix ES3 static member access restriction (issue 1120) + * Support for `super` in ES6 class (issue 1147) + +2015-03-09: Version 2.1.0 + + * Support ES6 class (issue 1001) + * Support ES6 rest parameter (issue 1011) + * Expand the location of property getter, setter, and methods (issue 1029) + * Enable TryStatement transition to a single handler (issue 1031) + * Support ES6 computed property name (issue 1037) + * Tolerate unclosed block comment (issue 1041) + * Support ES6 lexical declaration (issue 1065) + +2015-02-06: Version 2.0.0 + + * Support ES6 arrow function (issue 517) + * Support ES6 Unicode code point escape (issue 521) + * Improve the speed and accuracy of comment attachment (issue 522) + * Support ES6 default parameter (issue 519) + * Support ES6 regular expression flags (issue 557) + * Fix scanning of implicit octal literals (issue 565) + * Fix the handling of automatic semicolon insertion (issue 574) + * Support ES6 method definition (issue 620) + * Support ES6 octal integer literal (issue 621) + * Support ES6 binary integer literal (issue 622) + * Support ES6 object literal property value shorthand (issue 624) + +2015-03-03: Version 1.2.5 + + * Fix scanning of implicit octal literals (issue 565) + +2015-02-05: Version 1.2.4 + + * Fix parsing of LeftHandSideExpression in ForInStatement (issue 560) + * Fix the handling of automatic semicolon insertion (issue 574) + +2015-01-18: Version 1.2.3 + + * Fix division by this (issue 616) + +2014-05-18: Version 1.2.2 + + * Fix duplicated tokens when collecting comments (issue 537) + +2014-05-04: Version 1.2.1 + + * Ensure that Program node may still have leading comments (issue 536) + +2014-04-29: Version 1.2.0 + + * Fix semicolon handling for expression statement (issue 462, 533) + * Disallow escaped characters in regular expression flags (issue 503) + * Performance improvement for location tracking (issue 520) + * Improve the speed of comment attachment (issue 522) + +2014-03-26: Version 1.1.1 + + * Fix token handling of forward slash after an array literal (issue 512) + +2014-03-23: Version 1.1.0 + + * Optionally attach comments to the owning syntax nodes (issue 197) + * Simplify binary parsing with stack-based shift reduce (issue 352) + * Always include the raw source of literals (issue 376) + * Add optional input source information (issue 386) + * Tokenizer API for pure lexical scanning (issue 398) + * Improve the web site and its online demos (issue 337, 400, 404) + * Performance improvement for location tracking (issue 417, 424) + * Support HTML comment syntax (issue 451) + * Drop support for legacy browsers (issue 474) + +2013-08-27: Version 1.0.4 + + * Minimize the payload for packages (issue 362) + * Fix missing cases on an empty switch statement (issue 436) + * Support escaped ] in regexp literal character classes (issue 442) + * Tolerate invalid left-hand side expression (issue 130) + +2013-05-17: Version 1.0.3 + + * Variable declaration needs at least one declarator (issue 391) + * Fix benchmark's variance unit conversion (issue 397) + * IE < 9: \v should be treated as vertical tab (issue 405) + * Unary expressions should always have prefix: true (issue 418) + * Catch clause should only accept an identifier (issue 423) + * Tolerate setters without parameter (issue 426) + +2012-11-02: Version 1.0.2 + + Improvement: + + * Fix esvalidate JUnit output upon a syntax error (issue 374) + +2012-10-28: Version 1.0.1 + + Improvements: + + * esvalidate understands shebang in a Unix shell script (issue 361) + * esvalidate treats fatal parsing failure as an error (issue 361) + * Reduce Node.js package via .npmignore (issue 362) + +2012-10-22: Version 1.0.0 + + Initial release. diff --git a/node_modules/esprima/LICENSE.BSD b/node_modules/esprima/LICENSE.BSD @@ -0,0 +1,21 @@ +Copyright JS Foundation and other contributors, https://js.foundation/ + +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. + +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 <COPYRIGHT HOLDER> 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/node_modules/esprima/README.md b/node_modules/esprima/README.md @@ -0,0 +1,46 @@ +[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima) +[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima) +[![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima) +[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima) + +**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, +standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +parser written in ECMAScript (also popularly known as +[JavaScript](https://en.wikipedia.org/wiki/JavaScript)). +Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat), +with the help of [many contributors](https://github.com/jquery/esprima/contributors). + +### Features + +- Full support for ECMAScript 2017 ([ECMA-262 8th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) +- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree) +- Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/) +- Optional tracking of syntax node location (index-based and line-column) +- [Heavily tested](http://esprima.org/test/ci.html) (~1500 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima)) + +### API + +Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program. + +A simple example on Node.js REPL: + +```javascript +> var esprima = require('esprima'); +> var program = 'const answer = 42'; + +> esprima.tokenize(program); +[ { type: 'Keyword', value: 'const' }, + { type: 'Identifier', value: 'answer' }, + { type: 'Punctuator', value: '=' }, + { type: 'Numeric', value: '42' } ] + +> esprima.parseScript(program); +{ type: 'Program', + body: + [ { type: 'VariableDeclaration', + declarations: [Object], + kind: 'const' } ], + sourceType: 'script' } +``` + +For more information, please read the [complete documentation](http://esprima.org/doc).+ \ No newline at end of file diff --git a/node_modules/esprima/bin/esparse.js b/node_modules/esprima/bin/esparse.js @@ -0,0 +1,139 @@ +#!/usr/bin/env node +/* + Copyright JS Foundation and other contributors, https://js.foundation/ + + 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. + + 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 <COPYRIGHT HOLDER> 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. +*/ + +/*jslint sloppy:true node:true rhino:true */ + +var fs, esprima, fname, forceFile, content, options, syntax; + +if (typeof require === 'function') { + fs = require('fs'); + try { + esprima = require('esprima'); + } catch (e) { + esprima = require('../'); + } +} else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esparse.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esparse [options] [file.js]'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --comment Gather all line and block comments in an array'); + console.log(' --loc Include line-column location info for each syntax node'); + console.log(' --range Include index-based range for each syntax node'); + console.log(' --raw Display the raw value of literals'); + console.log(' --tokens List all tokens in an array'); + console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); + console.log(' -v, --version Shows program version'); + console.log(); + process.exit(1); +} + +options = {}; + +process.argv.splice(2).forEach(function (entry) { + + if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') { + if (typeof fname === 'string') { + console.log('Error: more than one input file.'); + process.exit(1); + } else { + fname = entry; + } + } else if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry === '--comment') { + options.comment = true; + } else if (entry === '--loc') { + options.loc = true; + } else if (entry === '--range') { + options.range = true; + } else if (entry === '--raw') { + options.raw = true; + } else if (entry === '--tokens') { + options.tokens = true; + } else if (entry === '--tolerant') { + options.tolerant = true; + } else if (entry === '--') { + forceFile = true; + } else { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } +}); + +// Special handling for regular expression literal since we need to +// convert it to a string literal, otherwise it will be decoded +// as object "{}" and the regular expression would be lost. +function adjustRegexLiteral(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return value; +} + +function run(content) { + syntax = esprima.parse(content, options); + console.log(JSON.stringify(syntax, adjustRegexLiteral, 4)); +} + +try { + if (fname && (fname !== '-' || forceFile)) { + run(fs.readFileSync(fname, 'utf-8')); + } else { + var content = ''; + process.stdin.resume(); + process.stdin.on('data', function(chunk) { + content += chunk; + }); + process.stdin.on('end', function() { + run(content); + }); + } +} catch (e) { + console.log('Error: ' + e.message); + process.exit(1); +} diff --git a/node_modules/esprima/bin/esvalidate.js b/node_modules/esprima/bin/esvalidate.js @@ -0,0 +1,236 @@ +#!/usr/bin/env node +/* + Copyright JS Foundation and other contributors, https://js.foundation/ + + 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. + + 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 <COPYRIGHT HOLDER> 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. +*/ + +/*jslint sloppy:true plusplus:true node:true rhino:true */ +/*global phantom:true */ + +var fs, system, esprima, options, fnames, forceFile, count; + +if (typeof esprima === 'undefined') { + // PhantomJS can only require() relative files + if (typeof phantom === 'object') { + fs = require('fs'); + system = require('system'); + esprima = require('./esprima'); + } else if (typeof require === 'function') { + fs = require('fs'); + try { + esprima = require('esprima'); + } catch (e) { + esprima = require('../'); + } + } else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } + } +} + +// Shims to Node.js objects when running under PhantomJS 1.7+. +if (typeof phantom === 'object') { + fs.readFileSync = fs.read; + process = { + argv: [].slice.call(system.args), + exit: phantom.exit, + on: function (evt, callback) { + callback(); + } + }; + process.argv.unshift('phantomjs'); +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { + argv: arguments, + exit: quit, + on: function (evt, callback) { + callback(); + } + }; + process.argv.unshift('esvalidate.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esvalidate [options] [file.js...]'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --format=type Set the report format, plain (default) or junit'); + console.log(' -v, --version Print program version'); + console.log(); + process.exit(1); +} + +options = { + format: 'plain' +}; + +fnames = []; + +process.argv.splice(2).forEach(function (entry) { + + if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') { + fnames.push(entry); + } else if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry.slice(0, 9) === '--format=') { + options.format = entry.slice(9); + if (options.format !== 'plain' && options.format !== 'junit') { + console.log('Error: unknown report format ' + options.format + '.'); + process.exit(1); + } + } else if (entry === '--') { + forceFile = true; + } else { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } +}); + +if (fnames.length === 0) { + fnames.push(''); +} + +if (options.format === 'junit') { + console.log('<?xml version="1.0" encoding="UTF-8"?>'); + console.log('<testsuites>'); +} + +count = 0; + +function run(fname, content) { + var timestamp, syntax, name; + try { + if (typeof content !== 'string') { + throw content; + } + + if (content[0] === '#' && content[1] === '!') { + content = '//' + content.substr(2, content.length); + } + + timestamp = Date.now(); + syntax = esprima.parse(content, { tolerant: true }); + + if (options.format === 'junit') { + + name = fname; + if (name.lastIndexOf('/') >= 0) { + name = name.slice(name.lastIndexOf('/') + 1); + } + + console.log('<testsuite name="' + fname + '" errors="0" ' + + ' failures="' + syntax.errors.length + '" ' + + ' tests="' + syntax.errors.length + '" ' + + ' time="' + Math.round((Date.now() - timestamp) / 1000) + + '">'); + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + console.log(' <testcase name="Line ' + error.lineNumber + ': ' + msg + '" ' + + ' time="0">'); + console.log(' <error type="SyntaxError" message="' + error.message + '">' + + error.message + '(' + name + ':' + error.lineNumber + ')' + + '</error>'); + console.log(' </testcase>'); + }); + + console.log('</testsuite>'); + + } else if (options.format === 'plain') { + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + msg = fname + ':' + error.lineNumber + ': ' + msg; + console.log(msg); + ++count; + }); + + } + } catch (e) { + ++count; + if (options.format === 'junit') { + console.log('<testsuite name="' + fname + '" errors="1" failures="0" tests="1" ' + + ' time="' + Math.round((Date.now() - timestamp) / 1000) + '">'); + console.log(' <testcase name="' + e.message + '" ' + ' time="0">'); + console.log(' <error type="ParseError" message="' + e.message + '">' + + e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + + ')</error>'); + console.log(' </testcase>'); + console.log('</testsuite>'); + } else { + console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, '')); + } + } +} + +fnames.forEach(function (fname) { + var content = ''; + try { + if (fname && (fname !== '-' || forceFile)) { + content = fs.readFileSync(fname, 'utf-8'); + } else { + fname = ''; + process.stdin.resume(); + process.stdin.on('data', function(chunk) { + content += chunk; + }); + process.stdin.on('end', function() { + run(fname, content); + }); + return; + } + } catch (e) { + content = e; + } + run(fname, content); +}); + +process.on('exit', function () { + if (options.format === 'junit') { + console.log('</testsuites>'); + } + + if (count > 0) { + process.exit(1); + } + + if (count === 0 && typeof phantom === 'object') { + process.exit(0); + } +}); diff --git a/node_modules/esprima/dist/esprima.js b/node_modules/esprima/dist/esprima.js @@ -0,0 +1,6709 @@ +(function webpackUniversalModuleDefinition(root, factory) { +/* istanbul ignore next */ + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); +/* istanbul ignore next */ + else if(typeof exports === 'object') + exports["esprima"] = factory(); + else + root["esprima"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/* istanbul ignore if */ +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + /* + Copyright JS Foundation and other contributors, https://js.foundation/ + + 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. + + 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 <COPYRIGHT HOLDER> 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. + */ + Object.defineProperty(exports, "__esModule", { value: true }); + var comment_handler_1 = __webpack_require__(1); + var jsx_parser_1 = __webpack_require__(3); + var parser_1 = __webpack_require__(8); + var tokenizer_1 = __webpack_require__(15); + function parse(code, options, delegate) { + var commentHandler = null; + var proxyDelegate = function (node, metadata) { + if (delegate) { + delegate(node, metadata); + } + if (commentHandler) { + commentHandler.visit(node, metadata); + } + }; + var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null; + var collectComment = false; + if (options) { + collectComment = (typeof options.comment === 'boolean' && options.comment); + var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment); + if (collectComment || attachComment) { + commentHandler = new comment_handler_1.CommentHandler(); + commentHandler.attach = attachComment; + options.comment = true; + parserDelegate = proxyDelegate; + } + } + var isModule = false; + if (options && typeof options.sourceType === 'string') { + isModule = (options.sourceType === 'module'); + } + var parser; + if (options && typeof options.jsx === 'boolean' && options.jsx) { + parser = new jsx_parser_1.JSXParser(code, options, parserDelegate); + } + else { + parser = new parser_1.Parser(code, options, parserDelegate); + } + var program = isModule ? parser.parseModule() : parser.parseScript(); + var ast = program; + if (collectComment && commentHandler) { + ast.comments = commentHandler.comments; + } + if (parser.config.tokens) { + ast.tokens = parser.tokens; + } + if (parser.config.tolerant) { + ast.errors = parser.errorHandler.errors; + } + return ast; + } + exports.parse = parse; + function parseModule(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = 'module'; + return parse(code, parsingOptions, delegate); + } + exports.parseModule = parseModule; + function parseScript(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = 'script'; + return parse(code, parsingOptions, delegate); + } + exports.parseScript = parseScript; + function tokenize(code, options, delegate) { + var tokenizer = new tokenizer_1.Tokenizer(code, options); + var tokens; + tokens = []; + try { + while (true) { + var token = tokenizer.getNextToken(); + if (!token) { + break; + } + if (delegate) { + token = delegate(token); + } + tokens.push(token); + } + } + catch (e) { + tokenizer.errorHandler.tolerate(e); + } + if (tokenizer.errorHandler.tolerant) { + tokens.errors = tokenizer.errors(); + } + return tokens; + } + exports.tokenize = tokenize; + var syntax_1 = __webpack_require__(2); + exports.Syntax = syntax_1.Syntax; + // Sync with *.json manifests. + exports.version = '4.0.1'; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + var CommentHandler = (function () { + function CommentHandler() { + this.attach = false; + this.comments = []; + this.stack = []; + this.leading = []; + this.trailing = []; + } + CommentHandler.prototype.insertInnerComments = function (node, metadata) { + // innnerComments for properties empty block + // `function a() {/** comments **\/}` + if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) { + var innerComments = []; + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (metadata.end.offset >= entry.start) { + innerComments.unshift(entry.comment); + this.leading.splice(i, 1); + this.trailing.splice(i, 1); + } + } + if (innerComments.length) { + node.innerComments = innerComments; + } + } + }; + CommentHandler.prototype.findTrailingComments = function (metadata) { + var trailingComments = []; + if (this.trailing.length > 0) { + for (var i = this.trailing.length - 1; i >= 0; --i) { + var entry_1 = this.trailing[i]; + if (entry_1.start >= metadata.end.offset) { + trailingComments.unshift(entry_1.comment); + } + } + this.trailing.length = 0; + return trailingComments; + } + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.node.trailingComments) { + var firstComment = entry.node.trailingComments[0]; + if (firstComment && firstComment.range[0] >= metadata.end.offset) { + trailingComments = entry.node.trailingComments; + delete entry.node.trailingComments; + } + } + return trailingComments; + }; + CommentHandler.prototype.findLeadingComments = function (metadata) { + var leadingComments = []; + var target; + while (this.stack.length > 0) { + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.start >= metadata.start.offset) { + target = entry.node; + this.stack.pop(); + } + else { + break; + } + } + if (target) { + var count = target.leadingComments ? target.leadingComments.length : 0; + for (var i = count - 1; i >= 0; --i) { + var comment = target.leadingComments[i]; + if (comment.range[1] <= metadata.start.offset) { + leadingComments.unshift(comment); + target.leadingComments.splice(i, 1); + } + } + if (target.leadingComments && target.leadingComments.length === 0) { + delete target.leadingComments; + } + return leadingComments; + } + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (entry.start <= metadata.start.offset) { + leadingComments.unshift(entry.comment); + this.leading.splice(i, 1); + } + } + return leadingComments; + }; + CommentHandler.prototype.visitNode = function (node, metadata) { + if (node.type === syntax_1.Syntax.Program && node.body.length > 0) { + return; + } + this.insertInnerComments(node, metadata); + var trailingComments = this.findTrailingComments(metadata); + var leadingComments = this.findLeadingComments(metadata); + if (leadingComments.length > 0) { + node.leadingComments = leadingComments; + } + if (trailingComments.length > 0) { + node.trailingComments = trailingComments; + } + this.stack.push({ + node: node, + start: metadata.start.offset + }); + }; + CommentHandler.prototype.visitComment = function (node, metadata) { + var type = (node.type[0] === 'L') ? 'Line' : 'Block'; + var comment = { + type: type, + value: node.value + }; + if (node.range) { + comment.range = node.range; + } + if (node.loc) { + comment.loc = node.loc; + } + this.comments.push(comment); + if (this.attach) { + var entry = { + comment: { + type: type, + value: node.value, + range: [metadata.start.offset, metadata.end.offset] + }, + start: metadata.start.offset + }; + if (node.loc) { + entry.comment.loc = node.loc; + } + node.type = type; + this.leading.push(entry); + this.trailing.push(entry); + } + }; + CommentHandler.prototype.visit = function (node, metadata) { + if (node.type === 'LineComment') { + this.visitComment(node, metadata); + } + else if (node.type === 'BlockComment') { + this.visitComment(node, metadata); + } + else if (this.attach) { + this.visitNode(node, metadata); + } + }; + return CommentHandler; + }()); + exports.CommentHandler = CommentHandler; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForOfStatement: 'ForOfStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; +/* istanbul ignore next */ + var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + var character_1 = __webpack_require__(4); + var JSXNode = __webpack_require__(5); + var jsx_syntax_1 = __webpack_require__(6); + var Node = __webpack_require__(7); + var parser_1 = __webpack_require__(8); + var token_1 = __webpack_require__(13); + var xhtml_entities_1 = __webpack_require__(14); + token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier'; + token_1.TokenName[101 /* Text */] = 'JSXText'; + // Fully qualified element name, e.g. <svg:path> returns "svg:path" + function getQualifiedElementName(elementName) { + var qualifiedName; + switch (elementName.type) { + case jsx_syntax_1.JSXSyntax.JSXIdentifier: + var id = elementName; + qualifiedName = id.name; + break; + case jsx_syntax_1.JSXSyntax.JSXNamespacedName: + var ns = elementName; + qualifiedName = getQualifiedElementName(ns.namespace) + ':' + + getQualifiedElementName(ns.name); + break; + case jsx_syntax_1.JSXSyntax.JSXMemberExpression: + var expr = elementName; + qualifiedName = getQualifiedElementName(expr.object) + '.' + + getQualifiedElementName(expr.property); + break; + /* istanbul ignore next */ + default: + break; + } + return qualifiedName; + } + var JSXParser = (function (_super) { + __extends(JSXParser, _super); + function JSXParser(code, options, delegate) { + return _super.call(this, code, options, delegate) || this; + } + JSXParser.prototype.parsePrimaryExpression = function () { + return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this); + }; + JSXParser.prototype.startJSX = function () { + // Unwind the scanner before the lookahead token. + this.scanner.index = this.startMarker.index; + this.scanner.lineNumber = this.startMarker.line; + this.scanner.lineStart = this.startMarker.index - this.startMarker.column; + }; + JSXParser.prototype.finishJSX = function () { + // Prime the next lookahead. + this.nextToken(); + }; + JSXParser.prototype.reenterJSX = function () { + this.startJSX(); + this.expectJSX('}'); + // Pop the closing '}' added from the lookahead. + if (this.config.tokens) { + this.tokens.pop(); + } + }; + JSXParser.prototype.createJSXNode = function () { + this.collectComments(); + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.createJSXChildNode = function () { + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.scanXHTMLEntity = function (quote) { + var result = '&'; + var valid = true; + var terminated = false; + var numeric = false; + var hex = false; + while (!this.scanner.eof() && valid && !terminated) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === quote) { + break; + } + terminated = (ch === ';'); + result += ch; + ++this.scanner.index; + if (!terminated) { + switch (result.length) { + case 2: + // e.g. '&#123;' + numeric = (ch === '#'); + break; + case 3: + if (numeric) { + // e.g. '&#x41;' + hex = (ch === 'x'); + valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0)); + numeric = numeric && !hex; + } + break; + default: + valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0))); + valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0))); + break; + } + } + } + if (valid && terminated && result.length > 2) { + // e.g. '&#x41;' becomes just '#x41' + var str = result.substr(1, result.length - 2); + if (numeric && str.length > 1) { + result = String.fromCharCode(parseInt(str.substr(1), 10)); + } + else if (hex && str.length > 2) { + result = String.fromCharCode(parseInt('0' + str.substr(1), 16)); + } + else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) { + result = xhtml_entities_1.XHTMLEntities[str]; + } + } + return result; + }; + // Scan the next JSX token. This replaces Scanner#lex when in JSX mode. + JSXParser.prototype.lexJSX = function () { + var cp = this.scanner.source.charCodeAt(this.scanner.index); + // < > / : = { } + if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) { + var value = this.scanner.source[this.scanner.index++]; + return { + type: 7 /* Punctuator */, + value: value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index - 1, + end: this.scanner.index + }; + } + // " ' + if (cp === 34 || cp === 39) { + var start = this.scanner.index; + var quote = this.scanner.source[this.scanner.index++]; + var str = ''; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index++]; + if (ch === quote) { + break; + } + else if (ch === '&') { + str += this.scanXHTMLEntity(quote); + } + else { + str += ch; + } + } + return { + type: 8 /* StringLiteral */, + value: str, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + // ... or . + if (cp === 46) { + var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1); + var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2); + var value = (n1 === 46 && n2 === 46) ? '...' : '.'; + var start = this.scanner.index; + this.scanner.index += value.length; + return { + type: 7 /* Punctuator */, + value: value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + // ` + if (cp === 96) { + // Only placeholder, since it will be rescanned as a real assignment expression. + return { + type: 10 /* Template */, + value: '', + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index, + end: this.scanner.index + }; + } + // Identifer can not contain backslash (char code 92). + if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) { + var start = this.scanner.index; + ++this.scanner.index; + while (!this.scanner.eof()) { + var ch = this.scanner.source.charCodeAt(this.scanner.index); + if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) { + ++this.scanner.index; + } + else if (ch === 45) { + // Hyphen (char code 45) can be part of an identifier. + ++this.scanner.index; + } + else { + break; + } + } + var id = this.scanner.source.slice(start, this.scanner.index); + return { + type: 100 /* Identifier */, + value: id, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + } + return this.scanner.lex(); + }; + JSXParser.prototype.nextJSXToken = function () { + this.collectComments(); + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var token = this.lexJSX(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + if (this.config.tokens) { + this.tokens.push(this.convertToken(token)); + } + return token; + }; + JSXParser.prototype.nextJSXText = function () { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var start = this.scanner.index; + var text = ''; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === '{' || ch === '<') { + break; + } + ++this.scanner.index; + text += ch; + if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + ++this.scanner.lineNumber; + if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') { + ++this.scanner.index; + } + this.scanner.lineStart = this.scanner.index; + } + } + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + var token = { + type: 101 /* Text */, + value: text, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: start, + end: this.scanner.index + }; + if ((text.length > 0) && this.config.tokens) { + this.tokens.push(this.convertToken(token)); + } + return token; + }; + JSXParser.prototype.peekJSXToken = function () { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.lexJSX(); + this.scanner.restoreState(state); + return next; + }; + // Expect the next JSX token to match the specified punctuator. + // If not, an exception will be thrown. + JSXParser.prototype.expectJSX = function (value) { + var token = this.nextJSXToken(); + if (token.type !== 7 /* Punctuator */ || token.value !== value) { + this.throwUnexpectedToken(token); + } + }; + // Return true if the next JSX token matches the specified punctuator. + JSXParser.prototype.matchJSX = function (value) { + var next = this.peekJSXToken(); + return next.type === 7 /* Punctuator */ && next.value === value; + }; + JSXParser.prototype.parseJSXIdentifier = function () { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 100 /* Identifier */) { + this.throwUnexpectedToken(token); + } + return this.finalize(node, new JSXNode.JSXIdentifier(token.value)); + }; + JSXParser.prototype.parseJSXElementName = function () { + var node = this.createJSXNode(); + var elementName = this.parseJSXIdentifier(); + if (this.matchJSX(':')) { + var namespace = elementName; + this.expectJSX(':'); + var name_1 = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1)); + } + else if (this.matchJSX('.')) { + while (this.matchJSX('.')) { + var object = elementName; + this.expectJSX('.'); + var property = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property)); + } + } + return elementName; + }; + JSXParser.prototype.parseJSXAttributeName = function () { + var node = this.createJSXNode(); + var attributeName; + var identifier = this.parseJSXIdentifier(); + if (this.matchJSX(':')) { + var namespace = identifier; + this.expectJSX(':'); + var name_2 = this.parseJSXIdentifier(); + attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2)); + } + else { + attributeName = identifier; + } + return attributeName; + }; + JSXParser.prototype.parseJSXStringLiteralAttribute = function () { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 8 /* StringLiteral */) { + this.throwUnexpectedToken(token); + } + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + JSXParser.prototype.parseJSXExpressionAttribute = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + this.finishJSX(); + if (this.match('}')) { + this.tolerateError('JSX attributes must only be assigned a non-empty expression'); + } + var expression = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXAttributeValue = function () { + return this.matchJSX('{') ? this.parseJSXExpressionAttribute() : + this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); + }; + JSXParser.prototype.parseJSXNameValueAttribute = function () { + var node = this.createJSXNode(); + var name = this.parseJSXAttributeName(); + var value = null; + if (this.matchJSX('=')) { + this.expectJSX('='); + value = this.parseJSXAttributeValue(); + } + return this.finalize(node, new JSXNode.JSXAttribute(name, value)); + }; + JSXParser.prototype.parseJSXSpreadAttribute = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + this.expectJSX('...'); + this.finishJSX(); + var argument = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument)); + }; + JSXParser.prototype.parseJSXAttributes = function () { + var attributes = []; + while (!this.matchJSX('/') && !this.matchJSX('>')) { + var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() : + this.parseJSXNameValueAttribute(); + attributes.push(attribute); + } + return attributes; + }; + JSXParser.prototype.parseJSXOpeningElement = function () { + var node = this.createJSXNode(); + this.expectJSX('<'); + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX('/'); + if (selfClosing) { + this.expectJSX('/'); + } + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXBoundaryElement = function () { + var node = this.createJSXNode(); + this.expectJSX('<'); + if (this.matchJSX('/')) { + this.expectJSX('/'); + var name_3 = this.parseJSXElementName(); + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXClosingElement(name_3)); + } + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX('/'); + if (selfClosing) { + this.expectJSX('/'); + } + this.expectJSX('>'); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXEmptyExpression = function () { + var node = this.createJSXChildNode(); + this.collectComments(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + return this.finalize(node, new JSXNode.JSXEmptyExpression()); + }; + JSXParser.prototype.parseJSXExpressionContainer = function () { + var node = this.createJSXNode(); + this.expectJSX('{'); + var expression; + if (this.matchJSX('}')) { + expression = this.parseJSXEmptyExpression(); + this.expectJSX('}'); + } + else { + this.finishJSX(); + expression = this.parseAssignmentExpression(); + this.reenterJSX(); + } + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXChildren = function () { + var children = []; + while (!this.scanner.eof()) { + var node = this.createJSXChildNode(); + var token = this.nextJSXText(); + if (token.start < token.end) { + var raw = this.getTokenRaw(token); + var child = this.finalize(node, new JSXNode.JSXText(token.value, raw)); + children.push(child); + } + if (this.scanner.source[this.scanner.index] === '{') { + var container = this.parseJSXExpressionContainer(); + children.push(container); + } + else { + break; + } + } + return children; + }; + JSXParser.prototype.parseComplexJSXElement = function (el) { + var stack = []; + while (!this.scanner.eof()) { + el.children = el.children.concat(this.parseJSXChildren()); + var node = this.createJSXChildNode(); + var element = this.parseJSXBoundaryElement(); + if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) { + var opening = element; + if (opening.selfClosing) { + var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null)); + el.children.push(child); + } + else { + stack.push(el); + el = { node: node, opening: opening, closing: null, children: [] }; + } + } + if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) { + el.closing = element; + var open_1 = getQualifiedElementName(el.opening.name); + var close_1 = getQualifiedElementName(el.closing.name); + if (open_1 !== close_1) { + this.tolerateError('Expected corresponding JSX closing tag for %0', open_1); + } + if (stack.length > 0) { + var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing)); + el = stack[stack.length - 1]; + el.children.push(child); + stack.pop(); + } + else { + break; + } + } + } + return el; + }; + JSXParser.prototype.parseJSXElement = function () { + var node = this.createJSXNode(); + var opening = this.parseJSXOpeningElement(); + var children = []; + var closing = null; + if (!opening.selfClosing) { + var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children }); + children = el.children; + closing = el.closing; + } + return this.finalize(node, new JSXNode.JSXElement(opening, children, closing)); + }; + JSXParser.prototype.parseJSXRoot = function () { + // Pop the opening '<' added from the lookahead. + if (this.config.tokens) { + this.tokens.pop(); + } + this.startJSX(); + var element = this.parseJSXElement(); + this.finishJSX(); + return element; + }; + JSXParser.prototype.isStartOfExpression = function () { + return _super.prototype.isStartOfExpression.call(this) || this.match('<'); + }; + return JSXParser; + }(parser_1.Parser)); + exports.JSXParser = JSXParser; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + // See also tools/generate-unicode-regex.js. + var Regex = { + // Unicode v8.0.0 NonAsciiIdentifierStart: + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, + // Unicode v8.0.0 NonAsciiIdentifierPart: + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + exports.Character = { + /* tslint:disable:no-bitwise */ + fromCodePoint: function (cp) { + return (cp < 0x10000) ? String.fromCharCode(cp) : + String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + + String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); + }, + // https://tc39.github.io/ecma262/#sec-white-space + isWhiteSpace: function (cp) { + return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) || + (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0); + }, + // https://tc39.github.io/ecma262/#sec-line-terminators + isLineTerminator: function (cp) { + return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029); + }, + // https://tc39.github.io/ecma262/#sec-names-and-keywords + isIdentifierStart: function (cp) { + return (cp === 0x24) || (cp === 0x5F) || + (cp >= 0x41 && cp <= 0x5A) || + (cp >= 0x61 && cp <= 0x7A) || + (cp === 0x5C) || + ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp))); + }, + isIdentifierPart: function (cp) { + return (cp === 0x24) || (cp === 0x5F) || + (cp >= 0x41 && cp <= 0x5A) || + (cp >= 0x61 && cp <= 0x7A) || + (cp >= 0x30 && cp <= 0x39) || + (cp === 0x5C) || + ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp))); + }, + // https://tc39.github.io/ecma262/#sec-literals-numeric-literals + isDecimalDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x39); // 0..9 + }, + isHexDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x39) || + (cp >= 0x41 && cp <= 0x46) || + (cp >= 0x61 && cp <= 0x66); // a..f + }, + isOctalDigit: function (cp) { + return (cp >= 0x30 && cp <= 0x37); // 0..7 + } + }; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var jsx_syntax_1 = __webpack_require__(6); + /* tslint:disable:max-classes-per-file */ + var JSXClosingElement = (function () { + function JSXClosingElement(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement; + this.name = name; + } + return JSXClosingElement; + }()); + exports.JSXClosingElement = JSXClosingElement; + var JSXElement = (function () { + function JSXElement(openingElement, children, closingElement) { + this.type = jsx_syntax_1.JSXSyntax.JSXElement; + this.openingElement = openingElement; + this.children = children; + this.closingElement = closingElement; + } + return JSXElement; + }()); + exports.JSXElement = JSXElement; + var JSXEmptyExpression = (function () { + function JSXEmptyExpression() { + this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression; + } + return JSXEmptyExpression; + }()); + exports.JSXEmptyExpression = JSXEmptyExpression; + var JSXExpressionContainer = (function () { + function JSXExpressionContainer(expression) { + this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer; + this.expression = expression; + } + return JSXExpressionContainer; + }()); + exports.JSXExpressionContainer = JSXExpressionContainer; + var JSXIdentifier = (function () { + function JSXIdentifier(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier; + this.name = name; + } + return JSXIdentifier; + }()); + exports.JSXIdentifier = JSXIdentifier; + var JSXMemberExpression = (function () { + function JSXMemberExpression(object, property) { + this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression; + this.object = object; + this.property = property; + } + return JSXMemberExpression; + }()); + exports.JSXMemberExpression = JSXMemberExpression; + var JSXAttribute = (function () { + function JSXAttribute(name, value) { + this.type = jsx_syntax_1.JSXSyntax.JSXAttribute; + this.name = name; + this.value = value; + } + return JSXAttribute; + }()); + exports.JSXAttribute = JSXAttribute; + var JSXNamespacedName = (function () { + function JSXNamespacedName(namespace, name) { + this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName; + this.namespace = namespace; + this.name = name; + } + return JSXNamespacedName; + }()); + exports.JSXNamespacedName = JSXNamespacedName; + var JSXOpeningElement = (function () { + function JSXOpeningElement(name, selfClosing, attributes) { + this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement; + this.name = name; + this.selfClosing = selfClosing; + this.attributes = attributes; + } + return JSXOpeningElement; + }()); + exports.JSXOpeningElement = JSXOpeningElement; + var JSXSpreadAttribute = (function () { + function JSXSpreadAttribute(argument) { + this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute; + this.argument = argument; + } + return JSXSpreadAttribute; + }()); + exports.JSXSpreadAttribute = JSXSpreadAttribute; + var JSXText = (function () { + function JSXText(value, raw) { + this.type = jsx_syntax_1.JSXSyntax.JSXText; + this.value = value; + this.raw = raw; + } + return JSXText; + }()); + exports.JSXText = JSXText; + + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.JSXSyntax = { + JSXAttribute: 'JSXAttribute', + JSXClosingElement: 'JSXClosingElement', + JSXElement: 'JSXElement', + JSXEmptyExpression: 'JSXEmptyExpression', + JSXExpressionContainer: 'JSXExpressionContainer', + JSXIdentifier: 'JSXIdentifier', + JSXMemberExpression: 'JSXMemberExpression', + JSXNamespacedName: 'JSXNamespacedName', + JSXOpeningElement: 'JSXOpeningElement', + JSXSpreadAttribute: 'JSXSpreadAttribute', + JSXText: 'JSXText' + }; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + /* tslint:disable:max-classes-per-file */ + var ArrayExpression = (function () { + function ArrayExpression(elements) { + this.type = syntax_1.Syntax.ArrayExpression; + this.elements = elements; + } + return ArrayExpression; + }()); + exports.ArrayExpression = ArrayExpression; + var ArrayPattern = (function () { + function ArrayPattern(elements) { + this.type = syntax_1.Syntax.ArrayPattern; + this.elements = elements; + } + return ArrayPattern; + }()); + exports.ArrayPattern = ArrayPattern; + var ArrowFunctionExpression = (function () { + function ArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = false; + } + return ArrowFunctionExpression; + }()); + exports.ArrowFunctionExpression = ArrowFunctionExpression; + var AssignmentExpression = (function () { + function AssignmentExpression(operator, left, right) { + this.type = syntax_1.Syntax.AssignmentExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return AssignmentExpression; + }()); + exports.AssignmentExpression = AssignmentExpression; + var AssignmentPattern = (function () { + function AssignmentPattern(left, right) { + this.type = syntax_1.Syntax.AssignmentPattern; + this.left = left; + this.right = right; + } + return AssignmentPattern; + }()); + exports.AssignmentPattern = AssignmentPattern; + var AsyncArrowFunctionExpression = (function () { + function AsyncArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = true; + } + return AsyncArrowFunctionExpression; + }()); + exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression; + var AsyncFunctionDeclaration = (function () { + function AsyncFunctionDeclaration(id, params, body) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionDeclaration; + }()); + exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration; + var AsyncFunctionExpression = (function () { + function AsyncFunctionExpression(id, params, body) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionExpression; + }()); + exports.AsyncFunctionExpression = AsyncFunctionExpression; + var AwaitExpression = (function () { + function AwaitExpression(argument) { + this.type = syntax_1.Syntax.AwaitExpression; + this.argument = argument; + } + return AwaitExpression; + }()); + exports.AwaitExpression = AwaitExpression; + var BinaryExpression = (function () { + function BinaryExpression(operator, left, right) { + var logical = (operator === '||' || operator === '&&'); + this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return BinaryExpression; + }()); + exports.BinaryExpression = BinaryExpression; + var BlockStatement = (function () { + function BlockStatement(body) { + this.type = syntax_1.Syntax.BlockStatement; + this.body = body; + } + return BlockStatement; + }()); + exports.BlockStatement = BlockStatement; + var BreakStatement = (function () { + function BreakStatement(label) { + this.type = syntax_1.Syntax.BreakStatement; + this.label = label; + } + return BreakStatement; + }()); + exports.BreakStatement = BreakStatement; + var CallExpression = (function () { + function CallExpression(callee, args) { + this.type = syntax_1.Syntax.CallExpression; + this.callee = callee; + this.arguments = args; + } + return CallExpression; + }()); + exports.CallExpression = CallExpression; + var CatchClause = (function () { + function CatchClause(param, body) { + this.type = syntax_1.Syntax.CatchClause; + this.param = param; + this.body = body; + } + return CatchClause; + }()); + exports.CatchClause = CatchClause; + var ClassBody = (function () { + function ClassBody(body) { + this.type = syntax_1.Syntax.ClassBody; + this.body = body; + } + return ClassBody; + }()); + exports.ClassBody = ClassBody; + var ClassDeclaration = (function () { + function ClassDeclaration(id, superClass, body) { + this.type = syntax_1.Syntax.ClassDeclaration; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassDeclaration; + }()); + exports.ClassDeclaration = ClassDeclaration; + var ClassExpression = (function () { + function ClassExpression(id, superClass, body) { + this.type = syntax_1.Syntax.ClassExpression; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassExpression; + }()); + exports.ClassExpression = ClassExpression; + var ComputedMemberExpression = (function () { + function ComputedMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = true; + this.object = object; + this.property = property; + } + return ComputedMemberExpression; + }()); + exports.ComputedMemberExpression = ComputedMemberExpression; + var ConditionalExpression = (function () { + function ConditionalExpression(test, consequent, alternate) { + this.type = syntax_1.Syntax.ConditionalExpression; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return ConditionalExpression; + }()); + exports.ConditionalExpression = ConditionalExpression; + var ContinueStatement = (function () { + function ContinueStatement(label) { + this.type = syntax_1.Syntax.ContinueStatement; + this.label = label; + } + return ContinueStatement; + }()); + exports.ContinueStatement = ContinueStatement; + var DebuggerStatement = (function () { + function DebuggerStatement() { + this.type = syntax_1.Syntax.DebuggerStatement; + } + return DebuggerStatement; + }()); + exports.DebuggerStatement = DebuggerStatement; + var Directive = (function () { + function Directive(expression, directive) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + this.directive = directive; + } + return Directive; + }()); + exports.Directive = Directive; + var DoWhileStatement = (function () { + function DoWhileStatement(body, test) { + this.type = syntax_1.Syntax.DoWhileStatement; + this.body = body; + this.test = test; + } + return DoWhileStatement; + }()); + exports.DoWhileStatement = DoWhileStatement; + var EmptyStatement = (function () { + function EmptyStatement() { + this.type = syntax_1.Syntax.EmptyStatement; + } + return EmptyStatement; + }()); + exports.EmptyStatement = EmptyStatement; + var ExportAllDeclaration = (function () { + function ExportAllDeclaration(source) { + this.type = syntax_1.Syntax.ExportAllDeclaration; + this.source = source; + } + return ExportAllDeclaration; + }()); + exports.ExportAllDeclaration = ExportAllDeclaration; + var ExportDefaultDeclaration = (function () { + function ExportDefaultDeclaration(declaration) { + this.type = syntax_1.Syntax.ExportDefaultDeclaration; + this.declaration = declaration; + } + return ExportDefaultDeclaration; + }()); + exports.ExportDefaultDeclaration = ExportDefaultDeclaration; + var ExportNamedDeclaration = (function () { + function ExportNamedDeclaration(declaration, specifiers, source) { + this.type = syntax_1.Syntax.ExportNamedDeclaration; + this.declaration = declaration; + this.specifiers = specifiers; + this.source = source; + } + return ExportNamedDeclaration; + }()); + exports.ExportNamedDeclaration = ExportNamedDeclaration; + var ExportSpecifier = (function () { + function ExportSpecifier(local, exported) { + this.type = syntax_1.Syntax.ExportSpecifier; + this.exported = exported; + this.local = local; + } + return ExportSpecifier; + }()); + exports.ExportSpecifier = ExportSpecifier; + var ExpressionStatement = (function () { + function ExpressionStatement(expression) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + } + return ExpressionStatement; + }()); + exports.ExpressionStatement = ExpressionStatement; + var ForInStatement = (function () { + function ForInStatement(left, right, body) { + this.type = syntax_1.Syntax.ForInStatement; + this.left = left; + this.right = right; + this.body = body; + this.each = false; + } + return ForInStatement; + }()); + exports.ForInStatement = ForInStatement; + var ForOfStatement = (function () { + function ForOfStatement(left, right, body) { + this.type = syntax_1.Syntax.ForOfStatement; + this.left = left; + this.right = right; + this.body = body; + } + return ForOfStatement; + }()); + exports.ForOfStatement = ForOfStatement; + var ForStatement = (function () { + function ForStatement(init, test, update, body) { + this.type = syntax_1.Syntax.ForStatement; + this.init = init; + this.test = test; + this.update = update; + this.body = body; + } + return ForStatement; + }()); + exports.ForStatement = ForStatement; + var FunctionDeclaration = (function () { + function FunctionDeclaration(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionDeclaration; + }()); + exports.FunctionDeclaration = FunctionDeclaration; + var FunctionExpression = (function () { + function FunctionExpression(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionExpression; + }()); + exports.FunctionExpression = FunctionExpression; + var Identifier = (function () { + function Identifier(name) { + this.type = syntax_1.Syntax.Identifier; + this.name = name; + } + return Identifier; + }()); + exports.Identifier = Identifier; + var IfStatement = (function () { + function IfStatement(test, consequent, alternate) { + this.type = syntax_1.Syntax.IfStatement; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return IfStatement; + }()); + exports.IfStatement = IfStatement; + var ImportDeclaration = (function () { + function ImportDeclaration(specifiers, source) { + this.type = syntax_1.Syntax.ImportDeclaration; + this.specifiers = specifiers; + this.source = source; + } + return ImportDeclaration; + }()); + exports.ImportDeclaration = ImportDeclaration; + var ImportDefaultSpecifier = (function () { + function ImportDefaultSpecifier(local) { + this.type = syntax_1.Syntax.ImportDefaultSpecifier; + this.local = local; + } + return ImportDefaultSpecifier; + }()); + exports.ImportDefaultSpecifier = ImportDefaultSpecifier; + var ImportNamespaceSpecifier = (function () { + function ImportNamespaceSpecifier(local) { + this.type = syntax_1.Syntax.ImportNamespaceSpecifier; + this.local = local; + } + return ImportNamespaceSpecifier; + }()); + exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; + var ImportSpecifier = (function () { + function ImportSpecifier(local, imported) { + this.type = syntax_1.Syntax.ImportSpecifier; + this.local = local; + this.imported = imported; + } + return ImportSpecifier; + }()); + exports.ImportSpecifier = ImportSpecifier; + var LabeledStatement = (function () { + function LabeledStatement(label, body) { + this.type = syntax_1.Syntax.LabeledStatement; + this.label = label; + this.body = body; + } + return LabeledStatement; + }()); + exports.LabeledStatement = LabeledStatement; + var Literal = (function () { + function Literal(value, raw) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + } + return Literal; + }()); + exports.Literal = Literal; + var MetaProperty = (function () { + function MetaProperty(meta, property) { + this.type = syntax_1.Syntax.MetaProperty; + this.meta = meta; + this.property = property; + } + return MetaProperty; + }()); + exports.MetaProperty = MetaProperty; + var MethodDefinition = (function () { + function MethodDefinition(key, computed, value, kind, isStatic) { + this.type = syntax_1.Syntax.MethodDefinition; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.static = isStatic; + } + return MethodDefinition; + }()); + exports.MethodDefinition = MethodDefinition; + var Module = (function () { + function Module(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = 'module'; + } + return Module; + }()); + exports.Module = Module; + var NewExpression = (function () { + function NewExpression(callee, args) { + this.type = syntax_1.Syntax.NewExpression; + this.callee = callee; + this.arguments = args; + } + return NewExpression; + }()); + exports.NewExpression = NewExpression; + var ObjectExpression = (function () { + function ObjectExpression(properties) { + this.type = syntax_1.Syntax.ObjectExpression; + this.properties = properties; + } + return ObjectExpression; + }()); + exports.ObjectExpression = ObjectExpression; + var ObjectPattern = (function () { + function ObjectPattern(properties) { + this.type = syntax_1.Syntax.ObjectPattern; + this.properties = properties; + } + return ObjectPattern; + }()); + exports.ObjectPattern = ObjectPattern; + var Property = (function () { + function Property(kind, key, computed, value, method, shorthand) { + this.type = syntax_1.Syntax.Property; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.method = method; + this.shorthand = shorthand; + } + return Property; + }()); + exports.Property = Property; + var RegexLiteral = (function () { + function RegexLiteral(value, raw, pattern, flags) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + this.regex = { pattern: pattern, flags: flags }; + } + return RegexLiteral; + }()); + exports.RegexLiteral = RegexLiteral; + var RestElement = (function () { + function RestElement(argument) { + this.type = syntax_1.Syntax.RestElement; + this.argument = argument; + } + return RestElement; + }()); + exports.RestElement = RestElement; + var ReturnStatement = (function () { + function ReturnStatement(argument) { + this.type = syntax_1.Syntax.ReturnStatement; + this.argument = argument; + } + return ReturnStatement; + }()); + exports.ReturnStatement = ReturnStatement; + var Script = (function () { + function Script(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = 'script'; + } + return Script; + }()); + exports.Script = Script; + var SequenceExpression = (function () { + function SequenceExpression(expressions) { + this.type = syntax_1.Syntax.SequenceExpression; + this.expressions = expressions; + } + return SequenceExpression; + }()); + exports.SequenceExpression = SequenceExpression; + var SpreadElement = (function () { + function SpreadElement(argument) { + this.type = syntax_1.Syntax.SpreadElement; + this.argument = argument; + } + return SpreadElement; + }()); + exports.SpreadElement = SpreadElement; + var StaticMemberExpression = (function () { + function StaticMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = false; + this.object = object; + this.property = property; + } + return StaticMemberExpression; + }()); + exports.StaticMemberExpression = StaticMemberExpression; + var Super = (function () { + function Super() { + this.type = syntax_1.Syntax.Super; + } + return Super; + }()); + exports.Super = Super; + var SwitchCase = (function () { + function SwitchCase(test, consequent) { + this.type = syntax_1.Syntax.SwitchCase; + this.test = test; + this.consequent = consequent; + } + return SwitchCase; + }()); + exports.SwitchCase = SwitchCase; + var SwitchStatement = (function () { + function SwitchStatement(discriminant, cases) { + this.type = syntax_1.Syntax.SwitchStatement; + this.discriminant = discriminant; + this.cases = cases; + } + return SwitchStatement; + }()); + exports.SwitchStatement = SwitchStatement; + var TaggedTemplateExpression = (function () { + function TaggedTemplateExpression(tag, quasi) { + this.type = syntax_1.Syntax.TaggedTemplateExpression; + this.tag = tag; + this.quasi = quasi; + } + return TaggedTemplateExpression; + }()); + exports.TaggedTemplateExpression = TaggedTemplateExpression; + var TemplateElement = (function () { + function TemplateElement(value, tail) { + this.type = syntax_1.Syntax.TemplateElement; + this.value = value; + this.tail = tail; + } + return TemplateElement; + }()); + exports.TemplateElement = TemplateElement; + var TemplateLiteral = (function () { + function TemplateLiteral(quasis, expressions) { + this.type = syntax_1.Syntax.TemplateLiteral; + this.quasis = quasis; + this.expressions = expressions; + } + return TemplateLiteral; + }()); + exports.TemplateLiteral = TemplateLiteral; + var ThisExpression = (function () { + function ThisExpression() { + this.type = syntax_1.Syntax.ThisExpression; + } + return ThisExpression; + }()); + exports.ThisExpression = ThisExpression; + var ThrowStatement = (function () { + function ThrowStatement(argument) { + this.type = syntax_1.Syntax.ThrowStatement; + this.argument = argument; + } + return ThrowStatement; + }()); + exports.ThrowStatement = ThrowStatement; + var TryStatement = (function () { + function TryStatement(block, handler, finalizer) { + this.type = syntax_1.Syntax.TryStatement; + this.block = block; + this.handler = handler; + this.finalizer = finalizer; + } + return TryStatement; + }()); + exports.TryStatement = TryStatement; + var UnaryExpression = (function () { + function UnaryExpression(operator, argument) { + this.type = syntax_1.Syntax.UnaryExpression; + this.operator = operator; + this.argument = argument; + this.prefix = true; + } + return UnaryExpression; + }()); + exports.UnaryExpression = UnaryExpression; + var UpdateExpression = (function () { + function UpdateExpression(operator, argument, prefix) { + this.type = syntax_1.Syntax.UpdateExpression; + this.operator = operator; + this.argument = argument; + this.prefix = prefix; + } + return UpdateExpression; + }()); + exports.UpdateExpression = UpdateExpression; + var VariableDeclaration = (function () { + function VariableDeclaration(declarations, kind) { + this.type = syntax_1.Syntax.VariableDeclaration; + this.declarations = declarations; + this.kind = kind; + } + return VariableDeclaration; + }()); + exports.VariableDeclaration = VariableDeclaration; + var VariableDeclarator = (function () { + function VariableDeclarator(id, init) { + this.type = syntax_1.Syntax.VariableDeclarator; + this.id = id; + this.init = init; + } + return VariableDeclarator; + }()); + exports.VariableDeclarator = VariableDeclarator; + var WhileStatement = (function () { + function WhileStatement(test, body) { + this.type = syntax_1.Syntax.WhileStatement; + this.test = test; + this.body = body; + } + return WhileStatement; + }()); + exports.WhileStatement = WhileStatement; + var WithStatement = (function () { + function WithStatement(object, body) { + this.type = syntax_1.Syntax.WithStatement; + this.object = object; + this.body = body; + } + return WithStatement; + }()); + exports.WithStatement = WithStatement; + var YieldExpression = (function () { + function YieldExpression(argument, delegate) { + this.type = syntax_1.Syntax.YieldExpression; + this.argument = argument; + this.delegate = delegate; + } + return YieldExpression; + }()); + exports.YieldExpression = YieldExpression; + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var error_handler_1 = __webpack_require__(10); + var messages_1 = __webpack_require__(11); + var Node = __webpack_require__(7); + var scanner_1 = __webpack_require__(12); + var syntax_1 = __webpack_require__(2); + var token_1 = __webpack_require__(13); + var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder'; + var Parser = (function () { + function Parser(code, options, delegate) { + if (options === void 0) { options = {}; } + this.config = { + range: (typeof options.range === 'boolean') && options.range, + loc: (typeof options.loc === 'boolean') && options.loc, + source: null, + tokens: (typeof options.tokens === 'boolean') && options.tokens, + comment: (typeof options.comment === 'boolean') && options.comment, + tolerant: (typeof options.tolerant === 'boolean') && options.tolerant + }; + if (this.config.loc && options.source && options.source !== null) { + this.config.source = String(options.source); + } + this.delegate = delegate; + this.errorHandler = new error_handler_1.ErrorHandler(); + this.errorHandler.tolerant = this.config.tolerant; + this.scanner = new scanner_1.Scanner(code, this.errorHandler); + this.scanner.trackComment = this.config.comment; + this.operatorPrecedence = { + ')': 0, + ';': 0, + ',': 0, + '=': 0, + ']': 0, + '||': 1, + '&&': 2, + '|': 3, + '^': 4, + '&': 5, + '==': 6, + '!=': 6, + '===': 6, + '!==': 6, + '<': 7, + '>': 7, + '<=': 7, + '>=': 7, + '<<': 8, + '>>': 8, + '>>>': 8, + '+': 9, + '-': 9, + '*': 11, + '/': 11, + '%': 11 + }; + this.lookahead = { + type: 2 /* EOF */, + value: '', + lineNumber: this.scanner.lineNumber, + lineStart: 0, + start: 0, + end: 0 + }; + this.hasLineTerminator = false; + this.context = { + isModule: false, + await: false, + allowIn: true, + allowStrictDirective: true, + allowYield: true, + firstCoverInitializedNameError: null, + isAssignmentTarget: false, + isBindingElement: false, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + labelSet: {}, + strict: false + }; + this.tokens = []; + this.startMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.lastMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.nextToken(); + this.lastMarker = { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + } + Parser.prototype.throwError = function (messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { + assert_1.assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + throw this.errorHandler.createError(index, line, column, msg); + }; + Parser.prototype.tolerateError = function (messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { + assert_1.assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.scanner.lineNumber; + var column = this.lastMarker.column + 1; + this.errorHandler.tolerateError(index, line, column, msg); + }; + // Throw an exception because of the token. + Parser.prototype.unexpectedTokenError = function (token, message) { + var msg = message || messages_1.Messages.UnexpectedToken; + var value; + if (token) { + if (!message) { + msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS : + (token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier : + (token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber : + (token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString : + (token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate : + messages_1.Messages.UnexpectedToken; + if (token.type === 4 /* Keyword */) { + if (this.scanner.isFutureReservedWord(token.value)) { + msg = messages_1.Messages.UnexpectedReserved; + } + else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) { + msg = messages_1.Messages.StrictReservedWord; + } + } + } + value = token.value; + } + else { + value = 'ILLEGAL'; + } + msg = msg.replace('%0', value); + if (token && typeof token.lineNumber === 'number') { + var index = token.start; + var line = token.lineNumber; + var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column; + var column = token.start - lastMarkerLineStart + 1; + return this.errorHandler.createError(index, line, column, msg); + } + else { + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + return this.errorHandler.createError(index, line, column, msg); + } + }; + Parser.prototype.throwUnexpectedToken = function (token, message) { + throw this.unexpectedTokenError(token, message); + }; + Parser.prototype.tolerateUnexpectedToken = function (token, message) { + this.errorHandler.tolerate(this.unexpectedTokenError(token, message)); + }; + Parser.prototype.collectComments = function () { + if (!this.config.comment) { + this.scanner.scanComments(); + } + else { + var comments = this.scanner.scanComments(); + if (comments.length > 0 && this.delegate) { + for (var i = 0; i < comments.length; ++i) { + var e = comments[i]; + var node = void 0; + node = { + type: e.multiLine ? 'BlockComment' : 'LineComment', + value: this.scanner.source.slice(e.slice[0], e.slice[1]) + }; + if (this.config.range) { + node.range = e.range; + } + if (this.config.loc) { + node.loc = e.loc; + } + var metadata = { + start: { + line: e.loc.start.line, + column: e.loc.start.column, + offset: e.range[0] + }, + end: { + line: e.loc.end.line, + column: e.loc.end.column, + offset: e.range[1] + } + }; + this.delegate(node, metadata); + } + } + } + }; + // From internal representation to an external structure + Parser.prototype.getTokenRaw = function (token) { + return this.scanner.source.slice(token.start, token.end); + }; + Parser.prototype.convertToken = function (token) { + var t = { + type: token_1.TokenName[token.type], + value: this.getTokenRaw(token) + }; + if (this.config.range) { + t.range = [token.start, token.end]; + } + if (this.config.loc) { + t.loc = { + start: { + line: this.startMarker.line, + column: this.startMarker.column + }, + end: { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + } + }; + } + if (token.type === 9 /* RegularExpression */) { + var pattern = token.pattern; + var flags = token.flags; + t.regex = { pattern: pattern, flags: flags }; + } + return t; + }; + Parser.prototype.nextToken = function () { + var token = this.lookahead; + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + this.collectComments(); + if (this.scanner.index !== this.startMarker.index) { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + } + var next = this.scanner.lex(); + this.hasLineTerminator = (token.lineNumber !== next.lineNumber); + if (next && this.context.strict && next.type === 3 /* Identifier */) { + if (this.scanner.isStrictModeReservedWord(next.value)) { + next.type = 4 /* Keyword */; + } + } + this.lookahead = next; + if (this.config.tokens && next.type !== 2 /* EOF */) { + this.tokens.push(this.convertToken(next)); + } + return token; + }; + Parser.prototype.nextRegexToken = function () { + this.collectComments(); + var token = this.scanner.scanRegExp(); + if (this.config.tokens) { + // Pop the previous token, '/' or '/=' + // This is added from the lookahead token. + this.tokens.pop(); + this.tokens.push(this.convertToken(token)); + } + // Prime the next lookahead. + this.lookahead = token; + this.nextToken(); + return token; + }; + Parser.prototype.createNode = function () { + return { + index: this.startMarker.index, + line: this.startMarker.line, + column: this.startMarker.column + }; + }; + Parser.prototype.startNode = function (token, lastLineStart) { + if (lastLineStart === void 0) { lastLineStart = 0; } + var column = token.start - token.lineStart; + var line = token.lineNumber; + if (column < 0) { + column += lastLineStart; + line--; + } + return { + index: token.start, + line: line, + column: column + }; + }; + Parser.prototype.finalize = function (marker, node) { + if (this.config.range) { + node.range = [marker.index, this.lastMarker.index]; + } + if (this.config.loc) { + node.loc = { + start: { + line: marker.line, + column: marker.column, + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column + } + }; + if (this.config.source) { + node.loc.source = this.config.source; + } + } + if (this.delegate) { + var metadata = { + start: { + line: marker.line, + column: marker.column, + offset: marker.index + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column, + offset: this.lastMarker.index + } + }; + this.delegate(node, metadata); + } + return node; + }; + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + Parser.prototype.expect = function (value) { + var token = this.nextToken(); + if (token.type !== 7 /* Punctuator */ || token.value !== value) { + this.throwUnexpectedToken(token); + } + }; + // Quietly expect a comma when in tolerant mode, otherwise delegates to expect(). + Parser.prototype.expectCommaSeparator = function () { + if (this.config.tolerant) { + var token = this.lookahead; + if (token.type === 7 /* Punctuator */ && token.value === ',') { + this.nextToken(); + } + else if (token.type === 7 /* Punctuator */ && token.value === ';') { + this.nextToken(); + this.tolerateUnexpectedToken(token); + } + else { + this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken); + } + } + else { + this.expect(','); + } + }; + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + Parser.prototype.expectKeyword = function (keyword) { + var token = this.nextToken(); + if (token.type !== 4 /* Keyword */ || token.value !== keyword) { + this.throwUnexpectedToken(token); + } + }; + // Return true if the next token matches the specified punctuator. + Parser.prototype.match = function (value) { + return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value; + }; + // Return true if the next token matches the specified keyword + Parser.prototype.matchKeyword = function (keyword) { + return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword; + }; + // Return true if the next token matches the specified contextual keyword + // (where an identifier is sometimes a keyword depending on the context) + Parser.prototype.matchContextualKeyword = function (keyword) { + return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword; + }; + // Return true if the next token is an assignment operator + Parser.prototype.matchAssign = function () { + if (this.lookahead.type !== 7 /* Punctuator */) { + return false; + } + var op = this.lookahead.value; + return op === '=' || + op === '*=' || + op === '**=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + }; + // Cover grammar support. + // + // When an assignment expression position starts with an left parenthesis, the determination of the type + // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) + // or the first comma. This situation also defers the determination of all the expressions nested in the pair. + // + // There are three productions that can be parsed in a parentheses pair that needs to be determined + // after the outermost pair is closed. They are: + // + // 1. AssignmentExpression + // 2. BindingElements + // 3. AssignmentTargets + // + // In order to avoid exponential backtracking, we use two flags to denote if the production can be + // binding element or assignment target. + // + // The three productions have the relationship: + // + // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression + // + // with a single exception that CoverInitializedName when used directly in an Expression, generates + // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the + // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. + // + // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not + // effect the current flags. This means the production the parser parses is only used as an expression. Therefore + // the CoverInitializedName check is conducted. + // + // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates + // the flags outside of the parser. This means the production the parser parses is used as a part of a potential + // pattern. The CoverInitializedName check is deferred. + Parser.prototype.isolateCoverGrammar = function (parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + if (this.context.firstCoverInitializedNameError !== null) { + this.throwUnexpectedToken(this.context.firstCoverInitializedNameError); + } + this.context.isBindingElement = previousIsBindingElement; + this.context.isAssignmentTarget = previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError; + return result; + }; + Parser.prototype.inheritCoverGrammar = function (parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement; + this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError; + return result; + }; + Parser.prototype.consumeSemicolon = function () { + if (this.match(';')) { + this.nextToken(); + } + else if (!this.hasLineTerminator) { + if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) { + this.throwUnexpectedToken(this.lookahead); + } + this.lastMarker.index = this.startMarker.index; + this.lastMarker.line = this.startMarker.line; + this.lastMarker.column = this.startMarker.column; + } + }; + // https://tc39.github.io/ecma262/#sec-primary-expression + Parser.prototype.parsePrimaryExpression = function () { + var node = this.createNode(); + var expr; + var token, raw; + switch (this.lookahead.type) { + case 3 /* Identifier */: + if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') { + this.tolerateUnexpectedToken(this.lookahead); + } + expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); + break; + case 6 /* NumericLiteral */: + case 8 /* StringLiteral */: + if (this.context.strict && this.lookahead.octal) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 1 /* BooleanLiteral */: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value === 'true', raw)); + break; + case 5 /* NullLiteral */: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(null, raw)); + break; + case 10 /* Template */: + expr = this.parseTemplateLiteral(); + break; + case 7 /* Punctuator */: + switch (this.lookahead.value) { + case '(': + this.context.isBindingElement = false; + expr = this.inheritCoverGrammar(this.parseGroupExpression); + break; + case '[': + expr = this.inheritCoverGrammar(this.parseArrayInitializer); + break; + case '{': + expr = this.inheritCoverGrammar(this.parseObjectInitializer); + break; + case '/': + case '/=': + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.scanner.index = this.startMarker.index; + token = this.nextRegexToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags)); + break; + default: + expr = this.throwUnexpectedToken(this.nextToken()); + } + break; + case 4 /* Keyword */: + if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) { + expr = this.parseIdentifierName(); + } + else if (!this.context.strict && this.matchKeyword('let')) { + expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); + } + else { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + if (this.matchKeyword('function')) { + expr = this.parseFunctionExpression(); + } + else if (this.matchKeyword('this')) { + this.nextToken(); + expr = this.finalize(node, new Node.ThisExpression()); + } + else if (this.matchKeyword('class')) { + expr = this.parseClassExpression(); + } + else { + expr = this.throwUnexpectedToken(this.nextToken()); + } + } + break; + default: + expr = this.throwUnexpectedToken(this.nextToken()); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-array-initializer + Parser.prototype.parseSpreadElement = function () { + var node = this.createNode(); + this.expect('...'); + var arg = this.inheritCoverGrammar(this.parseAssignmentExpression); + return this.finalize(node, new Node.SpreadElement(arg)); + }; + Parser.prototype.parseArrayInitializer = function () { + var node = this.createNode(); + var elements = []; + this.expect('['); + while (!this.match(']')) { + if (this.match(',')) { + this.nextToken(); + elements.push(null); + } + else if (this.match('...')) { + var element = this.parseSpreadElement(); + if (!this.match(']')) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.expect(','); + } + elements.push(element); + } + else { + elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + if (!this.match(']')) { + this.expect(','); + } + } + } + this.expect(']'); + return this.finalize(node, new Node.ArrayExpression(elements)); + }; + // https://tc39.github.io/ecma262/#sec-object-initializer + Parser.prototype.parsePropertyMethod = function (params) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = params.simple; + var body = this.isolateCoverGrammar(this.parseFunctionSourceElements); + if (this.context.strict && params.firstRestricted) { + this.tolerateUnexpectedToken(params.firstRestricted, params.message); + } + if (this.context.strict && params.stricted) { + this.tolerateUnexpectedToken(params.stricted, params.message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + return body; + }; + Parser.prototype.parsePropertyMethodFunction = function () { + var isGenerator = false; + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + Parser.prototype.parsePropertyMethodAsyncFunction = function () { + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = false; + this.context.await = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); + }; + Parser.prototype.parseObjectPropertyKey = function () { + var node = this.createNode(); + var token = this.nextToken(); + var key; + switch (token.type) { + case 8 /* StringLiteral */: + case 6 /* NumericLiteral */: + if (this.context.strict && token.octal) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral); + } + var raw = this.getTokenRaw(token); + key = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 3 /* Identifier */: + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 4 /* Keyword */: + key = this.finalize(node, new Node.Identifier(token.value)); + break; + case 7 /* Punctuator */: + if (token.value === '[') { + key = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.expect(']'); + } + else { + key = this.throwUnexpectedToken(token); + } + break; + default: + key = this.throwUnexpectedToken(token); + } + return key; + }; + Parser.prototype.isPropertyKey = function (key, value) { + return (key.type === syntax_1.Syntax.Identifier && key.name === value) || + (key.type === syntax_1.Syntax.Literal && key.value === value); + }; + Parser.prototype.parseObjectProperty = function (hasProto) { + var node = this.createNode(); + var token = this.lookahead; + var kind; + var key = null; + var value = null; + var computed = false; + var method = false; + var shorthand = false; + var isAsync = false; + if (token.type === 3 /* Identifier */) { + var id = token.value; + this.nextToken(); + computed = this.match('['); + isAsync = !this.hasLineTerminator && (id === 'async') && + !this.match(':') && !this.match('(') && !this.match('*') && !this.match(','); + key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); + } + else if (this.match('*')) { + this.nextToken(); + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) { + kind = 'get'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } + else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) { + kind = 'set'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) { + kind = 'init'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + else { + if (!key) { + this.throwUnexpectedToken(this.lookahead); + } + kind = 'init'; + if (this.match(':') && !isAsync) { + if (!computed && this.isPropertyKey(key, '__proto__')) { + if (hasProto.value) { + this.tolerateError(messages_1.Messages.DuplicateProtoProperty); + } + hasProto.value = true; + } + this.nextToken(); + value = this.inheritCoverGrammar(this.parseAssignmentExpression); + } + else if (this.match('(')) { + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + else if (token.type === 3 /* Identifier */) { + var id = this.finalize(node, new Node.Identifier(token.value)); + if (this.match('=')) { + this.context.firstCoverInitializedNameError = this.lookahead; + this.nextToken(); + shorthand = true; + var init = this.isolateCoverGrammar(this.parseAssignmentExpression); + value = this.finalize(node, new Node.AssignmentPattern(id, init)); + } + else { + shorthand = true; + value = id; + } + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + } + return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectInitializer = function () { + var node = this.createNode(); + this.expect('{'); + var properties = []; + var hasProto = { value: false }; + while (!this.match('}')) { + properties.push(this.parseObjectProperty(hasProto)); + if (!this.match('}')) { + this.expectCommaSeparator(); + } + } + this.expect('}'); + return this.finalize(node, new Node.ObjectExpression(properties)); + }; + // https://tc39.github.io/ecma262/#sec-template-literals + Parser.prototype.parseTemplateHead = function () { + assert_1.assert(this.lookahead.head, 'Template literal must start with a template head'); + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); + }; + Parser.prototype.parseTemplateElement = function () { + if (this.lookahead.type !== 10 /* Template */) { + this.throwUnexpectedToken(); + } + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); + }; + Parser.prototype.parseTemplateLiteral = function () { + var node = this.createNode(); + var expressions = []; + var quasis = []; + var quasi = this.parseTemplateHead(); + quasis.push(quasi); + while (!quasi.tail) { + expressions.push(this.parseExpression()); + quasi = this.parseTemplateElement(); + quasis.push(quasi); + } + return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); + }; + // https://tc39.github.io/ecma262/#sec-grouping-operator + Parser.prototype.reinterpretExpressionAsPattern = function (expr) { + switch (expr.type) { + case syntax_1.Syntax.Identifier: + case syntax_1.Syntax.MemberExpression: + case syntax_1.Syntax.RestElement: + case syntax_1.Syntax.AssignmentPattern: + break; + case syntax_1.Syntax.SpreadElement: + expr.type = syntax_1.Syntax.RestElement; + this.reinterpretExpressionAsPattern(expr.argument); + break; + case syntax_1.Syntax.ArrayExpression: + expr.type = syntax_1.Syntax.ArrayPattern; + for (var i = 0; i < expr.elements.length; i++) { + if (expr.elements[i] !== null) { + this.reinterpretExpressionAsPattern(expr.elements[i]); + } + } + break; + case syntax_1.Syntax.ObjectExpression: + expr.type = syntax_1.Syntax.ObjectPattern; + for (var i = 0; i < expr.properties.length; i++) { + this.reinterpretExpressionAsPattern(expr.properties[i].value); + } + break; + case syntax_1.Syntax.AssignmentExpression: + expr.type = syntax_1.Syntax.AssignmentPattern; + delete expr.operator; + this.reinterpretExpressionAsPattern(expr.left); + break; + default: + // Allow other node type for tolerant parsing. + break; + } + }; + Parser.prototype.parseGroupExpression = function () { + var expr; + this.expect('('); + if (this.match(')')) { + this.nextToken(); + if (!this.match('=>')) { + this.expect('=>'); + } + expr = { + type: ArrowParameterPlaceHolder, + params: [], + async: false + }; + } + else { + var startToken = this.lookahead; + var params = []; + if (this.match('...')) { + expr = this.parseRestElement(params); + this.expect(')'); + if (!this.match('=>')) { + this.expect('=>'); + } + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + else { + var arrow = false; + this.context.isBindingElement = true; + expr = this.inheritCoverGrammar(this.parseAssignmentExpression); + if (this.match(',')) { + var expressions = []; + this.context.isAssignmentTarget = false; + expressions.push(expr); + while (this.lookahead.type !== 2 /* EOF */) { + if (!this.match(',')) { + break; + } + this.nextToken(); + if (this.match(')')) { + this.nextToken(); + for (var i = 0; i < expressions.length; i++) { + this.reinterpretExpressionAsPattern(expressions[i]); + } + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } + else if (this.match('...')) { + if (!this.context.isBindingElement) { + this.throwUnexpectedToken(this.lookahead); + } + expressions.push(this.parseRestElement(params)); + this.expect(')'); + if (!this.match('=>')) { + this.expect('=>'); + } + this.context.isBindingElement = false; + for (var i = 0; i < expressions.length; i++) { + this.reinterpretExpressionAsPattern(expressions[i]); + } + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } + else { + expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + } + if (arrow) { + break; + } + } + if (!arrow) { + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + } + if (!arrow) { + this.expect(')'); + if (this.match('=>')) { + if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') { + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + if (!arrow) { + if (!this.context.isBindingElement) { + this.throwUnexpectedToken(this.lookahead); + } + if (expr.type === syntax_1.Syntax.SequenceExpression) { + for (var i = 0; i < expr.expressions.length; i++) { + this.reinterpretExpressionAsPattern(expr.expressions[i]); + } + } + else { + this.reinterpretExpressionAsPattern(expr); + } + var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]); + expr = { + type: ArrowParameterPlaceHolder, + params: parameters, + async: false + }; + } + } + this.context.isBindingElement = false; + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions + Parser.prototype.parseArguments = function () { + this.expect('('); + var args = []; + if (!this.match(')')) { + while (true) { + var expr = this.match('...') ? this.parseSpreadElement() : + this.isolateCoverGrammar(this.parseAssignmentExpression); + args.push(expr); + if (this.match(')')) { + break; + } + this.expectCommaSeparator(); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return args; + }; + Parser.prototype.isIdentifierName = function (token) { + return token.type === 3 /* Identifier */ || + token.type === 4 /* Keyword */ || + token.type === 1 /* BooleanLiteral */ || + token.type === 5 /* NullLiteral */; + }; + Parser.prototype.parseIdentifierName = function () { + var node = this.createNode(); + var token = this.nextToken(); + if (!this.isIdentifierName(token)) { + this.throwUnexpectedToken(token); + } + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseNewExpression = function () { + var node = this.createNode(); + var id = this.parseIdentifierName(); + assert_1.assert(id.name === 'new', 'New expression must start with `new`'); + var expr; + if (this.match('.')) { + this.nextToken(); + if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') { + var property = this.parseIdentifierName(); + expr = new Node.MetaProperty(id, property); + } + else { + this.throwUnexpectedToken(this.lookahead); + } + } + else { + var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); + var args = this.match('(') ? this.parseArguments() : []; + expr = new Node.NewExpression(callee, args); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return this.finalize(node, expr); + }; + Parser.prototype.parseAsyncArgument = function () { + var arg = this.parseAssignmentExpression(); + this.context.firstCoverInitializedNameError = null; + return arg; + }; + Parser.prototype.parseAsyncArguments = function () { + this.expect('('); + var args = []; + if (!this.match(')')) { + while (true) { + var expr = this.match('...') ? this.parseSpreadElement() : + this.isolateCoverGrammar(this.parseAsyncArgument); + args.push(expr); + if (this.match(')')) { + break; + } + this.expectCommaSeparator(); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return args; + }; + Parser.prototype.parseLeftHandSideExpressionAllowCall = function () { + var startToken = this.lookahead; + var maybeAsync = this.matchContextualKeyword('async'); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var expr; + if (this.matchKeyword('super') && this.context.inFunctionBody) { + expr = this.createNode(); + this.nextToken(); + expr = this.finalize(expr, new Node.Super()); + if (!this.match('(') && !this.match('.') && !this.match('[')) { + this.throwUnexpectedToken(this.lookahead); + } + } + else { + expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); + } + while (true) { + if (this.match('.')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('.'); + var property = this.parseIdentifierName(); + expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); + } + else if (this.match('(')) { + var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber); + this.context.isBindingElement = false; + this.context.isAssignmentTarget = false; + var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); + expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); + if (asyncArrow && this.match('=>')) { + for (var i = 0; i < args.length; ++i) { + this.reinterpretExpressionAsPattern(args[i]); + } + expr = { + type: ArrowParameterPlaceHolder, + params: args, + async: true + }; + } + } + else if (this.match('[')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('['); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect(']'); + expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); + } + else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); + } + else { + break; + } + } + this.context.allowIn = previousAllowIn; + return expr; + }; + Parser.prototype.parseSuper = function () { + var node = this.createNode(); + this.expectKeyword('super'); + if (!this.match('[') && !this.match('.')) { + this.throwUnexpectedToken(this.lookahead); + } + return this.finalize(node, new Node.Super()); + }; + Parser.prototype.parseLeftHandSideExpression = function () { + assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.'); + var node = this.startNode(this.lookahead); + var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() : + this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); + while (true) { + if (this.match('[')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('['); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect(']'); + expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); + } + else if (this.match('.')) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect('.'); + var property = this.parseIdentifierName(); + expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); + } + else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); + } + else { + break; + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-update-expressions + Parser.prototype.parseUpdateExpression = function () { + var expr; + var startToken = this.lookahead; + if (this.match('++') || this.match('--')) { + var node = this.startNode(startToken); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { + this.tolerateError(messages_1.Messages.StrictLHSPrefix); + } + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + var prefix = true; + expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else { + expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) { + if (this.match('++') || this.match('--')) { + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { + this.tolerateError(messages_1.Messages.StrictLHSPostfix); + } + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var operator = this.nextToken().value; + var prefix = false; + expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-unary-operators + Parser.prototype.parseAwaitExpression = function () { + var node = this.createNode(); + this.nextToken(); + var argument = this.parseUnaryExpression(); + return this.finalize(node, new Node.AwaitExpression(argument)); + }; + Parser.prototype.parseUnaryExpression = function () { + var expr; + if (this.match('+') || this.match('-') || this.match('~') || this.match('!') || + this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) { + var node = this.startNode(this.lookahead); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); + if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) { + this.tolerateError(messages_1.Messages.StrictDelete); + } + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else if (this.context.await && this.matchContextualKeyword('await')) { + expr = this.parseAwaitExpression(); + } + else { + expr = this.parseUpdateExpression(); + } + return expr; + }; + Parser.prototype.parseExponentiationExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right)); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-exp-operator + // https://tc39.github.io/ecma262/#sec-multiplicative-operators + // https://tc39.github.io/ecma262/#sec-additive-operators + // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators + // https://tc39.github.io/ecma262/#sec-relational-operators + // https://tc39.github.io/ecma262/#sec-equality-operators + // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators + // https://tc39.github.io/ecma262/#sec-binary-logical-operators + Parser.prototype.binaryPrecedence = function (token) { + var op = token.value; + var precedence; + if (token.type === 7 /* Punctuator */) { + precedence = this.operatorPrecedence[op] || 0; + } + else if (token.type === 4 /* Keyword */) { + precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0; + } + else { + precedence = 0; + } + return precedence; + }; + Parser.prototype.parseBinaryExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseExponentiationExpression); + var token = this.lookahead; + var prec = this.binaryPrecedence(token); + if (prec > 0) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var markers = [startToken, this.lookahead]; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + var stack = [left, token.value, right]; + var precedences = [prec]; + while (true) { + prec = this.binaryPrecedence(this.lookahead); + if (prec <= 0) { + break; + } + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) { + right = stack.pop(); + var operator = stack.pop(); + precedences.pop(); + left = stack.pop(); + markers.pop(); + var node = this.startNode(markers[markers.length - 1]); + stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); + } + // Shift. + stack.push(this.nextToken().value); + precedences.push(prec); + markers.push(this.lookahead); + stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); + } + // Final reduce to clean-up the stack. + var i = stack.length - 1; + expr = stack[i]; + var lastMarker = markers.pop(); + while (i > 1) { + var marker = markers.pop(); + var lastLineStart = lastMarker && lastMarker.lineStart; + var node = this.startNode(marker, lastLineStart); + var operator = stack[i - 1]; + expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); + i -= 2; + lastMarker = marker; + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-conditional-operator + Parser.prototype.parseConditionalExpression = function () { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseBinaryExpression); + if (this.match('?')) { + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + this.expect(':'); + var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-assignment-operators + Parser.prototype.checkPatternParam = function (options, param) { + switch (param.type) { + case syntax_1.Syntax.Identifier: + this.validateParam(options, param, param.name); + break; + case syntax_1.Syntax.RestElement: + this.checkPatternParam(options, param.argument); + break; + case syntax_1.Syntax.AssignmentPattern: + this.checkPatternParam(options, param.left); + break; + case syntax_1.Syntax.ArrayPattern: + for (var i = 0; i < param.elements.length; i++) { + if (param.elements[i] !== null) { + this.checkPatternParam(options, param.elements[i]); + } + } + break; + case syntax_1.Syntax.ObjectPattern: + for (var i = 0; i < param.properties.length; i++) { + this.checkPatternParam(options, param.properties[i].value); + } + break; + default: + break; + } + options.simple = options.simple && (param instanceof Node.Identifier); + }; + Parser.prototype.reinterpretAsCoverFormalsList = function (expr) { + var params = [expr]; + var options; + var asyncArrow = false; + switch (expr.type) { + case syntax_1.Syntax.Identifier: + break; + case ArrowParameterPlaceHolder: + params = expr.params; + asyncArrow = expr.async; + break; + default: + return null; + } + options = { + simple: true, + paramSet: {} + }; + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.AssignmentPattern) { + if (param.right.type === syntax_1.Syntax.YieldExpression) { + if (param.right.argument) { + this.throwUnexpectedToken(this.lookahead); + } + param.right.type = syntax_1.Syntax.Identifier; + param.right.name = 'yield'; + delete param.right.argument; + delete param.right.delegate; + } + } + else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') { + this.throwUnexpectedToken(this.lookahead); + } + this.checkPatternParam(options, param); + params[i] = param; + } + if (this.context.strict || !this.context.allowYield) { + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.YieldExpression) { + this.throwUnexpectedToken(this.lookahead); + } + } + } + if (options.message === messages_1.Messages.StrictParamDupe) { + var token = this.context.strict ? options.stricted : options.firstRestricted; + this.throwUnexpectedToken(token, options.message); + } + return { + simple: options.simple, + params: params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.parseAssignmentExpression = function () { + var expr; + if (!this.context.allowYield && this.matchKeyword('yield')) { + expr = this.parseYieldExpression(); + } + else { + var startToken = this.lookahead; + var token = startToken; + expr = this.parseConditionalExpression(); + if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') { + if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) { + var arg = this.parsePrimaryExpression(); + this.reinterpretExpressionAsPattern(arg); + expr = { + type: ArrowParameterPlaceHolder, + params: [arg], + async: true + }; + } + } + if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) { + // https://tc39.github.io/ecma262/#sec-arrow-function-definitions + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var isAsync = expr.async; + var list = this.reinterpretAsCoverFormalsList(expr); + if (list) { + if (this.hasLineTerminator) { + this.tolerateUnexpectedToken(this.lookahead); + } + this.context.firstCoverInitializedNameError = null; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = list.simple; + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = true; + this.context.await = isAsync; + var node = this.startNode(startToken); + this.expect('=>'); + var body = void 0; + if (this.match('{')) { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + body = this.parseFunctionSourceElements(); + this.context.allowIn = previousAllowIn; + } + else { + body = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + var expression = body.type !== syntax_1.Syntax.BlockStatement; + if (this.context.strict && list.firstRestricted) { + this.throwUnexpectedToken(list.firstRestricted, list.message); + } + if (this.context.strict && list.stricted) { + this.tolerateUnexpectedToken(list.stricted, list.message); + } + expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : + this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + } + } + else { + if (this.matchAssign()) { + if (!this.context.isAssignmentTarget) { + this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + } + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) { + var id = expr; + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment); + } + if (this.scanner.isStrictModeReservedWord(id.name)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + } + if (!this.match('=')) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + else { + this.reinterpretExpressionAsPattern(expr); + } + token = this.nextToken(); + var operator = token.value; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); + this.context.firstCoverInitializedNameError = null; + } + } + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-comma-operator + Parser.prototype.parseExpression = function () { + var startToken = this.lookahead; + var expr = this.isolateCoverGrammar(this.parseAssignmentExpression); + if (this.match(',')) { + var expressions = []; + expressions.push(expr); + while (this.lookahead.type !== 2 /* EOF */) { + if (!this.match(',')) { + break; + } + this.nextToken(); + expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + return expr; + }; + // https://tc39.github.io/ecma262/#sec-block + Parser.prototype.parseStatementListItem = function () { + var statement; + this.context.isAssignmentTarget = true; + this.context.isBindingElement = true; + if (this.lookahead.type === 4 /* Keyword */) { + switch (this.lookahead.value) { + case 'export': + if (!this.context.isModule) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration); + } + statement = this.parseExportDeclaration(); + break; + case 'import': + if (!this.context.isModule) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration); + } + statement = this.parseImportDeclaration(); + break; + case 'const': + statement = this.parseLexicalDeclaration({ inFor: false }); + break; + case 'function': + statement = this.parseFunctionDeclaration(); + break; + case 'class': + statement = this.parseClassDeclaration(); + break; + case 'let': + statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement(); + break; + default: + statement = this.parseStatement(); + break; + } + } + else { + statement = this.parseStatement(); + } + return statement; + }; + Parser.prototype.parseBlock = function () { + var node = this.createNode(); + this.expect('{'); + var block = []; + while (true) { + if (this.match('}')) { + break; + } + block.push(this.parseStatementListItem()); + } + this.expect('}'); + return this.finalize(node, new Node.BlockStatement(block)); + }; + // https://tc39.github.io/ecma262/#sec-let-and-const-declarations + Parser.prototype.parseLexicalBinding = function (kind, options) { + var node = this.createNode(); + var params = []; + var id = this.parsePattern(params, kind); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateError(messages_1.Messages.StrictVarName); + } + } + var init = null; + if (kind === 'const') { + if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) { + if (this.match('=')) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + else { + this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const'); + } + } + } + else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) { + this.expect('='); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseBindingList = function (kind, options) { + var list = [this.parseLexicalBinding(kind, options)]; + while (this.match(',')) { + this.nextToken(); + list.push(this.parseLexicalBinding(kind, options)); + } + return list; + }; + Parser.prototype.isLexicalDeclaration = function () { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + return (next.type === 3 /* Identifier */) || + (next.type === 7 /* Punctuator */ && next.value === '[') || + (next.type === 7 /* Punctuator */ && next.value === '{') || + (next.type === 4 /* Keyword */ && next.value === 'let') || + (next.type === 4 /* Keyword */ && next.value === 'yield'); + }; + Parser.prototype.parseLexicalDeclaration = function (options) { + var node = this.createNode(); + var kind = this.nextToken().value; + assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); + var declarations = this.parseBindingList(kind, options); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); + }; + // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns + Parser.prototype.parseBindingRestElement = function (params, kind) { + var node = this.createNode(); + this.expect('...'); + var arg = this.parsePattern(params, kind); + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseArrayPattern = function (params, kind) { + var node = this.createNode(); + this.expect('['); + var elements = []; + while (!this.match(']')) { + if (this.match(',')) { + this.nextToken(); + elements.push(null); + } + else { + if (this.match('...')) { + elements.push(this.parseBindingRestElement(params, kind)); + break; + } + else { + elements.push(this.parsePatternWithDefault(params, kind)); + } + if (!this.match(']')) { + this.expect(','); + } + } + } + this.expect(']'); + return this.finalize(node, new Node.ArrayPattern(elements)); + }; + Parser.prototype.parsePropertyPattern = function (params, kind) { + var node = this.createNode(); + var computed = false; + var shorthand = false; + var method = false; + var key; + var value; + if (this.lookahead.type === 3 /* Identifier */) { + var keyToken = this.lookahead; + key = this.parseVariableIdentifier(); + var init = this.finalize(node, new Node.Identifier(keyToken.value)); + if (this.match('=')) { + params.push(keyToken); + shorthand = true; + this.nextToken(); + var expr = this.parseAssignmentExpression(); + value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); + } + else if (!this.match(':')) { + params.push(keyToken); + shorthand = true; + value = init; + } + else { + this.expect(':'); + value = this.parsePatternWithDefault(params, kind); + } + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.expect(':'); + value = this.parsePatternWithDefault(params, kind); + } + return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectPattern = function (params, kind) { + var node = this.createNode(); + var properties = []; + this.expect('{'); + while (!this.match('}')) { + properties.push(this.parsePropertyPattern(params, kind)); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + return this.finalize(node, new Node.ObjectPattern(properties)); + }; + Parser.prototype.parsePattern = function (params, kind) { + var pattern; + if (this.match('[')) { + pattern = this.parseArrayPattern(params, kind); + } + else if (this.match('{')) { + pattern = this.parseObjectPattern(params, kind); + } + else { + if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) { + this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding); + } + params.push(this.lookahead); + pattern = this.parseVariableIdentifier(kind); + } + return pattern; + }; + Parser.prototype.parsePatternWithDefault = function (params, kind) { + var startToken = this.lookahead; + var pattern = this.parsePattern(params, kind); + if (this.match('=')) { + this.nextToken(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowYield = previousAllowYield; + pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); + } + return pattern; + }; + // https://tc39.github.io/ecma262/#sec-variable-statement + Parser.prototype.parseVariableIdentifier = function (kind) { + var node = this.createNode(); + var token = this.nextToken(); + if (token.type === 4 /* Keyword */ && token.value === 'yield') { + if (this.context.strict) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + else if (!this.context.allowYield) { + this.throwUnexpectedToken(token); + } + } + else if (token.type !== 3 /* Identifier */) { + if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + else { + if (this.context.strict || token.value !== 'let' || kind !== 'var') { + this.throwUnexpectedToken(token); + } + } + } + else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') { + this.tolerateUnexpectedToken(token); + } + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseVariableDeclaration = function (options) { + var node = this.createNode(); + var params = []; + var id = this.parsePattern(params, 'var'); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) { + this.tolerateError(messages_1.Messages.StrictVarName); + } + } + var init = null; + if (this.match('=')) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) { + this.expect('='); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseVariableDeclarationList = function (options) { + var opt = { inFor: options.inFor }; + var list = []; + list.push(this.parseVariableDeclaration(opt)); + while (this.match(',')) { + this.nextToken(); + list.push(this.parseVariableDeclaration(opt)); + } + return list; + }; + Parser.prototype.parseVariableStatement = function () { + var node = this.createNode(); + this.expectKeyword('var'); + var declarations = this.parseVariableDeclarationList({ inFor: false }); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, 'var')); + }; + // https://tc39.github.io/ecma262/#sec-empty-statement + Parser.prototype.parseEmptyStatement = function () { + var node = this.createNode(); + this.expect(';'); + return this.finalize(node, new Node.EmptyStatement()); + }; + // https://tc39.github.io/ecma262/#sec-expression-statement + Parser.prototype.parseExpressionStatement = function () { + var node = this.createNode(); + var expr = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ExpressionStatement(expr)); + }; + // https://tc39.github.io/ecma262/#sec-if-statement + Parser.prototype.parseIfClause = function () { + if (this.context.strict && this.matchKeyword('function')) { + this.tolerateError(messages_1.Messages.StrictFunction); + } + return this.parseStatement(); + }; + Parser.prototype.parseIfStatement = function () { + var node = this.createNode(); + var consequent; + var alternate = null; + this.expectKeyword('if'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + consequent = this.parseIfClause(); + if (this.matchKeyword('else')) { + this.nextToken(); + alternate = this.parseIfClause(); + } + } + return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); + }; + // https://tc39.github.io/ecma262/#sec-do-while-statement + Parser.prototype.parseDoWhileStatement = function () { + var node = this.createNode(); + this.expectKeyword('do'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + var body = this.parseStatement(); + this.context.inIteration = previousInIteration; + this.expectKeyword('while'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + } + else { + this.expect(')'); + if (this.match(';')) { + this.nextToken(); + } + } + return this.finalize(node, new Node.DoWhileStatement(body, test)); + }; + // https://tc39.github.io/ecma262/#sec-while-statement + Parser.prototype.parseWhileStatement = function () { + var node = this.createNode(); + var body; + this.expectKeyword('while'); + this.expect('('); + var test = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.parseStatement(); + this.context.inIteration = previousInIteration; + } + return this.finalize(node, new Node.WhileStatement(test, body)); + }; + // https://tc39.github.io/ecma262/#sec-for-statement + // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements + Parser.prototype.parseForStatement = function () { + var init = null; + var test = null; + var update = null; + var forIn = true; + var left, right; + var node = this.createNode(); + this.expectKeyword('for'); + this.expect('('); + if (this.match(';')) { + this.nextToken(); + } + else { + if (this.matchKeyword('var')) { + init = this.createNode(); + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseVariableDeclarationList({ inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && this.matchKeyword('in')) { + var decl = declarations[0]; + if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) { + this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in'); + } + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); + this.expect(';'); + } + } + else if (this.matchKeyword('const') || this.matchKeyword('let')) { + init = this.createNode(); + var kind = this.nextToken().value; + if (!this.context.strict && this.lookahead.value === 'in') { + init = this.finalize(init, new Node.Identifier(kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseBindingList(kind, { inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } + else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + this.consumeSemicolon(); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + } + } + } + else { + var initStartToken = this.lookahead; + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + init = this.inheritCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + if (this.matchKeyword('in')) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { + this.tolerateError(messages_1.Messages.InvalidLHSInForIn); + } + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseExpression(); + init = null; + } + else if (this.matchContextualKeyword('of')) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { + this.tolerateError(messages_1.Messages.InvalidLHSInForLoop); + } + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } + else { + if (this.match(',')) { + var initSeq = [init]; + while (this.match(',')) { + this.nextToken(); + initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); + } + this.expect(';'); + } + } + } + if (typeof left === 'undefined') { + if (!this.match(';')) { + test = this.parseExpression(); + } + this.expect(';'); + if (!this.match(')')) { + update = this.parseExpression(); + } + } + var body; + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.isolateCoverGrammar(this.parseStatement); + this.context.inIteration = previousInIteration; + } + return (typeof left === 'undefined') ? + this.finalize(node, new Node.ForStatement(init, test, update, body)) : + forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : + this.finalize(node, new Node.ForOfStatement(left, right, body)); + }; + // https://tc39.github.io/ecma262/#sec-continue-statement + Parser.prototype.parseContinueStatement = function () { + var node = this.createNode(); + this.expectKeyword('continue'); + var label = null; + if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + label = id; + var key = '$' + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration) { + this.throwError(messages_1.Messages.IllegalContinue); + } + return this.finalize(node, new Node.ContinueStatement(label)); + }; + // https://tc39.github.io/ecma262/#sec-break-statement + Parser.prototype.parseBreakStatement = function () { + var node = this.createNode(); + this.expectKeyword('break'); + var label = null; + if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + var key = '$' + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + label = id; + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration && !this.context.inSwitch) { + this.throwError(messages_1.Messages.IllegalBreak); + } + return this.finalize(node, new Node.BreakStatement(label)); + }; + // https://tc39.github.io/ecma262/#sec-return-statement + Parser.prototype.parseReturnStatement = function () { + if (!this.context.inFunctionBody) { + this.tolerateError(messages_1.Messages.IllegalReturn); + } + var node = this.createNode(); + this.expectKeyword('return'); + var hasArgument = (!this.match(';') && !this.match('}') && + !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */) || + this.lookahead.type === 8 /* StringLiteral */ || + this.lookahead.type === 10 /* Template */; + var argument = hasArgument ? this.parseExpression() : null; + this.consumeSemicolon(); + return this.finalize(node, new Node.ReturnStatement(argument)); + }; + // https://tc39.github.io/ecma262/#sec-with-statement + Parser.prototype.parseWithStatement = function () { + if (this.context.strict) { + this.tolerateError(messages_1.Messages.StrictModeWith); + } + var node = this.createNode(); + var body; + this.expectKeyword('with'); + this.expect('('); + var object = this.parseExpression(); + if (!this.match(')') && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } + else { + this.expect(')'); + body = this.parseStatement(); + } + return this.finalize(node, new Node.WithStatement(object, body)); + }; + // https://tc39.github.io/ecma262/#sec-switch-statement + Parser.prototype.parseSwitchCase = function () { + var node = this.createNode(); + var test; + if (this.matchKeyword('default')) { + this.nextToken(); + test = null; + } + else { + this.expectKeyword('case'); + test = this.parseExpression(); + } + this.expect(':'); + var consequent = []; + while (true) { + if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) { + break; + } + consequent.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.SwitchCase(test, consequent)); + }; + Parser.prototype.parseSwitchStatement = function () { + var node = this.createNode(); + this.expectKeyword('switch'); + this.expect('('); + var discriminant = this.parseExpression(); + this.expect(')'); + var previousInSwitch = this.context.inSwitch; + this.context.inSwitch = true; + var cases = []; + var defaultFound = false; + this.expect('{'); + while (true) { + if (this.match('}')) { + break; + } + var clause = this.parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + this.throwError(messages_1.Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + this.expect('}'); + this.context.inSwitch = previousInSwitch; + return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); + }; + // https://tc39.github.io/ecma262/#sec-labelled-statements + Parser.prototype.parseLabelledStatement = function () { + var node = this.createNode(); + var expr = this.parseExpression(); + var statement; + if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) { + this.nextToken(); + var id = expr; + var key = '$' + id.name; + if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { + this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name); + } + this.context.labelSet[key] = true; + var body = void 0; + if (this.matchKeyword('class')) { + this.tolerateUnexpectedToken(this.lookahead); + body = this.parseClassDeclaration(); + } + else if (this.matchKeyword('function')) { + var token = this.lookahead; + var declaration = this.parseFunctionDeclaration(); + if (this.context.strict) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction); + } + else if (declaration.generator) { + this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext); + } + body = declaration; + } + else { + body = this.parseStatement(); + } + delete this.context.labelSet[key]; + statement = new Node.LabeledStatement(id, body); + } + else { + this.consumeSemicolon(); + statement = new Node.ExpressionStatement(expr); + } + return this.finalize(node, statement); + }; + // https://tc39.github.io/ecma262/#sec-throw-statement + Parser.prototype.parseThrowStatement = function () { + var node = this.createNode(); + this.expectKeyword('throw'); + if (this.hasLineTerminator) { + this.throwError(messages_1.Messages.NewlineAfterThrow); + } + var argument = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ThrowStatement(argument)); + }; + // https://tc39.github.io/ecma262/#sec-try-statement + Parser.prototype.parseCatchClause = function () { + var node = this.createNode(); + this.expectKeyword('catch'); + this.expect('('); + if (this.match(')')) { + this.throwUnexpectedToken(this.lookahead); + } + var params = []; + var param = this.parsePattern(params); + var paramMap = {}; + for (var i = 0; i < params.length; i++) { + var key = '$' + params[i].value; + if (Object.prototype.hasOwnProperty.call(paramMap, key)) { + this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value); + } + paramMap[key] = true; + } + if (this.context.strict && param.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(param.name)) { + this.tolerateError(messages_1.Messages.StrictCatchVariable); + } + } + this.expect(')'); + var body = this.parseBlock(); + return this.finalize(node, new Node.CatchClause(param, body)); + }; + Parser.prototype.parseFinallyClause = function () { + this.expectKeyword('finally'); + return this.parseBlock(); + }; + Parser.prototype.parseTryStatement = function () { + var node = this.createNode(); + this.expectKeyword('try'); + var block = this.parseBlock(); + var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null; + var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null; + if (!handler && !finalizer) { + this.throwError(messages_1.Messages.NoCatchOrFinally); + } + return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); + }; + // https://tc39.github.io/ecma262/#sec-debugger-statement + Parser.prototype.parseDebuggerStatement = function () { + var node = this.createNode(); + this.expectKeyword('debugger'); + this.consumeSemicolon(); + return this.finalize(node, new Node.DebuggerStatement()); + }; + // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations + Parser.prototype.parseStatement = function () { + var statement; + switch (this.lookahead.type) { + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 6 /* NumericLiteral */: + case 8 /* StringLiteral */: + case 10 /* Template */: + case 9 /* RegularExpression */: + statement = this.parseExpressionStatement(); + break; + case 7 /* Punctuator */: + var value = this.lookahead.value; + if (value === '{') { + statement = this.parseBlock(); + } + else if (value === '(') { + statement = this.parseExpressionStatement(); + } + else if (value === ';') { + statement = this.parseEmptyStatement(); + } + else { + statement = this.parseExpressionStatement(); + } + break; + case 3 /* Identifier */: + statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); + break; + case 4 /* Keyword */: + switch (this.lookahead.value) { + case 'break': + statement = this.parseBreakStatement(); + break; + case 'continue': + statement = this.parseContinueStatement(); + break; + case 'debugger': + statement = this.parseDebuggerStatement(); + break; + case 'do': + statement = this.parseDoWhileStatement(); + break; + case 'for': + statement = this.parseForStatement(); + break; + case 'function': + statement = this.parseFunctionDeclaration(); + break; + case 'if': + statement = this.parseIfStatement(); + break; + case 'return': + statement = this.parseReturnStatement(); + break; + case 'switch': + statement = this.parseSwitchStatement(); + break; + case 'throw': + statement = this.parseThrowStatement(); + break; + case 'try': + statement = this.parseTryStatement(); + break; + case 'var': + statement = this.parseVariableStatement(); + break; + case 'while': + statement = this.parseWhileStatement(); + break; + case 'with': + statement = this.parseWithStatement(); + break; + default: + statement = this.parseExpressionStatement(); + break; + } + break; + default: + statement = this.throwUnexpectedToken(this.lookahead); + } + return statement; + }; + // https://tc39.github.io/ecma262/#sec-function-definitions + Parser.prototype.parseFunctionSourceElements = function () { + var node = this.createNode(); + this.expect('{'); + var body = this.parseDirectivePrologues(); + var previousLabelSet = this.context.labelSet; + var previousInIteration = this.context.inIteration; + var previousInSwitch = this.context.inSwitch; + var previousInFunctionBody = this.context.inFunctionBody; + this.context.labelSet = {}; + this.context.inIteration = false; + this.context.inSwitch = false; + this.context.inFunctionBody = true; + while (this.lookahead.type !== 2 /* EOF */) { + if (this.match('}')) { + break; + } + body.push(this.parseStatementListItem()); + } + this.expect('}'); + this.context.labelSet = previousLabelSet; + this.context.inIteration = previousInIteration; + this.context.inSwitch = previousInSwitch; + this.context.inFunctionBody = previousInFunctionBody; + return this.finalize(node, new Node.BlockStatement(body)); + }; + Parser.prototype.validateParam = function (options, param, name) { + var key = '$' + name; + if (this.context.strict) { + if (this.scanner.isRestrictedWord(name)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + else if (!options.firstRestricted) { + if (this.scanner.isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictParamName; + } + else if (this.scanner.isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictReservedWord; + } + else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + /* istanbul ignore next */ + if (typeof Object.defineProperty === 'function') { + Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true }); + } + else { + options.paramSet[key] = true; + } + }; + Parser.prototype.parseRestElement = function (params) { + var node = this.createNode(); + this.expect('...'); + var arg = this.parsePattern(params); + if (this.match('=')) { + this.throwError(messages_1.Messages.DefaultRestParameter); + } + if (!this.match(')')) { + this.throwError(messages_1.Messages.ParameterAfterRestParameter); + } + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseFormalParameter = function (options) { + var params = []; + var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params); + for (var i = 0; i < params.length; i++) { + this.validateParam(options, params[i], params[i].value); + } + options.simple = options.simple && (param instanceof Node.Identifier); + options.params.push(param); + }; + Parser.prototype.parseFormalParameters = function (firstRestricted) { + var options; + options = { + simple: true, + params: [], + firstRestricted: firstRestricted + }; + this.expect('('); + if (!this.match(')')) { + options.paramSet = {}; + while (this.lookahead.type !== 2 /* EOF */) { + this.parseFormalParameter(options); + if (this.match(')')) { + break; + } + this.expect(','); + if (this.match(')')) { + break; + } + } + } + this.expect(')'); + return { + simple: options.simple, + params: options.params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.matchAsyncFunction = function () { + var match = this.matchContextualKeyword('async'); + if (match) { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function'); + } + return match; + }; + Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword('async'); + if (isAsync) { + this.nextToken(); + } + this.expectKeyword('function'); + var isGenerator = isAsync ? false : this.match('*'); + if (isGenerator) { + this.nextToken(); + } + var message; + var id = null; + var firstRestricted = null; + if (!identifierIsOptional || !this.match('(')) { + var token = this.lookahead; + id = this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } + } + else { + if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } + else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + } + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) { + message = formalParameters.message; + } + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) { + this.throwUnexpectedToken(firstRestricted, message); + } + if (this.context.strict && stricted) { + this.tolerateUnexpectedToken(stricted, message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : + this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); + }; + Parser.prototype.parseFunctionExpression = function () { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword('async'); + if (isAsync) { + this.nextToken(); + } + this.expectKeyword('function'); + var isGenerator = isAsync ? false : this.match('*'); + if (isGenerator) { + this.nextToken(); + } + var message; + var id = null; + var firstRestricted; + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + if (!this.match('(')) { + var token = this.lookahead; + id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) { + this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } + } + else { + if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } + else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + } + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) { + message = formalParameters.message; + } + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) { + this.throwUnexpectedToken(firstRestricted, message); + } + if (this.context.strict && stricted) { + this.tolerateUnexpectedToken(stricted, message); + } + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : + this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); + }; + // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive + Parser.prototype.parseDirective = function () { + var token = this.lookahead; + var node = this.createNode(); + var expr = this.parseExpression(); + var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null; + this.consumeSemicolon(); + return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); + }; + Parser.prototype.parseDirectivePrologues = function () { + var firstRestricted = null; + var body = []; + while (true) { + var token = this.lookahead; + if (token.type !== 8 /* StringLiteral */) { + break; + } + var statement = this.parseDirective(); + body.push(statement); + var directive = statement.directive; + if (typeof directive !== 'string') { + break; + } + if (directive === 'use strict') { + this.context.strict = true; + if (firstRestricted) { + this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral); + } + if (!this.context.allowStrictDirective) { + this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective); + } + } + else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + return body; + }; + // https://tc39.github.io/ecma262/#sec-method-definitions + Parser.prototype.qualifiedPropertyName = function (token) { + switch (token.type) { + case 3 /* Identifier */: + case 8 /* StringLiteral */: + case 1 /* BooleanLiteral */: + case 5 /* NullLiteral */: + case 6 /* NumericLiteral */: + case 4 /* Keyword */: + return true; + case 7 /* Punctuator */: + return token.value === '['; + default: + break; + } + return false; + }; + Parser.prototype.parseGetterMethod = function () { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length > 0) { + this.tolerateError(messages_1.Messages.BadGetterArity); + } + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseSetterMethod = function () { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length !== 1) { + this.tolerateError(messages_1.Messages.BadSetterArity); + } + else if (formalParameters.params[0] instanceof Node.RestElement) { + this.tolerateError(messages_1.Messages.BadSetterRestParameter); + } + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseGeneratorMethod = function () { + var node = this.createNode(); + var isGenerator = true; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + this.context.allowYield = false; + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + // https://tc39.github.io/ecma262/#sec-generator-function-definitions + Parser.prototype.isStartOfExpression = function () { + var start = true; + var value = this.lookahead.value; + switch (this.lookahead.type) { + case 7 /* Punctuator */: + start = (value === '[') || (value === '(') || (value === '{') || + (value === '+') || (value === '-') || + (value === '!') || (value === '~') || + (value === '++') || (value === '--') || + (value === '/') || (value === '/='); // regular expression literal + break; + case 4 /* Keyword */: + start = (value === 'class') || (value === 'delete') || + (value === 'function') || (value === 'let') || (value === 'new') || + (value === 'super') || (value === 'this') || (value === 'typeof') || + (value === 'void') || (value === 'yield'); + break; + default: + break; + } + return start; + }; + Parser.prototype.parseYieldExpression = function () { + var node = this.createNode(); + this.expectKeyword('yield'); + var argument = null; + var delegate = false; + if (!this.hasLineTerminator) { + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + delegate = this.match('*'); + if (delegate) { + this.nextToken(); + argument = this.parseAssignmentExpression(); + } + else if (this.isStartOfExpression()) { + argument = this.parseAssignmentExpression(); + } + this.context.allowYield = previousAllowYield; + } + return this.finalize(node, new Node.YieldExpression(argument, delegate)); + }; + // https://tc39.github.io/ecma262/#sec-class-definitions + Parser.prototype.parseClassElement = function (hasConstructor) { + var token = this.lookahead; + var node = this.createNode(); + var kind = ''; + var key = null; + var value = null; + var computed = false; + var method = false; + var isStatic = false; + var isAsync = false; + if (this.match('*')) { + this.nextToken(); + } + else { + computed = this.match('['); + key = this.parseObjectPropertyKey(); + var id = key; + if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) { + token = this.lookahead; + isStatic = true; + computed = this.match('['); + if (this.match('*')) { + this.nextToken(); + } + else { + key = this.parseObjectPropertyKey(); + } + } + if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) { + var punctuator = this.lookahead.value; + if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') { + isAsync = true; + token = this.lookahead; + key = this.parseObjectPropertyKey(); + if (token.type === 3 /* Identifier */ && token.value === 'constructor') { + this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync); + } + } + } + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 /* Identifier */) { + if (token.value === 'get' && lookaheadPropertyKey) { + kind = 'get'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } + else if (token.value === 'set' && lookaheadPropertyKey) { + kind = 'set'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + } + else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) { + kind = 'init'; + computed = this.match('['); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + if (!kind && key && this.match('(')) { + kind = 'init'; + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + if (!kind) { + this.throwUnexpectedToken(this.lookahead); + } + if (kind === 'init') { + kind = 'method'; + } + if (!computed) { + if (isStatic && this.isPropertyKey(key, 'prototype')) { + this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype); + } + if (!isStatic && this.isPropertyKey(key, 'constructor')) { + if (kind !== 'method' || !method || (value && value.generator)) { + this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod); + } + if (hasConstructor.value) { + this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor); + } + else { + hasConstructor.value = true; + } + kind = 'constructor'; + } + } + return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); + }; + Parser.prototype.parseClassElementList = function () { + var body = []; + var hasConstructor = { value: false }; + this.expect('{'); + while (!this.match('}')) { + if (this.match(';')) { + this.nextToken(); + } + else { + body.push(this.parseClassElement(hasConstructor)); + } + } + this.expect('}'); + return body; + }; + Parser.prototype.parseClassBody = function () { + var node = this.createNode(); + var elementList = this.parseClassElementList(); + return this.finalize(node, new Node.ClassBody(elementList)); + }; + Parser.prototype.parseClassDeclaration = function (identifierIsOptional) { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword('class'); + var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier(); + var superClass = null; + if (this.matchKeyword('extends')) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); + }; + Parser.prototype.parseClassExpression = function () { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword('class'); + var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null; + var superClass = null; + if (this.matchKeyword('extends')) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); + }; + // https://tc39.github.io/ecma262/#sec-scripts + // https://tc39.github.io/ecma262/#sec-modules + Parser.prototype.parseModule = function () { + this.context.strict = true; + this.context.isModule = true; + this.scanner.isModule = true; + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2 /* EOF */) { + body.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.Module(body)); + }; + Parser.prototype.parseScript = function () { + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2 /* EOF */) { + body.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.Script(body)); + }; + // https://tc39.github.io/ecma262/#sec-imports + Parser.prototype.parseModuleSpecifier = function () { + var node = this.createNode(); + if (this.lookahead.type !== 8 /* StringLiteral */) { + this.throwError(messages_1.Messages.InvalidModuleSpecifier); + } + var token = this.nextToken(); + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + // import {<foo as bar>} ...; + Parser.prototype.parseImportSpecifier = function () { + var node = this.createNode(); + var imported; + var local; + if (this.lookahead.type === 3 /* Identifier */) { + imported = this.parseVariableIdentifier(); + local = imported; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + } + else { + imported = this.parseIdentifierName(); + local = imported; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + } + return this.finalize(node, new Node.ImportSpecifier(local, imported)); + }; + // {foo, bar as bas} + Parser.prototype.parseNamedImports = function () { + this.expect('{'); + var specifiers = []; + while (!this.match('}')) { + specifiers.push(this.parseImportSpecifier()); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + return specifiers; + }; + // import <foo> ...; + Parser.prototype.parseImportDefaultSpecifier = function () { + var node = this.createNode(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportDefaultSpecifier(local)); + }; + // import <* as foo> ...; + Parser.prototype.parseImportNamespaceSpecifier = function () { + var node = this.createNode(); + this.expect('*'); + if (!this.matchContextualKeyword('as')) { + this.throwError(messages_1.Messages.NoAsAfterImportNamespace); + } + this.nextToken(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); + }; + Parser.prototype.parseImportDeclaration = function () { + if (this.context.inFunctionBody) { + this.throwError(messages_1.Messages.IllegalImportDeclaration); + } + var node = this.createNode(); + this.expectKeyword('import'); + var src; + var specifiers = []; + if (this.lookahead.type === 8 /* StringLiteral */) { + // import 'foo'; + src = this.parseModuleSpecifier(); + } + else { + if (this.match('{')) { + // import {bar} + specifiers = specifiers.concat(this.parseNamedImports()); + } + else if (this.match('*')) { + // import * as foo + specifiers.push(this.parseImportNamespaceSpecifier()); + } + else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) { + // import foo + specifiers.push(this.parseImportDefaultSpecifier()); + if (this.match(',')) { + this.nextToken(); + if (this.match('*')) { + // import foo, * as foo + specifiers.push(this.parseImportNamespaceSpecifier()); + } + else if (this.match('{')) { + // import foo, {bar} + specifiers = specifiers.concat(this.parseNamedImports()); + } + else { + this.throwUnexpectedToken(this.lookahead); + } + } + } + else { + this.throwUnexpectedToken(this.nextToken()); + } + if (!this.matchContextualKeyword('from')) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + src = this.parseModuleSpecifier(); + } + this.consumeSemicolon(); + return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); + }; + // https://tc39.github.io/ecma262/#sec-exports + Parser.prototype.parseExportSpecifier = function () { + var node = this.createNode(); + var local = this.parseIdentifierName(); + var exported = local; + if (this.matchContextualKeyword('as')) { + this.nextToken(); + exported = this.parseIdentifierName(); + } + return this.finalize(node, new Node.ExportSpecifier(local, exported)); + }; + Parser.prototype.parseExportDeclaration = function () { + if (this.context.inFunctionBody) { + this.throwError(messages_1.Messages.IllegalExportDeclaration); + } + var node = this.createNode(); + this.expectKeyword('export'); + var exportDeclaration; + if (this.matchKeyword('default')) { + // export default ... + this.nextToken(); + if (this.matchKeyword('function')) { + // export default function foo () {} + // export default function () {} + var declaration = this.parseFunctionDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else if (this.matchKeyword('class')) { + // export default class foo {} + var declaration = this.parseClassDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else if (this.matchContextualKeyword('async')) { + // export default async function f () {} + // export default async function () {} + // export default async x => x + var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + else { + if (this.matchContextualKeyword('from')) { + this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value); + } + // export default {}; + // export default []; + // export default (1 + 2); + var declaration = this.match('{') ? this.parseObjectInitializer() : + this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + } + else if (this.match('*')) { + // export * from 'foo'; + this.nextToken(); + if (!this.matchContextualKeyword('from')) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + var src = this.parseModuleSpecifier(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); + } + else if (this.lookahead.type === 4 /* Keyword */) { + // export var f = 1; + var declaration = void 0; + switch (this.lookahead.value) { + case 'let': + case 'const': + declaration = this.parseLexicalDeclaration({ inFor: false }); + break; + case 'var': + case 'class': + case 'function': + declaration = this.parseStatementListItem(); + break; + default: + this.throwUnexpectedToken(this.lookahead); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } + else if (this.matchAsyncFunction()) { + var declaration = this.parseFunctionDeclaration(); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } + else { + var specifiers = []; + var source = null; + var isExportFromIdentifier = false; + this.expect('{'); + while (!this.match('}')) { + isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default'); + specifiers.push(this.parseExportSpecifier()); + if (!this.match('}')) { + this.expect(','); + } + } + this.expect('}'); + if (this.matchContextualKeyword('from')) { + // export {default} from 'foo'; + // export {foo} from 'foo'; + this.nextToken(); + source = this.parseModuleSpecifier(); + this.consumeSemicolon(); + } + else if (isExportFromIdentifier) { + // export {default}; // missing fromClause + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + else { + // export {foo}; + this.consumeSemicolon(); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); + } + return exportDeclaration; + }; + return Parser; + }()); + exports.Parser = Parser; + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + "use strict"; + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + Object.defineProperty(exports, "__esModule", { value: true }); + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + exports.assert = assert; + + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + "use strict"; + /* tslint:disable:max-classes-per-file */ + Object.defineProperty(exports, "__esModule", { value: true }); + var ErrorHandler = (function () { + function ErrorHandler() { + this.errors = []; + this.tolerant = false; + } + ErrorHandler.prototype.recordError = function (error) { + this.errors.push(error); + }; + ErrorHandler.prototype.tolerate = function (error) { + if (this.tolerant) { + this.recordError(error); + } + else { + throw error; + } + }; + ErrorHandler.prototype.constructError = function (msg, column) { + var error = new Error(msg); + try { + throw error; + } + catch (base) { + /* istanbul ignore else */ + if (Object.create && Object.defineProperty) { + error = Object.create(base); + Object.defineProperty(error, 'column', { value: column }); + } + } + /* istanbul ignore next */ + return error; + }; + ErrorHandler.prototype.createError = function (index, line, col, description) { + var msg = 'Line ' + line + ': ' + description; + var error = this.constructError(msg, col); + error.index = index; + error.lineNumber = line; + error.description = description; + return error; + }; + ErrorHandler.prototype.throwError = function (index, line, col, description) { + throw this.createError(index, line, col, description); + }; + ErrorHandler.prototype.tolerateError = function (index, line, col, description) { + var error = this.createError(index, line, col, description); + if (this.tolerant) { + this.recordError(error); + } + else { + throw error; + } + }; + return ErrorHandler; + }()); + exports.ErrorHandler = ErrorHandler; + + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + // Error messages should be identical to V8. + exports.Messages = { + BadGetterArity: 'Getter must not have any formal parameters', + BadSetterArity: 'Setter must have exactly one formal parameter', + BadSetterRestParameter: 'Setter function argument must not be a rest parameter', + ConstructorIsAsync: 'Class constructor may not be an async method', + ConstructorSpecialMethod: 'Class constructor may not be an accessor', + DeclarationMissingInitializer: 'Missing initializer in %0 declaration', + DefaultRestParameter: 'Unexpected token =', + DuplicateBinding: 'Duplicate binding %0', + DuplicateConstructor: 'A class may only have one constructor', + DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', + ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer', + GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts', + IllegalBreak: 'Illegal break statement', + IllegalContinue: 'Illegal continue statement', + IllegalExportDeclaration: 'Unexpected token', + IllegalImportDeclaration: 'Unexpected token', + IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list', + IllegalReturn: 'Illegal return statement', + InvalidEscapedReservedWord: 'Keyword must not contain escaped characters', + InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', + InvalidModuleSpecifier: 'Unexpected token', + InvalidRegExp: 'Invalid regular expression', + LetInLexicalBinding: 'let is disallowed as a lexically bound name', + MissingFromClause: 'Unexpected token', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NewlineAfterThrow: 'Illegal newline after throw', + NoAsAfterImportNamespace: 'Unexpected token', + NoCatchOrFinally: 'Missing catch or finally after try', + ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', + Redeclaration: '%0 \'%1\' has already been declared', + StaticPrototype: 'Classes may not have static property named prototype', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', + UnexpectedEOS: 'Unexpected end of input', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedNumber: 'Unexpected number', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedString: 'Unexpected string', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedToken: 'Unexpected token %0', + UnexpectedTokenIllegal: 'Unexpected token ILLEGAL', + UnknownLabel: 'Undefined label \'%0\'', + UnterminatedRegExp: 'Invalid regular expression: missing /' + }; + + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var character_1 = __webpack_require__(4); + var messages_1 = __webpack_require__(11); + function hexValue(ch) { + return '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + function octalValue(ch) { + return '01234567'.indexOf(ch); + } + var Scanner = (function () { + function Scanner(code, handler) { + this.source = code; + this.errorHandler = handler; + this.trackComment = false; + this.isModule = false; + this.length = code.length; + this.index = 0; + this.lineNumber = (code.length > 0) ? 1 : 0; + this.lineStart = 0; + this.curlyStack = []; + } + Scanner.prototype.saveState = function () { + return { + index: this.index, + lineNumber: this.lineNumber, + lineStart: this.lineStart + }; + }; + Scanner.prototype.restoreState = function (state) { + this.index = state.index; + this.lineNumber = state.lineNumber; + this.lineStart = state.lineStart; + }; + Scanner.prototype.eof = function () { + return this.index >= this.length; + }; + Scanner.prototype.throwUnexpectedToken = function (message) { + if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } + return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + Scanner.prototype.tolerateUnexpectedToken = function (message) { + if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } + this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + // https://tc39.github.io/ecma262/#sec-comments + Scanner.prototype.skipSingleLineComment = function (offset) { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - offset; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - offset + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + ++this.index; + if (character_1.Character.isLineTerminator(ch)) { + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart - 1 + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index - 1], + range: [start, this.index - 1], + loc: loc + }; + comments.push(entry); + } + if (ch === 13 && this.source.charCodeAt(this.index) === 10) { + ++this.index; + } + ++this.lineNumber; + this.lineStart = this.index; + return comments; + } + } + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + return comments; + }; + Scanner.prototype.skipMultiLineComment = function () { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - 2; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - 2 + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isLineTerminator(ch)) { + if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) { + ++this.index; + } + ++this.lineNumber; + ++this.index; + this.lineStart = this.index; + } + else if (ch === 0x2A) { + // Block comment ends with '*/'. + if (this.source.charCodeAt(this.index + 1) === 0x2F) { + this.index += 2; + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index - 2], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + return comments; + } + ++this.index; + } + else { + ++this.index; + } + } + // Ran off the end of the file - the whole thing is a comment + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index], + range: [start, this.index], + loc: loc + }; + comments.push(entry); + } + this.tolerateUnexpectedToken(); + return comments; + }; + Scanner.prototype.scanComments = function () { + var comments; + if (this.trackComment) { + comments = []; + } + var start = (this.index === 0); + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isWhiteSpace(ch)) { + ++this.index; + } + else if (character_1.Character.isLineTerminator(ch)) { + ++this.index; + if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) { + ++this.index; + } + ++this.lineNumber; + this.lineStart = this.index; + start = true; + } + else if (ch === 0x2F) { + ch = this.source.charCodeAt(this.index + 1); + if (ch === 0x2F) { + this.index += 2; + var comment = this.skipSingleLineComment(2); + if (this.trackComment) { + comments = comments.concat(comment); + } + start = true; + } + else if (ch === 0x2A) { + this.index += 2; + var comment = this.skipMultiLineComment(); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else if (start && ch === 0x2D) { + // U+003E is '>' + if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) { + // '-->' is a single-line comment + this.index += 3; + var comment = this.skipSingleLineComment(3); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else if (ch === 0x3C && !this.isModule) { + if (this.source.slice(this.index + 1, this.index + 4) === '!--') { + this.index += 4; // `<!--` + var comment = this.skipSingleLineComment(4); + if (this.trackComment) { + comments = comments.concat(comment); + } + } + else { + break; + } + } + else { + break; + } + } + return comments; + }; + // https://tc39.github.io/ecma262/#sec-future-reserved-words + Scanner.prototype.isFutureReservedWord = function (id) { + switch (id) { + case 'enum': + case 'export': + case 'import': + case 'super': + return true; + default: + return false; + } + }; + Scanner.prototype.isStrictModeReservedWord = function (id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + }; + Scanner.prototype.isRestrictedWord = function (id) { + return id === 'eval' || id === 'arguments'; + }; + // https://tc39.github.io/ecma262/#sec-keywords + Scanner.prototype.isKeyword = function (id) { + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || (id === 'yield') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + }; + Scanner.prototype.codePointAt = function (i) { + var cp = this.source.charCodeAt(i); + if (cp >= 0xD800 && cp <= 0xDBFF) { + var second = this.source.charCodeAt(i + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + var first = cp; + cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return cp; + }; + Scanner.prototype.scanHexEscape = function (prefix) { + var len = (prefix === 'u') ? 4 : 2; + var code = 0; + for (var i = 0; i < len; ++i) { + if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) { + code = code * 16 + hexValue(this.source[this.index++]); + } + else { + return null; + } + } + return String.fromCharCode(code); + }; + Scanner.prototype.scanUnicodeCodePointEscape = function () { + var ch = this.source[this.index]; + var code = 0; + // At least, one hex digit is required. + if (ch === '}') { + this.throwUnexpectedToken(); + } + while (!this.eof()) { + ch = this.source[this.index++]; + if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) { + break; + } + code = code * 16 + hexValue(ch); + } + if (code > 0x10FFFF || ch !== '}') { + this.throwUnexpectedToken(); + } + return character_1.Character.fromCodePoint(code); + }; + Scanner.prototype.getIdentifier = function () { + var start = this.index++; + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (ch === 0x5C) { + // Blackslash (U+005C) marks Unicode escape sequence. + this.index = start; + return this.getComplexIdentifier(); + } + else if (ch >= 0xD800 && ch < 0xDFFF) { + // Need to handle surrogate pairs. + this.index = start; + return this.getComplexIdentifier(); + } + if (character_1.Character.isIdentifierPart(ch)) { + ++this.index; + } + else { + break; + } + } + return this.source.slice(start, this.index); + }; + Scanner.prototype.getComplexIdentifier = function () { + var cp = this.codePointAt(this.index); + var id = character_1.Character.fromCodePoint(cp); + this.index += id.length; + // '\u' (U+005C, U+0075) denotes an escaped character. + var ch; + if (cp === 0x5C) { + if (this.source.charCodeAt(this.index) !== 0x75) { + this.throwUnexpectedToken(); + } + ++this.index; + if (this.source[this.index] === '{') { + ++this.index; + ch = this.scanUnicodeCodePointEscape(); + } + else { + ch = this.scanHexEscape('u'); + if (ch === null || ch === '\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) { + this.throwUnexpectedToken(); + } + } + id = ch; + } + while (!this.eof()) { + cp = this.codePointAt(this.index); + if (!character_1.Character.isIdentifierPart(cp)) { + break; + } + ch = character_1.Character.fromCodePoint(cp); + id += ch; + this.index += ch.length; + // '\u' (U+005C, U+0075) denotes an escaped character. + if (cp === 0x5C) { + id = id.substr(0, id.length - 1); + if (this.source.charCodeAt(this.index) !== 0x75) { + this.throwUnexpectedToken(); + } + ++this.index; + if (this.source[this.index] === '{') { + ++this.index; + ch = this.scanUnicodeCodePointEscape(); + } + else { + ch = this.scanHexEscape('u'); + if (ch === null || ch === '\\' || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) { + this.throwUnexpectedToken(); + } + } + id += ch; + } + } + return id; + }; + Scanner.prototype.octalToDecimal = function (ch) { + // \0 is not octal escape sequence + var octal = (ch !== '0'); + var code = octalValue(ch); + if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { + octal = true; + code = code * 8 + octalValue(this.source[this.index++]); + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { + code = code * 8 + octalValue(this.source[this.index++]); + } + } + return { + code: code, + octal: octal + }; + }; + // https://tc39.github.io/ecma262/#sec-names-and-keywords + Scanner.prototype.scanIdentifier = function () { + var type; + var start = this.index; + // Backslash (U+005C) starts an escaped character. + var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier(); + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = 3 /* Identifier */; + } + else if (this.isKeyword(id)) { + type = 4 /* Keyword */; + } + else if (id === 'null') { + type = 5 /* NullLiteral */; + } + else if (id === 'true' || id === 'false') { + type = 1 /* BooleanLiteral */; + } + else { + type = 3 /* Identifier */; + } + if (type !== 3 /* Identifier */ && (start + id.length !== this.index)) { + var restore = this.index; + this.index = start; + this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord); + this.index = restore; + } + return { + type: type, + value: id, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + // https://tc39.github.io/ecma262/#sec-punctuators + Scanner.prototype.scanPunctuator = function () { + var start = this.index; + // Check for most common single-character punctuators. + var str = this.source[this.index]; + switch (str) { + case '(': + case '{': + if (str === '{') { + this.curlyStack.push('{'); + } + ++this.index; + break; + case '.': + ++this.index; + if (this.source[this.index] === '.' && this.source[this.index + 1] === '.') { + // Spread operator: ... + this.index += 2; + str = '...'; + } + break; + case '}': + ++this.index; + this.curlyStack.pop(); + break; + case ')': + case ';': + case ',': + case '[': + case ']': + case ':': + case '?': + case '~': + ++this.index; + break; + default: + // 4-character punctuator. + str = this.source.substr(this.index, 4); + if (str === '>>>=') { + this.index += 4; + } + else { + // 3-character punctuators. + str = str.substr(0, 3); + if (str === '===' || str === '!==' || str === '>>>' || + str === '<<=' || str === '>>=' || str === '**=') { + this.index += 3; + } + else { + // 2-character punctuators. + str = str.substr(0, 2); + if (str === '&&' || str === '||' || str === '==' || str === '!=' || + str === '+=' || str === '-=' || str === '*=' || str === '/=' || + str === '++' || str === '--' || str === '<<' || str === '>>' || + str === '&=' || str === '|=' || str === '^=' || str === '%=' || + str === '<=' || str === '>=' || str === '=>' || str === '**') { + this.index += 2; + } + else { + // 1-character punctuators. + str = this.source[this.index]; + if ('<>=!+-*%&|^/'.indexOf(str) >= 0) { + ++this.index; + } + } + } + } + } + if (this.index === start) { + this.throwUnexpectedToken(); + } + return { + type: 7 /* Punctuator */, + value: str, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + // https://tc39.github.io/ecma262/#sec-literals-numeric-literals + Scanner.prototype.scanHexLiteral = function (start) { + var num = ''; + while (!this.eof()) { + if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) { + break; + } + num += this.source[this.index++]; + } + if (num.length === 0) { + this.throwUnexpectedToken(); + } + if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) { + this.throwUnexpectedToken(); + } + return { + type: 6 /* NumericLiteral */, + value: parseInt('0x' + num, 16), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + Scanner.prototype.scanBinaryLiteral = function (start) { + var num = ''; + var ch; + while (!this.eof()) { + ch = this.source[this.index]; + if (ch !== '0' && ch !== '1') { + break; + } + num += this.source[this.index++]; + } + if (num.length === 0) { + // only 0b or 0B + this.throwUnexpectedToken(); + } + if (!this.eof()) { + ch = this.source.charCodeAt(this.index); + /* istanbul ignore else */ + if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) { + this.throwUnexpectedToken(); + } + } + return { + type: 6 /* NumericLiteral */, + value: parseInt(num, 2), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + Scanner.prototype.scanOctalLiteral = function (prefix, start) { + var num = ''; + var octal = false; + if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) { + octal = true; + num = '0' + this.source[this.index++]; + } + else { + ++this.index; + } + while (!this.eof()) { + if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { + break; + } + num += this.source[this.index++]; + } + if (!octal && num.length === 0) { + // only 0o or 0O + this.throwUnexpectedToken(); + } + if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { + this.throwUnexpectedToken(); + } + return { + type: 6 /* NumericLiteral */, + value: parseInt(num, 8), + octal: octal, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + Scanner.prototype.isImplicitOctalLiteral = function () { + // Implicit octal, unless there is a non-octal digit. + // (Annex B.1.1 on Numeric Literals) + for (var i = this.index + 1; i < this.length; ++i) { + var ch = this.source[i]; + if (ch === '8' || ch === '9') { + return false; + } + if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) { + return true; + } + } + return true; + }; + Scanner.prototype.scanNumericLiteral = function () { + var start = this.index; + var ch = this.source[start]; + assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), 'Numeric literal must start with a decimal digit or a decimal point'); + var num = ''; + if (ch !== '.') { + num = this.source[this.index++]; + ch = this.source[this.index]; + // Hex number starts with '0x'. + // Octal number starts with '0'. + // Octal number in ES6 starts with '0o'. + // Binary number in ES6 starts with '0b'. + if (num === '0') { + if (ch === 'x' || ch === 'X') { + ++this.index; + return this.scanHexLiteral(start); + } + if (ch === 'b' || ch === 'B') { + ++this.index; + return this.scanBinaryLiteral(start); + } + if (ch === 'o' || ch === 'O') { + return this.scanOctalLiteral(ch, start); + } + if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) { + if (this.isImplicitOctalLiteral()) { + return this.scanOctalLiteral(ch, start); + } + } + } + while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { + num += this.source[this.index++]; + } + ch = this.source[this.index]; + } + if (ch === '.') { + num += this.source[this.index++]; + while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { + num += this.source[this.index++]; + } + ch = this.source[this.index]; + } + if (ch === 'e' || ch === 'E') { + num += this.source[this.index++]; + ch = this.source[this.index]; + if (ch === '+' || ch === '-') { + num += this.source[this.index++]; + } + if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { + while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { + num += this.source[this.index++]; + } + } + else { + this.throwUnexpectedToken(); + } + } + if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) { + this.throwUnexpectedToken(); + } + return { + type: 6 /* NumericLiteral */, + value: parseFloat(num), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + // https://tc39.github.io/ecma262/#sec-literals-string-literals + Scanner.prototype.scanStringLiteral = function () { + var start = this.index; + var quote = this.source[start]; + assert_1.assert((quote === '\'' || quote === '"'), 'String literal must starts with a quote'); + ++this.index; + var octal = false; + var str = ''; + while (!this.eof()) { + var ch = this.source[this.index++]; + if (ch === quote) { + quote = ''; + break; + } + else if (ch === '\\') { + ch = this.source[this.index++]; + if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'u': + if (this.source[this.index] === '{') { + ++this.index; + str += this.scanUnicodeCodePointEscape(); + } + else { + var unescaped_1 = this.scanHexEscape(ch); + if (unescaped_1 === null) { + this.throwUnexpectedToken(); + } + str += unescaped_1; + } + break; + case 'x': + var unescaped = this.scanHexEscape(ch); + if (unescaped === null) { + this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence); + } + str += unescaped; + break; + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + case '8': + case '9': + str += ch; + this.tolerateUnexpectedToken(); + break; + default: + if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) { + var octToDec = this.octalToDecimal(ch); + octal = octToDec.octal || octal; + str += String.fromCharCode(octToDec.code); + } + else { + str += ch; + } + break; + } + } + else { + ++this.lineNumber; + if (ch === '\r' && this.source[this.index] === '\n') { + ++this.index; + } + this.lineStart = this.index; + } + } + else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + break; + } + else { + str += ch; + } + } + if (quote !== '') { + this.index = start; + this.throwUnexpectedToken(); + } + return { + type: 8 /* StringLiteral */, + value: str, + octal: octal, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + // https://tc39.github.io/ecma262/#sec-template-literal-lexical-components + Scanner.prototype.scanTemplate = function () { + var cooked = ''; + var terminated = false; + var start = this.index; + var head = (this.source[start] === '`'); + var tail = false; + var rawOffset = 2; + ++this.index; + while (!this.eof()) { + var ch = this.source[this.index++]; + if (ch === '`') { + rawOffset = 1; + tail = true; + terminated = true; + break; + } + else if (ch === '$') { + if (this.source[this.index] === '{') { + this.curlyStack.push('${'); + ++this.index; + terminated = true; + break; + } + cooked += ch; + } + else if (ch === '\\') { + ch = this.source[this.index++]; + if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + cooked += '\n'; + break; + case 'r': + cooked += '\r'; + break; + case 't': + cooked += '\t'; + break; + case 'u': + if (this.source[this.index] === '{') { + ++this.index; + cooked += this.scanUnicodeCodePointEscape(); + } + else { + var restore = this.index; + var unescaped_2 = this.scanHexEscape(ch); + if (unescaped_2 !== null) { + cooked += unescaped_2; + } + else { + this.index = restore; + cooked += ch; + } + } + break; + case 'x': + var unescaped = this.scanHexEscape(ch); + if (unescaped === null) { + this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence); + } + cooked += unescaped; + break; + case 'b': + cooked += '\b'; + break; + case 'f': + cooked += '\f'; + break; + case 'v': + cooked += '\v'; + break; + default: + if (ch === '0') { + if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { + // Illegal: \01 \02 and so on + this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral); + } + cooked += '\0'; + } + else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) { + // Illegal: \1 \2 + this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral); + } + else { + cooked += ch; + } + break; + } + } + else { + ++this.lineNumber; + if (ch === '\r' && this.source[this.index] === '\n') { + ++this.index; + } + this.lineStart = this.index; + } + } + else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + ++this.lineNumber; + if (ch === '\r' && this.source[this.index] === '\n') { + ++this.index; + } + this.lineStart = this.index; + cooked += '\n'; + } + else { + cooked += ch; + } + } + if (!terminated) { + this.throwUnexpectedToken(); + } + if (!head) { + this.curlyStack.pop(); + } + return { + type: 10 /* Template */, + value: this.source.slice(start + 1, this.index - rawOffset), + cooked: cooked, + head: head, + tail: tail, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals + Scanner.prototype.testRegExp = function (pattern, flags) { + // The BMP character to use as a replacement for astral symbols when + // translating an ES6 "u"-flagged pattern to an ES5-compatible + // approximation. + // Note: replacing with '\uFFFF' enables false positives in unlikely + // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid + // pattern that would not be detected by this substitution. + var astralSubstitute = '\uFFFF'; + var tmp = pattern; + var self = this; + if (flags.indexOf('u') >= 0) { + tmp = tmp + .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) { + var codePoint = parseInt($1 || $2, 16); + if (codePoint > 0x10FFFF) { + self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp); + } + if (codePoint <= 0xFFFF) { + return String.fromCharCode(codePoint); + } + return astralSubstitute; + }) + .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute); + } + // First, detect invalid regular expressions. + try { + RegExp(tmp); + } + catch (e) { + this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp); + } + // Return a regular expression object for this pattern-flag pair, or + // `null` in case the current environment doesn't support the flags it + // uses. + try { + return new RegExp(pattern, flags); + } + catch (exception) { + /* istanbul ignore next */ + return null; + } + }; + Scanner.prototype.scanRegExpBody = function () { + var ch = this.source[this.index]; + assert_1.assert(ch === '/', 'Regular expression literal must start with a slash'); + var str = this.source[this.index++]; + var classMarker = false; + var terminated = false; + while (!this.eof()) { + ch = this.source[this.index++]; + str += ch; + if (ch === '\\') { + ch = this.source[this.index++]; + // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals + if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); + } + str += ch; + } + else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); + } + else if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } + else { + if (ch === '/') { + terminated = true; + break; + } + else if (ch === '[') { + classMarker = true; + } + } + } + if (!terminated) { + this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); + } + // Exclude leading and trailing slash. + return str.substr(1, str.length - 2); + }; + Scanner.prototype.scanRegExpFlags = function () { + var str = ''; + var flags = ''; + while (!this.eof()) { + var ch = this.source[this.index]; + if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) { + break; + } + ++this.index; + if (ch === '\\' && !this.eof()) { + ch = this.source[this.index]; + if (ch === 'u') { + ++this.index; + var restore = this.index; + var char = this.scanHexEscape('u'); + if (char !== null) { + flags += char; + for (str += '\\u'; restore < this.index; ++restore) { + str += this.source[restore]; + } + } + else { + this.index = restore; + flags += 'u'; + str += '\\u'; + } + this.tolerateUnexpectedToken(); + } + else { + str += '\\'; + this.tolerateUnexpectedToken(); + } + } + else { + flags += ch; + str += ch; + } + } + return flags; + }; + Scanner.prototype.scanRegExp = function () { + var start = this.index; + var pattern = this.scanRegExpBody(); + var flags = this.scanRegExpFlags(); + var value = this.testRegExp(pattern, flags); + return { + type: 9 /* RegularExpression */, + value: '', + pattern: pattern, + flags: flags, + regex: value, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: start, + end: this.index + }; + }; + Scanner.prototype.lex = function () { + if (this.eof()) { + return { + type: 2 /* EOF */, + value: '', + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: this.index, + end: this.index + }; + } + var cp = this.source.charCodeAt(this.index); + if (character_1.Character.isIdentifierStart(cp)) { + return this.scanIdentifier(); + } + // Very common: ( and ) and ; + if (cp === 0x28 || cp === 0x29 || cp === 0x3B) { + return this.scanPunctuator(); + } + // String literal starts with single quote (U+0027) or double quote (U+0022). + if (cp === 0x27 || cp === 0x22) { + return this.scanStringLiteral(); + } + // Dot (.) U+002E can also start a floating-point number, hence the need + // to check the next character. + if (cp === 0x2E) { + if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) { + return this.scanNumericLiteral(); + } + return this.scanPunctuator(); + } + if (character_1.Character.isDecimalDigit(cp)) { + return this.scanNumericLiteral(); + } + // Template literals start with ` (U+0060) for template head + // or } (U+007D) for template middle or template tail. + if (cp === 0x60 || (cp === 0x7D && this.curlyStack[this.curlyStack.length - 1] === '${')) { + return this.scanTemplate(); + } + // Possible identifier start in a surrogate pair. + if (cp >= 0xD800 && cp < 0xDFFF) { + if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) { + return this.scanIdentifier(); + } + } + return this.scanPunctuator(); + }; + return Scanner; + }()); + exports.Scanner = Scanner; + + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.TokenName = {}; + exports.TokenName[1 /* BooleanLiteral */] = 'Boolean'; + exports.TokenName[2 /* EOF */] = '<end>'; + exports.TokenName[3 /* Identifier */] = 'Identifier'; + exports.TokenName[4 /* Keyword */] = 'Keyword'; + exports.TokenName[5 /* NullLiteral */] = 'Null'; + exports.TokenName[6 /* NumericLiteral */] = 'Numeric'; + exports.TokenName[7 /* Punctuator */] = 'Punctuator'; + exports.TokenName[8 /* StringLiteral */] = 'String'; + exports.TokenName[9 /* RegularExpression */] = 'RegularExpression'; + exports.TokenName[10 /* Template */] = 'Template'; + + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + "use strict"; + // Generated by generate-xhtml-entities.js. DO NOT MODIFY! + Object.defineProperty(exports, "__esModule", { value: true }); + exports.XHTMLEntities = { + quot: '\u0022', + amp: '\u0026', + apos: '\u0027', + gt: '\u003E', + nbsp: '\u00A0', + iexcl: '\u00A1', + cent: '\u00A2', + pound: '\u00A3', + curren: '\u00A4', + yen: '\u00A5', + brvbar: '\u00A6', + sect: '\u00A7', + uml: '\u00A8', + copy: '\u00A9', + ordf: '\u00AA', + laquo: '\u00AB', + not: '\u00AC', + shy: '\u00AD', + reg: '\u00AE', + macr: '\u00AF', + deg: '\u00B0', + plusmn: '\u00B1', + sup2: '\u00B2', + sup3: '\u00B3', + acute: '\u00B4', + micro: '\u00B5', + para: '\u00B6', + middot: '\u00B7', + cedil: '\u00B8', + sup1: '\u00B9', + ordm: '\u00BA', + raquo: '\u00BB', + frac14: '\u00BC', + frac12: '\u00BD', + frac34: '\u00BE', + iquest: '\u00BF', + Agrave: '\u00C0', + Aacute: '\u00C1', + Acirc: '\u00C2', + Atilde: '\u00C3', + Auml: '\u00C4', + Aring: '\u00C5', + AElig: '\u00C6', + Ccedil: '\u00C7', + Egrave: '\u00C8', + Eacute: '\u00C9', + Ecirc: '\u00CA', + Euml: '\u00CB', + Igrave: '\u00CC', + Iacute: '\u00CD', + Icirc: '\u00CE', + Iuml: '\u00CF', + ETH: '\u00D0', + Ntilde: '\u00D1', + Ograve: '\u00D2', + Oacute: '\u00D3', + Ocirc: '\u00D4', + Otilde: '\u00D5', + Ouml: '\u00D6', + times: '\u00D7', + Oslash: '\u00D8', + Ugrave: '\u00D9', + Uacute: '\u00DA', + Ucirc: '\u00DB', + Uuml: '\u00DC', + Yacute: '\u00DD', + THORN: '\u00DE', + szlig: '\u00DF', + agrave: '\u00E0', + aacute: '\u00E1', + acirc: '\u00E2', + atilde: '\u00E3', + auml: '\u00E4', + aring: '\u00E5', + aelig: '\u00E6', + ccedil: '\u00E7', + egrave: '\u00E8', + eacute: '\u00E9', + ecirc: '\u00EA', + euml: '\u00EB', + igrave: '\u00EC', + iacute: '\u00ED', + icirc: '\u00EE', + iuml: '\u00EF', + eth: '\u00F0', + ntilde: '\u00F1', + ograve: '\u00F2', + oacute: '\u00F3', + ocirc: '\u00F4', + otilde: '\u00F5', + ouml: '\u00F6', + divide: '\u00F7', + oslash: '\u00F8', + ugrave: '\u00F9', + uacute: '\u00FA', + ucirc: '\u00FB', + uuml: '\u00FC', + yacute: '\u00FD', + thorn: '\u00FE', + yuml: '\u00FF', + OElig: '\u0152', + oelig: '\u0153', + Scaron: '\u0160', + scaron: '\u0161', + Yuml: '\u0178', + fnof: '\u0192', + circ: '\u02C6', + tilde: '\u02DC', + Alpha: '\u0391', + Beta: '\u0392', + Gamma: '\u0393', + Delta: '\u0394', + Epsilon: '\u0395', + Zeta: '\u0396', + Eta: '\u0397', + Theta: '\u0398', + Iota: '\u0399', + Kappa: '\u039A', + Lambda: '\u039B', + Mu: '\u039C', + Nu: '\u039D', + Xi: '\u039E', + Omicron: '\u039F', + Pi: '\u03A0', + Rho: '\u03A1', + Sigma: '\u03A3', + Tau: '\u03A4', + Upsilon: '\u03A5', + Phi: '\u03A6', + Chi: '\u03A7', + Psi: '\u03A8', + Omega: '\u03A9', + alpha: '\u03B1', + beta: '\u03B2', + gamma: '\u03B3', + delta: '\u03B4', + epsilon: '\u03B5', + zeta: '\u03B6', + eta: '\u03B7', + theta: '\u03B8', + iota: '\u03B9', + kappa: '\u03BA', + lambda: '\u03BB', + mu: '\u03BC', + nu: '\u03BD', + xi: '\u03BE', + omicron: '\u03BF', + pi: '\u03C0', + rho: '\u03C1', + sigmaf: '\u03C2', + sigma: '\u03C3', + tau: '\u03C4', + upsilon: '\u03C5', + phi: '\u03C6', + chi: '\u03C7', + psi: '\u03C8', + omega: '\u03C9', + thetasym: '\u03D1', + upsih: '\u03D2', + piv: '\u03D6', + ensp: '\u2002', + emsp: '\u2003', + thinsp: '\u2009', + zwnj: '\u200C', + zwj: '\u200D', + lrm: '\u200E', + rlm: '\u200F', + ndash: '\u2013', + mdash: '\u2014', + lsquo: '\u2018', + rsquo: '\u2019', + sbquo: '\u201A', + ldquo: '\u201C', + rdquo: '\u201D', + bdquo: '\u201E', + dagger: '\u2020', + Dagger: '\u2021', + bull: '\u2022', + hellip: '\u2026', + permil: '\u2030', + prime: '\u2032', + Prime: '\u2033', + lsaquo: '\u2039', + rsaquo: '\u203A', + oline: '\u203E', + frasl: '\u2044', + euro: '\u20AC', + image: '\u2111', + weierp: '\u2118', + real: '\u211C', + trade: '\u2122', + alefsym: '\u2135', + larr: '\u2190', + uarr: '\u2191', + rarr: '\u2192', + darr: '\u2193', + harr: '\u2194', + crarr: '\u21B5', + lArr: '\u21D0', + uArr: '\u21D1', + rArr: '\u21D2', + dArr: '\u21D3', + hArr: '\u21D4', + forall: '\u2200', + part: '\u2202', + exist: '\u2203', + empty: '\u2205', + nabla: '\u2207', + isin: '\u2208', + notin: '\u2209', + ni: '\u220B', + prod: '\u220F', + sum: '\u2211', + minus: '\u2212', + lowast: '\u2217', + radic: '\u221A', + prop: '\u221D', + infin: '\u221E', + ang: '\u2220', + and: '\u2227', + or: '\u2228', + cap: '\u2229', + cup: '\u222A', + int: '\u222B', + there4: '\u2234', + sim: '\u223C', + cong: '\u2245', + asymp: '\u2248', + ne: '\u2260', + equiv: '\u2261', + le: '\u2264', + ge: '\u2265', + sub: '\u2282', + sup: '\u2283', + nsub: '\u2284', + sube: '\u2286', + supe: '\u2287', + oplus: '\u2295', + otimes: '\u2297', + perp: '\u22A5', + sdot: '\u22C5', + lceil: '\u2308', + rceil: '\u2309', + lfloor: '\u230A', + rfloor: '\u230B', + loz: '\u25CA', + spades: '\u2660', + clubs: '\u2663', + hearts: '\u2665', + diams: '\u2666', + lang: '\u27E8', + rang: '\u27E9' + }; + + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var error_handler_1 = __webpack_require__(10); + var scanner_1 = __webpack_require__(12); + var token_1 = __webpack_require__(13); + var Reader = (function () { + function Reader() { + this.values = []; + this.curly = this.paren = -1; + } + // A function following one of those tokens is an expression. + Reader.prototype.beforeFunctionExpression = function (t) { + return ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '**', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!=='].indexOf(t) >= 0; + }; + // Determine if forward slash (/) is an operator or part of a regular expression + // https://github.com/mozilla/sweet.js/wiki/design + Reader.prototype.isRegexStart = function () { + var previous = this.values[this.values.length - 1]; + var regex = (previous !== null); + switch (previous) { + case 'this': + case ']': + regex = false; + break; + case ')': + var keyword = this.values[this.paren - 1]; + regex = (keyword === 'if' || keyword === 'while' || keyword === 'for' || keyword === 'with'); + break; + case '}': + // Dividing a function by anything makes little sense, + // but we have to check for that. + regex = false; + if (this.values[this.curly - 3] === 'function') { + // Anonymous function, e.g. function(){} /42 + var check = this.values[this.curly - 4]; + regex = check ? !this.beforeFunctionExpression(check) : false; + } + else if (this.values[this.curly - 4] === 'function') { + // Named function, e.g. function f(){} /42/ + var check = this.values[this.curly - 5]; + regex = check ? !this.beforeFunctionExpression(check) : true; + } + break; + default: + break; + } + return regex; + }; + Reader.prototype.push = function (token) { + if (token.type === 7 /* Punctuator */ || token.type === 4 /* Keyword */) { + if (token.value === '{') { + this.curly = this.values.length; + } + else if (token.value === '(') { + this.paren = this.values.length; + } + this.values.push(token.value); + } + else { + this.values.push(null); + } + }; + return Reader; + }()); + var Tokenizer = (function () { + function Tokenizer(code, config) { + this.errorHandler = new error_handler_1.ErrorHandler(); + this.errorHandler.tolerant = config ? (typeof config.tolerant === 'boolean' && config.tolerant) : false; + this.scanner = new scanner_1.Scanner(code, this.errorHandler); + this.scanner.trackComment = config ? (typeof config.comment === 'boolean' && config.comment) : false; + this.trackRange = config ? (typeof config.range === 'boolean' && config.range) : false; + this.trackLoc = config ? (typeof config.loc === 'boolean' && config.loc) : false; + this.buffer = []; + this.reader = new Reader(); + } + Tokenizer.prototype.errors = function () { + return this.errorHandler.errors; + }; + Tokenizer.prototype.getNextToken = function () { + if (this.buffer.length === 0) { + var comments = this.scanner.scanComments(); + if (this.scanner.trackComment) { + for (var i = 0; i < comments.length; ++i) { + var e = comments[i]; + var value = this.scanner.source.slice(e.slice[0], e.slice[1]); + var comment = { + type: e.multiLine ? 'BlockComment' : 'LineComment', + value: value + }; + if (this.trackRange) { + comment.range = e.range; + } + if (this.trackLoc) { + comment.loc = e.loc; + } + this.buffer.push(comment); + } + } + if (!this.scanner.eof()) { + var loc = void 0; + if (this.trackLoc) { + loc = { + start: { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }, + end: {} + }; + } + var startRegex = (this.scanner.source[this.scanner.index] === '/') && this.reader.isRegexStart(); + var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex(); + this.reader.push(token); + var entry = { + type: token_1.TokenName[token.type], + value: this.scanner.source.slice(token.start, token.end) + }; + if (this.trackRange) { + entry.range = [token.start, token.end]; + } + if (this.trackLoc) { + loc.end = { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + entry.loc = loc; + } + if (token.type === 9 /* RegularExpression */) { + var pattern = token.pattern; + var flags = token.flags; + entry.regex = { pattern: pattern, flags: flags }; + } + this.buffer.push(entry); + } + } + return this.buffer.shift(); + }; + return Tokenizer; + }()); + exports.Tokenizer = Tokenizer; + + +/***/ } +/******/ ]) +}); +;+ \ No newline at end of file diff --git a/node_modules/esprima/package.json b/node_modules/esprima/package.json @@ -0,0 +1,137 @@ +{ + "_from": "esprima@^4.0.0", + "_id": "esprima@4.0.1", + "_inBundle": false, + "_integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "_location": "/esprima", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "esprima@^4.0.0", + "name": "esprima", + "escapedName": "esprima", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "_shasum": "13b04cdb3e6c5d19df91ab6987a8695619b0aa71", + "_spec": "esprima@^4.0.0", + "_where": "/home/l0bster/Documents/l0bsterSSG/node_modules/js-yaml", + "author": { + "name": "Ariya Hidayat", + "email": "ariya.hidayat@gmail.com" + }, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "bugs": { + "url": "https://github.com/jquery/esprima/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ECMAScript parsing infrastructure for multipurpose analysis", + "devDependencies": { + "codecov.io": "~0.1.6", + "escomplex-js": "1.2.0", + "everything.js": "~1.0.3", + "glob": "~7.1.0", + "istanbul": "~0.4.0", + "json-diff": "~0.3.1", + "karma": "~1.3.0", + "karma-chrome-launcher": "~2.0.0", + "karma-detect-browsers": "~2.2.3", + "karma-edge-launcher": "~0.2.0", + "karma-firefox-launcher": "~1.0.0", + "karma-ie-launcher": "~1.0.0", + "karma-mocha": "~1.3.0", + "karma-safari-launcher": "~1.0.0", + "karma-safaritechpreview-launcher": "~0.0.4", + "karma-sauce-launcher": "~1.1.0", + "lodash": "~3.10.1", + "mocha": "~3.2.0", + "node-tick-processor": "~0.0.2", + "regenerate": "~1.3.2", + "temp": "~0.8.3", + "tslint": "~5.1.0", + "typescript": "~2.3.2", + "typescript-formatter": "~5.1.3", + "unicode-8.0.0": "~0.7.0", + "webpack": "~1.14.0" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "bin", + "dist/esprima.js" + ], + "homepage": "http://esprima.org", + "keywords": [ + "ast", + "ecmascript", + "esprima", + "javascript", + "parser", + "syntax" + ], + "license": "BSD-2-Clause", + "main": "dist/esprima.js", + "maintainers": [ + { + "name": "Ariya Hidayat", + "email": "ariya.hidayat@gmail.com", + "url": "http://ariya.ofilabs.com" + } + ], + "name": "esprima", + "repository": { + "type": "git", + "url": "git+https://github.com/jquery/esprima.git" + }, + "scripts": { + "all-tests": "npm run verify-line-ending && npm run generate-fixtures && npm run unit-tests && npm run api-tests && npm run grammar-tests && npm run regression-tests && npm run hostile-env-tests", + "analyze-coverage": "istanbul cover test/unit-tests.js", + "api-tests": "mocha -R dot test/api-tests.js", + "appveyor": "npm run compile && npm run all-tests && npm run browser-tests", + "benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer", + "benchmark-parser": "node -expose_gc test/benchmark-parser.js", + "benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js", + "browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run", + "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", + "check-version": "node test/check-version.js", + "circleci": "npm test && npm run codecov && npm run downstream", + "code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js", + "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", + "compile": "tsc -p src/ && webpack && node tools/fixupbundle.js", + "complexity": "node test/check-complexity.js", + "downstream": "node test/downstream.js", + "droneio": "npm run compile && npm run all-tests && npm run saucelabs", + "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", + "format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js", + "generate-fixtures": "node tools/generate-fixtures.js", + "generate-regex": "node tools/generate-identifier-regex.js", + "generate-xhtml-entities": "node tools/generate-xhtml-entities.js", + "grammar-tests": "node test/grammar-tests.js", + "hostile-env-tests": "node test/hostile-environment-tests.js", + "prepublish": "npm run compile", + "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", + "regression-tests": "node test/regression-tests.js", + "saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", + "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js", + "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", + "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js", + "static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity", + "test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis", + "travis": "npm test", + "tslint": "tslint src/*.ts", + "unit-tests": "node test/unit-tests.js", + "verify-line-ending": "node test/verify-line-ending.js" + }, + "version": "4.0.1" +} diff --git a/node_modules/front-matter/LICENSE b/node_modules/front-matter/LICENSE @@ -0,0 +1,9 @@ +# The MIT License (MIT) + +Copyright (c) Jason Campbell ("Author") + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.+ \ No newline at end of file diff --git a/node_modules/front-matter/README.md b/node_modules/front-matter/README.md @@ -0,0 +1,162 @@ +# front-matter +[![build][build-img]][build-url] +[![coverage][coverage-img]][coverage-url] +[![npm][npm-img]][npm-url] +[![github][github-img]][github-url] + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/front-matter.svg)](https://saucelabs.com/u/front-matter) + +> Extract meta data (front-matter) from documents. + +This modules does not do any IO (file loading or reading), only extracting and +parsing front matter from strings. + +This concept that was originally introduced to me through the [jekyll][jekyll] blogging system and is pretty useful where you want to be able to easily add meta-data to content without the need for a database. YAML is extracted from the the top of a file between matching separators of "---" or "= yaml =". It will also extract YAML between a separator and "...". + +<!-- This is part of a long running project I have been working on where I am splitting out internals of [haiku][haiku] into to separate, more useful and shareable modules. If your in need of a static site generator [check it out][haiku]. --> + +# Install + +With [npm][npm] do: + + npm install front-matter + +# Example + +So you have a file `example.md`: + +```yaml +--- +title: Just hack'n +description: Nothing to see here +--- + +This is some text about some stuff that happened sometime ago +``` + +**NOTE:** As of `front-matter@2.0.0` valid front matter is considered to have +the starting separator on the first line. + +Then you can do this: + +```javascript +var fs = require('fs') + , fm = require('front-matter') + +fs.readFile('./example.md', 'utf8', function(err, data){ + if (err) throw err + + var content = fm(data) + + console.log(content) +}) +``` + +And end up with an object like this: + +```javascript +{ + attributes: { + title: 'Just hack\'n', + description: 'Nothing to see here' + }, + body: 'This is some text about some stuff that happened sometime ago', + bodyBegin: 6, + frontmatter: 'title: Just hack\'n\ndescription: Nothing to see here' +} +``` + +# Methods + +```javascript +var fm = require('front-matter') +``` + +## fm(string, { allowUnsafe: false }) + +Return a `content` object with two properties: + +* `content.attributes` contains the extracted yaml attributes in json form +* `content.body` contains the string contents below the yaml separators +* `content.bodyBegin` contains the line number the body contents begins at +* `content.frontmatter` contains the original yaml string contents + +**NOTE:** By default `fm()` uses `ys-yaml`'s `safeLoad` unless you set +`allowUnsafe` in the options object to true. + +# fm.test(string) + +Check if a string contains a front matter header of "---" or "= yaml =". Primarily used internally but is useful outside of the module. + +Returns `true` or `false` + +```javascript + fm.test(string) #=> true || false +``` + +# Contributing + +front-matter is an OPEN Source Project so please help out by [reporting bugs](http://github.com/jxson/front-matter/issues) or [forking and opening pull](https://github.com/jxson/front-matter) requests when possible. + +![standard][standard-img] + +All code is linted/formatted using [standard][standard-url] style, any non-conforming code can be automatically formatted using the the fmt make task: `make fmt`. + +## Maintainers + +- [Adrian Gimenez](https://github.com/axdg) +- [Jason Campbell](https://github.com/jxson) - [@jxson](https://twitter.com/jxson) + +## Contributors + +This module is awesome because of all the folks who submitted pull requests: + +- [Jordan Santell](https://github.com/jsantell) - [@jsantell](https://twitter.com/jsantell) +- [Jean-Philippe Monette](https://github.com/jpmonette) - [@jpmonette](https://twitter.com/jpmonette) +- [Kai Davenport](https://github.com/binocarlos) +- [Marc-André Arseneault](https://github.com/arsnl) - [@im_arsnl](https://twitter.com/im_arsnl) +- [Bret Comnes](https://github.com/bcomnes) - http://bret.io +- [Shinnosuke Watanabe](https://github.com/shinnn) +- [Matt Dickens](https://github.com/mpd106) +- [Rod Knowlton](https://github.com/codelahoma) +- [Rich DeLauder](https://github.com/FMJaguar) +- [Sean Lang](https://github.com/slang800) - http://slang.cx +- [Benjamin Tan](https://github.com/d10) - https://d10.github.io/ +- [Kenneth Lim](https://github.com/kenlimmj) - https://kenlimmj.com +- [Cameron Moy](https://github.com/camoy) +- [Fernando Montoya](https://github.com/montogeek) - https://montogeek.com +- [Martin Heidegger](https://github.com/martinheidegger) +- [Leo Liang](https://github.com/aleung) +- [Kasper Pedersen](https://github.com/kasperpedersen) + +# CHANGELOG + +## 3.0.0 +* CI only tests Node versions >= v6 (drops v4, and v5) +* + +# LICENSE (MIT) + +Copyright (c) Jason Campbell ("Author") + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +[yaml]: http://en.wikipedia.org/wiki/YAML +[haiku]: http://haiku.io +[npm]: http://npmjs.org +[jekyll]: https://github.com/mojombo/jekyll +[coverage-img]: https://img.shields.io/coveralls/jxson/front-matter.svg +[coverage-url]: https://coveralls.io/r/jxson/front-matter?branch=master +[build-img]: https://img.shields.io/travis/jxson/front-matter/master.svg +[build-url]: http://travis-ci.org/jxson/front-matter +[npm-img]: https://img.shields.io/npm/dm/front-matter.svg +[npm-url]: https://npmjs.org/package/standard +[github-img]: https://img.shields.io/github/stars/jxson/front-matter.svg?style=social&label=Star +[github-url]: https://github.com/jxson/front-matter/ +[standard-img]: https://cdn.rawgit.com/feross/standard/master/badge.svg +[standard-url]: http://npmjs.com/package/standard diff --git a/node_modules/front-matter/index.d.ts b/node_modules/front-matter/index.d.ts @@ -0,0 +1,22 @@ +export interface FrontMatterResult<T> { + readonly attributes: T + readonly body: string + readonly bodyBegin: number; + readonly frontmatter?: string +} + +export interface FrontMatterOptions { + /** + * Whether to use [safeload](https://github.com/nodeca/js-yaml#safeload-string---options-) + * @default true + */ + allowUnsafe?: boolean +} + +interface FM { + <T>(file: string, options?: FrontMatterOptions): FrontMatterResult<T> + test(file: string): boolean +} + +declare const fm: FM +export default fm+ \ No newline at end of file diff --git a/node_modules/front-matter/index.js b/node_modules/front-matter/index.js @@ -0,0 +1,80 @@ +var parser = require('js-yaml') +var optionalByteOrderMark = '\\ufeff?' +var platform = typeof process !== 'undefined' ? process.platform : '' +var pattern = '^(' + + optionalByteOrderMark + + '(= yaml =|---)' + + '$([\\s\\S]*?)' + + '^(?:\\2|\\.\\.\\.)\\s*' + + '$' + + (platform === 'win32' ? '\\r?' : '') + + '(?:\\n)?)' +// NOTE: If this pattern uses the 'g' flag the `regex` variable definition will +// need to be moved down into the functions that use it. +var regex = new RegExp(pattern, 'm') + +module.exports = extractor +module.exports.test = test + +function extractor (string, options) { + string = string || '' + var defaultOptions = { allowUnsafe: false } + options = options instanceof Object ? { ...defaultOptions, ...options } : defaultOptions + options.allowUnsafe = Boolean(options.allowUnsafe) + var lines = string.split(/(\r?\n)/) + if (lines[0] && /= yaml =|---/.test(lines[0])) { + return parse(string, options.allowUnsafe) + } else { + return { + attributes: {}, + body: string, + bodyBegin: 1 + } + } +} + +function computeLocation (match, body) { + var line = 1 + var pos = body.indexOf('\n') + var offset = match.index + match[0].length + + while (pos !== -1) { + if (pos >= offset) { + return line + } + line++ + pos = body.indexOf('\n', pos + 1) + } + + return line +} + +function parse (string, allowUnsafe) { + var match = regex.exec(string) + if (!match) { + return { + attributes: {}, + body: string, + bodyBegin: 1 + } + } + + var loader = allowUnsafe ? parser.load : parser.safeLoad + var yaml = match[match.length - 1].replace(/^\s+|\s+$/g, '') + var attributes = loader(yaml) || {} + var body = string.replace(match[0], '') + var line = computeLocation(match, string) + + return { + attributes: attributes, + body: body, + bodyBegin: line, + frontmatter: yaml + } +} + +function test (string) { + string = string || '' + + return regex.test(string) +} diff --git a/node_modules/front-matter/package.json b/node_modules/front-matter/package.json @@ -0,0 +1,106 @@ +{ + "_from": "front-matter", + "_id": "front-matter@4.0.2", + "_inBundle": false, + "_integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", + "_location": "/front-matter", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "front-matter", + "name": "front-matter", + "escapedName": "front-matter", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "_shasum": "b14e54dc745cfd7293484f3210d15ea4edd7f4d5", + "_spec": "front-matter", + "_where": "/home/l0bster/Documents/l0bsterSSG", + "author": { + "name": "Jason Campbell", + "email": "jasoncampbell@google.com", + "url": "http://twitter.com/jxson" + }, + "bugs": { + "url": "https://github.com/jxson/front-matter/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jason Campbell", + "email": "jason@js.la", + "url": "http://twitter.com/jxson" + }, + { + "name": "Jordan Santell", + "email": "jsantell@gmail.com", + "url": "https://github.com/jsantell" + }, + { + "name": "Kai Davenport", + "email": "kaiyadavenport@gmail.com", + "url": "https://github.com/binocarlos" + }, + { + "name": "Jean-Philippe Monette", + "email": "contact@jpmonette.net", + "url": "https://github.com/jpmonette" + }, + { + "name": "Marc-André Arseneault", + "email": "marc-andre@arsnl.ca", + "url": "https://github.com/arsnl" + }, + { + "name": "Bret Comnes", + "email": "bcomnes@gmail.com", + "url": "http://bret.io" + }, + { + "name": "Peter Bengtsson", + "email": "mail@peterbe.com", + "url": "https://github.com/peterbe" + } + ], + "dependencies": { + "js-yaml": "^3.13.1" + }, + "deprecated": false, + "description": "Extract YAML front matter from a string", + "devDependencies": { + "brfs": "^2.0.2", + "check-dts": "^0.3.0", + "coveralls": "^3.0.9", + "istanbul": "^0.4.5", + "standard": "^14.3.4", + "tape": "^4.4.0", + "zuul": "^3.12.0" + }, + "files": [ + "index.d.ts" + ], + "homepage": "https://github.com/jxson/front-matter", + "keywords": [ + "yaml", + "front matter", + "meta data" + ], + "license": "MIT", + "main": "index.js", + "name": "front-matter", + "repository": { + "type": "git", + "url": "git://github.com/jxson/front-matter.git" + }, + "scripts": { + "test": "make test && check-dts" + }, + "version": "4.0.2" +} diff --git a/node_modules/highlight.js/LICENSE b/node_modules/highlight.js/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2006, Ivan Sagalaev. +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 the copyright holder 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 THE COPYRIGHT HOLDER OR CONTRIBUTORS 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/node_modules/highlight.js/README.md b/node_modules/highlight.js/README.md @@ -0,0 +1,313 @@ +# Highlight.js + +[![Build Status](https://travis-ci.org/highlightjs/highlight.js.svg?branch=master)](https://travis-ci.org/highlightjs/highlight.js) [![Greenkeeper badge](https://badges.greenkeeper.io/highlightjs/highlight.js.svg)](https://greenkeeper.io/) [![install size](https://packagephobia.now.sh/badge?p=highlight.js)](https://packagephobia.now.sh/result?p=highlight.js) + +Highlight.js is a syntax highlighter written in JavaScript. It works in +the browser as well as on the server. It works with pretty much any +markup, doesn’t depend on any framework, and has automatic language +detection. + +#### Upgrading to Version 10 + +Version 10 is one of the biggest releases in quite some time. If you're +upgrading from version 9, there are some breaking changes and things you may +want to double check first. + +Please read [VERSION_10_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_UPGRADE.md) for high-level summary of breaking changes and any actions you may need to take. See [VERSION_10_BREAKING_CHANGES.md](https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_BREAKING_CHANGES.md) for a more detailed list and [CHANGES.md](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md) to learn what else is new. + +##### Support for older versions + +Please see [OLD_VERSIONS.md](https://github.com/highlightjs/highlight.js/blob/master/OLD_VERSIONS.md) for support information. + +## Getting Started + +The bare minimum for using highlight.js on a web page is linking to the +library along with one of the styles and calling [`initHighlightingOnLoad`][1]: + +```html +<link rel="stylesheet" href="/path/to/styles/default.css"> +<script src="/path/to/highlight.min.js"></script> +<script>hljs.initHighlightingOnLoad();</script> +``` + +This will find and highlight code inside of `<pre><code>` tags; it tries +to detect the language automatically. If automatic detection doesn’t +work for you, you can specify the language in the `class` attribute: + +```html +<pre><code class="html">...</code></pre> +``` + +Classes may also be prefixed with either `language-` or `lang-`. + +```html +<pre><code class="language-html">...</code></pre> +``` + +### Plaintext and Disabling Highlighting + +To style arbitrary text like code, but without any highlighting, use the +`plaintext` class: + +```html +<pre><code class="plaintext">...</code></pre> +``` + +To disable highlighting of a tag completely, use the `nohighlight` class: + +```html +<pre><code class="nohighlight">...</code></pre> +``` + +### Supported Languages + +Highlight.js supports over 180 different languages in the core library. There are also 3rd party +language plugins available for additional languages. You can find the full list of supported languages +in [SUPPORTED_LANGUAGES.md][9]. + +## Custom Initialization + +When you need a bit more control over the initialization of +highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4] +functions. This allows you to control *what* to highlight and *when*. + +Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using +vanilla JS: + +```js +document.addEventListener('DOMContentLoaded', (event) => { + document.querySelectorAll('pre code').forEach((block) => { + hljs.highlightBlock(block); + }); +}); +``` + +You can use any tags instead of `<pre><code>` to mark up your code. If +you don't use a container that preserves line breaks you will need to +configure highlight.js to use the `<br>` tag: + +```js +hljs.configure({useBR: true}); + +document.querySelectorAll('div.code').forEach((block) => { + hljs.highlightBlock(block); +}); +``` + +For other options refer to the documentation for [`configure`][4]. + + +## Using with Vue.js + +Simply register the plugin with Vue: + +```js +Vue.use(hljs.vuePlugin); +``` + +And you'll be provided with a `highlightjs` component for use +in your templates: + +```html + <div id="app"> + <!-- bind to a data property named `code` --> + <highlightjs autodetect :code="code" /> + <!-- or literal code works as well --> + <highlightjs language='javascript' code="var x = 5;" /> + </div> +``` + +## Web Workers + +You can run highlighting inside a web worker to avoid freezing the browser +window while dealing with very big chunks of code. + +In your main script: + +```js +addEventListener('load', () => { + const code = document.querySelector('#code'); + const worker = new Worker('worker.js'); + worker.onmessage = (event) => { code.innerHTML = event.data; } + worker.postMessage(code.textContent); +}); +``` + +In worker.js: + +```js +onmessage = (event) => { + importScripts('<path>/highlight.min.js'); + const result = self.hljs.highlightAuto(event.data); + postMessage(result.value); +}; +``` + +## Node.js + +You can use highlight.js with node to highlight content before sending it to the browser. +Make sure to use the `.value` property to get the formatted html. +For more info about the returned object refer to the api docs https://highlightjs.readthedocs.io/en/latest/api.html + + +```js +// require the highlight.js library, including all languages +const hljs = require('./highlight.js'); +const highlightedCode = hljs.highlightAuto('<span>Hello World!</span>').value +``` + +Or for a smaller footprint... load just the languages you need. + +```js +const hljs = require("highlight.js/lib/core"); // require only the core library +// separately require languages +hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml')); + +const highlightedCode = hljs.highlight('xml', '<span>Hello World!</span>').value +``` + + +## ES6 Modules + +First, you'll likely install via `npm` or `yarn` -- see [Getting the Library](#getting-the-library) below. + +In your application: + +```js +import hljs from 'highlight.js'; +``` + +The default import imports all languages. Therefore it is likely to be more efficient to import only the library and the languages you need: + +```js +import hljs from 'highlight.js/lib/core'; +import javascript from 'highlight.js/lib/languages/javascript'; +hljs.registerLanguage('javascript', javascript); +``` + +To set the syntax highlighting style, if your build tool processes CSS from your JavaScript entry point, you can also import the stylesheet directly as modules: + +```js +import hljs from 'highlight.js/lib/core'; +import 'highlight.js/styles/github.css'; +``` + + +## Getting the Library + +You can get highlight.js as a hosted, or custom-build, browser script or +as a server module. Right out of the box the browser script supports +both AMD and CommonJS, so if you wish you can use RequireJS or +Browserify without having to build from source. The server module also +works perfectly fine with Browserify, but there is the option to use a +build specific to browsers rather than something meant for a server. + + +**Do not link to GitHub directly.** The library is not supposed to work straight +from the source, it requires building. If none of the pre-packaged options +work for you refer to the [building documentation][6]. + +**On Almond.** You need to use the optimizer to give the module a name. For +example: + +```bash +r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js +``` + +### CDN Hosted + +A prebuilt version of highlight.js bundled with many common languages is hosted by the following CDNs: + +**cdnjs** ([link](https://cdnjs.com/libraries/highlight.js)) + +```html +<link rel="stylesheet" + href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/default.min.css"> +<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script> +<!-- and it's easy to individually load additional languages --> +<script charset="UTF-8" + src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/go.min.js"></script> +``` + +**jsdelivr** ([link](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release)) + +```html +<link rel="stylesheet" + href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.2/build/styles/default.min.css"> +<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.2/build/highlight.min.js"></script> +``` + +**Note:** *The CDN-hosted `highlight.min.js` package doesn't bundle every language.* It would be +very large. You can find our list "common" languages that we bundle by default on our [download page][5]. + +### Self Hosting + +The [download page][5] can quickly generate a custom bundle including only the languages you need. + +Alternatively, you can build a browser package from [source](#source): + +``` +node tools/build.js -t browser :common +``` + +See our [building documentation][6] for more information. + +**Note:** Building from source should always result in the smallest size builds. The website download page is optimized for speed, not size. + + +#### Prebuilt CDN assets + +You can also download and self-host the same assets we serve up via our own CDNs. We publish those builds to the [cdn-release](https://github.com/highlightjs/cdn-release) GitHub repository. You can easily pull individual files off the CDN endpoints with `curl`, etc; if say you only needed `highlight.min.js` and a single CSS file. + +There is also an npm package [@highlightjs/cdn-assets](https://www.npmjs.com/package/@highlightjs/cdn-assets) if pulling the assets in via `npm` or `yarn` would be easier for your build process. + + +### NPM / Node.js server module + +Highlight.js can also be used on the server. The package with all supported languages can be installed from NPM or Yarn: + +```bash +npm install highlight.js +# or +yarn add highlight.js +``` + +Alternatively, you can build it from [source](#source): + +```bash +node tools/build.js -t node +``` + +See our [building documentation][6] for more information. + + +### Source + +[Current source][10] is always available on GitHub. + + +## License + +Highlight.js is released under the BSD License. See [LICENSE][7] file +for details. + + +## Links + +The official site for the library is at <https://highlightjs.org/>. + +Further in-depth documentation for the API and other topics is at +<http://highlightjs.readthedocs.io/>. + +Authors and contributors are listed in the [AUTHORS.txt][8] file. + +[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload +[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html +[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block +[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options +[5]: https://highlightjs.org/download/ +[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html +[7]: https://github.com/highlightjs/highlight.js/blob/master/LICENSE +[8]: https://github.com/highlightjs/highlight.js/blob/master/AUTHORS.txt +[9]: https://github.com/highlightjs/highlight.js/blob/master/SUPPORTED_LANGUAGES.md +[10]: https://github.com/highlightjs/ diff --git a/node_modules/highlight.js/lib/core.js b/node_modules/highlight.js/lib/core.js @@ -0,0 +1,2198 @@ +// https://github.com/substack/deep-freeze/blob/master/index.js +/** @param {any} obj */ +function deepFreeze(obj) { + Object.freeze(obj); + + var objIsFunction = typeof obj === 'function'; + + Object.getOwnPropertyNames(obj).forEach(function(prop) { + if (Object.hasOwnProperty.call(obj, prop) + && obj[prop] !== null + && (typeof obj[prop] === "object" || typeof obj[prop] === "function") + // IE11 fix: https://github.com/highlightjs/highlight.js/issues/2318 + // TODO: remove in the future + && (objIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true) + && !Object.isFrozen(obj[prop])) { + deepFreeze(obj[prop]); + } + }); + + return obj; +} + +class Response { + /** + * @param {CompiledMode} mode + */ + constructor(mode) { + // eslint-disable-next-line no-undefined + if (mode.data === undefined) mode.data = {}; + + this.data = mode.data; + } + + ignoreMatch() { + this.ignore = true; + } +} + +/** + * @param {string} value + * @returns {string} + */ +function escapeHTML(value) { + return value + .replace(/&/g, '&amp;') + .replace(/</g, '&lt;') + .replace(/>/g, '&gt;') + .replace(/"/g, '&quot;') + .replace(/'/g, '&#x27;'); +} + +/** + * performs a shallow merge of multiple objects into one + * + * @template T + * @param {T} original + * @param {Record<string,any>[]} objects + * @returns {T} a single new object + */ +function inherit(original, ...objects) { + /** @type Record<string,any> */ + var result = {}; + + for (const key in original) { + result[key] = original[key]; + } + objects.forEach(function(obj) { + for (const key in obj) { + result[key] = obj[key]; + } + }); + return /** @type {T} */ (result); +} + +/* Stream merging */ + +/** + * @typedef Event + * @property {'start'|'stop'} event + * @property {number} offset + * @property {Node} node + */ + +/** + * @param {Node} node + */ +function tag(node) { + return node.nodeName.toLowerCase(); +} + +/** + * @param {Node} node + */ +function nodeStream(node) { + /** @type Event[] */ + var result = []; + (function _nodeStream(node, offset) { + for (var child = node.firstChild; child; child = child.nextSibling) { + if (child.nodeType === 3) { + offset += child.nodeValue.length; + } else if (child.nodeType === 1) { + result.push({ + event: 'start', + offset: offset, + node: child + }); + offset = _nodeStream(child, offset); + // Prevent void elements from having an end tag that would actually + // double them in the output. There are more void elements in HTML + // but we list only those realistically expected in code display. + if (!tag(child).match(/br|hr|img|input/)) { + result.push({ + event: 'stop', + offset: offset, + node: child + }); + } + } + } + return offset; + })(node, 0); + return result; +} + +/** + * @param {any} original - the original stream + * @param {any} highlighted - stream of the highlighted source + * @param {string} value - the original source itself + */ +function mergeStreams(original, highlighted, value) { + var processed = 0; + var result = ''; + var nodeStack = []; + + function selectStream() { + if (!original.length || !highlighted.length) { + return original.length ? original : highlighted; + } + if (original[0].offset !== highlighted[0].offset) { + return (original[0].offset < highlighted[0].offset) ? original : highlighted; + } + + /* + To avoid starting the stream just before it should stop the order is + ensured that original always starts first and closes last: + + if (event1 == 'start' && event2 == 'start') + return original; + if (event1 == 'start' && event2 == 'stop') + return highlighted; + if (event1 == 'stop' && event2 == 'start') + return original; + if (event1 == 'stop' && event2 == 'stop') + return highlighted; + + ... which is collapsed to: + */ + return highlighted[0].event === 'start' ? original : highlighted; + } + + /** + * @param {Node} node + */ + function open(node) { + /** @param {Attr} attr */ + function attr_str(attr) { + return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"'; + } + // @ts-ignore + result += '<' + tag(node) + [].map.call(node.attributes, attr_str).join('') + '>'; + } + + /** + * @param {Node} node + */ + function close(node) { + result += '</' + tag(node) + '>'; + } + + /** + * @param {Event} event + */ + function render(event) { + (event.event === 'start' ? open : close)(event.node); + } + + while (original.length || highlighted.length) { + var stream = selectStream(); + result += escapeHTML(value.substring(processed, stream[0].offset)); + processed = stream[0].offset; + if (stream === original) { + /* + On any opening or closing tag of the original markup we first close + the entire highlighted node stack, then render the original tag along + with all the following original tags at the same offset and then + reopen all the tags on the highlighted stack. + */ + nodeStack.reverse().forEach(close); + do { + render(stream.splice(0, 1)[0]); + stream = selectStream(); + } while (stream === original && stream.length && stream[0].offset === processed); + nodeStack.reverse().forEach(open); + } else { + if (stream[0].event === 'start') { + nodeStack.push(stream[0].node); + } else { + nodeStack.pop(); + } + render(stream.splice(0, 1)[0]); + } + } + return result + escapeHTML(value.substr(processed)); +} + +var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + escapeHTML: escapeHTML, + inherit: inherit, + nodeStream: nodeStream, + mergeStreams: mergeStreams +}); + +/** + * @typedef {object} Renderer + * @property {(text: string) => void} addText + * @property {(node: Node) => void} openNode + * @property {(node: Node) => void} closeNode + * @property {() => string} value + */ + +/** @typedef {{kind?: string, sublanguage?: boolean}} Node */ +/** @typedef {{walk: (r: Renderer) => void}} Tree */ +/** */ + +const SPAN_CLOSE = '</span>'; + +/** + * Determines if a node needs to be wrapped in <span> + * + * @param {Node} node */ +const emitsWrappingTags = (node) => { + return !!node.kind; +}; + +/** @type {Renderer} */ +class HTMLRenderer { + /** + * Creates a new HTMLRenderer + * + * @param {Tree} parseTree - the parse tree (must support `walk` API) + * @param {{classPrefix: string}} options + */ + constructor(parseTree, options) { + this.buffer = ""; + this.classPrefix = options.classPrefix; + parseTree.walk(this); + } + + /** + * Adds texts to the output stream + * + * @param {string} text */ + addText(text) { + this.buffer += escapeHTML(text); + } + + /** + * Adds a node open to the output stream (if needed) + * + * @param {Node} node */ + openNode(node) { + if (!emitsWrappingTags(node)) return; + + let className = node.kind; + if (!node.sublanguage) { + className = `${this.classPrefix}${className}`; + } + this.span(className); + } + + /** + * Adds a node close to the output stream (if needed) + * + * @param {Node} node */ + closeNode(node) { + if (!emitsWrappingTags(node)) return; + + this.buffer += SPAN_CLOSE; + } + + /** + * returns the accumulated buffer + */ + value() { + return this.buffer; + } + + // helpers + + /** + * Builds a span element + * + * @param {string} className */ + span(className) { + this.buffer += `<span class="${className}">`; + } +} + +/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */ +/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */ +/** */ + +class TokenTree { + constructor() { + /** @type DataNode */ + this.rootNode = { children: [] }; + this.stack = [this.rootNode]; + } + + get top() { + return this.stack[this.stack.length - 1]; + } + + get root() { return this.rootNode; } + + /** @param {Node} node */ + add(node) { + this.top.children.push(node); + } + + /** @param {string} kind */ + openNode(kind) { + /** @type Node */ + const node = { kind, children: [] }; + this.add(node); + this.stack.push(node); + } + + closeNode() { + if (this.stack.length > 1) { + return this.stack.pop(); + } + // eslint-disable-next-line no-undefined + return undefined; + } + + closeAllNodes() { + while (this.closeNode()); + } + + toJSON() { + return JSON.stringify(this.rootNode, null, 4); + } + + /** + * @typedef { import("./html_renderer").Renderer } Renderer + * @param {Renderer} builder + */ + walk(builder) { + // this does not + return this.constructor._walk(builder, this.rootNode); + // this works + // return TokenTree._walk(builder, this.rootNode); + } + + /** + * @param {Renderer} builder + * @param {Node} node + */ + static _walk(builder, node) { + if (typeof node === "string") { + builder.addText(node); + } else if (node.children) { + builder.openNode(node); + node.children.forEach((child) => this._walk(builder, child)); + builder.closeNode(node); + } + return builder; + } + + /** + * @param {Node} node + */ + static _collapse(node) { + if (typeof node === "string") return; + if (!node.children) return; + + if (node.children.every(el => typeof el === "string")) { + // node.text = node.children.join(""); + // delete node.children; + node.children = [node.children.join("")]; + } else { + node.children.forEach((child) => { + TokenTree._collapse(child); + }); + } + } +} + +/** + Currently this is all private API, but this is the minimal API necessary + that an Emitter must implement to fully support the parser. + + Minimal interface: + + - addKeyword(text, kind) + - addText(text) + - addSublanguage(emitter, subLanguageName) + - finalize() + - openNode(kind) + - closeNode() + - closeAllNodes() + - toHTML() + +*/ + +/** + * @implements {Emitter} + */ +class TokenTreeEmitter extends TokenTree { + /** + * @param {*} options + */ + constructor(options) { + super(); + this.options = options; + } + + /** + * @param {string} text + * @param {string} kind + */ + addKeyword(text, kind) { + if (text === "") { return; } + + this.openNode(kind); + this.addText(text); + this.closeNode(); + } + + /** + * @param {string} text + */ + addText(text) { + if (text === "") { return; } + + this.add(text); + } + + /** + * @param {Emitter & {root: DataNode}} emitter + * @param {string} name + */ + addSublanguage(emitter, name) { + /** @type DataNode */ + const node = emitter.root; + node.kind = name; + node.sublanguage = true; + this.add(node); + } + + toHTML() { + const renderer = new HTMLRenderer(this, this.options); + return renderer.value(); + } + + finalize() { + return true; + } +} + +/** + * @param {string} value + * @returns {RegExp} + * */ +function escape(value) { + return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm'); +} + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/** + * @param {RegExp} re + * @returns {number} + */ +function countMatchGroups(re) { + return (new RegExp(re.toString() + '|')).exec('').length - 1; +} + +/** + * Does lexeme start with a regular expression match at the beginning + * @param {RegExp} re + * @param {string} lexeme + */ +function startsWith(re, lexeme) { + var match = re && re.exec(lexeme); + return match && match.index === 0; +} + +// join logically computes regexps.join(separator), but fixes the +// backreferences so they continue to match. +// it also places each individual regular expression into it's own +// match group, keeping track of the sequencing of those match groups +// is currently an exercise for the caller. :-) +/** + * @param {(string | RegExp)[]} regexps + * @param {string} separator + * @returns {string} + */ +function join(regexps, separator = "|") { + // backreferenceRe matches an open parenthesis or backreference. To avoid + // an incorrect parse, it additionally matches the following: + // - [...] elements, where the meaning of parentheses and escapes change + // - other escape sequences, so we do not misparse escape sequences as + // interesting elements + // - non-matching or lookahead parentheses, which do not capture. These + // follow the '(' with a '?'. + var backreferenceRe = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./; + var numCaptures = 0; + var ret = ''; + for (var i = 0; i < regexps.length; i++) { + numCaptures += 1; + var offset = numCaptures; + var re = source(regexps[i]); + if (i > 0) { + ret += separator; + } + ret += "("; + while (re.length > 0) { + var match = backreferenceRe.exec(re); + if (match == null) { + ret += re; + break; + } + ret += re.substring(0, match.index); + re = re.substring(match.index + match[0].length); + if (match[0][0] === '\\' && match[1]) { + // Adjust the backreference. + ret += '\\' + String(Number(match[1]) + offset); + } else { + ret += match[0]; + if (match[0] === '(') { + numCaptures++; + } + } + } + ret += ")"; + } + return ret; +} + +// Common regexps +const IDENT_RE = '[a-zA-Z]\\w*'; +const UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*'; +const NUMBER_RE = '\\b\\d+(\\.\\d+)?'; +const C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float +const BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b... +const RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~'; + +/** +* @param { Partial<Mode> & {binary?: string | RegExp} } opts +*/ +const SHEBANG = (opts = {}) => { + const beginShebang = /^#![ ]*\//; + if (opts.binary) { + opts.begin = concat( + beginShebang, + /.*\b/, + opts.binary, + /\b.*/); + } + return inherit({ + className: 'meta', + begin: beginShebang, + end: /$/, + relevance: 0, + /** @type {ModeCallback} */ + "on:begin": (m, resp) => { + if (m.index !== 0) resp.ignoreMatch(); + } + }, opts); +}; + +// Common modes +const BACKSLASH_ESCAPE = { + begin: '\\\\[\\s\\S]', relevance: 0 +}; +const APOS_STRING_MODE = { + className: 'string', + begin: '\'', + end: '\'', + illegal: '\\n', + contains: [BACKSLASH_ESCAPE] +}; +const QUOTE_STRING_MODE = { + className: 'string', + begin: '"', + end: '"', + illegal: '\\n', + contains: [BACKSLASH_ESCAPE] +}; +const PHRASAL_WORDS_MODE = { + begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +}; +/** + * Creates a comment mode + * + * @param {string | RegExp} begin + * @param {string | RegExp} end + * @param {Mode | {}} [modeOptions] + * @returns {Partial<Mode>} + */ +const COMMENT = function(begin, end, modeOptions = {}) { + var mode = inherit( + { + className: 'comment', + begin, + end, + contains: [] + }, + modeOptions + ); + mode.contains.push(PHRASAL_WORDS_MODE); + mode.contains.push({ + className: 'doctag', + begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):', + relevance: 0 + }); + return mode; +}; +const C_LINE_COMMENT_MODE = COMMENT('//', '$'); +const C_BLOCK_COMMENT_MODE = COMMENT('/\\*', '\\*/'); +const HASH_COMMENT_MODE = COMMENT('#', '$'); +const NUMBER_MODE = { + className: 'number', + begin: NUMBER_RE, + relevance: 0 +}; +const C_NUMBER_MODE = { + className: 'number', + begin: C_NUMBER_RE, + relevance: 0 +}; +const BINARY_NUMBER_MODE = { + className: 'number', + begin: BINARY_NUMBER_RE, + relevance: 0 +}; +const CSS_NUMBER_MODE = { + className: 'number', + begin: NUMBER_RE + '(' + + '%|em|ex|ch|rem' + + '|vw|vh|vmin|vmax' + + '|cm|mm|in|pt|pc|px' + + '|deg|grad|rad|turn' + + '|s|ms' + + '|Hz|kHz' + + '|dpi|dpcm|dppx' + + ')?', + relevance: 0 +}; +const REGEXP_MODE = { + // this outer rule makes sure we actually have a WHOLE regex and not simply + // an expression such as: + // + // 3 / something + // + // (which will then blow up when regex's `illegal` sees the newline) + begin: /(?=\/[^/\n]*\/)/, + contains: [{ + className: 'regexp', + begin: /\//, + end: /\/[gimuy]*/, + illegal: /\n/, + contains: [ + BACKSLASH_ESCAPE, + { + begin: /\[/, + end: /\]/, + relevance: 0, + contains: [BACKSLASH_ESCAPE] + } + ] + }] +}; +const TITLE_MODE = { + className: 'title', + begin: IDENT_RE, + relevance: 0 +}; +const UNDERSCORE_TITLE_MODE = { + className: 'title', + begin: UNDERSCORE_IDENT_RE, + relevance: 0 +}; +const METHOD_GUARD = { + // excludes method names from keyword processing + begin: '\\.\\s*' + UNDERSCORE_IDENT_RE, + relevance: 0 +}; + +/** + * Adds end same as begin mechanics to a mode + * + * Your mode must include at least a single () match group as that first match + * group is what is used for comparison + * @param {Partial<Mode>} mode + */ +const END_SAME_AS_BEGIN = function(mode) { + return Object.assign(mode, + { + /** @type {ModeCallback} */ + 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; }, + /** @type {ModeCallback} */ + 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); } + }); +}; + +var MODES = /*#__PURE__*/Object.freeze({ + __proto__: null, + IDENT_RE: IDENT_RE, + UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE, + NUMBER_RE: NUMBER_RE, + C_NUMBER_RE: C_NUMBER_RE, + BINARY_NUMBER_RE: BINARY_NUMBER_RE, + RE_STARTERS_RE: RE_STARTERS_RE, + SHEBANG: SHEBANG, + BACKSLASH_ESCAPE: BACKSLASH_ESCAPE, + APOS_STRING_MODE: APOS_STRING_MODE, + QUOTE_STRING_MODE: QUOTE_STRING_MODE, + PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE, + COMMENT: COMMENT, + C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE, + C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE, + HASH_COMMENT_MODE: HASH_COMMENT_MODE, + NUMBER_MODE: NUMBER_MODE, + C_NUMBER_MODE: C_NUMBER_MODE, + BINARY_NUMBER_MODE: BINARY_NUMBER_MODE, + CSS_NUMBER_MODE: CSS_NUMBER_MODE, + REGEXP_MODE: REGEXP_MODE, + TITLE_MODE: TITLE_MODE, + UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE, + METHOD_GUARD: METHOD_GUARD, + END_SAME_AS_BEGIN: END_SAME_AS_BEGIN +}); + +// keywords that should have no default relevance value +var COMMON_KEYWORDS = 'of and for in not or if then'.split(' '); + +// compilation + +/** + * Compiles a language definition result + * + * Given the raw result of a language definition (Language), compiles this so + * that it is ready for highlighting code. + * @param {Language} language + * @returns {CompiledLanguage} + */ +function compileLanguage(language) { + /** + * Builds a regex with the case sensativility of the current language + * + * @param {RegExp | string} value + * @param {boolean} [global] + */ + function langRe(value, global) { + return new RegExp( + source(value), + 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '') + ); + } + + /** + Stores multiple regular expressions and allows you to quickly search for + them all in a string simultaneously - returning the first match. It does + this by creating a huge (a|b|c) regex - each individual item wrapped with () + and joined by `|` - using match groups to track position. When a match is + found checking which position in the array has content allows us to figure + out which of the original regexes / match groups triggered the match. + + The match object itself (the result of `Regex.exec`) is returned but also + enhanced by merging in any meta-data that was registered with the regex. + This is how we keep track of which mode matched, and what type of rule + (`illegal`, `begin`, end, etc). + */ + class MultiRegex { + constructor() { + this.matchIndexes = {}; + // @ts-ignore + this.regexes = []; + this.matchAt = 1; + this.position = 0; + } + + // @ts-ignore + addRule(re, opts) { + opts.position = this.position++; + // @ts-ignore + this.matchIndexes[this.matchAt] = opts; + this.regexes.push([opts, re]); + this.matchAt += countMatchGroups(re) + 1; + } + + compile() { + if (this.regexes.length === 0) { + // avoids the need to check length every time exec is called + // @ts-ignore + this.exec = () => null; + } + const terminators = this.regexes.map(el => el[1]); + this.matcherRe = langRe(join(terminators), true); + this.lastIndex = 0; + } + + /** @param {string} s */ + exec(s) { + this.matcherRe.lastIndex = this.lastIndex; + const match = this.matcherRe.exec(s); + if (!match) { return null; } + + // eslint-disable-next-line no-undefined + const i = match.findIndex((el, i) => i > 0 && el !== undefined); + // @ts-ignore + const matchData = this.matchIndexes[i]; + // trim off any earlier non-relevant match groups (ie, the other regex + // match groups that make up the multi-matcher) + match.splice(0, i); + + return Object.assign(match, matchData); + } + } + + /* + Created to solve the key deficiently with MultiRegex - there is no way to + test for multiple matches at a single location. Why would we need to do + that? In the future a more dynamic engine will allow certain matches to be + ignored. An example: if we matched say the 3rd regex in a large group but + decided to ignore it - we'd need to started testing again at the 4th + regex... but MultiRegex itself gives us no real way to do that. + + So what this class creates MultiRegexs on the fly for whatever search + position they are needed. + + NOTE: These additional MultiRegex objects are created dynamically. For most + grammars most of the time we will never actually need anything more than the + first MultiRegex - so this shouldn't have too much overhead. + + Say this is our search group, and we match regex3, but wish to ignore it. + + regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0 + + What we need is a new MultiRegex that only includes the remaining + possibilities: + + regex4 | regex5 ' ie, startAt = 3 + + This class wraps all that complexity up in a simple API... `startAt` decides + where in the array of expressions to start doing the matching. It + auto-increments, so if a match is found at position 2, then startAt will be + set to 3. If the end is reached startAt will return to 0. + + MOST of the time the parser will be setting startAt manually to 0. + */ + class ResumableMultiRegex { + constructor() { + // @ts-ignore + this.rules = []; + // @ts-ignore + this.multiRegexes = []; + this.count = 0; + + this.lastIndex = 0; + this.regexIndex = 0; + } + + // @ts-ignore + getMatcher(index) { + if (this.multiRegexes[index]) return this.multiRegexes[index]; + + const matcher = new MultiRegex(); + this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts)); + matcher.compile(); + this.multiRegexes[index] = matcher; + return matcher; + } + + resumingScanAtSamePosition() { + return this.regexIndex !== 0; + } + + considerAll() { + this.regexIndex = 0; + } + + // @ts-ignore + addRule(re, opts) { + this.rules.push([re, opts]); + if (opts.type === "begin") this.count++; + } + + /** @param {string} s */ + exec(s) { + const m = this.getMatcher(this.regexIndex); + m.lastIndex = this.lastIndex; + let result = m.exec(s); + + // The following is because we have no easy way to say "resume scanning at the + // existing position but also skip the current rule ONLY". What happens is + // all prior rules are also skipped which can result in matching the wrong + // thing. Example of matching "booger": + + // our matcher is [string, "booger", number] + // + // ....booger.... + + // if "booger" is ignored then we'd really need a regex to scan from the + // SAME position for only: [string, number] but ignoring "booger" (if it + // was the first match), a simple resume would scan ahead who knows how + // far looking only for "number", ignoring potential string matches (or + // future "booger" matches that might be valid.) + + // So what we do: We execute two matchers, one resuming at the same + // position, but the second full matcher starting at the position after: + + // /--- resume first regex match here (for [number]) + // |/---- full match here for [string, "booger", number] + // vv + // ....booger.... + + // Which ever results in a match first is then used. So this 3-4 step + // process essentially allows us to say "match at this position, excluding + // a prior rule that was ignored". + // + // 1. Match "booger" first, ignore. Also proves that [string] does non match. + // 2. Resume matching for [number] + // 3. Match at index + 1 for [string, "booger", number] + // 4. If #2 and #3 result in matches, which came first? + if (this.resumingScanAtSamePosition()) { + if (result && result.index === this.lastIndex) ; else { // use the second matcher result + const m2 = this.getMatcher(0); + m2.lastIndex = this.lastIndex + 1; + result = m2.exec(s); + } + } + + if (result) { + this.regexIndex += result.position + 1; + if (this.regexIndex === this.count) { + // wrap-around to considering all matches again + this.considerAll(); + } + } + + return result; + } + } + + /** + * Given a mode, builds a huge ResumableMultiRegex that can be used to walk + * the content and find matches. + * + * @param {CompiledMode} mode + * @returns {ResumableMultiRegex} + */ + function buildModeRegex(mode) { + const mm = new ResumableMultiRegex(); + + mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: "begin" })); + + if (mode.terminator_end) { + mm.addRule(mode.terminator_end, { type: "end" }); + } + if (mode.illegal) { + mm.addRule(mode.illegal, { type: "illegal" }); + } + + return mm; + } + + // TODO: We need negative look-behind support to do this properly + /** + * Skip a match if it has a preceding or trailing dot + * + * This is used for `beginKeywords` to prevent matching expressions such as + * `bob.keyword.do()`. The mode compiler automatically wires this up as a + * special _internal_ 'on:begin' callback for modes with `beginKeywords` + * @param {RegExpMatchArray} match + * @param {CallbackResponse} response + */ + function skipIfhasPrecedingOrTrailingDot(match, response) { + const before = match.input[match.index - 1]; + const after = match.input[match.index + match[0].length]; + if (before === "." || after === ".") { + response.ignoreMatch(); + } + } + + /** skip vs abort vs ignore + * + * @skip - The mode is still entered and exited normally (and contains rules apply), + * but all content is held and added to the parent buffer rather than being + * output when the mode ends. Mostly used with `sublanguage` to build up + * a single large buffer than can be parsed by sublanguage. + * + * - The mode begin ands ends normally. + * - Content matched is added to the parent mode buffer. + * - The parser cursor is moved forward normally. + * + * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it + * never matched) but DOES NOT continue to match subsequent `contains` + * modes. Abort is bad/suboptimal because it can result in modes + * farther down not getting applied because an earlier rule eats the + * content but then aborts. + * + * - The mode does not begin. + * - Content matched by `begin` is added to the mode buffer. + * - The parser cursor is moved forward accordingly. + * + * @ignore - Ignores the mode (as if it never matched) and continues to match any + * subsequent `contains` modes. Ignore isn't technically possible with + * the current parser implementation. + * + * - The mode does not begin. + * - Content matched by `begin` is ignored. + * - The parser cursor is not moved forward. + */ + + /** + * Compiles an individual mode + * + * This can raise an error if the mode contains certain detectable known logic + * issues. + * @param {Mode} mode + * @param {CompiledMode | null} [parent] + * @returns {CompiledMode | never} + */ + function compileMode(mode, parent) { + const cmode = /** @type CompiledMode */ (mode); + if (mode.compiled) return cmode; + mode.compiled = true; + + // __beforeBegin is considered private API, internal use only + mode.__beforeBegin = null; + + mode.keywords = mode.keywords || mode.beginKeywords; + + let kw_pattern = null; + if (typeof mode.keywords === "object") { + kw_pattern = mode.keywords.$pattern; + delete mode.keywords.$pattern; + } + + if (mode.keywords) { + mode.keywords = compileKeywords(mode.keywords, language.case_insensitive); + } + + // both are not allowed + if (mode.lexemes && kw_pattern) { + throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) "); + } + + // `mode.lexemes` was the old standard before we added and now recommend + // using `keywords.$pattern` to pass the keyword pattern + cmode.keywordPatternRe = langRe(mode.lexemes || kw_pattern || /\w+/, true); + + if (parent) { + if (mode.beginKeywords) { + // for languages with keywords that include non-word characters checking for + // a word boundary is not sufficient, so instead we check for a word boundary + // or whitespace - this does no harm in any case since our keyword engine + // doesn't allow spaces in keywords anyways and we still check for the boundary + // first + mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?=\\b|\\s)'; + mode.__beforeBegin = skipIfhasPrecedingOrTrailingDot; + } + if (!mode.begin) mode.begin = /\B|\b/; + cmode.beginRe = langRe(mode.begin); + if (mode.endSameAsBegin) mode.end = mode.begin; + if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/; + if (mode.end) cmode.endRe = langRe(mode.end); + cmode.terminator_end = source(mode.end) || ''; + if (mode.endsWithParent && parent.terminator_end) { + cmode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end; + } + } + if (mode.illegal) cmode.illegalRe = langRe(mode.illegal); + // eslint-disable-next-line no-undefined + if (mode.relevance === undefined) mode.relevance = 1; + if (!mode.contains) mode.contains = []; + + mode.contains = [].concat(...mode.contains.map(function(c) { + return expand_or_clone_mode(c === 'self' ? mode : c); + })); + mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); }); + + if (mode.starts) { + compileMode(mode.starts, parent); + } + + cmode.matcher = buildModeRegex(cmode); + return cmode; + } + + // self is not valid at the top-level + if (language.contains && language.contains.includes('self')) { + throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation."); + } + return compileMode(/** @type Mode */ (language)); +} + +/** + * Determines if a mode has a dependency on it's parent or not + * + * If a mode does have a parent dependency then often we need to clone it if + * it's used in multiple places so that each copy points to the correct parent, + * where-as modes without a parent can often safely be re-used at the bottom of + * a mode chain. + * + * @param {Mode | null} mode + * @returns {boolean} - is there a dependency on the parent? + * */ +function dependencyOnParent(mode) { + if (!mode) return false; + + return mode.endsWithParent || dependencyOnParent(mode.starts); +} + +/** + * Expands a mode or clones it if necessary + * + * This is necessary for modes with parental dependenceis (see notes on + * `dependencyOnParent`) and for nodes that have `variants` - which must then be + * exploded into their own individual modes at compile time. + * + * @param {Mode} mode + * @returns {Mode | Mode[]} + * */ +function expand_or_clone_mode(mode) { + if (mode.variants && !mode.cached_variants) { + mode.cached_variants = mode.variants.map(function(variant) { + return inherit(mode, { variants: null }, variant); + }); + } + + // EXPAND + // if we have variants then essentially "replace" the mode with the variants + // this happens in compileMode, where this function is called from + if (mode.cached_variants) { + return mode.cached_variants; + } + + // CLONE + // if we have dependencies on parents then we need a unique + // instance of ourselves, so we can be reused with many + // different parents without issue + if (dependencyOnParent(mode)) { + return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null }); + } + + if (Object.isFrozen(mode)) { + return inherit(mode); + } + + // no special dependency issues, just return ourselves + return mode; +} + +/*********************************************** + Keywords +***********************************************/ + +/** + * Given raw keywords from a language definition, compile them. + * + * @param {string | Record<string,string>} rawKeywords + * @param {boolean} case_insensitive + */ +function compileKeywords(rawKeywords, case_insensitive) { + /** @type KeywordDict */ + var compiled_keywords = {}; + + if (typeof rawKeywords === 'string') { // string + splitAndCompile('keyword', rawKeywords); + } else { + Object.keys(rawKeywords).forEach(function(className) { + splitAndCompile(className, rawKeywords[className]); + }); + } + return compiled_keywords; + + // --- + + /** + * Compiles an individual list of keywords + * + * Ex: "for if when while|5" + * + * @param {string} className + * @param {string} keywordList + */ + function splitAndCompile(className, keywordList) { + if (case_insensitive) { + keywordList = keywordList.toLowerCase(); + } + keywordList.split(' ').forEach(function(keyword) { + var pair = keyword.split('|'); + compiled_keywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])]; + }); + } +} + +/** + * Returns the proper score for a given keyword + * + * Also takes into account comment keywords, which will be scored 0 UNLESS + * another score has been manually assigned. + * @param {string} keyword + * @param {string} [providedScore] + */ +function scoreForKeyword(keyword, providedScore) { + // manual scores always win over common keywords + // so you can force a score of 1 if you really insist + if (providedScore) { + return Number(providedScore); + } + + return commonKeyword(keyword) ? 0 : 1; +} + +/** + * Determines if a given keyword is common or not + * + * @param {string} keyword */ +function commonKeyword(keyword) { + return COMMON_KEYWORDS.includes(keyword.toLowerCase()); +} + +var version = "10.2.1"; + +// @ts-nocheck + +function hasValueOrEmptyAttribute(value) { + return Boolean(value || value === ""); +} + +const Component = { + props: ["language", "code", "autodetect"], + data: function() { + return { + detectedLanguage: "", + unknownLanguage: false + }; + }, + computed: { + className() { + if (this.unknownLanguage) return ""; + + return "hljs " + this.detectedLanguage; + }, + highlighted() { + // no idea what language to use, return raw code + if (!this.autoDetect && !hljs.getLanguage(this.language)) { + console.warn(`The language "${this.language}" you specified could not be found.`); + this.unknownLanguage = true; + return escapeHTML(this.code); + } + + let result; + if (this.autoDetect) { + result = hljs.highlightAuto(this.code); + this.detectedLanguage = result.language; + } else { + result = hljs.highlight(this.language, this.code, this.ignoreIllegals); + this.detectectLanguage = this.language; + } + return result.value; + }, + autoDetect() { + return !this.language || hasValueOrEmptyAttribute(this.autodetect); + }, + ignoreIllegals() { + return true; + } + }, + // this avoids needing to use a whole Vue compilation pipeline just + // to build Highlight.js + render(createElement) { + return createElement("pre", {}, [ + createElement("code", { + class: this.className, + domProps: { innerHTML: this.highlighted }}) + ]); + } + // template: `<pre><code :class="className" v-html="highlighted"></code></pre>` +}; + +const VuePlugin = { + install(Vue) { + Vue.component('highlightjs', Component); + } +}; + +/* +Syntax highlighting with language autodetection. +https://highlightjs.org/ +*/ + +const escape$1 = escapeHTML; +const inherit$1 = inherit; + +const { nodeStream: nodeStream$1, mergeStreams: mergeStreams$1 } = utils; +const NO_MATCH = Symbol("nomatch"); + +/** + * @param {any} hljs - object that is extended (legacy) + * @returns {HLJSApi} + */ +const HLJS = function(hljs) { + // Convenience variables for build-in objects + /** @type {unknown[]} */ + var ArrayProto = []; + + // Global internal variables used within the highlight.js library. + /** @type {Record<string, Language>} */ + var languages = Object.create(null); + /** @type {Record<string, string>} */ + var aliases = Object.create(null); + /** @type {HLJSPlugin[]} */ + var plugins = []; + + // safe/production mode - swallows more errors, tries to keep running + // even if a single syntax or parse hits a fatal error + var SAFE_MODE = true; + var fixMarkupRe = /(^(<[^>]+>|\t|)+|\n)/gm; + var LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?"; + /** @type {Language} */ + const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] }; + + // Global options used when within external APIs. This is modified when + // calling the `hljs.configure` function. + /** @type HLJSOptions */ + var options = { + noHighlightRe: /^(no-?highlight)$/i, + languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i, + classPrefix: 'hljs-', + tabReplace: null, + useBR: false, + languages: null, + // beta configuration options, subject to change, welcome to discuss + // https://github.com/highlightjs/highlight.js/issues/1086 + __emitter: TokenTreeEmitter + }; + + /* Utility functions */ + + /** + * Tests a language name to see if highlighting should be skipped + * @param {string} languageName + */ + function shouldNotHighlight(languageName) { + return options.noHighlightRe.test(languageName); + } + + /** + * @param {HighlightedHTMLElement} block - the HTML element to determine language for + */ + function blockLanguage(block) { + var classes = block.className + ' '; + + classes += block.parentNode ? block.parentNode.className : ''; + + // language-* takes precedence over non-prefixed class names. + const match = options.languageDetectRe.exec(classes); + if (match) { + var language = getLanguage(match[1]); + if (!language) { + console.warn(LANGUAGE_NOT_FOUND.replace("{}", match[1])); + console.warn("Falling back to no-highlight mode for this block.", block); + } + return language ? match[1] : 'no-highlight'; + } + + return classes + .split(/\s+/) + .find((_class) => shouldNotHighlight(_class) || getLanguage(_class)); + } + + /** + * Core highlighting function. + * + * @param {string} languageName - the language to use for highlighting + * @param {string} code - the code to highlight + * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail + * @param {Mode} [continuation] - current continuation mode, if any + * + * @returns {HighlightResult} Result - an object that represents the result + * @property {string} language - the language name + * @property {number} relevance - the relevance score + * @property {string} value - the highlighted HTML code + * @property {string} code - the original raw code + * @property {Mode} top - top of the current mode stack + * @property {boolean} illegal - indicates whether any illegal matches were found + */ + function highlight(languageName, code, ignoreIllegals, continuation) { + /** @type {{ code: string, language: string, result?: any }} */ + var context = { + code, + language: languageName + }; + // the plugin can change the desired language or the code to be highlighted + // just be changing the object it was passed + fire("before:highlight", context); + + // a before plugin can usurp the result completely by providing it's own + // in which case we don't even need to call highlight + var result = context.result ? + context.result : + _highlight(context.language, context.code, ignoreIllegals, continuation); + + result.code = context.code; + // the plugin can change anything in result to suite it + fire("after:highlight", result); + + return result; + } + + /** + * private highlight that's used internally and does not fire callbacks + * + * @param {string} languageName - the language to use for highlighting + * @param {string} code - the code to highlight + * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail + * @param {Mode} [continuation] - current continuation mode, if any + */ + function _highlight(languageName, code, ignoreIllegals, continuation) { + var codeToHighlight = code; + + /** + * Return keyword data if a match is a keyword + * @param {CompiledMode} mode - current mode + * @param {RegExpMatchArray} match - regexp match data + * @returns {KeywordData | false} + */ + function keywordData(mode, match) { + var matchText = language.case_insensitive ? match[0].toLowerCase() : match[0]; + return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText]; + } + + function processKeywords() { + if (!top.keywords) { + emitter.addText(mode_buffer); + return; + } + + let last_index = 0; + top.keywordPatternRe.lastIndex = 0; + let match = top.keywordPatternRe.exec(mode_buffer); + let buf = ""; + + while (match) { + buf += mode_buffer.substring(last_index, match.index); + const data = keywordData(top, match); + if (data) { + const [kind, keywordRelevance] = data; + emitter.addText(buf); + buf = ""; + + relevance += keywordRelevance; + emitter.addKeyword(match[0], kind); + } else { + buf += match[0]; + } + last_index = top.keywordPatternRe.lastIndex; + match = top.keywordPatternRe.exec(mode_buffer); + } + buf += mode_buffer.substr(last_index); + emitter.addText(buf); + } + + function processSubLanguage() { + if (mode_buffer === "") return; + /** @type HighlightResult */ + var result = null; + + if (typeof top.subLanguage === 'string') { + if (!languages[top.subLanguage]) { + emitter.addText(mode_buffer); + return; + } + result = _highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]); + continuations[top.subLanguage] = result.top; + } else { + result = highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : null); + } + + // Counting embedded language score towards the host language may be disabled + // with zeroing the containing mode relevance. Use case in point is Markdown that + // allows XML everywhere and makes every XML snippet to have a much larger Markdown + // score. + if (top.relevance > 0) { + relevance += result.relevance; + } + emitter.addSublanguage(result.emitter, result.language); + } + + function processBuffer() { + if (top.subLanguage != null) { + processSubLanguage(); + } else { + processKeywords(); + } + mode_buffer = ''; + } + + /** + * @param {Mode} mode - new mode to start + */ + function startNewMode(mode) { + if (mode.className) { + emitter.openNode(mode.className); + } + top = Object.create(mode, { parent: { value: top } }); + return top; + } + + /** + * @param {CompiledMode } mode - the mode to potentially end + * @param {RegExpMatchArray} match - the latest match + * @param {string} matchPlusRemainder - match plus remainder of content + * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode + */ + function endOfMode(mode, match, matchPlusRemainder) { + let matched = startsWith(mode.endRe, matchPlusRemainder); + + if (matched) { + if (mode["on:end"]) { + const resp = new Response(mode); + mode["on:end"](match, resp); + if (resp.ignore) matched = false; + } + + if (matched) { + while (mode.endsParent && mode.parent) { + mode = mode.parent; + } + return mode; + } + } + // even if on:end fires an `ignore` it's still possible + // that we might trigger the end node because of a parent mode + if (mode.endsWithParent) { + return endOfMode(mode.parent, match, matchPlusRemainder); + } + } + + /** + * Handle matching but then ignoring a sequence of text + * + * @param {string} lexeme - string containing full match text + */ + function doIgnore(lexeme) { + if (top.matcher.regexIndex === 0) { + // no more regexs to potentially match here, so we move the cursor forward one + // space + mode_buffer += lexeme[0]; + return 1; + } else { + // no need to move the cursor, we still have additional regexes to try and + // match at this very spot + resumeScanAtSamePosition = true; + return 0; + } + } + + /** + * Handle the start of a new potential mode match + * + * @param {EnhancedMatch} match - the current match + * @returns {number} how far to advance the parse cursor + */ + function doBeginMatch(match) { + var lexeme = match[0]; + var new_mode = match.rule; + + const resp = new Response(new_mode); + // first internal before callbacks, then the public ones + const beforeCallbacks = [new_mode.__beforeBegin, new_mode["on:begin"]]; + for (const cb of beforeCallbacks) { + if (!cb) continue; + cb(match, resp); + if (resp.ignore) return doIgnore(lexeme); + } + + if (new_mode && new_mode.endSameAsBegin) { + new_mode.endRe = escape(lexeme); + } + + if (new_mode.skip) { + mode_buffer += lexeme; + } else { + if (new_mode.excludeBegin) { + mode_buffer += lexeme; + } + processBuffer(); + if (!new_mode.returnBegin && !new_mode.excludeBegin) { + mode_buffer = lexeme; + } + } + startNewMode(new_mode); + // if (mode["after:begin"]) { + // let resp = new Response(mode); + // mode["after:begin"](match, resp); + // } + return new_mode.returnBegin ? 0 : lexeme.length; + } + + /** + * Handle the potential end of mode + * + * @param {RegExpMatchArray} match - the current match + */ + function doEndMatch(match) { + var lexeme = match[0]; + var matchPlusRemainder = codeToHighlight.substr(match.index); + + var end_mode = endOfMode(top, match, matchPlusRemainder); + if (!end_mode) { return NO_MATCH; } + + var origin = top; + if (origin.skip) { + mode_buffer += lexeme; + } else { + if (!(origin.returnEnd || origin.excludeEnd)) { + mode_buffer += lexeme; + } + processBuffer(); + if (origin.excludeEnd) { + mode_buffer = lexeme; + } + } + do { + if (top.className) { + emitter.closeNode(); + } + if (!top.skip && !top.subLanguage) { + relevance += top.relevance; + } + top = top.parent; + } while (top !== end_mode.parent); + if (end_mode.starts) { + if (end_mode.endSameAsBegin) { + end_mode.starts.endRe = end_mode.endRe; + } + startNewMode(end_mode.starts); + } + return origin.returnEnd ? 0 : lexeme.length; + } + + function processContinuations() { + var list = []; + for (var current = top; current !== language; current = current.parent) { + if (current.className) { + list.unshift(current.className); + } + } + list.forEach(item => emitter.openNode(item)); + } + + /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */ + var lastMatch = {}; + + /** + * Process an individual match + * + * @param {string} textBeforeMatch - text preceeding the match (since the last match) + * @param {EnhancedMatch} [match] - the match itself + */ + function processLexeme(textBeforeMatch, match) { + var lexeme = match && match[0]; + + // add non-matched text to the current mode buffer + mode_buffer += textBeforeMatch; + + if (lexeme == null) { + processBuffer(); + return 0; + } + + // we've found a 0 width match and we're stuck, so we need to advance + // this happens when we have badly behaved rules that have optional matchers to the degree that + // sometimes they can end up matching nothing at all + // Ref: https://github.com/highlightjs/highlight.js/issues/2140 + if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") { + // spit the "skipped" character that our regex choked on back into the output sequence + mode_buffer += codeToHighlight.slice(match.index, match.index + 1); + if (!SAFE_MODE) { + /** @type {AnnotatedError} */ + const err = new Error('0 width match regex'); + err.languageName = languageName; + err.badRule = lastMatch.rule; + throw err; + } + return 1; + } + lastMatch = match; + + if (match.type === "begin") { + return doBeginMatch(match); + } else if (match.type === "illegal" && !ignoreIllegals) { + // illegal match, we do not continue processing + /** @type {AnnotatedError} */ + const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"'); + err.mode = top; + throw err; + } else if (match.type === "end") { + var processed = doEndMatch(match); + if (processed !== NO_MATCH) { + return processed; + } + } + + // edge case for when illegal matches $ (end of line) which is technically + // a 0 width match but not a begin/end match so it's not caught by the + // first handler (when ignoreIllegals is true) + if (match.type === "illegal" && lexeme === "") { + // advance so we aren't stuck in an infinite loop + return 1; + } + + // infinite loops are BAD, this is a last ditch catch all. if we have a + // decent number of iterations yet our index (cursor position in our + // parsing) still 3x behind our index then something is very wrong + // so we bail + if (iterations > 100000 && iterations > match.index * 3) { + const err = new Error('potential infinite loop, way more iterations than matches'); + throw err; + } + + /* + Why might be find ourselves here? Only one occasion now. An end match that was + triggered but could not be completed. When might this happen? When an `endSameasBegin` + rule sets the end rule to a specific match. Since the overall mode termination rule that's + being used to scan the text isn't recompiled that means that any match that LOOKS like + the end (but is not, because it is not an exact match to the beginning) will + end up here. A definite end match, but when `doEndMatch` tries to "reapply" + the end rule and fails to match, we wind up here, and just silently ignore the end. + + This causes no real harm other than stopping a few times too many. + */ + + mode_buffer += lexeme; + return lexeme.length; + } + + var language = getLanguage(languageName); + if (!language) { + console.error(LANGUAGE_NOT_FOUND.replace("{}", languageName)); + throw new Error('Unknown language: "' + languageName + '"'); + } + + var md = compileLanguage(language); + var result = ''; + /** @type {CompiledMode} */ + var top = continuation || md; + /** @type Record<string,Mode> */ + var continuations = {}; // keep continuations for sub-languages + var emitter = new options.__emitter(options); + processContinuations(); + var mode_buffer = ''; + var relevance = 0; + var index = 0; + var iterations = 0; + var resumeScanAtSamePosition = false; + + try { + top.matcher.considerAll(); + + for (;;) { + iterations++; + if (resumeScanAtSamePosition) { + // only regexes not matched previously will now be + // considered for a potential match + resumeScanAtSamePosition = false; + } else { + top.matcher.considerAll(); + } + top.matcher.lastIndex = index; + + const match = top.matcher.exec(codeToHighlight); + // console.log("match", match[0], match.rule && match.rule.begin) + + if (!match) break; + + const beforeMatch = codeToHighlight.substring(index, match.index); + const processedCount = processLexeme(beforeMatch, match); + index = match.index + processedCount; + } + processLexeme(codeToHighlight.substr(index)); + emitter.closeAllNodes(); + emitter.finalize(); + result = emitter.toHTML(); + + return { + relevance: relevance, + value: result, + language: languageName, + illegal: false, + emitter: emitter, + top: top + }; + } catch (err) { + if (err.message && err.message.includes('Illegal')) { + return { + illegal: true, + illegalBy: { + msg: err.message, + context: codeToHighlight.slice(index - 100, index + 100), + mode: err.mode + }, + sofar: result, + relevance: 0, + value: escape$1(codeToHighlight), + emitter: emitter + }; + } else if (SAFE_MODE) { + return { + illegal: false, + relevance: 0, + value: escape$1(codeToHighlight), + emitter: emitter, + language: languageName, + top: top, + errorRaised: err + }; + } else { + throw err; + } + } + } + + /** + * returns a valid highlight result, without actually doing any actual work, + * auto highlight starts with this and it's possible for small snippets that + * auto-detection may not find a better match + * @param {string} code + * @returns {HighlightResult} + */ + function justTextHighlightResult(code) { + const result = { + relevance: 0, + emitter: new options.__emitter(options), + value: escape$1(code), + illegal: false, + top: PLAINTEXT_LANGUAGE + }; + result.emitter.addText(code); + return result; + } + + /** + Highlighting with language detection. Accepts a string with the code to + highlight. Returns an object with the following properties: + + - language (detected language) + - relevance (int) + - value (an HTML string with highlighting markup) + - second_best (object with the same structure for second-best heuristically + detected language, may be absent) + + @param {string} code + @param {Array<string>} [languageSubset] + @returns {AutoHighlightResult} + */ + function highlightAuto(code, languageSubset) { + languageSubset = languageSubset || options.languages || Object.keys(languages); + var result = justTextHighlightResult(code); + var secondBest = result; + languageSubset.filter(getLanguage).filter(autoDetection).forEach(function(name) { + var current = _highlight(name, code, false); + current.language = name; + if (current.relevance > secondBest.relevance) { + secondBest = current; + } + if (current.relevance > result.relevance) { + secondBest = result; + result = current; + } + }); + if (secondBest.language) { + // second_best (with underscore) is the expected API + result.second_best = secondBest; + } + return result; + } + + /** + Post-processing of the highlighted markup: + + - replace TABs with something more useful + - replace real line-breaks with '<br>' for non-pre containers + + @param {string} html + @returns {string} + */ + function fixMarkup(html) { + if (!(options.tabReplace || options.useBR)) { + return html; + } + + return html.replace(fixMarkupRe, match => { + if (match === '\n') { + return options.useBR ? '<br>' : match; + } else if (options.tabReplace) { + return match.replace(/\t/g, options.tabReplace); + } + return match; + }); + } + + /** + * Builds new class name for block given the language name + * + * @param {string} prevClassName + * @param {string} [currentLang] + * @param {string} [resultLang] + */ + function buildClassName(prevClassName, currentLang, resultLang) { + var language = currentLang ? aliases[currentLang] : resultLang; + var result = [prevClassName.trim()]; + + if (!prevClassName.match(/\bhljs\b/)) { + result.push('hljs'); + } + + if (!prevClassName.includes(language)) { + result.push(language); + } + + return result.join(' ').trim(); + } + + /** + * Applies highlighting to a DOM node containing code. Accepts a DOM node and + * two optional parameters for fixMarkup. + * + * @param {HighlightedHTMLElement} element - the HTML element to highlight + */ + function highlightBlock(element) { + /** @type HTMLElement */ + let node = null; + const language = blockLanguage(element); + + if (shouldNotHighlight(language)) return; + + fire("before:highlightBlock", + { block: element, language: language }); + + if (options.useBR) { + node = document.createElement('div'); + node.innerHTML = element.innerHTML.replace(/\n/g, '').replace(/<br[ /]*>/g, '\n'); + } else { + node = element; + } + const text = node.textContent; + const result = language ? highlight(language, text, true) : highlightAuto(text); + + const originalStream = nodeStream$1(node); + if (originalStream.length) { + const resultNode = document.createElement('div'); + resultNode.innerHTML = result.value; + result.value = mergeStreams$1(originalStream, nodeStream$1(resultNode), text); + } + result.value = fixMarkup(result.value); + + fire("after:highlightBlock", { block: element, result: result }); + + element.innerHTML = result.value; + element.className = buildClassName(element.className, language, result.language); + element.result = { + language: result.language, + // TODO: remove with version 11.0 + re: result.relevance, + relavance: result.relevance + }; + if (result.second_best) { + element.second_best = { + language: result.second_best.language, + // TODO: remove with version 11.0 + re: result.second_best.relevance, + relavance: result.second_best.relevance + }; + } + } + + /** + * Updates highlight.js global options with the passed options + * + * @param {{}} userOptions + */ + function configure(userOptions) { + options = inherit$1(options, userOptions); + } + + /** + * Highlights to all <pre><code> blocks on a page + * + * @type {Function & {called?: boolean}} + */ + const initHighlighting = () => { + if (initHighlighting.called) return; + initHighlighting.called = true; + + var blocks = document.querySelectorAll('pre code'); + ArrayProto.forEach.call(blocks, highlightBlock); + }; + + // Higlights all when DOMContentLoaded fires + function initHighlightingOnLoad() { + // @ts-ignore + window.addEventListener('DOMContentLoaded', initHighlighting, false); + } + + /** + * Register a language grammar module + * + * @param {string} languageName + * @param {LanguageFn} languageDefinition + */ + function registerLanguage(languageName, languageDefinition) { + var lang = null; + try { + lang = languageDefinition(hljs); + } catch (error) { + console.error("Language definition for '{}' could not be registered.".replace("{}", languageName)); + // hard or soft error + if (!SAFE_MODE) { throw error; } else { console.error(error); } + // languages that have serious errors are replaced with essentially a + // "plaintext" stand-in so that the code blocks will still get normal + // css classes applied to them - and one bad language won't break the + // entire highlighter + lang = PLAINTEXT_LANGUAGE; + } + // give it a temporary name if it doesn't have one in the meta-data + if (!lang.name) lang.name = languageName; + languages[languageName] = lang; + lang.rawDefinition = languageDefinition.bind(null, hljs); + + if (lang.aliases) { + registerAliases(lang.aliases, { languageName }); + } + } + + /** + * @returns {string[]} List of language internal names + */ + function listLanguages() { + return Object.keys(languages); + } + + /** + intended usage: When one language truly requires another + + Unlike `getLanguage`, this will throw when the requested language + is not available. + + @param {string} name - name of the language to fetch/require + @returns {Language | never} + */ + function requireLanguage(name) { + var lang = getLanguage(name); + if (lang) { return lang; } + + var err = new Error('The \'{}\' language is required, but not loaded.'.replace('{}', name)); + throw err; + } + + /** + * @param {string} name - name of the language to retrieve + * @returns {Language | undefined} + */ + function getLanguage(name) { + name = (name || '').toLowerCase(); + return languages[name] || languages[aliases[name]]; + } + + /** + * + * @param {string|string[]} aliasList - single alias or list of aliases + * @param {{languageName: string}} opts + */ + function registerAliases(aliasList, { languageName }) { + if (typeof aliasList === 'string') { + aliasList = [aliasList]; + } + aliasList.forEach(alias => { aliases[alias] = languageName; }); + } + + /** + * Determines if a given language has auto-detection enabled + * @param {string} name - name of the language + */ + function autoDetection(name) { + var lang = getLanguage(name); + return lang && !lang.disableAutodetect; + } + + /** + * @param {HLJSPlugin} plugin + */ + function addPlugin(plugin) { + plugins.push(plugin); + } + + /** + * + * @param {PluginEvent} event + * @param {any} args + */ + function fire(event, args) { + var cb = event; + plugins.forEach(function(plugin) { + if (plugin[cb]) { + plugin[cb](args); + } + }); + } + + /* fixMarkup is deprecated and will be removed entirely in v11 */ + function deprecate_fixMarkup(arg) { + console.warn("fixMarkup is deprecated and will be removed entirely in v11.0"); + console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534"); + + return fixMarkup(arg) + } + + /* Interface definition */ + Object.assign(hljs, { + highlight, + highlightAuto, + fixMarkup: deprecate_fixMarkup, + highlightBlock, + configure, + initHighlighting, + initHighlightingOnLoad, + registerLanguage, + listLanguages, + getLanguage, + registerAliases, + requireLanguage, + autoDetection, + inherit: inherit$1, + addPlugin, + // plugins for frameworks + vuePlugin: VuePlugin + }); + + hljs.debugMode = function() { SAFE_MODE = false; }; + hljs.safeMode = function() { SAFE_MODE = true; }; + hljs.versionString = version; + + for (const key in MODES) { + // @ts-ignore + if (typeof MODES[key] === "object") { + // @ts-ignore + deepFreeze(MODES[key]); + } + } + + // merge all the modes/regexs into our main object + Object.assign(hljs, MODES); + + return hljs; +}; + +// export an "instance" of the highlighter +var highlight = HLJS({}); + +module.exports = highlight; diff --git a/node_modules/highlight.js/lib/highlight.js b/node_modules/highlight.js/lib/highlight.js @@ -0,0 +1,2 @@ +// This file has been deprecated in favor of core.js +var hljs = require('./core'); diff --git a/node_modules/highlight.js/lib/index.js b/node_modules/highlight.js/lib/index.js @@ -0,0 +1,194 @@ +var hljs = require('./core'); + +hljs.registerLanguage('1c', require('./languages/1c')); +hljs.registerLanguage('abnf', require('./languages/abnf')); +hljs.registerLanguage('accesslog', require('./languages/accesslog')); +hljs.registerLanguage('actionscript', require('./languages/actionscript')); +hljs.registerLanguage('ada', require('./languages/ada')); +hljs.registerLanguage('angelscript', require('./languages/angelscript')); +hljs.registerLanguage('apache', require('./languages/apache')); +hljs.registerLanguage('applescript', require('./languages/applescript')); +hljs.registerLanguage('arcade', require('./languages/arcade')); +hljs.registerLanguage('c-like', require('./languages/c-like')); +hljs.registerLanguage('cpp', require('./languages/cpp')); +hljs.registerLanguage('arduino', require('./languages/arduino')); +hljs.registerLanguage('armasm', require('./languages/armasm')); +hljs.registerLanguage('xml', require('./languages/xml')); +hljs.registerLanguage('asciidoc', require('./languages/asciidoc')); +hljs.registerLanguage('aspectj', require('./languages/aspectj')); +hljs.registerLanguage('autohotkey', require('./languages/autohotkey')); +hljs.registerLanguage('autoit', require('./languages/autoit')); +hljs.registerLanguage('avrasm', require('./languages/avrasm')); +hljs.registerLanguage('awk', require('./languages/awk')); +hljs.registerLanguage('axapta', require('./languages/axapta')); +hljs.registerLanguage('bash', require('./languages/bash')); +hljs.registerLanguage('basic', require('./languages/basic')); +hljs.registerLanguage('bnf', require('./languages/bnf')); +hljs.registerLanguage('brainfuck', require('./languages/brainfuck')); +hljs.registerLanguage('c', require('./languages/c')); +hljs.registerLanguage('cal', require('./languages/cal')); +hljs.registerLanguage('capnproto', require('./languages/capnproto')); +hljs.registerLanguage('ceylon', require('./languages/ceylon')); +hljs.registerLanguage('clean', require('./languages/clean')); +hljs.registerLanguage('clojure', require('./languages/clojure')); +hljs.registerLanguage('clojure-repl', require('./languages/clojure-repl')); +hljs.registerLanguage('cmake', require('./languages/cmake')); +hljs.registerLanguage('coffeescript', require('./languages/coffeescript')); +hljs.registerLanguage('coq', require('./languages/coq')); +hljs.registerLanguage('cos', require('./languages/cos')); +hljs.registerLanguage('crmsh', require('./languages/crmsh')); +hljs.registerLanguage('crystal', require('./languages/crystal')); +hljs.registerLanguage('csharp', require('./languages/csharp')); +hljs.registerLanguage('csp', require('./languages/csp')); +hljs.registerLanguage('css', require('./languages/css')); +hljs.registerLanguage('d', require('./languages/d')); +hljs.registerLanguage('markdown', require('./languages/markdown')); +hljs.registerLanguage('dart', require('./languages/dart')); +hljs.registerLanguage('delphi', require('./languages/delphi')); +hljs.registerLanguage('diff', require('./languages/diff')); +hljs.registerLanguage('django', require('./languages/django')); +hljs.registerLanguage('dns', require('./languages/dns')); +hljs.registerLanguage('dockerfile', require('./languages/dockerfile')); +hljs.registerLanguage('dos', require('./languages/dos')); +hljs.registerLanguage('dsconfig', require('./languages/dsconfig')); +hljs.registerLanguage('dts', require('./languages/dts')); +hljs.registerLanguage('dust', require('./languages/dust')); +hljs.registerLanguage('ebnf', require('./languages/ebnf')); +hljs.registerLanguage('elixir', require('./languages/elixir')); +hljs.registerLanguage('elm', require('./languages/elm')); +hljs.registerLanguage('ruby', require('./languages/ruby')); +hljs.registerLanguage('erb', require('./languages/erb')); +hljs.registerLanguage('erlang-repl', require('./languages/erlang-repl')); +hljs.registerLanguage('erlang', require('./languages/erlang')); +hljs.registerLanguage('excel', require('./languages/excel')); +hljs.registerLanguage('fix', require('./languages/fix')); +hljs.registerLanguage('flix', require('./languages/flix')); +hljs.registerLanguage('fortran', require('./languages/fortran')); +hljs.registerLanguage('fsharp', require('./languages/fsharp')); +hljs.registerLanguage('gams', require('./languages/gams')); +hljs.registerLanguage('gauss', require('./languages/gauss')); +hljs.registerLanguage('gcode', require('./languages/gcode')); +hljs.registerLanguage('gherkin', require('./languages/gherkin')); +hljs.registerLanguage('glsl', require('./languages/glsl')); +hljs.registerLanguage('gml', require('./languages/gml')); +hljs.registerLanguage('go', require('./languages/go')); +hljs.registerLanguage('golo', require('./languages/golo')); +hljs.registerLanguage('gradle', require('./languages/gradle')); +hljs.registerLanguage('groovy', require('./languages/groovy')); +hljs.registerLanguage('haml', require('./languages/haml')); +hljs.registerLanguage('handlebars', require('./languages/handlebars')); +hljs.registerLanguage('haskell', require('./languages/haskell')); +hljs.registerLanguage('haxe', require('./languages/haxe')); +hljs.registerLanguage('hsp', require('./languages/hsp')); +hljs.registerLanguage('htmlbars', require('./languages/htmlbars')); +hljs.registerLanguage('http', require('./languages/http')); +hljs.registerLanguage('hy', require('./languages/hy')); +hljs.registerLanguage('inform7', require('./languages/inform7')); +hljs.registerLanguage('ini', require('./languages/ini')); +hljs.registerLanguage('irpf90', require('./languages/irpf90')); +hljs.registerLanguage('isbl', require('./languages/isbl')); +hljs.registerLanguage('java', require('./languages/java')); +hljs.registerLanguage('javascript', require('./languages/javascript')); +hljs.registerLanguage('typescript', require('./languages/typescript')); +hljs.registerLanguage('javascript.old', require('./languages/javascript.old')); +hljs.registerLanguage('jboss-cli', require('./languages/jboss-cli')); +hljs.registerLanguage('json', require('./languages/json')); +hljs.registerLanguage('julia', require('./languages/julia')); +hljs.registerLanguage('julia-repl', require('./languages/julia-repl')); +hljs.registerLanguage('kotlin', require('./languages/kotlin')); +hljs.registerLanguage('lasso', require('./languages/lasso')); +hljs.registerLanguage('latex', require('./languages/latex')); +hljs.registerLanguage('ldif', require('./languages/ldif')); +hljs.registerLanguage('leaf', require('./languages/leaf')); +hljs.registerLanguage('less', require('./languages/less')); +hljs.registerLanguage('lisp', require('./languages/lisp')); +hljs.registerLanguage('livecodeserver', require('./languages/livecodeserver')); +hljs.registerLanguage('livescript', require('./languages/livescript')); +hljs.registerLanguage('llvm', require('./languages/llvm')); +hljs.registerLanguage('lsl', require('./languages/lsl')); +hljs.registerLanguage('lua', require('./languages/lua')); +hljs.registerLanguage('makefile', require('./languages/makefile')); +hljs.registerLanguage('mathematica', require('./languages/mathematica')); +hljs.registerLanguage('matlab', require('./languages/matlab')); +hljs.registerLanguage('maxima', require('./languages/maxima')); +hljs.registerLanguage('mel', require('./languages/mel')); +hljs.registerLanguage('mercury', require('./languages/mercury')); +hljs.registerLanguage('mipsasm', require('./languages/mipsasm')); +hljs.registerLanguage('mizar', require('./languages/mizar')); +hljs.registerLanguage('perl', require('./languages/perl')); +hljs.registerLanguage('mojolicious', require('./languages/mojolicious')); +hljs.registerLanguage('monkey', require('./languages/monkey')); +hljs.registerLanguage('moonscript', require('./languages/moonscript')); +hljs.registerLanguage('n1ql', require('./languages/n1ql')); +hljs.registerLanguage('nginx', require('./languages/nginx')); +hljs.registerLanguage('nim', require('./languages/nim')); +hljs.registerLanguage('nix', require('./languages/nix')); +hljs.registerLanguage('nsis', require('./languages/nsis')); +hljs.registerLanguage('objectivec', require('./languages/objectivec')); +hljs.registerLanguage('ocaml', require('./languages/ocaml')); +hljs.registerLanguage('openscad', require('./languages/openscad')); +hljs.registerLanguage('oxygene', require('./languages/oxygene')); +hljs.registerLanguage('parser3', require('./languages/parser3')); +hljs.registerLanguage('pf', require('./languages/pf')); +hljs.registerLanguage('pgsql', require('./languages/pgsql')); +hljs.registerLanguage('php', require('./languages/php')); +hljs.registerLanguage('php-template', require('./languages/php-template')); +hljs.registerLanguage('plaintext', require('./languages/plaintext')); +hljs.registerLanguage('pony', require('./languages/pony')); +hljs.registerLanguage('powershell', require('./languages/powershell')); +hljs.registerLanguage('processing', require('./languages/processing')); +hljs.registerLanguage('profile', require('./languages/profile')); +hljs.registerLanguage('prolog', require('./languages/prolog')); +hljs.registerLanguage('properties', require('./languages/properties')); +hljs.registerLanguage('protobuf', require('./languages/protobuf')); +hljs.registerLanguage('puppet', require('./languages/puppet')); +hljs.registerLanguage('purebasic', require('./languages/purebasic')); +hljs.registerLanguage('python', require('./languages/python')); +hljs.registerLanguage('python-repl', require('./languages/python-repl')); +hljs.registerLanguage('q', require('./languages/q')); +hljs.registerLanguage('qml', require('./languages/qml')); +hljs.registerLanguage('r', require('./languages/r')); +hljs.registerLanguage('reasonml', require('./languages/reasonml')); +hljs.registerLanguage('rib', require('./languages/rib')); +hljs.registerLanguage('roboconf', require('./languages/roboconf')); +hljs.registerLanguage('routeros', require('./languages/routeros')); +hljs.registerLanguage('rsl', require('./languages/rsl')); +hljs.registerLanguage('ruleslanguage', require('./languages/ruleslanguage')); +hljs.registerLanguage('rust', require('./languages/rust')); +hljs.registerLanguage('sas', require('./languages/sas')); +hljs.registerLanguage('scala', require('./languages/scala')); +hljs.registerLanguage('scheme', require('./languages/scheme')); +hljs.registerLanguage('scilab', require('./languages/scilab')); +hljs.registerLanguage('scss', require('./languages/scss')); +hljs.registerLanguage('shell', require('./languages/shell')); +hljs.registerLanguage('smali', require('./languages/smali')); +hljs.registerLanguage('smalltalk', require('./languages/smalltalk')); +hljs.registerLanguage('sml', require('./languages/sml')); +hljs.registerLanguage('sqf', require('./languages/sqf')); +hljs.registerLanguage('sql', require('./languages/sql')); +hljs.registerLanguage('stan', require('./languages/stan')); +hljs.registerLanguage('stata', require('./languages/stata')); +hljs.registerLanguage('step21', require('./languages/step21')); +hljs.registerLanguage('stylus', require('./languages/stylus')); +hljs.registerLanguage('subunit', require('./languages/subunit')); +hljs.registerLanguage('swift', require('./languages/swift')); +hljs.registerLanguage('taggerscript', require('./languages/taggerscript')); +hljs.registerLanguage('yaml', require('./languages/yaml')); +hljs.registerLanguage('tap', require('./languages/tap')); +hljs.registerLanguage('tcl', require('./languages/tcl')); +hljs.registerLanguage('thrift', require('./languages/thrift')); +hljs.registerLanguage('tp', require('./languages/tp')); +hljs.registerLanguage('twig', require('./languages/twig')); +hljs.registerLanguage('vala', require('./languages/vala')); +hljs.registerLanguage('vbnet', require('./languages/vbnet')); +hljs.registerLanguage('vbscript', require('./languages/vbscript')); +hljs.registerLanguage('vbscript-html', require('./languages/vbscript-html')); +hljs.registerLanguage('verilog', require('./languages/verilog')); +hljs.registerLanguage('vhdl', require('./languages/vhdl')); +hljs.registerLanguage('vim', require('./languages/vim')); +hljs.registerLanguage('x86asm', require('./languages/x86asm')); +hljs.registerLanguage('xl', require('./languages/xl')); +hljs.registerLanguage('xquery', require('./languages/xquery')); +hljs.registerLanguage('zephir', require('./languages/zephir')); + +module.exports = hljs;+ \ No newline at end of file diff --git a/node_modules/highlight.js/lib/languages/1c.js b/node_modules/highlight.js/lib/languages/1c.js @@ -0,0 +1,521 @@ +/* +Language: 1C:Enterprise +Author: Stanislav Belov <stbelov@gmail.com> +Description: built-in language 1C:Enterprise (v7, v8) +Category: enterprise +*/ + +function _1c(hljs) { + + // общий паттерн для определения идентификаторов + var UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+'; + + // v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword + var v7_keywords = + 'далее '; + + // v8 ключевые слова ==> keyword + var v8_keywords = + 'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли ' + + 'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт '; + + // keyword : ключевые слова + var KEYWORD = v7_keywords + v8_keywords; + + // v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword + var v7_meta_keywords = + 'загрузитьизфайла '; + + // v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword + var v8_meta_keywords = + 'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер ' + + 'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед ' + + 'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент '; + + // meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях + var METAKEYWORD = v7_meta_keywords + v8_meta_keywords; + + // v7 системные константы ==> built_in + var v7_system_constants = + 'разделительстраниц разделительстрок символтабуляции '; + + // v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in + var v7_global_context_methods = + 'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов ' + + 'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя ' + + 'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца ' + + 'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид ' + + 'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца ' + + 'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов ' + + 'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута ' + + 'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта ' + + 'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына ' + + 'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента ' + + 'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон '; + + // v8 методы глобального контекста ==> built_in + var v8_global_context_methods = + 'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока ' + + 'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ' + + 'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации ' + + 'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода ' + + 'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы ' + + 'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации ' + + 'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию ' + + 'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла ' + + 'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке ' + + 'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку ' + + 'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты ' + + 'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы ' + + 'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти ' + + 'найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы ' + + 'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя ' + + 'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты ' + + 'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов ' + + 'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя ' + + 'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога ' + + 'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией ' + + 'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы ' + + 'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения ' + + 'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении ' + + 'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения ' + + 'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально ' + + 'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа ' + + 'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту ' + + 'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения ' + + 'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки ' + + 'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение ' + + 'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя ' + + 'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса ' + + 'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора ' + + 'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса ' + + 'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации ' + + 'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла ' + + 'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации ' + + 'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления ' + + 'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу ' + + 'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы ' + + 'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет ' + + 'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима ' + + 'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения ' + + 'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути ' + + 'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы ' + + 'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю ' + + 'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных ' + + 'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию ' + + 'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище ' + + 'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода ' + + 'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение ' + + 'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока ' + + 'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных ' + + 'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени ' + + 'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить ' + + 'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс ' + + 'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '+ + 'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах ' + + 'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации ' + + 'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы ' + + 'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим ' + + 'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту ' + + 'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных ' + + 'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации ' + + 'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения ' + + 'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования ' + + 'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима ' + + 'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим ' + + 'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией ' + + 'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы ' + + 'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса ' + + 'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища '; + + // v8 свойства глобального контекста ==> built_in + var v8_global_context_property = + 'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы ' + + 'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль ' + + 'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты ' + + 'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений ' + + 'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик ' + + 'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок ' + + 'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений ' + + 'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа ' + + 'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек ' + + 'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков ' + + 'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек '; + + // built_in : встроенные или библиотечные объекты (константы, классы, функции) + var BUILTIN = + v7_system_constants + + v7_global_context_methods + v8_global_context_methods + + v8_global_context_property; + + // v8 системные наборы значений ==> class + var v8_system_sets_of_values = + 'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля '; + + // v8 системные перечисления - интерфейсные ==> class + var v8_system_enums_interface = + 'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий ' + + 'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы ' + + 'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы ' + + 'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя ' + + 'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение ' + + 'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы ' + + 'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания ' + + 'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки ' + + 'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы ' + + 'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева ' + + 'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ' + + 'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме ' + + 'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы ' + + 'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы ' + + 'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы ' + + 'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска ' + + 'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования ' + + 'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта ' + + 'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы ' + + 'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы ' + + 'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы ' + + 'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы ' + + 'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы ' + + 'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском ' + + 'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы ' + + 'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта ' + + 'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты ' + + 'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения ' + + 'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра ' + + 'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения ' + + 'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы ' + + 'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки ' + + 'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание ' + + 'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы ' + + 'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление ' + + 'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы ' + + 'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы ' + + 'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления ' + + 'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы ' + + 'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы ' + + 'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений ' + + 'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы ' + + 'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы ' + + 'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы ' + + 'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени ' + + 'форматкартинки ширинаподчиненныхэлементовформы '; + + // v8 системные перечисления - свойства прикладных объектов ==> class + var v8_system_enums_objects_properties = + 'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса ' + + 'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения ' + + 'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента '; + + // v8 системные перечисления - планы обмена ==> class + var v8_system_enums_exchange_plans = + 'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных '; + + // v8 системные перечисления - табличный документ ==> class + var v8_system_enums_tabular_document = + 'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы ' + + 'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента ' + + 'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента ' + + 'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента ' + + 'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы ' + + 'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента ' + + 'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц '; + + // v8 системные перечисления - планировщик ==> class + var v8_system_enums_sheduler = + 'отображениевремениэлементовпланировщика '; + + // v8 системные перечисления - форматированный документ ==> class + var v8_system_enums_formatted_document = + 'типфайлаформатированногодокумента '; + + // v8 системные перечисления - запрос ==> class + var v8_system_enums_query = + 'обходрезультатазапроса типзаписизапроса '; + + // v8 системные перечисления - построитель отчета ==> class + var v8_system_enums_report_builder = + 'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов '; + + // v8 системные перечисления - работа с файлами ==> class + var v8_system_enums_files = + 'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла '; + + // v8 системные перечисления - построитель запроса ==> class + var v8_system_enums_query_builder = + 'типизмеренияпостроителязапроса '; + + // v8 системные перечисления - анализ данных ==> class + var v8_system_enums_data_analysis = + 'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных ' + + 'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений ' + + 'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций ' + + 'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных ' + + 'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных ' + + 'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений '; + + // v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class + var v8_system_enums_xml_json_xs_dom_xdto_ws = + 'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto ' + + 'действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs ' + + 'исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs ' + + 'методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ' + + 'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson ' + + 'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs ' + + 'форматдатыjson экранированиесимволовjson '; + + // v8 системные перечисления - система компоновки данных ==> class + var v8_system_enums_data_composition_system = + 'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных ' + + 'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных ' + + 'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных ' + + 'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных ' + + 'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных ' + + 'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных ' + + 'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных ' + + 'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных ' + + 'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных ' + + 'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '+ + 'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных ' + + 'использованиеусловногооформлениякомпоновкиданных '; + + // v8 системные перечисления - почта ==> class + var v8_system_enums_email = + 'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения ' + + 'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты ' + + 'статусразборапочтовогосообщения '; + + // v8 системные перечисления - журнал регистрации ==> class + var v8_system_enums_logbook = + 'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации '; + + // v8 системные перечисления - криптография ==> class + var v8_system_enums_cryptography = + 'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии ' + + 'типхранилищасертификатовкриптографии '; + + // v8 системные перечисления - ZIP ==> class + var v8_system_enums_zip = + 'кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip ' + + 'режимсохраненияпутейzip уровеньсжатияzip '; + + // v8 системные перечисления - + // Блокировка данных, Фоновые задания, Автоматизированное тестирование, + // Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class + var v8_system_enums_other = + 'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных ' + + 'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp '; + + // v8 системные перечисления - схема запроса ==> class + var v8_system_enums_request_schema = + 'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса ' + + 'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса '; + + // v8 системные перечисления - свойства объектов метаданных ==> class + var v8_system_enums_properties_of_metadata_objects = + 'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления ' + + 'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование ' + + 'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения ' + + 'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита ' + + 'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных ' + + 'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи ' + + 'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении ' + + 'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений ' + + 'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение ' + + 'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '+ + 'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности ' + + 'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов ' + + 'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса ' + + 'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов ' + + 'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования ' + + 'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса ' + + 'типномерадокумента типномеразадачи типформы удалениедвижений '; + + // v8 системные перечисления - разные ==> class + var v8_system_enums_differents = + 'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения ' + + 'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки ' + + 'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак ' + + 'использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога ' + + 'кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных ' + + 'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения ' + + 'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных ' + + 'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter ' + + 'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты'; + + // class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование) + var CLASS = + v8_system_sets_of_values + + v8_system_enums_interface + + v8_system_enums_objects_properties + + v8_system_enums_exchange_plans + + v8_system_enums_tabular_document + + v8_system_enums_sheduler + + v8_system_enums_formatted_document + + v8_system_enums_query + + v8_system_enums_report_builder + + v8_system_enums_files + + v8_system_enums_query_builder + + v8_system_enums_data_analysis + + v8_system_enums_xml_json_xs_dom_xdto_ws + + v8_system_enums_data_composition_system + + v8_system_enums_email + + v8_system_enums_logbook + + v8_system_enums_cryptography + + v8_system_enums_zip + + v8_system_enums_other + + v8_system_enums_request_schema + + v8_system_enums_properties_of_metadata_objects + + v8_system_enums_differents; + + // v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type + var v8_shared_object = + 'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs ' + + 'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема ' + + 'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма ' + + 'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания ' + + 'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление ' + + 'записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom ' + + 'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта ' + + 'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs ' + + 'использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных ' + + 'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла ' + + 'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных ' + + 'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных ' + + 'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson ' + + 'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs ' + + 'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации ' + + 'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных ' + + 'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs ' + + 'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom ' + + 'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных ' + + 'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных ' + + 'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных ' + + 'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml ' + + 'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент ' + + 'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml ' + + 'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto ' + + 'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows ' + + 'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш ' + + 'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент ' + + 'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток ' + + 'фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs ' + + 'фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs ' + + 'фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs ' + + 'фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент ' + + 'фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла ' + + 'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных '; + + // v8 универсальные коллекции значений ==> type + var v8_universal_collection = + 'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура ' + + 'фиксированноесоответствие фиксированныймассив '; + + // type : встроенные типы + var TYPE = + v8_shared_object + + v8_universal_collection; + + // literal : примитивные типы + var LITERAL = 'null истина ложь неопределено'; + + // number : числа + var NUMBERS = hljs.inherit(hljs.NUMBER_MODE); + + // string : строки + var STRINGS = { + className: 'string', + begin: '"|\\|', end: '"|$', + contains: [{begin: '""'}] + }; + + // number : даты + var DATE = { + begin: "'", end: "'", excludeBegin: true, excludeEnd: true, + contains: [ + { + className: 'number', + begin: '\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}' + } + ] + }; + + // comment : комментарии + var COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE); + + // meta : инструкции препроцессора, директивы компиляции + var META = { + className: 'meta', + + begin: '#|&', end: '$', + keywords: { + $pattern: UNDERSCORE_IDENT_RE, + 'meta-keyword': KEYWORD + METAKEYWORD + }, + contains: [ + COMMENTS + ] + }; + + // symbol : метка goto + var SYMBOL = { + className: 'symbol', + begin: '~', end: ';|:', excludeEnd: true + }; + + // function : объявление процедур и функций + var FUNCTION = { + className: 'function', + variants: [ + {begin: 'процедура|функция', end: '\\)', keywords: 'процедура функция'}, + {begin: 'конецпроцедуры|конецфункции', keywords: 'конецпроцедуры конецфункции'} + ], + contains: [ + { + begin: '\\(', end: '\\)', endsParent : true, + contains: [ + { + className: 'params', + begin: UNDERSCORE_IDENT_RE, end: ',', excludeEnd: true, endsWithParent: true, + keywords: { + $pattern: UNDERSCORE_IDENT_RE, + keyword: 'знач', + literal: LITERAL + }, + contains: [ + NUMBERS, + STRINGS, + DATE + ] + }, + COMMENTS + ] + }, + hljs.inherit(hljs.TITLE_MODE, {begin: UNDERSCORE_IDENT_RE}) + ] + }; + + return { + name: '1C:Enterprise', + case_insensitive: true, + keywords: { + $pattern: UNDERSCORE_IDENT_RE, + keyword: KEYWORD, + built_in: BUILTIN, + class: CLASS, + type: TYPE, + literal: LITERAL + }, + contains: [ + META, + FUNCTION, + COMMENTS, + SYMBOL, + NUMBERS, + STRINGS, + DATE + ] + } +} + +module.exports = _1c; diff --git a/node_modules/highlight.js/lib/languages/abnf.js b/node_modules/highlight.js/lib/languages/abnf.js @@ -0,0 +1,77 @@ +/* +Language: Augmented Backus-Naur Form +Author: Alex McKibben <alex@nullscope.net> +Website: https://tools.ietf.org/html/rfc5234 +*/ + +/** @type LanguageFn */ +function abnf(hljs) { + var regexes = { + ruleDeclaration: "^[a-zA-Z][a-zA-Z0-9-]*", + unexpectedChars: "[!@#$^&',?+~`|:]" + }; + + var keywords = [ + "ALPHA", + "BIT", + "CHAR", + "CR", + "CRLF", + "CTL", + "DIGIT", + "DQUOTE", + "HEXDIG", + "HTAB", + "LF", + "LWSP", + "OCTET", + "SP", + "VCHAR", + "WSP" + ]; + + var commentMode = hljs.COMMENT(";", "$"); + + var terminalBinaryMode = { + className: "symbol", + begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/ + }; + + var terminalDecimalMode = { + className: "symbol", + begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/ + }; + + var terminalHexadecimalMode = { + className: "symbol", + begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/, + }; + + var caseSensitivityIndicatorMode = { + className: "symbol", + begin: /%[si]/ + }; + + var ruleDeclarationMode = { + className: "attribute", + begin: regexes.ruleDeclaration + '(?=\\s*=)', + }; + + return { + name: 'Augmented Backus-Naur Form', + illegal: regexes.unexpectedChars, + keywords: keywords.join(" "), + contains: [ + ruleDeclarationMode, + commentMode, + terminalBinaryMode, + terminalDecimalMode, + terminalHexadecimalMode, + caseSensitivityIndicatorMode, + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE + ] + }; +} + +module.exports = abnf; diff --git a/node_modules/highlight.js/lib/languages/accesslog.js b/node_modules/highlight.js/lib/languages/accesslog.js @@ -0,0 +1,75 @@ +/* + Language: Apache Access Log + Author: Oleg Efimov <efimovov@gmail.com> + Description: Apache/Nginx Access Logs + Website: https://httpd.apache.org/docs/2.4/logs.html#accesslog + */ + + /** @type LanguageFn */ +function accesslog(hljs) { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods + var HTTP_VERBS = [ + "GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "PATCH", "TRACE" + ]; + return { + name: 'Apache Access Log', + contains: [ + // IP + { + className: 'number', + begin: '^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b', + relevance:5 + }, + // Other numbers + { + className: 'number', + begin: '\\b\\d+\\b', + relevance: 0 + }, + // Requests + { + className: 'string', + begin: '"(' + HTTP_VERBS.join("|") + ')', end: '"', + keywords: HTTP_VERBS.join(" "), + illegal: '\\n', + relevance: 5, + contains: [{ + begin: 'HTTP/[12]\\.\\d', + relevance:5 + }] + }, + // Dates + { + className: 'string', + // dates must have a certain length, this prevents matching + // simple array accesses a[123] and [] and other common patterns + // found in other languages + begin: /\[\d[^\]\n]{8,}\]/, + illegal: '\\n', + relevance: 1 + }, + { + className: 'string', + begin: /\[/, end: /\]/, + illegal: '\\n', + relevance: 0 + }, + // User agent / relevance boost + { + className: 'string', + begin: '"Mozilla/\\d\\.\\d \\\(', end: '"', + illegal: '\\n', + relevance: 3 + }, + // Strings + { + className: 'string', + begin: '"', end: '"', + illegal: '\\n', + relevance: 0 + } + ] + }; +} + +module.exports = accesslog; diff --git a/node_modules/highlight.js/lib/languages/actionscript.js b/node_modules/highlight.js/lib/languages/actionscript.js @@ -0,0 +1,83 @@ +/* +Language: ActionScript +Author: Alexander Myadzel <myadzel@gmail.com> +Category: scripting +*/ + +/** @type LanguageFn */ +function actionscript(hljs) { + var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*'; + var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)'; + + var AS3_REST_ARG_MODE = { + className: 'rest_arg', + begin: '[.]{3}', end: IDENT_RE, + relevance: 10 + }; + + return { + name: 'ActionScript', + aliases: ['as'], + keywords: { + keyword: 'as break case catch class const continue default delete do dynamic each ' + + 'else extends final finally for function get if implements import in include ' + + 'instanceof interface internal is namespace native new override package private ' + + 'protected public return set static super switch this throw try typeof use var void ' + + 'while with', + literal: 'true false null undefined' + }, + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_NUMBER_MODE, + { + className: 'class', + beginKeywords: 'package', end: '{', + contains: [hljs.TITLE_MODE] + }, + { + className: 'class', + beginKeywords: 'class interface', end: '{', excludeEnd: true, + contains: [ + { + beginKeywords: 'extends implements' + }, + hljs.TITLE_MODE + ] + }, + { + className: 'meta', + beginKeywords: 'import include', end: ';', + keywords: {'meta-keyword': 'import include'} + }, + { + className: 'function', + beginKeywords: 'function', end: '[{;]', excludeEnd: true, + illegal: '\\S', + contains: [ + hljs.TITLE_MODE, + { + className: 'params', + begin: '\\(', end: '\\)', + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + AS3_REST_ARG_MODE + ] + }, + { + begin: ':\\s*' + IDENT_FUNC_RETURN_TYPE_RE + } + ] + }, + hljs.METHOD_GUARD + ], + illegal: /#/ + }; +} + +module.exports = actionscript; diff --git a/node_modules/highlight.js/lib/languages/ada.js b/node_modules/highlight.js/lib/languages/ada.js @@ -0,0 +1,185 @@ +/* +Language: Ada +Author: Lars Schulna <kartoffelbrei.mit.muskatnuss@gmail.org> +Description: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications. + It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation). + The first version appeared in the 80s, but it's still actively developed today with + the newest standard being Ada2012. +*/ + +// We try to support full Ada2012 +// +// We highlight all appearances of types, keywords, literals (string, char, number, bool) +// and titles (user defined function/procedure/package) +// CSS classes are set accordingly +// +// Languages causing problems for language detection: +// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword) +// sql (ada default.txt has a lot of sql keywords) + +/** @type LanguageFn */ +function ada(hljs) { + // Regular expression for Ada numeric literals. + // stolen form the VHDL highlighter + + // Decimal literal: + var INTEGER_RE = '\\d(_|\\d)*'; + var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE; + var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?'; + + // Based literal: + var BASED_INTEGER_RE = '\\w+'; + var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?'; + + var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')'; + + // Identifier regex + var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*'; + + // bad chars, only allowed in literals + var BAD_CHARS = `[]{}%#'"`; + + // Ada doesn't have block comments, only line comments + var COMMENTS = hljs.COMMENT('--', '$'); + + // variable declarations of the form + // Foo : Bar := Baz; + // where only Bar will be highlighted + var VAR_DECLS = { + // TODO: These spaces are not required by the Ada syntax + // however, I have yet to see handwritten Ada code where + // someone does not put spaces around : + begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)', + // endsWithParent: true, + // returnBegin: true, + illegal: BAD_CHARS, + contains: [ + { + // workaround to avoid highlighting + // named loops and declare blocks + beginKeywords: 'loop for declare others', + endsParent: true, + }, + { + // properly highlight all modifiers + className: 'keyword', + beginKeywords: 'not null constant access function procedure in out aliased exception' + }, + { + className: 'type', + begin: ID_REGEX, + endsParent: true, + relevance: 0, + } + ] + }; + + return { + name: 'Ada', + case_insensitive: true, + keywords: { + keyword: + 'abort else new return abs elsif not reverse abstract end ' + + '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 ' + + 'is raise use declare range delay limited record when delta loop rem while ' + + 'digits renames with do mod requeue xor', + literal: + 'True False', + }, + contains: [ + COMMENTS, + // strings "foobar" + { + className: 'string', + begin: /"/, end: /"/, + contains: [{begin: /""/, relevance: 0}] + }, + // characters '' + { + // character literals always contain one char + className: 'string', + begin: /'.'/ + }, + { + // number literals + className: 'number', + begin: NUMBER_RE, + relevance: 0 + }, + { + // Attributes + className: 'symbol', + begin: "'" + ID_REGEX, + }, + { + // package definition, maybe inside generic + className: 'title', + begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)', + keywords: 'package body', + excludeBegin: true, + excludeEnd: true, + illegal: BAD_CHARS + }, + { + // function/procedure declaration/definition + // maybe inside generic + begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)', + keywords: 'overriding function procedure with is renames return', + // we need to re-match the 'function' keyword, so that + // the title mode below matches only exactly once + returnBegin: true, + contains: + [ + COMMENTS, + { + // name of the function/procedure + className: 'title', + begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+', + end: '(\\(|\\s+|$)', + excludeBegin: true, + excludeEnd: true, + illegal: BAD_CHARS + }, + // 'self' + // // parameter types + VAR_DECLS, + { + // return type + className: 'type', + begin: '\\breturn\\s+', end: '(\\s+|;|$)', + keywords: 'return', + excludeBegin: true, + excludeEnd: true, + // we are done with functions + endsParent: true, + illegal: BAD_CHARS + + }, + ] + }, + { + // new type declarations + // maybe inside generic + className: 'type', + begin: '\\b(sub)?type\\s+', end: '\\s+', + keywords: 'type', + excludeBegin: true, + illegal: BAD_CHARS + }, + + // see comment above the definition + VAR_DECLS, + + // no markup + // relevance boosters for small snippets + // {begin: '\\s*=>\\s*'}, + // {begin: '\\s*:=\\s*'}, + // {begin: '\\s+:=\\s+'}, + ] + }; +} + +module.exports = ada; diff --git a/node_modules/highlight.js/lib/languages/angelscript.js b/node_modules/highlight.js/lib/languages/angelscript.js @@ -0,0 +1,117 @@ +/* +Language: AngelScript +Author: Melissa Geels <melissa@nimble.tools> +Category: scripting +Website: https://www.angelcode.com/angelscript/ +*/ + +/** @type LanguageFn */ +function angelscript(hljs) { + var builtInTypeMode = { + className: 'built_in', + begin: '\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)' + }; + + var objectHandleMode = { + className: 'symbol', + begin: '[a-zA-Z0-9_]+@' + }; + + var genericMode = { + className: 'keyword', + begin: '<', end: '>', + contains: [ builtInTypeMode, objectHandleMode ] + }; + + builtInTypeMode.contains = [ genericMode ]; + objectHandleMode.contains = [ genericMode ]; + + return { + name: 'AngelScript', + aliases: ['asc'], + + keywords: + 'for in|0 break continue while do|0 return if else case switch namespace is cast ' + + 'or and xor not get|0 in inout|10 out override set|0 private public const default|0 ' + + 'final shared external mixin|10 enum typedef funcdef this super import from interface ' + + 'abstract|0 try catch protected explicit property', + + // avoid close detection with C# and JS + illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\s*[^\\(])', + + contains: [ + { // 'strings' + className: 'string', + begin: '\'', end: '\'', + illegal: '\\n', + contains: [ hljs.BACKSLASH_ESCAPE ], + relevance: 0 + }, + + { // "strings" + className: 'string', + begin: '"', end: '"', + illegal: '\\n', + contains: [ hljs.BACKSLASH_ESCAPE ], + relevance: 0 + }, + + // """heredoc strings""" + { + className: 'string', + begin: '"""', end: '"""' + }, + + hljs.C_LINE_COMMENT_MODE, // single-line comments + hljs.C_BLOCK_COMMENT_MODE, // comment blocks + + { // interface or namespace declaration + beginKeywords: 'interface namespace', end: '{', + illegal: '[;.\\-]', + contains: [ + { // interface or namespace name + className: 'symbol', + begin: '[a-zA-Z0-9_]+' + } + ] + }, + + { // class declaration + beginKeywords: 'class', end: '{', + illegal: '[;.\\-]', + contains: [ + { // class name + className: 'symbol', + begin: '[a-zA-Z0-9_]+', + contains: [ + { + begin: '[:,]\\s*', + contains: [ + { + className: 'symbol', + begin: '[a-zA-Z0-9_]+' + } + ] + } + ] + } + ] + }, + + builtInTypeMode, // built-in types + objectHandleMode, // object handles + + { // literals + className: 'literal', + begin: '\\b(null|true|false)' + }, + + { // numbers + className: 'number', + begin: '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)' + } + ] + }; +} + +module.exports = angelscript; diff --git a/node_modules/highlight.js/lib/languages/apache.js b/node_modules/highlight.js/lib/languages/apache.js @@ -0,0 +1,76 @@ +/* +Language: Apache config +Author: Ruslan Keba <rukeba@gmail.com> +Contributors: Ivan Sagalaev <maniac@softwaremaniacs.org> +Website: https://httpd.apache.org +Description: language definition for Apache configuration files (httpd.conf & .htaccess) +Category: common, config +*/ + +/** @type LanguageFn */ +function apache(hljs) { + var NUMBER_REF = {className: 'number', begin: '[\\$%]\\d+'}; + var NUMBER = {className: 'number', begin: '\\d+'}; + var IP_ADDRESS = { + className: "number", + begin: '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?' + }; + var PORT_NUMBER = { + className: "number", + begin: ":\\d{1,5}" + }; + return { + name: 'Apache config', + aliases: ['apacheconf'], + case_insensitive: true, + contains: [ + hljs.HASH_COMMENT_MODE, + {className: 'section', begin: '</?', end: '>', + contains: [ + IP_ADDRESS, + PORT_NUMBER, + // low relevance prevents us from claming XML/HTML where this rule would + // match strings inside of XML tags + hljs.inherit(hljs.QUOTE_STRING_MODE, { relevance:0 }) + ] + }, + { + className: 'attribute', + begin: /\w+/, + relevance: 0, + // keywords aren’t needed for highlighting per se, they only boost relevance + // for a very generally defined mode (starts with a word, ends with line-end + keywords: { + nomarkup: + 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' + + 'sethandler errordocument loadmodule options header listen serverroot ' + + 'servername' + }, + starts: { + end: /$/, + relevance: 0, + keywords: { + literal: 'on off all deny allow' + }, + contains: [ + { + className: 'meta', + begin: '\\s\\[', end: '\\]$' + }, + { + className: 'variable', + begin: '[\\$%]\\{', end: '\\}', + contains: ['self', NUMBER_REF] + }, + IP_ADDRESS, + NUMBER, + hljs.QUOTE_STRING_MODE + ] + } + } + ], + illegal: /\S/ + }; +} + +module.exports = apache; diff --git a/node_modules/highlight.js/lib/languages/applescript.js b/node_modules/highlight.js/lib/languages/applescript.js @@ -0,0 +1,96 @@ +/* +Language: AppleScript +Authors: Nathan Grigg <nathan@nathanamy.org>, Dr. Drang <drdrang@gmail.com> +Category: scripting +Website: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html +*/ + +/** @type LanguageFn */ +function applescript(hljs) { + var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''}); + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)', + contains: ['self', hljs.C_NUMBER_MODE, STRING] + }; + var COMMENT_MODE_1 = hljs.COMMENT('--', '$'); + var COMMENT_MODE_2 = hljs.COMMENT( + '\\(\\*', + '\\*\\)', + { + contains: ['self', COMMENT_MODE_1] //allow nesting + } + ); + var COMMENTS = [ + COMMENT_MODE_1, + COMMENT_MODE_2, + hljs.HASH_COMMENT_MODE + ]; + + return { + name: 'AppleScript', + aliases: ['osascript'], + keywords: { + keyword: + '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|0 then third through thru ' + + 'timeout times to transaction try until where while whose with ' + + 'without', + literal: + 'AppleScript false linefeed return pi quote result space tab true', + built_in: + 'alias application boolean class constant date file integer list ' + + 'number real record string text ' + + 'activate beep count delay launch log offset read round ' + + 'run say summarize write ' + + 'character characters contents day frontmost id item length ' + + 'month name paragraph paragraphs rest reverse running time version ' + + 'weekday word words year' + }, + contains: [ + STRING, + hljs.C_NUMBER_MODE, + { + className: 'built_in', + begin: + '\\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' + }, + { + className: 'literal', + begin: + '\\b(text item delimiters|current application|missing value)\\b' + }, + { + className: 'keyword', + begin: + '\\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)|POSIX file|' + + 'POSIX path|(date|time) string|quoted form)\\b' + }, + { + beginKeywords: 'on', + illegal: '[${=;\\n]', + contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS] + } + ].concat(COMMENTS), + illegal: '//|->|=>|\\[\\[' + }; +} + +module.exports = applescript; diff --git a/node_modules/highlight.js/lib/languages/arcade.js b/node_modules/highlight.js/lib/languages/arcade.js @@ -0,0 +1,148 @@ +/* + Language: ArcGIS Arcade + Category: scripting + Author: John Foster <jfoster@esri.com> + Website: https://developers.arcgis.com/arcade/ + Description: ArcGIS Arcade is an expression language used in many Esri ArcGIS products such as Pro, Online, Server, Runtime, JavaScript, and Python +*/ + +/** @type LanguageFn */ +function arcade(hljs) { + var IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*'; + var KEYWORDS = { + keyword: + 'if for while var new function do return void else break', + literal: + 'BackSlash DoubleQuote false ForwardSlash Infinity NaN NewLine null PI SingleQuote Tab TextFormatting true undefined', + built_in: + 'Abs Acos Angle Attachments Area AreaGeodetic Asin Atan Atan2 Average Bearing Boolean Buffer BufferGeodetic ' + + 'Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd ' + + 'DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance DistanceGeodetic Distinct ' + + 'DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetByAssociation FeatureSetById FeatureSetByPortalItem ' + + 'FeatureSetByRelationshipName FeatureSetByTitle FeatureSetByUrl Filter First Floor Geometry GroupBy Guid HasKey Hour IIf IndexOf ' + + 'Intersection Intersects IsEmpty IsNan IsSelfIntersecting Length LengthGeodetic Log Max Mean Millisecond Min Minute Month ' + + 'MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon ' + + 'Polyline Portal Pow Random Relate Reverse RingIsClockWise Round Second SetGeometry Sin Sort Sqrt Stdev Sum ' + + 'SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TrackCurrentTime ' + + 'TrackGeometryWindow TrackIndex TrackStartTime TrackWindow TypeOf Union UrlEncode Variance ' + + 'Weekday When Within Year ' + }; + var SYMBOL = { + className: 'symbol', + begin: '\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+' + }; + var NUMBER = { + className: 'number', + variants: [ + { begin: '\\b(0[bB][01]+)' }, + { begin: '\\b(0[oO][0-7]+)' }, + { begin: hljs.C_NUMBER_RE } + ], + relevance: 0 + }; + var SUBST = { + className: 'subst', + begin: '\\$\\{', end: '\\}', + keywords: KEYWORDS, + contains: [] // defined later + }; + var TEMPLATE_STRING = { + className: 'string', + begin: '`', end: '`', + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ] + }; + SUBST.contains = [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + TEMPLATE_STRING, + NUMBER, + hljs.REGEXP_MODE + ]; + var PARAMS_CONTAINS = SUBST.contains.concat([ + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_LINE_COMMENT_MODE + ]); + + return { + name: 'ArcGIS Arcade', + aliases: ['arcade'], + keywords: KEYWORDS, + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + TEMPLATE_STRING, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + SYMBOL, + NUMBER, + { // object attr container + begin: /[{,]\s*/, relevance: 0, + contains: [ + { + begin: IDENT_RE + '\\s*:', returnBegin: true, + relevance: 0, + contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}] + } + ] + }, + { // "value" container + begin: '(' + hljs.RE_STARTERS_RE + '|\\b(return)\\b)\\s*', + keywords: 'return', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.REGEXP_MODE, + { + className: 'function', + begin: '(\\(.*?\\)|' + IDENT_RE + ')\\s*=>', returnBegin: true, + end: '\\s*=>', + contains: [ + { + className: 'params', + variants: [ + { + begin: IDENT_RE + }, + { + begin: /\(\s*\)/, + }, + { + begin: /\(/, end: /\)/, + excludeBegin: true, excludeEnd: true, + keywords: KEYWORDS, + contains: PARAMS_CONTAINS + } + ] + } + ] + } + ], + relevance: 0 + }, + { + className: 'function', + beginKeywords: 'function', end: /\{/, excludeEnd: true, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}), + { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + contains: PARAMS_CONTAINS + } + ], + illegal: /\[|%/ + }, + { + begin: /\$[(.]/ + } + ], + illegal: /#(?!!)/ + }; +} + +module.exports = arcade; diff --git a/node_modules/highlight.js/lib/languages/arduino.js b/node_modules/highlight.js/lib/languages/arduino.js @@ -0,0 +1,112 @@ +/* +Language: Arduino +Author: Stefania Mellai <s.mellai@arduino.cc> +Description: The Arduino® Language is a superset of C++. This rules are designed to highlight the Arduino® source code. For info about language see http://www.arduino.cc. +Requires: cpp.js +Website: https://www.arduino.cc +*/ + +/** @type LanguageFn */ +function arduino(hljs) { + + var ARDUINO_KW = { + keyword: + 'boolean byte word String', + built_in: + 'setup loop ' + + 'KeyboardController MouseController SoftwareSerial ' + + 'EthernetServer EthernetClient LiquidCrystal ' + + 'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' + + 'HttpClient RobotMotor WiFiClient GSMScanner ' + + 'FileSystem Scheduler GSMServer YunClient YunServer ' + + 'IPAddress GSMClient GSMModem Keyboard Ethernet ' + + 'Console GSMBand Esplora Stepper Process ' + + 'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' + + 'Client Server GSMPIN FileIO Bridge Serial ' + + 'EEPROM Stream Mouse Audio Servo File Task ' + + 'GPRS WiFi Wire TFT GSM SPI SD ' + + 'runShellCommandAsynchronously analogWriteResolution ' + + 'retrieveCallingNumber printFirmwareVersion ' + + 'analogReadResolution sendDigitalPortPair ' + + 'noListenOnLocalhost readJoystickButton setFirmwareVersion ' + + 'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' + + 'scrollDisplayLeft writeMicroseconds delayMicroseconds ' + + 'beginTransmission getSignalStrength runAsynchronously ' + + 'getAsynchronously listenOnLocalhost getCurrentCarrier ' + + 'readAccelerometer messageAvailable sendDigitalPorts ' + + 'lineFollowConfig countryNameWrite runShellCommand ' + + 'readStringUntil rewindDirectory readTemperature ' + + 'setClockDivider readLightSensor endTransmission ' + + 'analogReference detachInterrupt countryNameRead ' + + 'attachInterrupt encryptionType readBytesUntil ' + + 'robotNameWrite readMicrophone robotNameRead cityNameWrite ' + + 'userNameWrite readJoystickY readJoystickX mouseReleased ' + + 'openNextFile scanNetworks noInterrupts digitalWrite ' + + 'beginSpeaker mousePressed isActionDone mouseDragged ' + + 'displayLogos noAutoscroll addParameter remoteNumber ' + + 'getModifiers keyboardRead userNameRead waitContinue ' + + 'processInput parseCommand printVersion readNetworks ' + + 'writeMessage blinkVersion cityNameRead readMessage ' + + 'setDataMode parsePacket isListening setBitOrder ' + + 'beginPacket isDirectory motorsWrite drawCompass ' + + 'digitalRead clearScreen serialEvent rightToLeft ' + + 'setTextSize leftToRight requestFrom keyReleased ' + + 'compassRead analogWrite interrupts WiFiServer ' + + 'disconnect playMelody parseFloat autoscroll ' + + 'getPINUsed setPINUsed setTimeout sendAnalog ' + + 'readSlider analogRead beginWrite createChar ' + + 'motorsStop keyPressed tempoWrite readButton ' + + 'subnetMask debugPrint macAddress writeGreen ' + + 'randomSeed attachGPRS readString sendString ' + + 'remotePort releaseAll mouseMoved background ' + + 'getXChange getYChange answerCall getResult ' + + 'voiceCall endPacket constrain getSocket writeJSON ' + + 'getButton available connected findUntil readBytes ' + + 'exitValue readGreen writeBlue startLoop IPAddress ' + + 'isPressed sendSysex pauseMode gatewayIP setCursor ' + + 'getOemKey tuneWrite noDisplay loadImage switchPIN ' + + 'onRequest onReceive changePIN playFile noBuffer ' + + 'parseInt overflow checkPIN knobRead beginTFT ' + + 'bitClear updateIR bitWrite position writeRGB ' + + 'highByte writeRed setSpeed readBlue noStroke ' + + 'remoteIP transfer shutdown hangCall beginSMS ' + + 'endWrite attached maintain noCursor checkReg ' + + 'checkPUK shiftOut isValid shiftIn pulseIn ' + + 'connect println localIP pinMode getIMEI ' + + 'display noBlink process getBand running beginSD ' + + 'drawBMP lowByte setBand release bitRead prepare ' + + 'pointTo readRed setMode noFill remove listen ' + + 'stroke detach attach noTone exists buffer ' + + 'height bitSet circle config cursor random ' + + 'IRread setDNS endSMS getKey micros ' + + 'millis begin print write ready flush width ' + + 'isPIN blink clear press mkdir rmdir close ' + + 'point yield image BSSID click delay ' + + 'read text move peek beep rect line open ' + + 'seek fill size turn stop home find ' + + 'step tone sqrt RSSI SSID ' + + 'end bit tan cos sin pow map abs max ' + + 'min get run put', + literal: + 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' + + 'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' + + 'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' + + 'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' + + 'DEFAULT OUTPUT INPUT HIGH LOW' + }; + + var ARDUINO = hljs.requireLanguage('cpp').rawDefinition(); + + var kws = ARDUINO.keywords; + + kws.keyword += ' ' + ARDUINO_KW.keyword; + kws.literal += ' ' + ARDUINO_KW.literal; + kws.built_in += ' ' + ARDUINO_KW.built_in; + + ARDUINO.name = 'Arduino'; + ARDUINO.aliases = ['ino']; + + return ARDUINO; +} + +module.exports = arduino; diff --git a/node_modules/highlight.js/lib/languages/armasm.js b/node_modules/highlight.js/lib/languages/armasm.js @@ -0,0 +1,111 @@ +/* +Language: ARM Assembly +Author: Dan Panzarella <alsoelp@gmail.com> +Description: ARM Assembly including Thumb and Thumb2 instructions +Category: assembler +*/ + +/** @type LanguageFn */ +function armasm(hljs) { + //local labels: %?[FB]?[AT]?\d{1,2}\w+ + + const COMMENT = { + variants: [ + hljs.COMMENT('^[ \\t]*(?=#)', '$', {relevance: 0, excludeBegin: true }), + hljs.COMMENT('[;@]', '$', {relevance: 0}), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + ] + }; + + return { + name: 'ARM Assembly', + case_insensitive: true, + aliases: ['arm'], + keywords: { + $pattern: '\\.?' + hljs.IDENT_RE, + meta: + //GNU preprocs + '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+ + //ARM directives + 'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ', + built_in: + 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers + 'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility + 'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp + 'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs + 'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc + 'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs + + //program status registers + 'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+ + 'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+ + + //NEON and VFP registers + 's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+ + 's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+ + 'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+ + 'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' + + + '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @' + }, + contains: [ + { + className: 'keyword', + begin: '\\b('+ //mnemonics + 'adc|'+ + '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+ + 'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+ + 'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+ + 'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+ + 'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+ + 'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+ + 'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+ + 'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+ + 'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+ + 'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+ + '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+ + 'wfe|wfi|yield'+ + ')'+ + '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes + '[sptrx]?' + //legal postfixes + '(?=\\s)' // followed by space + }, + COMMENT, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '\'', + end: '[^\\\\]\'', + relevance: 0 + }, + { + className: 'title', + begin: '\\|', end: '\\|', + illegal: '\\n', + relevance: 0 + }, + { + className: 'number', + variants: [ + {begin: '[#$=]?0x[0-9a-f]+'}, //hex + {begin: '[#$=]?0b[01]+'}, //bin + {begin: '[#$=]\\d+'}, //literal + {begin: '\\b\\d+'} //bare number + ], + relevance: 0 + }, + { + className: 'symbol', + variants: [ + {begin: '^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU ARM syntax + {begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'}, //ARM syntax + {begin: '[=#]\\w+' } //label reference + ], + relevance: 0 + } + ] + }; +} + +module.exports = armasm; diff --git a/node_modules/highlight.js/lib/languages/asciidoc.js b/node_modules/highlight.js/lib/languages/asciidoc.js @@ -0,0 +1,200 @@ +/* +Language: AsciiDoc +Requires: xml.js +Author: Dan Allen <dan.j.allen@gmail.com> +Website: http://asciidoc.org +Description: A semantic, text-based document format that can be exported to HTML, DocBook and other backends. +Category: markup +*/ + +/** @type LanguageFn */ +function asciidoc(hljs) { + return { + name: 'AsciiDoc', + aliases: ['adoc'], + contains: [ + // block comment + hljs.COMMENT( + '^/{4,}\\n', + '\\n/{4,}$', + // can also be done as... + //'^/{4,}$', + //'^/{4,}$', + { + relevance: 10 + } + ), + // line comment + hljs.COMMENT( + '^//', + '$', + { + relevance: 0 + } + ), + // title + { + className: 'title', + begin: '^\\.\\w.*$' + }, + // example, admonition & sidebar blocks + { + begin: '^[=\\*]{4,}\\n', + end: '\\n^[=\\*]{4,}$', + relevance: 10 + }, + // headings + { + className: 'section', + relevance: 10, + variants: [ + {begin: '^(={1,5}) .+?( \\1)?$'}, + {begin: '^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$'}, + ] + }, + // document attributes + { + className: 'meta', + begin: '^:.+?:', + end: '\\s', + excludeEnd: true, + relevance: 10 + }, + // block attributes + { + className: 'meta', + begin: '^\\[.+?\\]$', + relevance: 0 + }, + // quoteblocks + { + className: 'quote', + begin: '^_{4,}\\n', + end: '\\n_{4,}$', + relevance: 10 + }, + // listing and literal blocks + { + className: 'code', + begin: '^[\\-\\.]{4,}\\n', + end: '\\n[\\-\\.]{4,}$', + relevance: 10 + }, + // passthrough blocks + { + begin: '^\\+{4,}\\n', + end: '\\n\\+{4,}$', + contains: [ + { + begin: '<', end: '>', + subLanguage: 'xml', + relevance: 0 + } + ], + relevance: 10 + }, + // lists (can only capture indicators) + { + className: 'bullet', + begin: '^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+' + }, + // admonition + { + className: 'symbol', + begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+', + relevance: 10 + }, + // inline strong + { + className: 'strong', + // must not follow a word character or be followed by an asterisk or space + begin: '\\B\\*(?![\\*\\s])', + end: '(\\n{2}|\\*)', + // allow escaped asterisk followed by word char + contains: [ + { + begin: '\\\\*\\w', + relevance: 0 + } + ] + }, + // inline emphasis + { + className: 'emphasis', + // must not follow a word character or be followed by a single quote or space + begin: '\\B\'(?![\'\\s])', + end: '(\\n{2}|\')', + // allow escaped single quote followed by word char + contains: [ + { + begin: '\\\\\'\\w', + relevance: 0 + } + ], + relevance: 0 + }, + // inline emphasis (alt) + { + className: 'emphasis', + // must not follow a word character or be followed by an underline or space + begin: '_(?![_\\s])', + end: '(\\n{2}|_)', + relevance: 0 + }, + // inline smart quotes + { + className: 'string', + variants: [ + {begin: "``.+?''"}, + {begin: "`.+?'"} + ] + }, + // inline code snippets (TODO should get same treatment as strong and emphasis) + { + className: 'code', + begin: '(`.+?`|\\+.+?\\+)', + relevance: 0 + }, + // indented literal block + { + className: 'code', + begin: '^[ \\t]', + end: '$', + relevance: 0 + }, + // horizontal rules + { + begin: '^\'{3,}[ \\t]*$', + relevance: 10 + }, + // images and links + { + begin: '(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]', + returnBegin: true, + contains: [ + { + begin: '(link|image:?):', + relevance: 0 + }, + { + className: 'link', + begin: '\\w', + end: '[^\\[]+', + relevance: 0 + }, + { + className: 'string', + begin: '\\[', + end: '\\]', + excludeBegin: true, + excludeEnd: true, + relevance: 0 + } + ], + relevance: 10 + } + ] + }; +} + +module.exports = asciidoc; diff --git a/node_modules/highlight.js/lib/languages/aspectj.js b/node_modules/highlight.js/lib/languages/aspectj.js @@ -0,0 +1,155 @@ +/* +Language: AspectJ +Author: Hakan Ozler <ozler.hakan@gmail.com> +Website: https://www.eclipse.org/aspectj/ +Description: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language. + */ + +/** @type LanguageFn */ +function aspectj(hljs) { + var KEYWORDS = + 'false synchronized int abstract float private char boolean static null if const ' + + 'for true while long throw strictfp finally protected import native final return void ' + + 'enum else extends implements break transient new catch instanceof byte super volatile case ' + + 'assert short package default double public try this switch continue throws privileged ' + + 'aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization ' + + 'staticinitialization withincode target within execution getWithinTypeName handler ' + + 'thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents '+ + 'warning error soft precedence thisAspectInstance'; + var SHORTKEYS = 'get set args call'; + return { + name: 'AspectJ', + keywords : KEYWORDS, + illegal : /<\/|#/, + contains : [ + hljs.COMMENT( + '/\\*\\*', + '\\*/', + { + relevance : 0, + contains : [ + { + // eat up @'s in emails to prevent them to be recognized as doctags + begin: /\w+@/, relevance: 0 + }, + { + className : 'doctag', + begin : '@[A-Za-z]+' + } + ] + } + ), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className : 'class', + beginKeywords : 'aspect', + end : /[{;=]/, + excludeEnd : true, + illegal : /[:;"\[\]]/, + contains : [ + { + beginKeywords : 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton' + }, + hljs.UNDERSCORE_TITLE_MODE, + { + begin : /\([^\)]*/, + end : /[)]+/, + keywords : KEYWORDS + ' ' + SHORTKEYS, + excludeEnd : false + } + ] + }, + { + className : 'class', + beginKeywords : 'class interface', + end : /[{;=]/, + excludeEnd : true, + relevance: 0, + keywords : 'class interface', + illegal : /[:"\[\]]/, + contains : [ + {beginKeywords : 'extends implements'}, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + // AspectJ Constructs + beginKeywords : 'pointcut after before around throwing returning', + end : /[)]/, + excludeEnd : false, + illegal : /["\[\]]/, + contains : [ + { + begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', + returnBegin : true, + contains : [hljs.UNDERSCORE_TITLE_MODE] + } + ] + }, + { + begin : /[:]/, + returnBegin : true, + end : /[{;]/, + relevance: 0, + excludeEnd : false, + keywords : KEYWORDS, + illegal : /["\[\]]/, + contains : [ + { + begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', + keywords : KEYWORDS + ' ' + SHORTKEYS, + relevance: 0 + }, + hljs.QUOTE_STRING_MODE + ] + }, + { + // this prevents 'new Name(...), or throw ...' from being recognized as a function definition + beginKeywords : 'new throw', + relevance : 0 + }, + { + // the function class is a bit different for AspectJ compared to the Java language + className : 'function', + begin : /\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/, + returnBegin : true, + end : /[{;=]/, + keywords : KEYWORDS, + excludeEnd : true, + contains : [ + { + begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', + returnBegin : true, + relevance: 0, + contains : [hljs.UNDERSCORE_TITLE_MODE] + }, + { + className : 'params', + begin : /\(/, end : /\)/, + relevance: 0, + keywords : KEYWORDS, + contains : [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + hljs.C_NUMBER_MODE, + { + // annotation is also used in this language + className : 'meta', + begin : '@[A-Za-z]+' + } + ] + }; +} + +module.exports = aspectj; diff --git a/node_modules/highlight.js/lib/languages/autohotkey.js b/node_modules/highlight.js/lib/languages/autohotkey.js @@ -0,0 +1,68 @@ +/* +Language: AutoHotkey +Author: Seongwon Lee <dlimpid@gmail.com> +Description: AutoHotkey language definition +Category: scripting +*/ + +/** @type LanguageFn */ +function autohotkey(hljs) { + var BACKTICK_ESCAPE = { + begin: '`[\\s\\S]' + }; + + return { + name: 'AutoHotkey', + case_insensitive: true, + aliases: ['ahk'], + keywords: { + keyword: 'Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group', + literal: 'true false NOT AND OR', + built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel', + }, + contains: [ + BACKTICK_ESCAPE, + hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}), + hljs.COMMENT(';', '$', {relevance: 0}), + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'number', + begin: hljs.NUMBER_RE, + relevance: 0 + }, + { + className: 'variable', //subst would be the most accurate however fails the point of highlighting. variable is comparably the most accurate that actually has some effect + begin: '%[a-zA-Z0-9#_$@]+%' + }, + { + className: 'built_in', + begin: '^\\s*\\w+\\s*(,|%)' + //I don't really know if this is totally relevant + }, + { + className: 'title', //symbol would be most accurate however is highlighted just like built_in and that makes up a lot of AutoHotkey code + //meaning that it would fail to highlight anything + variants: [ + {begin: '^[^\\n";]+::(?!=)'}, + {begin: '^[^\\n";]+:(?!=)', relevance: 0} // zero relevance as it catches a lot of things + // followed by a single ':' in many languages + ] + }, + { + className: 'meta', + begin: '^\\s*#\\w+', end:'$', + relevance: 0 + }, + { + className: 'built_in', + begin: 'A_[a-zA-Z0-9]+' + }, + { + // consecutive commas, not for highlighting but just for relevance + begin: ',\\s*,' + } + ] + } +} + +module.exports = autohotkey; diff --git a/node_modules/highlight.js/lib/languages/autoit.js b/node_modules/highlight.js/lib/languages/autoit.js @@ -0,0 +1,146 @@ +/* +Language: AutoIt +Author: Manh Tuan <junookyo@gmail.com> +Description: AutoIt language definition +Category: scripting +*/ + +/** @type LanguageFn */ +function autoit(hljs) { + var KEYWORDS = 'ByRef Case Const ContinueCase ContinueLoop ' + + 'Default Dim Do Else ElseIf EndFunc EndIf EndSelect ' + + 'EndSwitch EndWith Enum Exit ExitLoop For Func ' + + 'Global If In Local Next ReDim Return Select Static ' + + 'Step Switch Then To Until Volatile WEnd While With', + + LITERAL = 'True False And Null Not Or', + + BUILT_IN = + 'Abs ACos AdlibRegister AdlibUnRegister 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 DllCallAddress 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 FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName 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 GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont 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 HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch 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 StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup 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 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', + + COMMENT = { + variants: [ + hljs.COMMENT(';', '$', {relevance: 0}), + hljs.COMMENT('#cs', '#ce'), + hljs.COMMENT('#comments-start', '#comments-end') + ] + }, + + VARIABLE = { + begin: '\\$[A-z0-9_]+' + }, + + STRING = { + className: 'string', + variants: [{ + begin: /"/, + end: /"/, + contains: [{ + begin: /""/, + relevance: 0 + }] + }, { + begin: /'/, + end: /'/, + contains: [{ + begin: /''/, + relevance: 0 + }] + }] + }, + + NUMBER = { + variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE] + }, + + PREPROCESSOR = { + className: 'meta', + begin: '#', + end: '$', + keywords: {'meta-keyword': 'comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin'}, + contains: [{ + begin: /\\\n/, + relevance: 0 + }, { + beginKeywords: 'include', + keywords: {'meta-keyword': 'include'}, + end: '$', + contains: [ + STRING, { + className: 'meta-string', + variants: [{ + begin: '<', + end: '>' + }, { + begin: /"/, + end: /"/, + contains: [{ + begin: /""/, + relevance: 0 + }] + }, { + begin: /'/, + end: /'/, + contains: [{ + begin: /''/, + relevance: 0 + }] + }] + } + ] + }, + STRING, + COMMENT + ] + }, + + CONSTANT = { + className: 'symbol', + // begin: '@', + // end: '$', + // keywords: 'AppDataCommonDir AppDataDir AutoItExe AutoItPID AutoItVersion AutoItX64 COM_EventObj CommonFilesDir Compiled ComputerName ComSpec CPUArch 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 IPAddress1 IPAddress2 IPAddress3 IPAddress4 KBLayout LF LocalAppDataDir LogonDNSDomain LogonDomain LogonServer MDAY MIN MON MSEC MUILang MyDocumentsDir NumParams OSArch OSBuild OSLang OSServicePack OSType OSVersion 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', + // relevance: 5 + begin: '@[A-z0-9_]+' + }, + + FUNCTION = { + className: 'function', + beginKeywords: 'Func', + end: '$', + illegal: '\\$|\\[|%', + contains: [ + hljs.UNDERSCORE_TITLE_MODE, { + className: 'params', + begin: '\\(', + end: '\\)', + contains: [ + VARIABLE, + STRING, + NUMBER + ] + } + ] + }; + + return { + name: 'AutoIt', + case_insensitive: true, + illegal: /\/\*/, + keywords: { + keyword: KEYWORDS, + built_in: BUILT_IN, + literal: LITERAL + }, + contains: [ + COMMENT, + VARIABLE, + STRING, + NUMBER, + PREPROCESSOR, + CONSTANT, + FUNCTION + ] + } +} + +module.exports = autoit; diff --git a/node_modules/highlight.js/lib/languages/avrasm.js b/node_modules/highlight.js/lib/languages/avrasm.js @@ -0,0 +1,72 @@ +/* +Language: AVR Assembly +Author: Vladimir Ermakov <vooon341@gmail.com> +Category: assembler +Website: https://www.microchip.com/webdoc/avrassembler/avrassembler.wb_instruction_list.html +*/ + +/** @type LanguageFn */ +function avrasm(hljs) { + return { + name: 'AVR Assembly', + case_insensitive: true, + keywords: { + $pattern: '\\.?' + hljs.IDENT_RE, + keyword: + /* mnemonic */ + 'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' + + 'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' + + 'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' + + 'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' + + 'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' + + 'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' + + 'subi swap tst wdr', + built_in: + /* general purpose registers */ + 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' + + 'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' + + /* IO Registers (ATMega128) */ + 'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' + + 'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' + + 'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' + + 'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' + + 'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' + + 'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' + + 'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' + + 'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf', + meta: + '.byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list ' + + '.listmac .macro .nolist .org .set' + }, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + hljs.COMMENT( + ';', + '$', + { + relevance: 0 + } + ), + hljs.C_NUMBER_MODE, // 0x..., decimal, float + hljs.BINARY_NUMBER_MODE, // 0b... + { + className: 'number', + begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o... + }, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '\'', end: '[^\\\\]\'', + illegal: '[^\\\\][^\']' + }, + {className: 'symbol', begin: '^[A-Za-z0-9_.$]+:'}, + {className: 'meta', begin: '#', end: '$'}, + { // substitution within a macro + className: 'subst', + begin: '@[0-9]+' + } + ] + }; +} + +module.exports = avrasm; diff --git a/node_modules/highlight.js/lib/languages/awk.js b/node_modules/highlight.js/lib/languages/awk.js @@ -0,0 +1,63 @@ +/* +Language: Awk +Author: Matthew Daly <matthewbdaly@gmail.com> +Website: https://www.gnu.org/software/gawk/manual/gawk.html +Description: language definition for Awk scripts +*/ + +/** @type LanguageFn */ +function awk(hljs) { + var VARIABLE = { + className: 'variable', + variants: [ + {begin: /\$[\w\d#@][\w\d_]*/}, + {begin: /\$\{(.*?)}/} + ] + }; + var KEYWORDS = 'BEGIN END if else while do for in break continue delete next nextfile function func exit|10'; + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + { + begin: /(u|b)?r?'''/, end: /'''/, + relevance: 10 + }, + { + begin: /(u|b)?r?"""/, end: /"""/, + relevance: 10 + }, + { + begin: /(u|r|ur)'/, end: /'/, + relevance: 10 + }, + { + begin: /(u|r|ur)"/, end: /"/, + relevance: 10 + }, + { + begin: /(b|br)'/, end: /'/ + }, + { + begin: /(b|br)"/, end: /"/ + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }; + return { + name: 'Awk', + keywords: { + keyword: KEYWORDS + }, + contains: [ + VARIABLE, + STRING, + hljs.REGEXP_MODE, + hljs.HASH_COMMENT_MODE, + hljs.NUMBER_MODE + ] + } +} + +module.exports = awk; diff --git a/node_modules/highlight.js/lib/languages/axapta.js b/node_modules/highlight.js/lib/languages/axapta.js @@ -0,0 +1,41 @@ +/* +Language: Microsoft Axapta (now Dynamics 365) +Author: Dmitri Roudakov <dmitri@roudakov.ru> +Website: https://dynamics.microsoft.com/en-us/ax-overview/ +Category: enterprise +*/ + +/** @type LanguageFn */ +function axapta(hljs) { + return { + name: 'Dynamics 365', + keywords: 'false int abstract private char boolean static null if for true ' + + 'while long throw finally protected final return void enum else ' + + 'break new catch byte super case short default double public try this switch ' + + 'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' + + 'order group by asc desc index hint like dispaly edit client server ttsbegin ' + + 'ttscommit str real date container anytype common div mod', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'meta', + begin: '#', end: '$' + }, + { + className: 'class', + beginKeywords: 'class interface', end: '{', excludeEnd: true, + illegal: ':', + contains: [ + {beginKeywords: 'extends implements'}, + hljs.UNDERSCORE_TITLE_MODE + ] + } + ] + }; +} + +module.exports = axapta; diff --git a/node_modules/highlight.js/lib/languages/bash.js b/node_modules/highlight.js/lib/languages/bash.js @@ -0,0 +1,125 @@ +/* +Language: Bash +Author: vah <vahtenberg@gmail.com> +Contributrors: Benjamin Pannell <contact@sierrasoftworks.com> +Website: https://www.gnu.org/software/bash/ +Category: common +*/ + +/** @type LanguageFn */ +function bash(hljs) { + const VAR = {}; + const BRACED_VAR = { + begin: /\$\{/, end:/\}/, + contains: [ + { begin: /:-/, contains: [VAR] } // default values + ] + }; + Object.assign(VAR,{ + className: 'variable', + variants: [ + {begin: /\$[\w\d#@][\w\d_]*/}, + BRACED_VAR + ] + }); + + const SUBST = { + className: 'subst', + begin: /\$\(/, end: /\)/, + contains: [hljs.BACKSLASH_ESCAPE] + }; + const QUOTE_STRING = { + className: 'string', + begin: /"/, end: /"/, + contains: [ + hljs.BACKSLASH_ESCAPE, + VAR, + SUBST + ] + }; + SUBST.contains.push(QUOTE_STRING); + const ESCAPED_QUOTE = { + className: '', + begin: /\\"/ + + }; + const APOS_STRING = { + className: 'string', + begin: /'/, end: /'/ + }; + const ARITHMETIC = { + begin: /\$\(\(/, + end: /\)\)/, + contains: [ + { begin: /\d+#[0-9a-f]+/, className: "number" }, + hljs.NUMBER_MODE, + VAR + ] + }; + const SH_LIKE_SHELLS = [ + "fish", + "bash", + "zsh", + "sh", + "csh", + "ksh", + "tcsh", + "dash", + "scsh", + ]; + const KNOWN_SHEBANG = hljs.SHEBANG({ + binary: `(${SH_LIKE_SHELLS.join("|")})`, + relevance: 10 + }); + const FUNCTION = { + className: 'function', + begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/, + returnBegin: true, + contains: [hljs.inherit(hljs.TITLE_MODE, {begin: /\w[\w\d_]*/})], + relevance: 0 + }; + + return { + name: 'Bash', + aliases: ['sh', 'zsh'], + keywords: { + $pattern: /\b-?[a-z\._-]+\b/, + keyword: + 'if then else elif fi for while in do done case esac function', + literal: + 'true false', + built_in: + // Shell built-ins + // http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html + 'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' + + 'trap umask unset ' + + // Bash built-ins + 'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' + + 'read readarray source type typeset ulimit unalias ' + + // Shell modifiers + 'set shopt ' + + // Zsh built-ins + 'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' + + 'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' + + 'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' + + 'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' + + 'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' + + 'zpty zregexparse zsocket zstyle ztcp', + _: + '-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster + }, + contains: [ + KNOWN_SHEBANG, // to catch known shells and boost relevancy + hljs.SHEBANG(), // to catch unknown shells but still highlight the shebang + FUNCTION, + ARITHMETIC, + hljs.HASH_COMMENT_MODE, + QUOTE_STRING, + ESCAPED_QUOTE, + APOS_STRING, + VAR + ] + }; +} + +module.exports = bash; diff --git a/node_modules/highlight.js/lib/languages/basic.js b/node_modules/highlight.js/lib/languages/basic.js @@ -0,0 +1,61 @@ +/* +Language: BASIC +Author: Raphaël Assénat <raph@raphnet.net> +Description: Based on the BASIC reference from the Tandy 1000 guide +Website: https://en.wikipedia.org/wiki/Tandy_1000 +*/ + +/** @type LanguageFn */ +function basic(hljs) { + return { + name: 'BASIC', + case_insensitive: true, + illegal: '^\.', + // Support explicitly typed variables that end with $%! or #. + keywords: { + $pattern: '[a-zA-Z][a-zA-Z0-9_\$\%\!\#]*', + keyword: + 'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' + + 'CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ ' + + 'DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ ' + + 'EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO ' + + 'HEX$ IF THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON ' + + 'OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET ' + + 'MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION ' + + 'BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET ' + + 'PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET ' + + 'RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP ' + + 'SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE ' + + 'WEND WIDTH WINDOW WRITE XOR' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.COMMENT('REM', '$', {relevance: 10}), + hljs.COMMENT('\'', '$', {relevance: 0}), + { + // Match line numbers + className: 'symbol', + begin: '^[0-9]+\ ', + relevance: 10 + }, + { + // Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2) + className: 'number', + begin: '\\b([0-9]+[0-9edED\.]*[#\!]?)', + relevance: 0 + }, + { + // Match hexadecimal numbers (&Hxxxx) + className: 'number', + begin: '(\&[hH][0-9a-fA-F]{1,4})' + }, + { + // Match octal numbers (&Oxxxxxx) + className: 'number', + begin: '(\&[oO][0-7]{1,6})' + } + ] + }; +} + +module.exports = basic; diff --git a/node_modules/highlight.js/lib/languages/bnf.js b/node_modules/highlight.js/lib/languages/bnf.js @@ -0,0 +1,36 @@ +/* +Language: Backus–Naur Form +Website: https://en.wikipedia.org/wiki/Backus–Naur_form +Author: Oleg Efimov <efimovov@gmail.com> +*/ + +/** @type LanguageFn */ +function bnf(hljs) { + return { + name: 'Backus–Naur Form', + contains: [ + // Attribute + { + className: 'attribute', + begin: /</, end: />/ + }, + // Specific + { + begin: /::=/, + end: /$/, + contains: [ + { + begin: /</, end: />/ + }, + // Common + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + } + ] + }; +} + +module.exports = bnf; diff --git a/node_modules/highlight.js/lib/languages/brainfuck.js b/node_modules/highlight.js/lib/languages/brainfuck.js @@ -0,0 +1,46 @@ +/* +Language: Brainfuck +Author: Evgeny Stepanischev <imbolk@gmail.com> +Website: https://esolangs.org/wiki/Brainfuck +*/ + +/** @type LanguageFn */ +function brainfuck(hljs) { + var LITERAL = { + className: 'literal', + begin: '[\\+\\-]', + relevance: 0 + }; + return { + name: 'Brainfuck', + aliases: ['bf'], + contains: [ + hljs.COMMENT( + '[^\\[\\]\\.,\\+\\-<> \r\n]', + '[\\[\\]\\.,\\+\\-<> \r\n]', + { + returnEnd: true, + relevance: 0 + } + ), + { + className: 'title', + begin: '[\\[\\]]', + relevance: 0 + }, + { + className: 'string', + begin: '[\\.,]', + relevance: 0 + }, + { + // this mode works as the only relevance counter + begin: /(?:\+\+|\-\-)/, + contains: [LITERAL] + }, + LITERAL + ] + }; +} + +module.exports = brainfuck; diff --git a/node_modules/highlight.js/lib/languages/c-like.js b/node_modules/highlight.js/lib/languages/c-like.js @@ -0,0 +1,242 @@ +/* +Language: C-like foundation grammar for C/C++ grammars +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>, Roel Deckers <admin@codingcat.nl>, Sam Wu <samsam2310@gmail.com>, Jordi Petit <jordi.petit@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com>, Google Inc. (David Benjamin) <davidben@google.com> +Category: common, system +*/ + +/* In the future the intention is to split out the C/C++ grammars distinctly +since they are separate languages. They will likely share a common foundation +though, and this file sets the groundwork for that - so that we get the breaking +change in v10 and don't have to change the requirements again later. + +See: https://github.com/highlightjs/highlight.js/issues/2146 +*/ + +/** @type LanguageFn */ +function cLike(hljs) { + function optional(s) { + return '(?:' + s + ')?'; + } + var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)'; + var NAMESPACE_RE = '[a-zA-Z_]\\w*::'; + var TEMPLATE_ARGUMENT_RE = '<.*?>'; + var FUNCTION_TYPE_RE = '(' + + DECLTYPE_AUTO_RE + '|' + + optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) + + ')'; + var CPP_PRIMITIVE_TYPES = { + className: 'keyword', + begin: '\\b[a-z\\d_]*_t\\b' + }; + + // https://en.cppreference.com/w/cpp/language/escape + // \\ \x \xFF \u2837 \u00323747 \374 + var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)'; + var STRINGS = { + className: 'string', + variants: [ + { + begin: '(u8?|U|L)?"', end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: '(u8?|U|L)?\'(' + CHARACTER_ESCAPES + "|.)", end: '\'', + illegal: '.' + }, + hljs.END_SAME_AS_BEGIN({ + begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, + end: /\)([^()\\ ]{0,16})"/, + }) + ] + }; + + var NUMBERS = { + className: 'number', + variants: [ + { begin: '\\b(0b[01\']+)' }, + { begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' }, + { begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } + ], + relevance: 0 + }; + + var PREPROCESSOR = { + className: 'meta', + begin: /#\s*[a-z]+\b/, end: /$/, + keywords: { + 'meta-keyword': + 'if else elif endif define undef warning error line ' + + 'pragma _Pragma ifdef ifndef include' + }, + contains: [ + { + begin: /\\\n/, relevance: 0 + }, + hljs.inherit(STRINGS, {className: 'meta-string'}), + { + className: 'meta-string', + begin: /<.*?>/, end: /$/, + illegal: '\\n', + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }; + + var TITLE_MODE = { + className: 'title', + begin: optional(NAMESPACE_RE) + hljs.IDENT_RE, + relevance: 0 + }; + + var FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\('; + + var CPP_KEYWORDS = { + keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' + + 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' + + 'unsigned long volatile static protected bool template mutable if public friend ' + + 'do goto auto void enum else break extern using asm case typeid wchar_t ' + + 'short reinterpret_cast|10 default double register explicit signed typename try this ' + + 'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' + + 'concept co_await co_return co_yield requires ' + + 'noexcept static_assert thread_local restrict final override ' + + 'atomic_bool atomic_char atomic_schar ' + + 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' + + 'atomic_ullong new throw return ' + + 'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq', + built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' + + 'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set ' + + 'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos ' + + 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' + + 'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' + + 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' + + 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' + + 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' + + 'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary', + literal: 'true false nullptr NULL' + }; + + var EXPRESSION_CONTAINS = [ + CPP_PRIMITIVE_TYPES, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + NUMBERS, + STRINGS + ]; + + var EXPRESSION_CONTEXT = { + // This mode covers expression context where we can't expect a function + // definition and shouldn't highlight anything that looks like one: + // `return some()`, `else if()`, `(x*sum(1, 2))` + variants: [ + {begin: /=/, end: /;/}, + {begin: /\(/, end: /\)/}, + {beginKeywords: 'new throw return else', end: /;/} + ], + keywords: CPP_KEYWORDS, + contains: EXPRESSION_CONTAINS.concat([ + { + begin: /\(/, end: /\)/, + keywords: CPP_KEYWORDS, + contains: EXPRESSION_CONTAINS.concat(['self']), + relevance: 0 + } + ]), + relevance: 0 + }; + + var FUNCTION_DECLARATION = { + className: 'function', + begin: '(' + FUNCTION_TYPE_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE, + returnBegin: true, end: /[{;=]/, + excludeEnd: true, + keywords: CPP_KEYWORDS, + illegal: /[^\w\s\*&:<>]/, + contains: [ + + { // to prevent it from being confused as the function title + begin: DECLTYPE_AUTO_RE, + keywords: CPP_KEYWORDS, + relevance: 0, + }, + { + begin: FUNCTION_TITLE, returnBegin: true, + contains: [TITLE_MODE], + relevance: 0 + }, + { + className: 'params', + begin: /\(/, end: /\)/, + keywords: CPP_KEYWORDS, + relevance: 0, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + STRINGS, + NUMBERS, + CPP_PRIMITIVE_TYPES, + // Count matching parentheses. + { + begin: /\(/, end: /\)/, + keywords: CPP_KEYWORDS, + relevance: 0, + contains: [ + 'self', + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + STRINGS, + NUMBERS, + CPP_PRIMITIVE_TYPES + ] + } + ] + }, + CPP_PRIMITIVE_TYPES, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + PREPROCESSOR + ] + }; + + return { + aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'], + keywords: CPP_KEYWORDS, + // the base c-like language will NEVER be auto-detected, rather the + // derivitives: c, c++, arduino turn auto-detect back on for themselves + disableAutodetect: true, + illegal: '</', + contains: [].concat( + EXPRESSION_CONTEXT, + FUNCTION_DECLARATION, + EXPRESSION_CONTAINS, + [ + PREPROCESSOR, + { // containers: ie, `vector <int> rooms (9);` + begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>', + keywords: CPP_KEYWORDS, + contains: ['self', CPP_PRIMITIVE_TYPES] + }, + { + begin: hljs.IDENT_RE + '::', + keywords: CPP_KEYWORDS + }, + { + className: 'class', + beginKeywords: 'class struct', end: /[{;:]/, + contains: [ + {begin: /</, end: />/, contains: ['self']}, // skip generic stuff + hljs.TITLE_MODE + ] + } + ]), + exports: { + preprocessor: PREPROCESSOR, + strings: STRINGS, + keywords: CPP_KEYWORDS + } + }; +} + +module.exports = cLike; diff --git a/node_modules/highlight.js/lib/languages/c.js b/node_modules/highlight.js/lib/languages/c.js @@ -0,0 +1,23 @@ +/* +Language: C +Category: common, system +Website: https://en.wikipedia.org/wiki/C_(programming_language) +Requires: c-like.js +*/ + +/** @type LanguageFn */ +function c(hljs) { + var lang = hljs.requireLanguage('c-like').rawDefinition(); + // Until C is actually different than C++ there is no reason to auto-detect C + // as it's own language since it would just fail auto-detect testing or + // simply match with C++. + // + // See further comments in c-like.js. + + // lang.disableAutodetect = false; + lang.name = 'C'; + lang.aliases = ['c', 'h']; + return lang; +} + +module.exports = c; diff --git a/node_modules/highlight.js/lib/languages/cal.js b/node_modules/highlight.js/lib/languages/cal.js @@ -0,0 +1,90 @@ +/* +Language: C/AL +Author: Kenneth Fuglsang Christensen <kfuglsang@gmail.com> +Description: Provides highlighting of Microsoft Dynamics NAV C/AL code files +Website: https://docs.microsoft.com/en-us/dynamics-nav/programming-in-c-al +*/ + +/** @type LanguageFn */ +function cal(hljs) { + var KEYWORDS = + 'div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to ' + + 'until while with var'; + var LITERALS = 'false true'; + var COMMENT_MODES = [ + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT( + /\{/, + /\}/, + { + relevance: 0 + } + ), + hljs.COMMENT( + /\(\*/, + /\*\)/, + { + relevance: 10 + } + ) + ]; + var STRING = { + className: 'string', + begin: /'/, end: /'/, + contains: [{begin: /''/}] + }; + var CHAR_STRING = { + className: 'string', begin: /(#\d+)+/ + }; + var DATE = { + className: 'number', + begin: '\\b\\d+(\\.\\d+)?(DT|D|T)', + relevance: 0 + }; + var DBL_QUOTED_VARIABLE = { + className: 'string', // not a string technically but makes sense to be highlighted in the same style + begin: '"', + end: '"' + }; + + var PROCEDURE = { + className: 'function', + beginKeywords: 'procedure', end: /[:;]/, + keywords: 'procedure|10', + contains: [ + hljs.TITLE_MODE, + { + className: 'params', + begin: /\(/, end: /\)/, + keywords: KEYWORDS, + contains: [STRING, CHAR_STRING] + } + ].concat(COMMENT_MODES) + }; + + var OBJECT = { + className: 'class', + begin: 'OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)', + returnBegin: true, + contains: [ + hljs.TITLE_MODE, + PROCEDURE + ] + }; + + return { + name: 'C/AL', + case_insensitive: true, + keywords: { keyword: KEYWORDS, literal: LITERALS }, + illegal: /\/\*/, + contains: [ + STRING, CHAR_STRING, + DATE, DBL_QUOTED_VARIABLE, + hljs.NUMBER_MODE, + OBJECT, + PROCEDURE + ] + }; +} + +module.exports = cal; diff --git a/node_modules/highlight.js/lib/languages/capnproto.js b/node_modules/highlight.js/lib/languages/capnproto.js @@ -0,0 +1,60 @@ +/* +Language: Cap’n Proto +Author: Oleg Efimov <efimovov@gmail.com> +Description: Cap’n Proto message definition format +Website: https://capnproto.org/capnp-tool.html +Category: protocols +*/ + +/** @type LanguageFn */ +function capnproto(hljs) { + return { + name: 'Cap’n Proto', + aliases: ['capnp'], + keywords: { + keyword: + 'struct enum interface union group import using const annotation extends in of on as with from fixed', + built_in: + 'Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 ' + + 'Text Data AnyPointer AnyStruct Capability List', + literal: + 'true false' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE, + hljs.HASH_COMMENT_MODE, + { + className: 'meta', + begin: /@0x[\w\d]{16};/, + illegal: /\n/ + }, + { + className: 'symbol', + begin: /@\d+\b/ + }, + { + className: 'class', + beginKeywords: 'struct enum', end: /\{/, + illegal: /\n/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title + }) + ] + }, + { + className: 'class', + beginKeywords: 'interface', end: /\{/, + illegal: /\n/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title + }) + ] + } + ] + }; +} + +module.exports = capnproto; diff --git a/node_modules/highlight.js/lib/languages/ceylon.js b/node_modules/highlight.js/lib/languages/ceylon.js @@ -0,0 +1,76 @@ +/* +Language: Ceylon +Author: Lucas Werkmeister <mail@lucaswerkmeister.de> +Website: https://ceylon-lang.org +*/ + +/** @type LanguageFn */ +function ceylon(hljs) { + // 2.3. Identifiers and keywords + var KEYWORDS = + 'assembly module package import alias class interface object given value ' + + 'assign void function new of extends satisfies abstracts in out return ' + + 'break continue throw assert dynamic if else switch case for while try ' + + 'catch finally then let this outer super is exists nonempty'; + // 7.4.1 Declaration Modifiers + var DECLARATION_MODIFIERS = + 'shared abstract formal default actual variable late native deprecated ' + + 'final sealed annotation suppressWarnings small'; + // 7.4.2 Documentation + var DOCUMENTATION = + 'doc by license see throws tagged'; + var SUBST = { + className: 'subst', excludeBegin: true, excludeEnd: true, + begin: /``/, end: /``/, + keywords: KEYWORDS, + relevance: 10 + }; + var EXPRESSIONS = [ + { + // verbatim string + className: 'string', + begin: '"""', + end: '"""', + relevance: 10 + }, + { + // string literal or template + className: 'string', + begin: '"', end: '"', + contains: [SUBST] + }, + { + // character literal + className: 'string', + begin: "'", + end: "'" + }, + { + // numeric literal + className: 'number', + begin: '#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?', + relevance: 0 + } + ]; + SUBST.contains = EXPRESSIONS; + + return { + name: 'Ceylon', + keywords: { + keyword: KEYWORDS + ' ' + DECLARATION_MODIFIERS, + meta: DOCUMENTATION + }, + illegal: '\\$[^01]|#[^0-9a-fA-F]', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT('/\\*', '\\*/', {contains: ['self']}), + { + // compiler annotation + className: 'meta', + begin: '@[a-z]\\w*(?:\\:\"[^\"]*\")?' + } + ].concat(EXPRESSIONS) + }; +} + +module.exports = ceylon; diff --git a/node_modules/highlight.js/lib/languages/clean.js b/node_modules/highlight.js/lib/languages/clean.js @@ -0,0 +1,37 @@ +/* +Language: Clean +Author: Camil Staps <info@camilstaps.nl> +Category: functional +Website: http://clean.cs.ru.nl +*/ + +/** @type LanguageFn */ +function clean(hljs) { + return { + name: 'Clean', + aliases: ['clean','icl','dcl'], + keywords: { + keyword: + 'if let in with where case of class instance otherwise ' + + 'implementation definition system module from import qualified as ' + + 'special code inline foreign export ccall stdcall generic derive ' + + 'infix infixl infixr', + built_in: + 'Int Real Char Bool', + literal: + 'True False' + }, + contains: [ + + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + + {begin: '->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>'} // relevance booster + ] + }; +} + +module.exports = clean; diff --git a/node_modules/highlight.js/lib/languages/clojure-repl.js b/node_modules/highlight.js/lib/languages/clojure-repl.js @@ -0,0 +1,27 @@ +/* +Language: Clojure REPL +Description: Clojure REPL sessions +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Requires: clojure.js +Website: https://clojure.org +Category: lisp +*/ + +/** @type LanguageFn */ +function clojureRepl(hljs) { + return { + name: 'Clojure REPL', + contains: [ + { + className: 'meta', + begin: /^([\w.-]+|\s*#_)?=>/, + starts: { + end: /$/, + subLanguage: 'clojure' + } + } + ] + } +} + +module.exports = clojureRepl; diff --git a/node_modules/highlight.js/lib/languages/clojure.js b/node_modules/highlight.js/lib/languages/clojure.js @@ -0,0 +1,125 @@ +/* +Language: Clojure +Description: Clojure syntax (based on lisp.js) +Author: mfornos +Website: https://clojure.org +Category: lisp +*/ + +/** @type LanguageFn */ +function clojure(hljs) { + var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>&#\''; + var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*'; + var globals = 'def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord'; + var keywords = { + $pattern: SYMBOL_RE, + 'builtin-name': + // Clojure keywords + globals + ' ' + + 'cond apply if-not if-let if not not= = < > <= >= == + / * - rem ' + + 'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? ' + + 'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? ' + + 'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? ' + + 'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . ' + + 'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last ' + + 'drop-while while intern condp case reduced cycle split-at split-with repeat replicate ' + + 'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext ' + + 'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends ' + + 'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler ' + + 'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter ' + + 'monitor-exit macroexpand macroexpand-1 for dosync and or ' + + 'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert ' + + 'peek pop doto proxy first rest cons cast coll last butlast ' + + 'sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import ' + + 'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! ' + + 'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger ' + + 'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline ' + + 'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking ' + + 'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! ' + + 'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! ' + + 'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty ' + + 'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list ' + + 'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer ' + + 'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate ' + + 'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta ' + + 'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize' + }; + + var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?'; + + var SYMBOL = { + begin: SYMBOL_RE, + relevance: 0 + }; + var NUMBER = { + className: 'number', begin: SIMPLE_NUMBER_RE, + relevance: 0 + }; + var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}); + var COMMENT = hljs.COMMENT( + ';', + '$', + { + relevance: 0 + } + ); + var LITERAL = { + className: 'literal', + begin: /\b(true|false|nil)\b/ + }; + var COLLECTION = { + begin: '[\\[\\{]', end: '[\\]\\}]' + }; + var HINT = { + className: 'comment', + begin: '\\^' + SYMBOL_RE + }; + var HINT_COL = hljs.COMMENT('\\^\\{', '\\}'); + var KEY = { + className: 'symbol', + begin: '[:]{1,2}' + SYMBOL_RE + }; + var LIST = { + begin: '\\(', end: '\\)' + }; + var BODY = { + endsWithParent: true, + relevance: 0 + }; + var NAME = { + keywords: keywords, + className: 'name', begin: SYMBOL_RE, + starts: BODY + }; + var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL]; + + var GLOBAL = { + beginKeywords: globals, + lexemes: SYMBOL_RE, + end: '(\\[|\\#|\\d|"|:|\\{|\\)|\\(|$)', + contains: [ + { + className: 'title', + begin: SYMBOL_RE, + relevance: 0, + excludeEnd: true, + // we can only have a single title + endsParent: true + }, + ].concat(DEFAULT_CONTAINS) + }; + + LIST.contains = [hljs.COMMENT('comment', ''), GLOBAL, NAME, BODY]; + BODY.contains = DEFAULT_CONTAINS; + COLLECTION.contains = DEFAULT_CONTAINS; + HINT_COL.contains = [COLLECTION]; + + return { + name: 'Clojure', + aliases: ['clj'], + illegal: /\S/, + contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL] + }; +} + +module.exports = clojure; diff --git a/node_modules/highlight.js/lib/languages/cmake.js b/node_modules/highlight.js/lib/languages/cmake.js @@ -0,0 +1,63 @@ +/* +Language: CMake +Description: CMake is an open-source cross-platform system for build automation. +Author: Igor Kalnitsky <igor@kalnitsky.org> +Website: https://cmake.org +*/ + +/** @type LanguageFn */ +function cmake(hljs) { + return { + name: 'CMake', + aliases: ['cmake.in'], + case_insensitive: true, + keywords: { + keyword: + // scripting commands + 'break cmake_host_system_information cmake_minimum_required cmake_parse_arguments ' + + 'cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro ' + + 'endwhile execute_process file find_file find_library find_package find_path ' + + 'find_program foreach function get_cmake_property get_directory_property ' + + 'get_filename_component get_property if include include_guard list macro ' + + 'mark_as_advanced math message option return separate_arguments ' + + 'set_directory_properties set_property set site_name string unset variable_watch while ' + + // project commands + 'add_compile_definitions add_compile_options add_custom_command add_custom_target ' + + 'add_definitions add_dependencies add_executable add_library add_link_options ' + + 'add_subdirectory add_test aux_source_directory build_command create_test_sourcelist ' + + 'define_property enable_language enable_testing export fltk_wrap_ui ' + + 'get_source_file_property get_target_property get_test_property include_directories ' + + 'include_external_msproject include_regular_expression install link_directories ' + + 'link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions ' + + 'set_source_files_properties set_target_properties set_tests_properties source_group ' + + 'target_compile_definitions target_compile_features target_compile_options ' + + 'target_include_directories target_link_directories target_link_libraries ' + + 'target_link_options target_sources try_compile try_run ' + + // CTest commands + 'ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ' + + 'ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ' + + 'ctest_test ctest_update ctest_upload ' + + // deprecated commands + 'build_name exec_program export_library_dependencies install_files install_programs ' + + 'install_targets load_command make_directory output_required_files remove ' + + 'subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file ' + + 'qt5_use_modules qt5_use_package qt5_wrap_cpp ' + + // core keywords + 'on off true false and or not command policy target test exists is_newer_than ' + + 'is_directory is_symlink is_absolute matches less greater equal less_equal ' + + 'greater_equal strless strgreater strequal strless_equal strgreater_equal version_less ' + + 'version_greater version_equal version_less_equal version_greater_equal in_list defined' + }, + contains: [ + { + className: 'variable', + begin: '\\${', end: '}' + }, + hljs.HASH_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE + ] + }; +} + +module.exports = cmake; diff --git a/node_modules/highlight.js/lib/languages/coffeescript.js b/node_modules/highlight.js/lib/languages/coffeescript.js @@ -0,0 +1,317 @@ +const KEYWORDS = [ + "as", // for exports + "in", + "of", + "if", + "for", + "while", + "finally", + "var", + "new", + "function", + "do", + "return", + "void", + "else", + "break", + "catch", + "instanceof", + "with", + "throw", + "case", + "default", + "try", + "switch", + "continue", + "typeof", + "delete", + "let", + "yield", + "const", + "class", + // JS handles these with a special rule + // "get", + // "set", + "debugger", + "async", + "await", + "static", + "import", + "from", + "export", + "extends" +]; +const LITERALS = [ + "true", + "false", + "null", + "undefined", + "NaN", + "Infinity" +]; + +const TYPES = [ + "Intl", + "DataView", + "Number", + "Math", + "Date", + "String", + "RegExp", + "Object", + "Function", + "Boolean", + "Error", + "Symbol", + "Set", + "Map", + "WeakSet", + "WeakMap", + "Proxy", + "Reflect", + "JSON", + "Promise", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Float32Array", + "Array", + "Uint8Array", + "Uint8ClampedArray", + "ArrayBuffer" +]; + +const ERROR_TYPES = [ + "EvalError", + "InternalError", + "RangeError", + "ReferenceError", + "SyntaxError", + "TypeError", + "URIError" +]; + +const BUILT_IN_GLOBALS = [ + "setInterval", + "setTimeout", + "clearInterval", + "clearTimeout", + + "require", + "exports", + + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "unescape" +]; + +const BUILT_IN_VARIABLES = [ + "arguments", + "this", + "super", + "console", + "window", + "document", + "localStorage", + "module", + "global" // Node.js +]; + +const BUILT_INS = [].concat( + BUILT_IN_GLOBALS, + BUILT_IN_VARIABLES, + TYPES, + ERROR_TYPES +); + +/* +Language: CoffeeScript +Author: Dmytrii Nagirniak <dnagir@gmail.com> +Contributors: Oleg Efimov <efimovov@gmail.com>, Cédric Néhémie <cedric.nehemie@gmail.com> +Description: CoffeeScript is a programming language that transcompiles to JavaScript. For info about language see http://coffeescript.org/ +Category: common, scripting +Website: https://coffeescript.org +*/ + +/** @type LanguageFn */ +function coffeescript(hljs) { + var COFFEE_BUILT_INS = [ + 'npm', + 'print' + ]; + var COFFEE_LITERALS = [ + 'yes', + 'no', + 'on', + 'off' + ]; + var COFFEE_KEYWORDS = [ + 'then', + 'unless', + 'until', + 'loop', + 'by', + 'when', + 'and', + 'or', + 'is', + 'isnt', + 'not' + ]; + var NOT_VALID_KEYWORDS = [ + "var", + "const", + "let", + "function", + "static" + ]; + var excluding = (list) => + (kw) => !list.includes(kw); + var KEYWORDS$1 = { + keyword: KEYWORDS.concat(COFFEE_KEYWORDS).filter(excluding(NOT_VALID_KEYWORDS)).join(" "), + literal: LITERALS.concat(COFFEE_LITERALS).join(" "), + built_in: BUILT_INS.concat(COFFEE_BUILT_INS).join(" ") + }; + var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; + var SUBST = { + className: 'subst', + begin: /#\{/, end: /}/, + keywords: KEYWORDS$1 + }; + var EXPRESSIONS = [ + hljs.BINARY_NUMBER_MODE, + hljs.inherit(hljs.C_NUMBER_MODE, {starts: {end: '(\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp + { + className: 'string', + variants: [ + { + begin: /'''/, end: /'''/, + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: /'/, end: /'/, + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: /"""/, end: /"""/, + contains: [hljs.BACKSLASH_ESCAPE, SUBST] + }, + { + begin: /"/, end: /"/, + contains: [hljs.BACKSLASH_ESCAPE, SUBST] + } + ] + }, + { + className: 'regexp', + variants: [ + { + begin: '///', end: '///', + contains: [SUBST, hljs.HASH_COMMENT_MODE] + }, + { + begin: '//[gim]{0,3}(?=\\W)', + relevance: 0 + }, + { + // regex can't start with space to parse x / 2 / 3 as two divisions + // regex can't start with *, and it supports an "illegal" in the main mode + begin: /\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/ + } + ] + }, + { + begin: '@' + JS_IDENT_RE // relevance booster + }, + { + subLanguage: 'javascript', + excludeBegin: true, excludeEnd: true, + variants: [ + { + begin: '```', end: '```', + }, + { + begin: '`', end: '`', + } + ] + } + ]; + SUBST.contains = EXPRESSIONS; + + var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE}); + var PARAMS_RE = '(\\(.*\\))?\\s*\\B[-=]>'; + var PARAMS = { + className: 'params', + begin: '\\([^\\(]', returnBegin: true, + /* We need another contained nameless mode to not have every nested + pair of parens to be called "params" */ + contains: [{ + begin: /\(/, end: /\)/, + keywords: KEYWORDS$1, + contains: ['self'].concat(EXPRESSIONS) + }] + }; + + return { + name: 'CoffeeScript', + aliases: ['coffee', 'cson', 'iced'], + keywords: KEYWORDS$1, + illegal: /\/\*/, + contains: EXPRESSIONS.concat([ + hljs.COMMENT('###', '###'), + hljs.HASH_COMMENT_MODE, + { + className: 'function', + begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + PARAMS_RE, end: '[-=]>', + returnBegin: true, + contains: [TITLE, PARAMS] + }, + { + // anonymous function start + begin: /[:\(,=]\s*/, + relevance: 0, + contains: [ + { + className: 'function', + begin: PARAMS_RE, end: '[-=]>', + returnBegin: true, + contains: [PARAMS] + } + ] + }, + { + className: 'class', + beginKeywords: 'class', + end: '$', + illegal: /[:="\[\]]/, + contains: [ + { + beginKeywords: 'extends', + endsWithParent: true, + illegal: /[:="\[\]]/, + contains: [TITLE] + }, + TITLE + ] + }, + { + begin: JS_IDENT_RE + ':', end: ':', + returnBegin: true, returnEnd: true, + relevance: 0 + } + ]) + }; +} + +module.exports = coffeescript; diff --git a/node_modules/highlight.js/lib/languages/coq.js b/node_modules/highlight.js/lib/languages/coq.js @@ -0,0 +1,77 @@ +/* +Language: Coq +Author: Stephan Boyer <stephan@stephanboyer.com> +Category: functional +Website: https://coq.inria.fr +*/ + +/** @type LanguageFn */ +function coq(hljs) { + return { + name: 'Coq', + keywords: { + keyword: + '_|0 as at cofix else end exists exists2 fix for forall fun if IF in let ' + + 'match mod Prop return Set then Type using where with ' + + 'Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo ' + + 'Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion ' + + 'Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture ' + + 'Conjectures Constant constr Constraint Constructors Context Corollary ' + + 'CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent ' + + 'Derive Drop eauto End Equality Eval Example Existential Existentials ' + + 'Existing Export exporting Extern Extract Extraction Fact Field Fields File ' + + 'Fixpoint Focus for From Function Functional Generalizable Global Goal Grab ' + + 'Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident ' + + 'Identity If Immediate Implicit Import Include Inductive Infix Info Initial ' + + 'Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear ' + + 'Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML ' + + 'Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation ' + + 'Obligations Opaque Open Optimize Options Parameter Parameters Parametric ' + + 'Path Paths pattern Polymorphic Preterm Print Printing Program Projections ' + + 'Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark ' + + 'Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save ' + + 'Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern ' + + 'SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies ' + + 'Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time ' + + 'Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused ' + + 'Unfold Universe Universes Unset Unshelve using Variable Variables Variant ' + + 'Verbose Visibility where with', + built_in: + 'abstract absurd admit after apply as assert assumption at auto autorewrite ' + + 'autounfold before bottom btauto by case case_eq cbn cbv change ' + + 'classical_left classical_right clear clearbody cofix compare compute ' + + 'congruence constr_eq constructor contradict contradiction cut cutrewrite ' + + 'cycle decide decompose dependent destruct destruction dintuition ' + + 'discriminate discrR do double dtauto eapply eassumption eauto ecase ' + + 'econstructor edestruct ediscriminate eelim eexact eexists einduction ' + + 'einjection eleft elim elimtype enough equality erewrite eright ' + + 'esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail ' + + 'field field_simplify field_simplify_eq first firstorder fix fold fourier ' + + 'functional generalize generalizing gfail give_up has_evar hnf idtac in ' + + 'induction injection instantiate intro intro_pattern intros intuition ' + + 'inversion inversion_clear is_evar is_var lapply lazy left lia lra move ' + + 'native_compute nia nsatz omega once pattern pose progress proof psatz quote ' + + 'record red refine reflexivity remember rename repeat replace revert ' + + 'revgoals rewrite rewrite_strat right ring ring_simplify rtauto set ' + + 'setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry ' + + 'setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve ' + + 'specialize split split_Rabs split_Rmult stepl stepr subst sum swap ' + + 'symmetry tactic tauto time timeout top transitivity trivial try tryif ' + + 'unfold unify until using vm_compute with' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.COMMENT('\\(\\*', '\\*\\)'), + hljs.C_NUMBER_MODE, + { + className: 'type', + excludeBegin: true, + begin: '\\|\\s*', + end: '\\w+' + }, + {begin: /[-=]>/} // relevance booster + ] + }; +} + +module.exports = coq; diff --git a/node_modules/highlight.js/lib/languages/cos.js b/node_modules/highlight.js/lib/languages/cos.js @@ -0,0 +1,134 @@ +/* +Language: Caché Object Script +Author: Nikita Savchenko <zitros.lab@gmail.com> +Category: enterprise, scripting +Website: https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls +*/ + +/** @type LanguageFn */ +function cos (hljs) { + + var STRINGS = { + className: 'string', + variants: [ + { + begin: '"', + end: '"', + contains: [{ // escaped + begin: "\"\"", + relevance: 0 + }] + } + ] + }; + + var NUMBERS = { + className: "number", + begin: "\\b(\\d+(\\.\\d*)?|\\.\\d+)", + relevance: 0 + }; + + var COS_KEYWORDS = + 'property parameter class classmethod clientmethod extends as break ' + + 'catch close continue do d|0 else elseif for goto halt hang h|0 if job ' + + 'j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 ' + + 'tcommit throw trollback try tstart use view while write w|0 xecute x|0 ' + + 'zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert ' + + 'zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit ' + + 'zsync ascii'; + + // registered function - no need in them due to all functions are highlighted, + // but I'll just leave this here. + + //"$bit", "$bitcount", + //"$bitfind", "$bitlogic", "$case", "$char", "$classmethod", "$classname", + //"$compile", "$data", "$decimal", "$double", "$extract", "$factor", + //"$find", "$fnumber", "$get", "$increment", "$inumber", "$isobject", + //"$isvaliddouble", "$isvalidnum", "$justify", "$length", "$list", + //"$listbuild", "$listdata", "$listfind", "$listfromstring", "$listget", + //"$listlength", "$listnext", "$listsame", "$listtostring", "$listvalid", + //"$locate", "$match", "$method", "$name", "$nconvert", "$next", + //"$normalize", "$now", "$number", "$order", "$parameter", "$piece", + //"$prefetchoff", "$prefetchon", "$property", "$qlength", "$qsubscript", + //"$query", "$random", "$replace", "$reverse", "$sconvert", "$select", + //"$sortbegin", "$sortend", "$stack", "$text", "$translate", "$view", + //"$wascii", "$wchar", "$wextract", "$wfind", "$wiswide", "$wlength", + //"$wreverse", "$xecute", "$zabs", "$zarccos", "$zarcsin", "$zarctan", + //"$zcos", "$zcot", "$zcsc", "$zdate", "$zdateh", "$zdatetime", + //"$zdatetimeh", "$zexp", "$zhex", "$zln", "$zlog", "$zpower", "$zsec", + //"$zsin", "$zsqr", "$ztan", "$ztime", "$ztimeh", "$zboolean", + //"$zconvert", "$zcrc", "$zcyc", "$zdascii", "$zdchar", "$zf", + //"$ziswide", "$zlascii", "$zlchar", "$zname", "$zposition", "$zqascii", + //"$zqchar", "$zsearch", "$zseek", "$zstrip", "$zwascii", "$zwchar", + //"$zwidth", "$zwpack", "$zwbpack", "$zwunpack", "$zwbunpack", "$zzenkaku", + //"$change", "$mv", "$mvat", "$mvfmt", "$mvfmts", "$mviconv", + //"$mviconvs", "$mvinmat", "$mvlover", "$mvoconv", "$mvoconvs", "$mvraise", + //"$mvtrans", "$mvv", "$mvname", "$zbitand", "$zbitcount", "$zbitfind", + //"$zbitget", "$zbitlen", "$zbitnot", "$zbitor", "$zbitset", "$zbitstr", + //"$zbitxor", "$zincrement", "$znext", "$zorder", "$zprevious", "$zsort", + //"device", "$ecode", "$estack", "$etrap", "$halt", "$horolog", + //"$io", "$job", "$key", "$namespace", "$principal", "$quit", "$roles", + //"$storage", "$system", "$test", "$this", "$tlevel", "$username", + //"$x", "$y", "$za", "$zb", "$zchild", "$zeof", "$zeos", "$zerror", + //"$zhorolog", "$zio", "$zjob", "$zmode", "$znspace", "$zparent", "$zpi", + //"$zpos", "$zreference", "$zstorage", "$ztimestamp", "$ztimezone", + //"$ztrap", "$zversion" + + return { + name: 'Caché Object Script', + case_insensitive: true, + aliases: ["cos", "cls"], + keywords: COS_KEYWORDS, + contains: [ + NUMBERS, + STRINGS, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: "comment", + begin: /;/, end: "$", + relevance: 0 + }, + { // Functions and user-defined functions: write $ztime(60*60*3), $$myFunc(10), $$^Val(1) + className: "built_in", + begin: /(?:\$\$?|\.\.)\^?[a-zA-Z]+/ + }, + { // Macro command: quit $$$OK + className: "built_in", + begin: /\$\$\$[a-zA-Z]+/ + }, + { // Special (global) variables: write %request.Content; Built-in classes: %Library.Integer + className: "built_in", + begin: /%[a-z]+(?:\.[a-z]+)*/ + }, + { // Global variable: set ^globalName = 12 write ^globalName + className: "symbol", + begin: /\^%?[a-zA-Z][\w]*/ + }, + { // Some control constructions: do ##class(Package.ClassName).Method(), ##super() + className: "keyword", + begin: /##class|##super|#define|#dim/ + }, + + // sub-languages: are not fully supported by hljs by 11/15/2015 + // left for the future implementation. + { + begin: /&sql\(/, end: /\)/, + excludeBegin: true, excludeEnd: true, + subLanguage: "sql" + }, + { + begin: /&(js|jscript|javascript)</, end: />/, + excludeBegin: true, excludeEnd: true, + subLanguage: "javascript" + }, + { + // this brakes first and last tag, but this is the only way to embed a valid html + begin: /&html<\s*</, end: />\s*>/, + subLanguage: "xml" + } + ] + }; +} + +module.exports = cos; diff --git a/node_modules/highlight.js/lib/languages/cpp.js b/node_modules/highlight.js/lib/languages/cpp.js @@ -0,0 +1,18 @@ +/* +Language: C++ +Category: common, system +Website: https://isocpp.org +Requires: c-like.js +*/ + +/** @type LanguageFn */ +function cpp(hljs) { + var lang = hljs.requireLanguage('c-like').rawDefinition(); + // return auto-detection back on + lang.disableAutodetect = false; + lang.name = 'C++'; + lang.aliases = ['cc', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx']; + return lang; +} + +module.exports = cpp; diff --git a/node_modules/highlight.js/lib/languages/crmsh.js b/node_modules/highlight.js/lib/languages/crmsh.js @@ -0,0 +1,105 @@ +/* +Language: crmsh +Author: Kristoffer Gronlund <kgronlund@suse.com> +Website: http://crmsh.github.io +Description: Syntax Highlighting for the crmsh DSL +Category: config +*/ + +/** @type LanguageFn */ +function crmsh(hljs) { + var RESOURCES = 'primitive rsc_template'; + + var COMMANDS = 'group clone ms master location colocation order fencing_topology ' + + 'rsc_ticket acl_target acl_group user role ' + + 'tag xml'; + + var PROPERTY_SETS = 'property rsc_defaults op_defaults'; + + var KEYWORDS = 'params meta operations op rule attributes utilization'; + + var OPERATORS = 'read write deny defined not_defined in_range date spec in ' + + 'ref reference attribute type xpath version and or lt gt tag ' + + 'lte gte eq ne \\'; + + var TYPES = 'number string'; + + var LITERALS = 'Master Started Slave Stopped start promote demote stop monitor true false'; + + return { + name: 'crmsh', + aliases: ['crm', 'pcmk'], + case_insensitive: true, + keywords: { + keyword: KEYWORDS + ' ' + OPERATORS + ' ' + TYPES, + literal: LITERALS + }, + contains: [ + hljs.HASH_COMMENT_MODE, + { + beginKeywords: 'node', + starts: { + end: '\\s*([\\w_-]+:)?', + starts: { + className: 'title', + end: '\\s*[\\$\\w_][\\w_-]*' + } + } + }, + { + beginKeywords: RESOURCES, + starts: { + className: 'title', + end: '\\s*[\\$\\w_][\\w_-]*', + starts: { + end: '\\s*@?[\\w_][\\w_\\.:-]*' + } + } + }, + { + begin: '\\b(' + COMMANDS.split(' ').join('|') + ')\\s+', + keywords: COMMANDS, + starts: { + className: 'title', + end: '[\\$\\w_][\\w_-]*' + } + }, + { + beginKeywords: PROPERTY_SETS, + starts: { + className: 'title', + end: '\\s*([\\w_-]+:)?' + } + }, + hljs.QUOTE_STRING_MODE, + { + className: 'meta', + begin: '(ocf|systemd|service|lsb):[\\w_:-]+', + relevance: 0 + }, + { + className: 'number', + begin: '\\b\\d+(\\.\\d+)?(ms|s|h|m)?', + relevance: 0 + }, + { + className: 'literal', + begin: '[-]?(infinity|inf)', + relevance: 0 + }, + { + className: 'attr', + begin: /([A-Za-z\$_\#][\w_-]+)=/, + relevance: 0 + }, + { + className: 'tag', + begin: '</?', + end: '/?>', + relevance: 0 + } + ] + }; +} + +module.exports = crmsh; diff --git a/node_modules/highlight.js/lib/languages/crystal.js b/node_modules/highlight.js/lib/languages/crystal.js @@ -0,0 +1,197 @@ +/* +Language: Crystal +Author: TSUYUSATO Kitsune <make.just.on@gmail.com> +Website: https://crystal-lang.org +*/ + +/** @type LanguageFn */ +function crystal(hljs) { + var INT_SUFFIX = '(_*[ui](8|16|32|64|128))?'; + var FLOAT_SUFFIX = '(_*f(32|64))?'; + var CRYSTAL_IDENT_RE = '[a-zA-Z_]\\w*[!?=]?'; + var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?'; + var CRYSTAL_PATH_RE = '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?'; + var CRYSTAL_KEYWORDS = { + $pattern: CRYSTAL_IDENT_RE, + keyword: + 'abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if ' + + 'include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? ' + + 'return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield ' + + '__DIR__ __END_LINE__ __FILE__ __LINE__', + literal: 'false nil true' + }; + var SUBST = { + className: 'subst', + begin: '#{', end: '}', + keywords: CRYSTAL_KEYWORDS + }; + var EXPANSION = { + className: 'template-variable', + variants: [ + {begin: '\\{\\{', end: '\\}\\}'}, + {begin: '\\{%', end: '%\\}'} + ], + keywords: CRYSTAL_KEYWORDS + }; + + function recursiveParen(begin, end) { + var + contains = [{begin: begin, end: end}]; + contains[0].contains = contains; + return contains; + } + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + {begin: /'/, end: /'/}, + {begin: /"/, end: /"/}, + {begin: /`/, end: /`/}, + {begin: '%[Qwi]?\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')}, + {begin: '%[Qwi]?\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')}, + {begin: '%[Qwi]?{', end: '}', contains: recursiveParen('{', '}')}, + {begin: '%[Qwi]?<', end: '>', contains: recursiveParen('<', '>')}, + {begin: '%[Qwi]?\\|', end: '\\|'}, + {begin: /<<-\w+$/, end: /^\s*\w+$/}, + ], + relevance: 0, + }; + var Q_STRING = { + className: 'string', + variants: [ + {begin: '%q\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')}, + {begin: '%q\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')}, + {begin: '%q{', end: '}', contains: recursiveParen('{', '}')}, + {begin: '%q<', end: '>', contains: recursiveParen('<', '>')}, + {begin: '%q\\|', end: '\\|'}, + {begin: /<<-'\w+'$/, end: /^\s*\w+$/}, + ], + relevance: 0, + }; + var REGEXP = { + begin: '(?!%})(' + hljs.RE_STARTERS_RE + '|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*', + keywords: 'case if select unless until when while', + contains: [ + { + className: 'regexp', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + {begin: '//[a-z]*', relevance: 0}, + {begin: '/(?!\\/)', end: '/[a-z]*'}, + ] + } + ], + relevance: 0 + }; + var REGEXP2 = { + className: 'regexp', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + {begin: '%r\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')}, + {begin: '%r\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')}, + {begin: '%r{', end: '}', contains: recursiveParen('{', '}')}, + {begin: '%r<', end: '>', contains: recursiveParen('<', '>')}, + {begin: '%r\\|', end: '\\|'}, + ], + relevance: 0 + }; + var ATTRIBUTE = { + className: 'meta', + begin: '@\\[', end: '\\]', + contains: [ + hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}) + ] + }; + var CRYSTAL_DEFAULT_CONTAINS = [ + EXPANSION, + STRING, + Q_STRING, + REGEXP2, + REGEXP, + ATTRIBUTE, + hljs.HASH_COMMENT_MODE, + { + className: 'class', + beginKeywords: 'class module struct', end: '$|;', + illegal: /=/, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}), + {begin: '<'} // relevance booster for inheritance + ] + }, + { + className: 'class', + beginKeywords: 'lib enum union', end: '$|;', + illegal: /=/, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}), + ], + relevance: 10 + }, + { + beginKeywords: 'annotation', end: '$|;', + illegal: /=/, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}), + ], + relevance: 10 + }, + { + className: 'function', + beginKeywords: 'def', end: /\B\b/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + begin: CRYSTAL_METHOD_RE, + endsParent: true + }) + ] + }, + { + className: 'function', + beginKeywords: 'fun macro', end: /\B\b/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + begin: CRYSTAL_METHOD_RE, + endsParent: true + }) + ], + relevance: 5 + }, + { + className: 'symbol', + begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:', + relevance: 0 + }, + { + className: 'symbol', + begin: ':', + contains: [STRING, {begin: CRYSTAL_METHOD_RE}], + relevance: 0 + }, + { + className: 'number', + variants: [ + { begin: '\\b0b([01_]+)' + INT_SUFFIX }, + { begin: '\\b0o([0-7_]+)' + INT_SUFFIX }, + { begin: '\\b0x([A-Fa-f0-9_]+)' + INT_SUFFIX }, + { begin: '\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_*[-+]?[0-9_]*)?' + FLOAT_SUFFIX + '(?!_)' }, + { begin: '\\b([1-9][0-9_]*|0)' + INT_SUFFIX } + ], + relevance: 0 + } + ]; + SUBST.contains = CRYSTAL_DEFAULT_CONTAINS; + EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION + + return { + name: 'Crystal', + aliases: ['cr'], + keywords: CRYSTAL_KEYWORDS, + contains: CRYSTAL_DEFAULT_CONTAINS + }; +} + +module.exports = crystal; diff --git a/node_modules/highlight.js/lib/languages/csharp.js b/node_modules/highlight.js/lib/languages/csharp.js @@ -0,0 +1,227 @@ +/* +Language: C# +Author: Jason Diamond <jason@diamond.name> +Contributor: Nicolas LLOBERA <nllobera@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com> +Website: https://docs.microsoft.com/en-us/dotnet/csharp/ +Category: common +*/ + +/** @type LanguageFn */ +function csharp(hljs) { + var KEYWORDS = { + keyword: + // Normal keywords. + 'abstract as base bool break byte case catch char checked const continue decimal ' + + 'default delegate do double enum event explicit extern finally fixed float ' + + 'for foreach goto if implicit in init int interface internal is lock long ' + + 'object operator out override params private protected public readonly ref sbyte ' + + 'sealed short sizeof stackalloc static string struct switch this try typeof ' + + 'uint ulong unchecked unsafe ushort using virtual void volatile while ' + + // Contextual keywords. + 'add alias ascending async await by descending dynamic equals from get global group into join ' + + 'let nameof on orderby partial remove select set value var when where yield', + literal: + 'null false true' + }; + var TITLE_MODE = hljs.inherit(hljs.TITLE_MODE, {begin: '[a-zA-Z](\\.?\\w)*'}); + var NUMBERS = { + className: 'number', + variants: [ + { begin: '\\b(0b[01\']+)' }, + { begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' }, + { begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } + ], + relevance: 0 + }; + var VERBATIM_STRING = { + className: 'string', + begin: '@"', end: '"', + contains: [{begin: '""'}] + }; + var VERBATIM_STRING_NO_LF = hljs.inherit(VERBATIM_STRING, {illegal: /\n/}); + var SUBST = { + className: 'subst', + begin: '{', end: '}', + keywords: KEYWORDS + }; + var SUBST_NO_LF = hljs.inherit(SUBST, {illegal: /\n/}); + var INTERPOLATED_STRING = { + className: 'string', + begin: /\$"/, end: '"', + illegal: /\n/, + contains: [{begin: '{{'}, {begin: '}}'}, hljs.BACKSLASH_ESCAPE, SUBST_NO_LF] + }; + var INTERPOLATED_VERBATIM_STRING = { + className: 'string', + begin: /\$@"/, end: '"', + contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST] + }; + var INTERPOLATED_VERBATIM_STRING_NO_LF = hljs.inherit(INTERPOLATED_VERBATIM_STRING, { + illegal: /\n/, + contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST_NO_LF] + }); + SUBST.contains = [ + INTERPOLATED_VERBATIM_STRING, + INTERPOLATED_STRING, + VERBATIM_STRING, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + NUMBERS, + hljs.C_BLOCK_COMMENT_MODE + ]; + SUBST_NO_LF.contains = [ + INTERPOLATED_VERBATIM_STRING_NO_LF, + INTERPOLATED_STRING, + VERBATIM_STRING_NO_LF, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + NUMBERS, + hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, {illegal: /\n/}) + ]; + var STRING = { + variants: [ + INTERPOLATED_VERBATIM_STRING, + INTERPOLATED_STRING, + VERBATIM_STRING, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }; + + var GENERIC_MODIFIER = { + begin: "<", + end: ">", + contains: [ + { beginKeywords: "in out"}, + TITLE_MODE + ] + }; + var TYPE_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '(\\s*,\\s*' + hljs.IDENT_RE + ')*>)?(\\[\\])?'; + var AT_IDENTIFIER = { + // prevents expressions like `@class` from incorrect flagging + // `class` as a keyword + begin: "@" + hljs.IDENT_RE, + relevance: 0 + }; + + return { + name: 'C#', + aliases: ['cs', 'c#'], + keywords: KEYWORDS, + illegal: /::/, + contains: [ + hljs.COMMENT( + '///', + '$', + { + returnBegin: true, + contains: [ + { + className: 'doctag', + variants: [ + { + begin: '///', relevance: 0 + }, + { + begin: '<!--|-->' + }, + { + begin: '</?', end: '>' + } + ] + } + ] + } + ), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'meta', + begin: '#', end: '$', + keywords: { + 'meta-keyword': 'if else elif endif define undef warning error line region endregion pragma checksum' + } + }, + STRING, + NUMBERS, + { + beginKeywords: 'class interface', end: /[{;=]/, + illegal: /[^\s:,]/, + contains: [ + { beginKeywords: "where class" }, + TITLE_MODE, + GENERIC_MODIFIER, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + { + beginKeywords: 'namespace', end: /[{;=]/, + illegal: /[^\s:]/, + contains: [ + TITLE_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + { + beginKeywords: 'record', end: /[{;=]/, + illegal: /[^\s:]/, + contains: [ + TITLE_MODE, + GENERIC_MODIFIER, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + { + // [Attributes("")] + className: 'meta', + begin: '^\\s*\\[', excludeBegin: true, end: '\\]', excludeEnd: true, + contains: [ + {className: 'meta-string', begin: /"/, end: /"/} + ] + }, + { + // Expression keywords prevent 'keyword Name(...)' from being + // recognized as a function definition + beginKeywords: 'new return throw await else', + relevance: 0 + }, + { + className: 'function', + begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*(\\<.+\\>)?\\s*\\(', returnBegin: true, + end: /\s*[{;=]/, excludeEnd: true, + keywords: KEYWORDS, + contains: [ + { + begin: hljs.IDENT_RE + '\\s*(\\<.+\\>)?\\s*\\(', returnBegin: true, + contains: [ + hljs.TITLE_MODE, + GENERIC_MODIFIER + ], + relevance: 0 + }, + { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS, + relevance: 0, + contains: [ + STRING, + NUMBERS, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + AT_IDENTIFIER + ] + }; +} + +module.exports = csharp; diff --git a/node_modules/highlight.js/lib/languages/csp.js b/node_modules/highlight.js/lib/languages/csp.js @@ -0,0 +1,34 @@ +/* +Language: CSP +Description: Content Security Policy definition highlighting +Author: Taras <oxdef@oxdef.info> +Website: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP + +vim: ts=2 sw=2 st=2 +*/ + +/** @type LanguageFn */ +function csp(hljs) { + return { + name: 'CSP', + case_insensitive: false, + keywords: { + $pattern: '[a-zA-Z][a-zA-Z0-9_-]*', + keyword: 'base-uri child-src connect-src default-src font-src form-action ' + + 'frame-ancestors frame-src img-src media-src object-src plugin-types ' + + 'report-uri sandbox script-src style-src', + }, + contains: [ + { + className: 'string', + begin: "'", end: "'" + }, + { + className: 'attribute', + begin: '^Content', end: ':', excludeEnd: true, + }, + ] + }; +} + +module.exports = csp; diff --git a/node_modules/highlight.js/lib/languages/css.js b/node_modules/highlight.js/lib/languages/css.js @@ -0,0 +1,134 @@ +/* +Language: CSS +Category: common, css +Website: https://developer.mozilla.org/en-US/docs/Web/CSS +*/ + +/** @type LanguageFn */ +function css(hljs) { + var FUNCTION_LIKE = { + begin: /[\w-]+\(/, returnBegin: true, + contains: [ + { + className: 'built_in', + begin: /[\w-]+/ + }, + { + begin: /\(/, end: /\)/, + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.CSS_NUMBER_MODE, + ] + } + ] + }; + var ATTRIBUTE = { + className: 'attribute', + begin: /\S/, end: ':', excludeEnd: true, + starts: { + endsWithParent: true, excludeEnd: true, + contains: [ + FUNCTION_LIKE, + hljs.CSS_NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'number', begin: '#[0-9A-Fa-f]+' + }, + { + className: 'meta', begin: '!important' + } + ] + } + }; + var AT_IDENTIFIER = '@[a-z-]+'; // @font-face + var AT_MODIFIERS = "and or not only"; + var AT_PROPERTY_RE = /@\-?\w[\w]*(\-\w+)*/; // @-webkit-keyframes + var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*'; + var RULE = { + begin: /(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/, returnBegin: true, end: ';', endsWithParent: true, + contains: [ + ATTRIBUTE + ] + }; + + return { + name: 'CSS', + case_insensitive: true, + illegal: /[=\/|'\$]/, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'selector-id', begin: /#[A-Za-z0-9_-]+/ + }, + { + className: 'selector-class', begin: /\.[A-Za-z0-9_-]+/ + }, + { + className: 'selector-attr', + begin: /\[/, end: /\]/, + illegal: '$', + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + ] + }, + { + className: 'selector-pseudo', + begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/ + }, + // matching these here allows us to treat them more like regular CSS + // rules so everything between the {} gets regular rule highlighting, + // which is what we want for page and font-face + { + begin: '@(page|font-face)', + lexemes: AT_IDENTIFIER, + keywords: '@page @font-face' + }, + { + begin: '@', end: '[{;]', // at_rule eating first "{" is a good thing + // because it doesn’t let it to be parsed as + // a rule set but instead drops parser into + // the default mode which is how it should be. + illegal: /:/, // break on Less variables @var: ... + returnBegin: true, + contains: [ + { + className: 'keyword', + begin: AT_PROPERTY_RE + }, + { + begin: /\s/, endsWithParent: true, excludeEnd: true, + relevance: 0, + keywords: AT_MODIFIERS, + contains: [ + { + begin: /[a-z-]+:/, + className:"attribute" + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.CSS_NUMBER_MODE + ] + } + ] + }, + { + className: 'selector-tag', begin: IDENT_RE, + relevance: 0 + }, + { + begin: '{', end: '}', + illegal: /\S/, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + RULE, + ] + } + ] + }; +} + +module.exports = css; diff --git a/node_modules/highlight.js/lib/languages/d.js b/node_modules/highlight.js/lib/languages/d.js @@ -0,0 +1,270 @@ +/* +Language: D +Author: Aleksandar Ruzicic <aleksandar@ruzicic.info> +Description: D is a language with C-like syntax and static typing. It pragmatically combines efficiency, control, and modeling power, with safety and programmer productivity. +Version: 1.0a +Website: https://dlang.org +Date: 2012-04-08 +*/ + +/** + * Known issues: + * + * - invalid hex string literals will be recognized as a double quoted strings + * but 'x' at the beginning of string will not be matched + * + * - delimited string literals are not checked for matching end delimiter + * (not possible to do with js regexp) + * + * - content of token string is colored as a string (i.e. no keyword coloring inside a token string) + * also, content of token string is not validated to contain only valid D tokens + * + * - special token sequence rule is not strictly following D grammar (anything following #line + * up to the end of line is matched as special token sequence) + */ + +/** @type LanguageFn */ +function d(hljs) { + /** + * Language keywords + * + * @type {Object} + */ + var D_KEYWORDS = { + $pattern: hljs.UNDERSCORE_IDENT_RE, + keyword: + 'abstract alias align asm assert auto body break byte case cast catch class ' + + 'const continue debug default delete deprecated do else enum export extern final ' + + 'finally for foreach foreach_reverse|10 goto if immutable import in inout int ' + + 'interface invariant is lazy macro mixin module new nothrow out override package ' + + 'pragma private protected public pure ref return scope shared static struct ' + + 'super switch synchronized template this throw try typedef typeid typeof union ' + + 'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 ' + + '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__', + built_in: + 'bool cdouble cent cfloat char creal dchar delegate double dstring float function ' + + 'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar ' + + 'wstring', + literal: + 'false null true' + }; + + /** + * Number literal regexps + * + * @type {String} + */ + var decimal_integer_re = '(0|[1-9][\\d_]*)', + decimal_integer_nosus_re = '(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)', + binary_integer_re = '0[bB][01_]+', + hexadecimal_digits_re = '([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)', + hexadecimal_integer_re = '0[xX]' + hexadecimal_digits_re, + + decimal_exponent_re = '([eE][+-]?' + decimal_integer_nosus_re + ')', + decimal_float_re = '(' + decimal_integer_nosus_re + '(\\.\\d*|' + decimal_exponent_re + ')|' + + '\\d+\\.' + decimal_integer_nosus_re + decimal_integer_nosus_re + '|' + + '\\.' + decimal_integer_re + decimal_exponent_re + '?' + + ')', + hexadecimal_float_re = '(0[xX](' + + hexadecimal_digits_re + '\\.' + hexadecimal_digits_re + '|'+ + '\\.?' + hexadecimal_digits_re + + ')[pP][+-]?' + decimal_integer_nosus_re + ')', + + integer_re = '(' + + decimal_integer_re + '|' + + binary_integer_re + '|' + + hexadecimal_integer_re + + ')', + + float_re = '(' + + hexadecimal_float_re + '|' + + decimal_float_re + + ')'; + + /** + * Escape sequence supported in D string and character literals + * + * @type {String} + */ + var escape_sequence_re = '\\\\(' + + '[\'"\\?\\\\abfnrtv]|' + // common escapes + 'u[\\dA-Fa-f]{4}|' + // four hex digit unicode codepoint + '[0-7]{1,3}|' + // one to three octal digit ascii char code + 'x[\\dA-Fa-f]{2}|' + // two hex digit ascii char code + 'U[\\dA-Fa-f]{8}' + // eight hex digit unicode codepoint + ')|' + + '&[a-zA-Z\\d]{2,};'; // named character entity + + /** + * D integer number literals + * + * @type {Object} + */ + var D_INTEGER_MODE = { + className: 'number', + begin: '\\b' + integer_re + '(L|u|U|Lu|LU|uL|UL)?', + relevance: 0 + }; + + /** + * [D_FLOAT_MODE description] + * @type {Object} + */ + var D_FLOAT_MODE = { + className: 'number', + begin: '\\b(' + + float_re + '([fF]|L|i|[fF]i|Li)?|' + + integer_re + '(i|[fF]i|Li)' + + ')', + relevance: 0 + }; + + /** + * D character literal + * + * @type {Object} + */ + var D_CHARACTER_MODE = { + className: 'string', + begin: '\'(' + escape_sequence_re + '|.)', end: '\'', + illegal: '.' + }; + + /** + * D string escape sequence + * + * @type {Object} + */ + var D_ESCAPE_SEQUENCE = { + begin: escape_sequence_re, + relevance: 0 + }; + + /** + * D double quoted string literal + * + * @type {Object} + */ + var D_STRING_MODE = { + className: 'string', + begin: '"', + contains: [D_ESCAPE_SEQUENCE], + end: '"[cwd]?' + }; + + /** + * D wysiwyg and delimited string literals + * + * @type {Object} + */ + var D_WYSIWYG_DELIMITED_STRING_MODE = { + className: 'string', + begin: '[rq]"', + end: '"[cwd]?', + relevance: 5 + }; + + /** + * D alternate wysiwyg string literal + * + * @type {Object} + */ + var D_ALTERNATE_WYSIWYG_STRING_MODE = { + className: 'string', + begin: '`', + end: '`[cwd]?' + }; + + /** + * D hexadecimal string literal + * + * @type {Object} + */ + var D_HEX_STRING_MODE = { + className: 'string', + begin: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?', + relevance: 10 + }; + + /** + * D delimited string literal + * + * @type {Object} + */ + var D_TOKEN_STRING_MODE = { + className: 'string', + begin: 'q"\\{', + end: '\\}"' + }; + + /** + * Hashbang support + * + * @type {Object} + */ + var D_HASHBANG_MODE = { + className: 'meta', + begin: '^#!', + end: '$', + relevance: 5 + }; + + /** + * D special token sequence + * + * @type {Object} + */ + var D_SPECIAL_TOKEN_SEQUENCE_MODE = { + className: 'meta', + begin: '#(line)', + end: '$', + relevance: 5 + }; + + /** + * D attributes + * + * @type {Object} + */ + var D_ATTRIBUTE_MODE = { + className: 'keyword', + begin: '@[a-zA-Z_][a-zA-Z_\\d]*' + }; + + /** + * D nesting comment + * + * @type {Object} + */ + var D_NESTING_COMMENT_MODE = hljs.COMMENT( + '\\/\\+', + '\\+\\/', + { + contains: ['self'], + relevance: 10 + } + ); + + return { + name: 'D', + keywords: D_KEYWORDS, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + D_NESTING_COMMENT_MODE, + D_HEX_STRING_MODE, + D_STRING_MODE, + D_WYSIWYG_DELIMITED_STRING_MODE, + D_ALTERNATE_WYSIWYG_STRING_MODE, + D_TOKEN_STRING_MODE, + D_FLOAT_MODE, + D_INTEGER_MODE, + D_CHARACTER_MODE, + D_HASHBANG_MODE, + D_SPECIAL_TOKEN_SEQUENCE_MODE, + D_ATTRIBUTE_MODE + ] + }; +} + +module.exports = d; diff --git a/node_modules/highlight.js/lib/languages/dart.js b/node_modules/highlight.js/lib/languages/dart.js @@ -0,0 +1,178 @@ +/* +Language: Dart +Requires: markdown.js +Author: Maxim Dikun <dikmax@gmail.com> +Description: Dart a modern, object-oriented language developed by Google. For more information see https://www.dartlang.org/ +Website: https://dart.dev +Category: scripting +*/ + +function dart(hljs) { + const SUBST = { + className: 'subst', + variants: [{ + begin: '\\$[A-Za-z0-9_]+' + }], + }; + + const BRACED_SUBST = { + className: 'subst', + variants: [{ + begin: '\\${', + end: '}' + }], + keywords: 'true false null this is new super', + }; + + const STRING = { + className: 'string', + variants: [{ + begin: 'r\'\'\'', + end: '\'\'\'' + }, + { + begin: 'r"""', + end: '"""' + }, + { + begin: 'r\'', + end: '\'', + illegal: '\\n' + }, + { + begin: 'r"', + end: '"', + illegal: '\\n' + }, + { + begin: '\'\'\'', + end: '\'\'\'', + contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST] + }, + { + begin: '"""', + end: '"""', + contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST] + }, + { + begin: '\'', + end: '\'', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST] + }, + { + begin: '"', + end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE, SUBST, BRACED_SUBST] + } + ] + }; + BRACED_SUBST.contains = [ + hljs.C_NUMBER_MODE, STRING + ]; + + const BUILT_IN_TYPES = [ + // dart:core + 'Comparable', + 'DateTime', + 'Duration', + 'Function', + 'Iterable', + 'Iterator', + 'List', + 'Map', + 'Match', + 'Object', + 'Pattern', + 'RegExp', + 'Set', + 'Stopwatch', + 'String', + 'StringBuffer', + 'StringSink', + 'Symbol', + 'Type', + 'Uri', + 'bool', + 'double', + 'int', + 'num', + // dart:html + 'Element', + 'ElementList', + ]; + const NULLABLE_BUILT_IN_TYPES = BUILT_IN_TYPES.map((e) => `${e}?`); + + const KEYWORDS = { + keyword: 'abstract as assert async await break case catch class const continue covariant default deferred do ' + + 'dynamic else enum export extends extension external factory false final finally for Function get hide if ' + + 'implements import in inferface is late library mixin new null on operator part required rethrow return set ' + + 'show static super switch sync this throw true try typedef var void while with yield', + built_in: + BUILT_IN_TYPES + .concat(NULLABLE_BUILT_IN_TYPES) + .concat([ + // dart:core + 'Never', + 'Null', + 'dynamic', + 'print', + // dart:html + 'document', + 'querySelector', + 'querySelectorAll', + 'window', + ]).join(' '), + $pattern: /[A-Za-z][A-Za-z0-9_]*\??/ + }; + + return { + name: 'Dart', + keywords: KEYWORDS, + contains: [ + STRING, + hljs.COMMENT( + '/\\*\\*', + '\\*/', { + subLanguage: 'markdown', + relevance:0 + } + ), + hljs.COMMENT( + '///+\\s*', + '$', { + contains: [{ + subLanguage: 'markdown', + begin: '.', + end: '$', + relevance:0 + }] + } + ), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'class', + beginKeywords: 'class interface', + end: '{', + excludeEnd: true, + contains: [{ + beginKeywords: 'extends implements' + }, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + hljs.C_NUMBER_MODE, + { + className: 'meta', + begin: '@[A-Za-z]+' + }, + { + begin: '=>' // No markup, just a relevance booster + } + ] + }; +} + +module.exports = dart; diff --git a/node_modules/highlight.js/lib/languages/delphi.js b/node_modules/highlight.js/lib/languages/delphi.js @@ -0,0 +1,97 @@ +/* +Language: Delphi +Website: https://www.embarcadero.com/products/delphi +*/ + +/** @type LanguageFn */ +function delphi(hljs) { + var KEYWORDS = + 'exports register file shl array record property for mod while set ally label uses raise not ' + + 'stored class safecall var interface or private static exit index inherited to else stdcall ' + + 'override shr asm far resourcestring finalization packed virtual out and protected library do ' + + 'xorwrite goto near function end div overload object unit begin string on inline repeat until ' + + 'destructor write message program with read initialization except default nil if case cdecl in ' + + 'downto threadvar of try pascal const external constructor type public then implementation ' + + 'finally published procedure absolute reintroduce operator as is abstract alias assembler ' + + 'bitpacked break continue cppdecl cvar enumerator experimental platform deprecated ' + + 'unimplemented dynamic export far16 forward generic helper implements interrupt iochecks ' + + 'local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat ' + + 'specialize strict unaligned varargs '; + var COMMENT_MODES = [ + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT(/\{/, /\}/, {relevance: 0}), + hljs.COMMENT(/\(\*/, /\*\)/, {relevance: 10}) + ]; + var DIRECTIVE = { + className: 'meta', + variants: [ + {begin: /\{\$/, end: /\}/}, + {begin: /\(\*\$/, end: /\*\)/} + ] + }; + var STRING = { + className: 'string', + begin: /'/, end: /'/, + contains: [{begin: /''/}] + }; + var NUMBER = { + className: 'number', + relevance: 0, + // Source: https://www.freepascal.org/docs-html/ref/refse6.html + variants: [ + { + // Hexadecimal notation, e.g., $7F. + begin: '\\$[0-9A-Fa-f]+', + }, + { + // Octal notation, e.g., &42. + begin: '&[0-7]+', + }, + { + // Binary notation, e.g., %1010. + begin: '%[01]+', + } + ] + }; + var CHAR_STRING = { + className: 'string', begin: /(#\d+)+/ + }; + var CLASS = { + begin: hljs.IDENT_RE + '\\s*=\\s*class\\s*\\(', returnBegin: true, + contains: [ + hljs.TITLE_MODE + ] + }; + var FUNCTION = { + className: 'function', + beginKeywords: 'function constructor destructor procedure', end: /[:;]/, + keywords: 'function constructor|10 destructor|10 procedure|10', + contains: [ + hljs.TITLE_MODE, + { + className: 'params', + begin: /\(/, end: /\)/, + keywords: KEYWORDS, + contains: [STRING, CHAR_STRING, DIRECTIVE].concat(COMMENT_MODES) + }, + DIRECTIVE + ].concat(COMMENT_MODES) + }; + return { + name: 'Delphi', + aliases: ['dpr', 'dfm', 'pas', 'pascal', 'freepascal', 'lazarus', 'lpr', 'lfm'], + case_insensitive: true, + keywords: KEYWORDS, + illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/, + contains: [ + STRING, CHAR_STRING, + hljs.NUMBER_MODE, + NUMBER, + CLASS, + FUNCTION, + DIRECTIVE + ].concat(COMMENT_MODES) + }; +} + +module.exports = delphi; diff --git a/node_modules/highlight.js/lib/languages/diff.js b/node_modules/highlight.js/lib/languages/diff.js @@ -0,0 +1,51 @@ +/* +Language: Diff +Description: Unified and context diff +Author: Vasily Polovnyov <vast@whiteants.net> +Website: https://www.gnu.org/software/diffutils/ +Category: common +*/ + +/** @type LanguageFn */ +function diff(hljs) { + return { + name: 'Diff', + aliases: ['patch'], + contains: [ + { + className: 'meta', + relevance: 10, + variants: [ + {begin: /^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/}, + {begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/}, + {begin: /^\-\-\- +\d+,\d+ +\-\-\-\-$/} + ] + }, + { + className: 'comment', + variants: [ + {begin: /Index: /, end: /$/}, + {begin: /={3,}/, end: /$/}, + {begin: /^\-{3}/, end: /$/}, + {begin: /^\*{3} /, end: /$/}, + {begin: /^\+{3}/, end: /$/}, + {begin: /^\*{15}$/ } + ] + }, + { + className: 'addition', + begin: '^\\+', end: '$' + }, + { + className: 'deletion', + begin: '^\\-', end: '$' + }, + { + className: 'addition', + begin: '^\\!', end: '$' + } + ] + }; +} + +module.exports = diff; diff --git a/node_modules/highlight.js/lib/languages/django.js b/node_modules/highlight.js/lib/languages/django.js @@ -0,0 +1,76 @@ +/* +Language: Django +Description: Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. +Requires: xml.js +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Contributors: Ilya Baryshev <baryshev@gmail.com> +Website: https://www.djangoproject.com +Category: template +*/ + +function django(hljs) { + var FILTER = { + begin: /\|[A-Za-z]+:?/, + keywords: { + name: + 'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' + + 'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' + + 'title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode ' + + 'timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort ' + + 'dictsortreversed default_if_none pluralize lower join center default ' + + 'truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first ' + + 'escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize ' + + 'localtime utc timezone' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE + ] + }; + + return { + name: 'Django', + aliases: ['jinja'], + case_insensitive: true, + subLanguage: 'xml', + contains: [ + hljs.COMMENT(/\{%\s*comment\s*%}/, /\{%\s*endcomment\s*%}/), + hljs.COMMENT(/\{#/, /#}/), + { + className: 'template-tag', + begin: /\{%/, end: /%}/, + contains: [ + { + className: 'name', + begin: /\w+/, + keywords: { + name: + 'comment endcomment load templatetag ifchanged endifchanged if endif firstof for ' + + 'endfor ifnotequal endifnotequal widthratio extends include spaceless ' + + 'endspaceless regroup ifequal endifequal ssi now with cycle url filter ' + + 'endfilter debug block endblock else autoescape endautoescape csrf_token empty elif ' + + 'endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix ' + + 'plural get_current_language language get_available_languages ' + + 'get_current_language_bidi get_language_info get_language_info_list localize ' + + 'endlocalize localtime endlocaltime timezone endtimezone get_current_timezone ' + + 'verbatim' + }, + starts: { + endsWithParent: true, + keywords: 'in by as', + contains: [FILTER], + relevance: 0 + } + } + ] + }, + { + className: 'template-variable', + begin: /\{\{/, end: /}}/, + contains: [FILTER] + } + ] + }; +} + +module.exports = django; diff --git a/node_modules/highlight.js/lib/languages/dns.js b/node_modules/highlight.js/lib/languages/dns.js @@ -0,0 +1,39 @@ +/* +Language: DNS Zone +Author: Tim Schumacher <tim@datenknoten.me> +Category: config +Website: https://en.wikipedia.org/wiki/Zone_file +*/ + +/** @type LanguageFn */ +function dns(hljs) { + return { + name: 'DNS Zone', + aliases: ['bind', 'zone'], + keywords: { + keyword: + 'IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX ' + + 'LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT' + }, + contains: [ + hljs.COMMENT(';', '$', {relevance: 0}), + { + className: 'meta', + begin: /^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/ + }, + // IPv6 + { + className: 'number', + begin: '((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b' + }, + // IPv4 + { + className: 'number', + begin: '((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b' + }, + hljs.inherit(hljs.NUMBER_MODE, {begin: /\b\d+[dhwm]?/}) + ] + }; +} + +module.exports = dns; diff --git a/node_modules/highlight.js/lib/languages/dockerfile.js b/node_modules/highlight.js/lib/languages/dockerfile.js @@ -0,0 +1,33 @@ +/* +Language: Dockerfile +Requires: bash.js +Author: Alexis Hénaut <alexis@henaut.net> +Description: language definition for Dockerfile files +Website: https://docs.docker.com/engine/reference/builder/ +Category: config +*/ + +function dockerfile(hljs) { + return { + name: 'Dockerfile', + aliases: ['docker'], + case_insensitive: true, + keywords: 'from maintainer expose env arg user onbuild stopsignal', + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE, + { + beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck shell', + starts: { + end: /[^\\]$/, + subLanguage: 'bash' + } + } + ], + illegal: '</' + } +} + +module.exports = dockerfile; diff --git a/node_modules/highlight.js/lib/languages/dos.js b/node_modules/highlight.js/lib/languages/dos.js @@ -0,0 +1,61 @@ +/* +Language: Batch file (DOS) +Author: Alexander Makarov <sam@rmcreative.ru> +Contributors: Anton Kochkov <anton.kochkov@gmail.com> +Website: https://en.wikipedia.org/wiki/Batch_file +*/ + +function dos(hljs) { + var COMMENT = hljs.COMMENT( + /^\s*@?rem\b/, /$/, + { + relevance: 10 + } + ); + var LABEL = { + className: 'symbol', + begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)', + relevance: 0 + }; + return { + name: 'Batch file (DOS)', + aliases: ['bat', 'cmd'], + case_insensitive: true, + illegal: /\/\*/, + keywords: { + keyword: + 'if else goto for in do call exit not exist errorlevel defined ' + + 'equ neq lss leq gtr geq', + built_in: + 'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux ' + + 'shift cd dir echo setlocal endlocal set pause copy ' + + 'append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color ' + + 'comp compact convert date dir diskcomp diskcopy doskey erase fs ' + + 'find findstr format ftype graftabl help keyb label md mkdir mode more move path ' + + 'pause print popd pushd promt rd recover rem rename replace restore rmdir shift ' + + 'sort start subst time title tree type ver verify vol ' + + // winutils + 'ping net ipconfig taskkill xcopy ren del' + }, + contains: [ + { + className: 'variable', begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/ + }, + { + className: 'function', + begin: LABEL.begin, end: 'goto:eof', + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'}), + COMMENT + ] + }, + { + className: 'number', begin: '\\b\\d+', + relevance: 0 + }, + COMMENT + ] + }; +} + +module.exports = dos; diff --git a/node_modules/highlight.js/lib/languages/dsconfig.js b/node_modules/highlight.js/lib/languages/dsconfig.js @@ -0,0 +1,54 @@ +/* + Language: dsconfig + Description: dsconfig batch configuration language for LDAP directory servers + Contributors: Jacob Childress <jacobc@gmail.com> + Category: enterprise, config + */ +function dsconfig(hljs) { + var QUOTED_PROPERTY = { + className: 'string', + begin: /"/, end: /"/ + }; + var APOS_PROPERTY = { + className: 'string', + begin: /'/, end: /'/ + }; + var UNQUOTED_PROPERTY = { + className: 'string', + begin: '[\\w-?]+:\\w+', end: '\\W', + relevance: 0 + }; + var VALUELESS_PROPERTY = { + className: 'string', + begin: '\\w+-?\\w+', end: '\\W', + relevance: 0 + }; + + return { + keywords: 'dsconfig', + contains: [ + { + className: 'keyword', + begin: '^dsconfig', end: '\\s', excludeEnd: true, + relevance: 10 + }, + { + className: 'built_in', + begin: '(list|create|get|set|delete)-(\\w+)', end: '\\s', excludeEnd: true, + illegal: '!@#$%^&*()', + relevance: 10 + }, + { + className: 'built_in', + begin: '--(\\w+)', end: '\\s', excludeEnd: true + }, + QUOTED_PROPERTY, + APOS_PROPERTY, + UNQUOTED_PROPERTY, + VALUELESS_PROPERTY, + hljs.HASH_COMMENT_MODE + ] + }; +} + +module.exports = dsconfig; diff --git a/node_modules/highlight.js/lib/languages/dts.js b/node_modules/highlight.js/lib/languages/dts.js @@ -0,0 +1,134 @@ +/* +Language: Device Tree +Description: *.dts files used in the Linux kernel +Author: Martin Braun <martin.braun@ettus.com>, Moritz Fischer <moritz.fischer@ettus.com> +Website: https://elinux.org/Device_Tree_Reference +Category: config +*/ + +function dts(hljs) { + var STRINGS = { + className: 'string', + variants: [ + hljs.inherit(hljs.QUOTE_STRING_MODE, { begin: '((u8?|U)|L)?"' }), + { + begin: '(u8?|U)?R"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: '\'\\\\?.', end: '\'', + illegal: '.' + } + ] + }; + + var NUMBERS = { + className: 'number', + variants: [ + { begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' }, + { begin: hljs.C_NUMBER_RE } + ], + relevance: 0 + }; + + var PREPROCESSOR = { + className: 'meta', + begin: '#', end: '$', + keywords: {'meta-keyword': 'if else elif endif define undef ifdef ifndef'}, + contains: [ + { + begin: /\\\n/, relevance: 0 + }, + { + beginKeywords: 'include', end: '$', + keywords: {'meta-keyword': 'include'}, + contains: [ + hljs.inherit(STRINGS, {className: 'meta-string'}), + { + className: 'meta-string', + begin: '<', end: '>', + illegal: '\\n' + } + ] + }, + STRINGS, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }; + + var DTS_REFERENCE = { + className: 'variable', + begin: '\\&[a-z\\d_]*\\b' + }; + + var DTS_KEYWORD = { + className: 'meta-keyword', + begin: '/[a-z][a-z\\d-]*/' + }; + + var DTS_LABEL = { + className: 'symbol', + begin: '^\\s*[a-zA-Z_][a-zA-Z\\d_]*:' + }; + + var DTS_CELL_PROPERTY = { + className: 'params', + begin: '<', + end: '>', + contains: [ + NUMBERS, + DTS_REFERENCE + ] + }; + + var DTS_NODE = { + className: 'class', + begin: /[a-zA-Z_][a-zA-Z\d_@]*\s{/, + end: /[{;=]/, + returnBegin: true, + excludeEnd: true + }; + + var DTS_ROOT_NODE = { + className: 'class', + begin: '/\\s*{', + end: '};', + relevance: 10, + contains: [ + DTS_REFERENCE, + DTS_KEYWORD, + DTS_LABEL, + DTS_NODE, + DTS_CELL_PROPERTY, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + NUMBERS, + STRINGS + ] + }; + + return { + name: 'Device Tree', + keywords: "", + contains: [ + DTS_ROOT_NODE, + DTS_REFERENCE, + DTS_KEYWORD, + DTS_LABEL, + DTS_NODE, + DTS_CELL_PROPERTY, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + NUMBERS, + STRINGS, + PREPROCESSOR, + { + begin: hljs.IDENT_RE + '::', + keywords: "" + } + ] + }; +} + +module.exports = dts; diff --git a/node_modules/highlight.js/lib/languages/dust.js b/node_modules/highlight.js/lib/languages/dust.js @@ -0,0 +1,43 @@ +/* +Language: Dust +Requires: xml.js +Author: Michael Allen <michael.allen@benefitfocus.com> +Description: Matcher for dust.js templates. +Website: https://www.dustjs.com +Category: template +*/ + +function dust(hljs) { + var EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep'; + return { + name: 'Dust', + aliases: ['dst'], + case_insensitive: true, + subLanguage: 'xml', + contains: [ + { + className: 'template-tag', + begin: /\{[#\/]/, end: /\}/, illegal: /;/, + contains: [ + { + className: 'name', + begin: /[a-zA-Z\.-]+/, + starts: { + endsWithParent: true, relevance: 0, + contains: [ + hljs.QUOTE_STRING_MODE + ] + } + } + ] + }, + { + className: 'template-variable', + begin: /\{/, end: /\}/, illegal: /;/, + keywords: EXPRESSION_KEYWORDS + } + ] + }; +} + +module.exports = dust; diff --git a/node_modules/highlight.js/lib/languages/ebnf.js b/node_modules/highlight.js/lib/languages/ebnf.js @@ -0,0 +1,48 @@ +/* +Language: Extended Backus-Naur Form +Author: Alex McKibben <alex@nullscope.net> +Website: https://en.wikipedia.org/wiki/Extended_Backus–Naur_form +*/ + +function ebnf(hljs) { + var commentMode = hljs.COMMENT(/\(\*/, /\*\)/); + + var nonTerminalMode = { + className: "attribute", + begin: /^[ ]*[a-zA-Z][a-zA-Z-_]*([\s-_]+[a-zA-Z][a-zA-Z]*)*/ + }; + + var specialSequenceMode = { + className: "meta", + begin: /\?.*\?/ + }; + + var ruleBodyMode = { + begin: /=/, end: /[.;]/, + contains: [ + commentMode, + specialSequenceMode, + { + // terminals + className: 'string', + variants: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + {begin: '`', end: '`'}, + ] + }, + ] + }; + + return { + name: 'Extended Backus-Naur Form', + illegal: /\S/, + contains: [ + commentMode, + nonTerminalMode, + ruleBodyMode + ] + }; +} + +module.exports = ebnf; diff --git a/node_modules/highlight.js/lib/languages/elixir.js b/node_modules/highlight.js/lib/languages/elixir.js @@ -0,0 +1,183 @@ +/* +Language: Elixir +Author: Josh Adams <josh@isotope11.com> +Description: language definition for Elixir source code files (.ex and .exs). Based on ruby language support. +Category: functional +Website: https://elixir-lang.org +*/ + +function elixir(hljs) { + var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?'; + var ELIXIR_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?'; + var ELIXIR_KEYWORDS = { + $pattern: ELIXIR_IDENT_RE, + keyword: 'and false then defined module in return redo retry end for true self when ' + + 'next until do begin unless nil break not case cond alias while ensure or ' + + 'include use alias fn quote require import with|0' + }; + var SUBST = { + className: 'subst', + begin: '#\\{', end: '}', + keywords: ELIXIR_KEYWORDS + }; + var NUMBER = { + className: 'number', + begin: '(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(.[0-9_]+([eE][-+]?[0-9]+)?)?)', + relevance: 0 + }; + var SIGIL_DELIMITERS = '[/|([{<"\']'; + var LOWERCASE_SIGIL = { + className: 'string', + begin: '~[a-z]' + '(?=' + SIGIL_DELIMITERS + ')', + contains: [ + { + endsParent:true, + contains: [{ + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + { begin: /"/, end: /"/ }, + { begin: /'/, end: /'/ }, + { begin: /\//, end: /\// }, + { begin: /\|/, end: /\|/ }, + { begin: /\(/, end: /\)/ }, + { begin: /\[/, end: /\]/ }, + { begin: /\{/, end: /\}/ }, + { begin: /</, end: />/ } + ] + }] + }, + ], + }; + + var UPCASE_SIGIL = { + className: 'string', + begin: '~[A-Z]' + '(?=' + SIGIL_DELIMITERS + ')', + contains: [ + { begin: /"/, end: /"/ }, + { begin: /'/, end: /'/ }, + { begin: /\//, end: /\// }, + { begin: /\|/, end: /\|/ }, + { begin: /\(/, end: /\)/ }, + { begin: /\[/, end: /\]/ }, + { begin: /\{/, end: /\}/ }, + { begin: /\</, end: /\>/ } + ] + }; + + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + { + begin: /"""/, end: /"""/, + }, + { + begin: /'''/, end: /'''/, + }, + { + begin: /~S"""/, end: /"""/, + contains: [] + }, + { + begin: /~S"/, end: /"/, + contains: [] + }, + { + begin: /~S'''/, end: /'''/, + contains: [] + }, + { + begin: /~S'/, end: /'/, + contains: [] + }, + { + begin: /'/, end: /'/ + }, + { + begin: /"/, end: /"/ + }, + ] + }; + var FUNCTION = { + className: 'function', + beginKeywords: 'def defp defmacro', end: /\B\b/, // the mode is ended by the title + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + begin: ELIXIR_IDENT_RE, + endsParent: true + }) + ] + }; + var CLASS = hljs.inherit(FUNCTION, { + className: 'class', + beginKeywords: 'defimpl defmodule defprotocol defrecord', end: /\bdo\b|$|;/ + }); + var ELIXIR_DEFAULT_CONTAINS = [ + STRING, + UPCASE_SIGIL, + LOWERCASE_SIGIL, + hljs.HASH_COMMENT_MODE, + CLASS, + FUNCTION, + { + begin: '::' + }, + { + className: 'symbol', + begin: ':(?![\\s:])', + contains: [STRING, {begin: ELIXIR_METHOD_RE}], + relevance: 0 + }, + { + className: 'symbol', + begin: ELIXIR_IDENT_RE + ':(?!:)', + relevance: 0 + }, + NUMBER, + { + className: 'variable', + begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))' + }, + { + begin: '->' + }, + { // regexp container + begin: '(' + hljs.RE_STARTERS_RE + ')\\s*', + contains: [ + hljs.HASH_COMMENT_MODE, + { + // to prevent false regex triggers for the division function: + // /: + begin: /\/: (?=\d+\s*[,\]])/, + relevance: 0, + contains: [ + NUMBER + ] + }, + { + className: 'regexp', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + { + begin: '/', end: '/[a-z]*' + }, + { + begin: '%r\\[', end: '\\][a-z]*' + } + ] + } + ], + relevance: 0 + } + ]; + SUBST.contains = ELIXIR_DEFAULT_CONTAINS; + + return { + name: 'Elixir', + keywords: ELIXIR_KEYWORDS, + contains: ELIXIR_DEFAULT_CONTAINS + }; +} + +module.exports = elixir; diff --git a/node_modules/highlight.js/lib/languages/elm.js b/node_modules/highlight.js/lib/languages/elm.js @@ -0,0 +1,99 @@ +/* +Language: Elm +Author: Janis Voigtlaender <janis.voigtlaender@gmail.com> +Website: https://elm-lang.org +Category: functional +*/ + +function elm(hljs) { + var COMMENT = { + variants: [ + hljs.COMMENT('--', '$'), + hljs.COMMENT( + '{-', + '-}', + { + contains: ['self'] + } + ) + ] + }; + + var CONSTRUCTOR = { + className: 'type', + begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (built-in, infix). + relevance: 0 + }; + + var LIST = { + begin: '\\(', end: '\\)', + illegal: '"', + contains: [ + {className: 'type', begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'}, + COMMENT + ] + }; + + var RECORD = { + begin: '{', end: '}', + contains: LIST.contains + }; + + var CHARACTER = { + className: 'string', + begin: '\'\\\\?.', end: '\'', + illegal: '.' + }; + + return { + name: 'Elm', + keywords: + 'let in if then else case of where module import exposing ' + + 'type alias as infix infixl infixr port effect command subscription', + contains: [ + + // Top-level constructions. + + { + beginKeywords: 'port effect module', end: 'exposing', + keywords: 'port effect module where command subscription exposing', + contains: [LIST, COMMENT], + illegal: '\\W\\.|;' + }, + { + begin: 'import', end: '$', + keywords: 'import as exposing', + contains: [LIST, COMMENT], + illegal: '\\W\\.|;' + }, + { + begin: 'type', end: '$', + keywords: 'type alias', + contains: [CONSTRUCTOR, LIST, RECORD, COMMENT] + }, + { + beginKeywords: 'infix infixl infixr', end: '$', + contains: [hljs.C_NUMBER_MODE, COMMENT] + }, + { + begin: 'port', end: '$', + keywords: 'port', + contains: [COMMENT] + }, + + // Literals and names. + + CHARACTER, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + CONSTRUCTOR, + hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\w\']*'}), + COMMENT, + + {begin: '->|<-'} // No markup, relevance booster + ], + illegal: /;/ + }; +} + +module.exports = elm; diff --git a/node_modules/highlight.js/lib/languages/erb.js b/node_modules/highlight.js/lib/languages/erb.js @@ -0,0 +1,27 @@ +/* +Language: ERB (Embedded Ruby) +Requires: xml.js, ruby.js +Author: Lucas Mazza <lucastmazza@gmail.com> +Contributors: Kassio Borges <kassioborgesm@gmail.com> +Description: "Bridge" language defining fragments of Ruby in HTML within <% .. %> +Website: https://ruby-doc.org/stdlib-2.6.5/libdoc/erb/rdoc/ERB.html +Category: template +*/ + +function erb(hljs) { + return { + name: 'ERB', + subLanguage: 'xml', + contains: [ + hljs.COMMENT('<%#', '%>'), + { + begin: '<%[%=-]?', end: '[%-]?%>', + subLanguage: 'ruby', + excludeBegin: true, + excludeEnd: true + } + ] + }; +} + +module.exports = erb; diff --git a/node_modules/highlight.js/lib/languages/erlang-repl.js b/node_modules/highlight.js/lib/languages/erlang-repl.js @@ -0,0 +1,55 @@ +/* +Language: Erlang REPL +Author: Sergey Ignatov <sergey@ignatov.spb.su> +Website: https://www.erlang.org +Category: functional +*/ + +function erlangRepl(hljs) { + return { + name: 'Erlang REPL', + keywords: { + built_in: + 'spawn spawn_link self', + keyword: + 'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' + + 'let not of or orelse|10 query receive rem try when xor' + }, + contains: [ + { + className: 'meta', begin: '^[0-9]+> ', + relevance: 10 + }, + hljs.COMMENT('%', '$'), + { + className: 'number', + begin: '\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)', + relevance: 0 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + begin: '\\?(::)?([A-Z]\\w*(::)?)+' + }, + { + begin: '->' + }, + { + begin: 'ok' + }, + { + begin: '!' + }, + { + begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)', + relevance: 0 + }, + { + begin: '[A-Z][a-zA-Z0-9_\']*', + relevance: 0 + } + ] + }; +} + +module.exports = erlangRepl; diff --git a/node_modules/highlight.js/lib/languages/erlang.js b/node_modules/highlight.js/lib/languages/erlang.js @@ -0,0 +1,157 @@ +/* +Language: Erlang +Description: Erlang is a general-purpose functional language, with strict evaluation, single assignment, and dynamic typing. +Author: Nikolay Zakharov <nikolay.desh@gmail.com>, Dmitry Kovega <arhibot@gmail.com> +Website: https://www.erlang.org +Category: functional +*/ + +function erlang(hljs) { + var BASIC_ATOM_RE = '[a-z\'][a-zA-Z0-9_\']*'; + var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')'; + var ERLANG_RESERVED = { + keyword: + 'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' + + 'let not of orelse|10 query receive rem try when xor', + literal: + 'false true' + }; + + var COMMENT = hljs.COMMENT('%', '$'); + var NUMBER = { + className: 'number', + begin: '\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)', + relevance: 0 + }; + var NAMED_FUN = { + begin: 'fun\\s+' + BASIC_ATOM_RE + '/\\d+' + }; + var FUNCTION_CALL = { + begin: FUNCTION_NAME_RE + '\\(', end: '\\)', + returnBegin: true, + relevance: 0, + contains: [ + { + begin: FUNCTION_NAME_RE, relevance: 0 + }, + { + begin: '\\(', end: '\\)', endsWithParent: true, + returnEnd: true, + relevance: 0 + // "contains" defined later + } + ] + }; + var TUPLE = { + begin: '{', end: '}', + relevance: 0 + // "contains" defined later + }; + var VAR1 = { + begin: '\\b_([A-Z][A-Za-z0-9_]*)?', + relevance: 0 + }; + var VAR2 = { + begin: '[A-Z][a-zA-Z0-9_]*', + relevance: 0 + }; + var RECORD_ACCESS = { + begin: '#' + hljs.UNDERSCORE_IDENT_RE, + relevance: 0, + returnBegin: true, + contains: [ + { + begin: '#' + hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }, + { + begin: '{', end: '}', + relevance: 0 + // "contains" defined later + } + ] + }; + + var BLOCK_STATEMENTS = { + beginKeywords: 'fun receive if try case', end: 'end', + keywords: ERLANG_RESERVED + }; + BLOCK_STATEMENTS.contains = [ + COMMENT, + NAMED_FUN, + hljs.inherit(hljs.APOS_STRING_MODE, {className: ''}), + BLOCK_STATEMENTS, + FUNCTION_CALL, + hljs.QUOTE_STRING_MODE, + NUMBER, + TUPLE, + VAR1, VAR2, + RECORD_ACCESS + ]; + + var BASIC_MODES = [ + COMMENT, + NAMED_FUN, + BLOCK_STATEMENTS, + FUNCTION_CALL, + hljs.QUOTE_STRING_MODE, + NUMBER, + TUPLE, + VAR1, VAR2, + RECORD_ACCESS + ]; + FUNCTION_CALL.contains[1].contains = BASIC_MODES; + TUPLE.contains = BASIC_MODES; + RECORD_ACCESS.contains[1].contains = BASIC_MODES; + + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)', + contains: BASIC_MODES + }; + return { + name: 'Erlang', + aliases: ['erl'], + keywords: ERLANG_RESERVED, + illegal: '(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))', + contains: [ + { + className: 'function', + begin: '^' + BASIC_ATOM_RE + '\\s*\\(', end: '->', + returnBegin: true, + illegal: '\\(|#|//|/\\*|\\\\|:|;', + contains: [ + PARAMS, + hljs.inherit(hljs.TITLE_MODE, {begin: BASIC_ATOM_RE}) + ], + starts: { + end: ';|\\.', + keywords: ERLANG_RESERVED, + contains: BASIC_MODES + } + }, + COMMENT, + { + begin: '^-', end: '\\.', + relevance: 0, + excludeEnd: true, + returnBegin: true, + keywords: { + $pattern: '-' + hljs.IDENT_RE, + keyword: '-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' + + '-import -include -include_lib -compile -define -else -endif -file -behaviour ' + + '-behavior -spec' + }, + contains: [PARAMS] + }, + NUMBER, + hljs.QUOTE_STRING_MODE, + RECORD_ACCESS, + VAR1, VAR2, + TUPLE, + {begin: /\.$/} // relevance booster + ] + }; +} + +module.exports = erlang; diff --git a/node_modules/highlight.js/lib/languages/excel.js b/node_modules/highlight.js/lib/languages/excel.js @@ -0,0 +1,57 @@ +/* +Language: Excel formulae +Author: Victor Zhou <OiCMudkips@users.noreply.github.com> +Description: Excel formulae +Website: https://products.office.com/en-us/excel/ +*/ + +function excel(hljs) { + return { + name: 'Excel formulae', + aliases: ['xlsx', 'xls'], + case_insensitive: true, + // built-in functions imported from https://web.archive.org/web/20160513042710/https://support.office.com/en-us/article/Excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188 + keywords: { + $pattern: /[a-zA-Z][\w\.]*/, + built_in: 'ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST' + }, + contains: [ + { + /* matches a beginning equal sign found in Excel formula examples */ + begin: /^=/, + end: /[^=]/, returnEnd: true, illegal: /=/, /* only allow single equal sign at front of line */ + relevance: 10 + }, + /* technically, there can be more than 2 letters in column names, but this prevents conflict with some keywords */ + { + /* matches a reference to a single cell */ + className: 'symbol', + begin: /\b[A-Z]{1,2}\d+\b/, + end: /[^\d]/, excludeEnd: true, + relevance: 0 + }, + { + /* matches a reference to a range of cells */ + className: 'symbol', + begin: /[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/, + relevance: 0 + }, + hljs.BACKSLASH_ESCAPE, + hljs.QUOTE_STRING_MODE, + { + className: 'number', + begin: hljs.NUMBER_RE + '(%)?', + relevance: 0 + }, + /* Excel formula comments are done by putting the comment in a function call to N() */ + hljs.COMMENT(/\bN\(/,/\)/, + { + excludeBegin: true, + excludeEnd: true, + illegal: /\n/ + }) + ] + }; +} + +module.exports = excel; diff --git a/node_modules/highlight.js/lib/languages/fix.js b/node_modules/highlight.js/lib/languages/fix.js @@ -0,0 +1,36 @@ +/* +Language: FIX +Author: Brent Bradbury <brent@brentium.com> +*/ + +function fix(hljs) { + return { + name: 'FIX', + contains: [ + { + begin: /[^\u2401\u0001]+/, + end: /[\u2401\u0001]/, + excludeEnd: true, + returnBegin: true, + returnEnd: false, + contains: [ + { + begin: /([^\u2401\u0001=]+)/, + end: /=([^\u2401\u0001=]+)/, + returnEnd: true, + returnBegin: false, + className: 'attr' + }, + { + begin: /=/, + end: /([\u2401\u0001])/, + excludeEnd: true, + excludeBegin: true, + className: 'string' + }] + }], + case_insensitive: true + }; +} + +module.exports = fix; diff --git a/node_modules/highlight.js/lib/languages/flix.js b/node_modules/highlight.js/lib/languages/flix.js @@ -0,0 +1,54 @@ +/* + Language: Flix + Category: functional + Author: Magnus Madsen <mmadsen@uwaterloo.ca> + Website: https://flix.dev/ + */ + +function flix (hljs) { + + var CHAR = { + className: 'string', + begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/ + }; + + var STRING = { + className: 'string', + variants: [ + { + begin: '"', end: '"' + } + ] + }; + + var NAME = { + className: 'title', + begin: /[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/ + }; + + var METHOD = { + className: 'function', + beginKeywords: 'def', + end: /[:={\[(\n;]/, + excludeEnd: true, + contains: [NAME] + }; + + return { + name: 'Flix', + keywords: { + literal: 'true false', + keyword: 'case class def else enum if impl import in lat rel index let match namespace switch type yield with' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + CHAR, + STRING, + METHOD, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = flix; diff --git a/node_modules/highlight.js/lib/languages/fortran.js b/node_modules/highlight.js/lib/languages/fortran.js @@ -0,0 +1,107 @@ +/* +Language: Fortran +Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> +Website: https://en.wikipedia.org/wiki/Fortran +Category: scientific +*/ + +function fortran(hljs) { + const PARAMS = { + className: 'params', + begin: '\\(', end: '\\)' + }; + + const COMMENT = { + variants: [ + hljs.COMMENT('!', '$', {relevance: 0}), + // allow Fortran 77 style comments + hljs.COMMENT('^C', '$', {relevance: 0}) + ] + }; + + const NUMBER = { + className: 'number', + // regex in both fortran and irpf90 should match + begin: '(?=\\b|\\+|\\-|\\.)(?:\\.|\\d+\\.?)\\d*([de][+-]?\\d+)?(_[a-z_\\d]+)?', + relevance: 0 + }; + + const FUNCTION_DEF = { + className: 'function', + beginKeywords: 'subroutine function program', + illegal: '[${=\\n]', + contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS] + }; + + const STRING = { + className: 'string', + relevance: 0, + variants: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }; + + const KEYWORDS = { + literal: '.False. .True.', + keyword: 'kind do concurrent local shared while private call intrinsic where elsewhere ' + + 'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then block endblock endassociate ' + + 'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' + + 'goto save else use module select case ' + + 'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' + + 'continue format pause cycle exit ' + + 'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' + + 'synchronous nopass non_overridable pass protected volatile abstract extends import ' + + 'non_intrinsic value deferred generic final enumerator class associate bind enum ' + + 'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' + + 'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' + + 'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' + + 'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' + + 'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' + + 'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' + + 'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' + + 'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure impure ' + + 'integer real character complex logical codimension dimension allocatable|10 parameter ' + + 'external implicit|10 none double precision assign intent optional pointer ' + + 'target in out common equivalence data', + built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' + + 'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' + + 'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' + + 'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' + + 'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' + + 'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' + + 'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' + + 'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' + + 'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' + + 'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' + + 'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' + + 'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' + + 'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' + + 'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of ' + + 'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' + + 'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' + + 'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' + + 'num_images parity popcnt poppar shifta shiftl shiftr this_image sync change team co_broadcast co_max co_min co_sum co_reduce' + }; + return { + name: 'Fortran', + case_insensitive: true, + aliases: ['f90', 'f95'], + keywords: KEYWORDS, + illegal: /\/\*/, + contains: [ + STRING, + FUNCTION_DEF, + // allow `C = value` for assignments so they aren't misdetected + // as Fortran 77 style comments + { + begin: /^C\s*=(?!=)/, + relevance: 0, + }, + COMMENT, + NUMBER + ] + }; +} + +module.exports = fortran; diff --git a/node_modules/highlight.js/lib/languages/fsharp.js b/node_modules/highlight.js/lib/languages/fsharp.js @@ -0,0 +1,68 @@ +/* +Language: F# +Author: Jonas Follesø <jonas@follesoe.no> +Contributors: Troy Kershaw <hello@troykershaw.com>, Henrik Feldt <henrik@haf.se> +Website: https://docs.microsoft.com/en-us/dotnet/fsharp/ +Category: functional +*/ +function fsharp(hljs) { + var TYPEPARAM = { + begin: '<', end: '>', + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: /'[a-zA-Z0-9_]+/}) + ] + }; + + return { + name: 'F#', + aliases: ['fs'], + keywords: + 'abstract and as assert base begin class default delegate do done ' + + 'downcast downto elif else end exception extern false finally for ' + + 'fun function global if in inherit inline interface internal lazy let ' + + 'match member module mutable namespace new null of open or ' + + 'override private public rec return sig static struct then to ' + + 'true try type upcast use val void when while with yield', + illegal: /\/\*/, + contains: [ + { + // monad builder keywords (matches before non-bang kws) + className: 'keyword', + begin: /\b(yield|return|let|do)!/ + }, + { + className: 'string', + begin: '@"', end: '"', + contains: [{begin: '""'}] + }, + { + className: 'string', + begin: '"""', end: '"""' + }, + hljs.COMMENT('\\(\\*', '\\*\\)'), + { + className: 'class', + beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true, + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + TYPEPARAM + ] + }, + { + className: 'meta', + begin: '\\[<', end: '>\\]', + relevance: 10 + }, + { + className: 'symbol', + begin: '\\B(\'[A-Za-z])\\b', + contains: [hljs.BACKSLASH_ESCAPE] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = fsharp; diff --git a/node_modules/highlight.js/lib/languages/gams.js b/node_modules/highlight.js/lib/languages/gams.js @@ -0,0 +1,165 @@ +/* + Language: GAMS + Author: Stefan Bechert <stefan.bechert@gmx.net> + Contributors: Oleg Efimov <efimovov@gmail.com>, Mikko Kouhia <mikko.kouhia@iki.fi> + Description: The General Algebraic Modeling System language + Website: https://www.gams.com + Category: scientific + */ + +function gams (hljs) { + var KEYWORDS = { + keyword: + 'abort acronym acronyms alias all and assign binary card diag display ' + + 'else eq file files for free ge gt if integer le loop lt maximizing ' + + 'minimizing model models ne negative no not option options or ord ' + + 'positive prod put putpage puttl repeat sameas semicont semiint smax ' + + 'smin solve sos1 sos2 sum system table then until using while xor yes', + literal: 'eps inf na', + built_in: + 'abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy ' + + 'cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact ' + + 'floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max ' + + 'min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power ' + + 'randBinomial randLinear randTriangle round rPower sigmoid sign ' + + 'signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt ' + + 'tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp ' + + 'bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt ' + + 'rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear ' + + 'jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion ' + + 'handleCollect handleDelete handleStatus handleSubmit heapFree ' + + 'heapLimit heapSize jobHandle jobKill jobStatus jobTerminate ' + + 'licenseLevel licenseStatus maxExecError sleep timeClose timeComp ' + + 'timeElapsed timeExec timeStart' + }; + var PARAMS = { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + }; + var SYMBOLS = { + className: 'symbol', + variants: [ + {begin: /\=[lgenxc]=/}, + {begin: /\$/}, + ] + }; + var QSTR = { // One-line quoted comment string + className: 'comment', + variants: [ + {begin: '\'', end: '\''}, + {begin: '"', end: '"'}, + ], + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + }; + var ASSIGNMENT = { + begin: '/', + end: '/', + keywords: KEYWORDS, + contains: [ + QSTR, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.C_NUMBER_MODE, + ], + }; + var DESCTEXT = { // Parameter/set/variable description text + begin: /[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/, + excludeBegin: true, + end: '$', + endsWithParent: true, + contains: [ + QSTR, + ASSIGNMENT, + { + className: 'comment', + begin: /([ ]*[a-z0-9&#*=?@>\\<:\-,()$\[\]_.{}!+%^]+)+/, + relevance: 0 + }, + ], + }; + + return { + name: 'GAMS', + aliases: ['gms'], + case_insensitive: true, + keywords: KEYWORDS, + contains: [ + hljs.COMMENT(/^\$ontext/, /^\$offtext/), + { + className: 'meta', + begin: '^\\$[a-z0-9]+', + end: '$', + returnBegin: true, + contains: [ + { + className: 'meta-keyword', + begin: '^\\$[a-z0-9]+', + } + ] + }, + hljs.COMMENT('^\\*', '$'), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + // Declarations + { + beginKeywords: + 'set sets parameter parameters variable variables ' + + 'scalar scalars equation equations', + end: ';', + contains: [ + hljs.COMMENT('^\\*', '$'), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + ASSIGNMENT, + DESCTEXT, + ] + }, + { // table environment + beginKeywords: 'table', + end: ';', + returnBegin: true, + contains: [ + { // table header row + beginKeywords: 'table', + end: '$', + contains: [DESCTEXT], + }, + hljs.COMMENT('^\\*', '$'), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.C_NUMBER_MODE, + // Table does not contain DESCTEXT or ASSIGNMENT + ] + }, + // Function definitions + { + className: 'function', + begin: /^[a-z][a-z0-9_,\-+' ()$]+\.{2}/, + returnBegin: true, + contains: [ + { // Function title + className: 'title', + begin: /^[a-z0-9_]+/, + }, + PARAMS, + SYMBOLS, + ], + }, + hljs.C_NUMBER_MODE, + SYMBOLS, + ] + }; +} + +module.exports = gams; diff --git a/node_modules/highlight.js/lib/languages/gauss.js b/node_modules/highlight.js/lib/languages/gauss.js @@ -0,0 +1,300 @@ +/* +Language: GAUSS +Author: Matt Evans <matt@aptech.com> +Description: GAUSS Mathematical and Statistical language +Website: https://www.aptech.com +Category: scientific +*/ +function gauss(hljs) { + var KEYWORDS = { + keyword: 'bool break call callexe checkinterrupt clear clearg closeall cls comlog compile ' + + 'continue create debug declare delete disable dlibrary dllcall do dos ed edit else ' + + 'elseif enable end endfor endif endp endo errorlog errorlogat expr external fn ' + + 'for format goto gosub graph if keyword let lib library line load loadarray loadexe ' + + 'loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow ' + + 'matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print ' + + 'printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen ' + + 'scroll setarray show sparse stop string struct system trace trap threadfor ' + + 'threadendfor threadbegin threadjoin threadstat threadend until use while winprint ' + + 'ne ge le gt lt and xor or not eq eqv', + built_in: 'abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol ' + + 'AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks ' + + 'AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults ' + + 'annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness ' + + 'annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd ' + + 'astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar ' + + 'base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 ' + + 'cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv ' + + 'cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn ' + + 'cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi ' + + 'cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ' + + 'ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated ' + + 'complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs ' + + 'cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos ' + + 'datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd ' + + 'dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName ' + + 'dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy ' + + 'dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen ' + + 'dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA ' + + 'dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField ' + + 'dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition ' + + 'dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows ' + + 'dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly ' + + 'dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy ' + + 'dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl ' + + 'dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt ' + + 'dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday ' + + 'dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays ' + + 'endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error ' + + 'etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut ' + + 'EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol ' + + 'EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq ' + + 'feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt ' + + 'floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC ' + + 'gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders ' + + 'gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse ' + + 'gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray ' + + 'getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders ' + + 'getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT ' + + 'gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm ' + + 'hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 ' + + 'indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 ' + + 'inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf ' + + 'isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv ' + + 'lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn ' + + 'lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind ' + + 'loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars ' + + 'makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli ' + + 'mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave ' + + 'movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate ' + + 'olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto ' + + 'pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox ' + + 'plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea ' + + 'plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout ' + + 'plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill ' + + 'plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol ' + + 'plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange ' + + 'plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel ' + + 'plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot ' + + 'pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames ' + + 'pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector ' + + 'pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate ' + + 'qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr ' + + 'real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn ' + + 'rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel ' + + 'rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn ' + + 'rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh ' + + 'rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind ' + + 'scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa ' + + 'setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind ' + + 'sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL ' + + 'spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense ' + + 'spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet ' + + 'sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt ' + + 'strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr ' + + 'surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname ' + + 'time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk ' + + 'trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt ' + + 'utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs ' + + 'vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window ' + + 'writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM ' + + 'xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute ' + + 'h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels ' + + 'plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester ' + + 'strtrim', + literal: 'DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS ' + + 'DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 ' + + 'DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS ' + + 'DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES ' + + 'DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR' + }; + + + var AT_COMMENT_MODE = hljs.COMMENT('@', '@'); + + var PREPROCESSOR = + { + className: 'meta', + begin: '#', end: '$', + keywords: {'meta-keyword': 'define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline'}, + contains: [ + { + begin: /\\\n/, relevance: 0 + }, + { + beginKeywords: 'include', end: '$', + keywords: {'meta-keyword': 'include'}, + contains: [ + { + className: 'meta-string', + begin: '"', end: '"', + illegal: '\\n' + } + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + AT_COMMENT_MODE, + ] + }; + + var STRUCT_TYPE = + { + begin: /\bstruct\s+/, + end: /\s/, + keywords: "struct", + contains: [ + { + className: "type", + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0, + }, + ], + }; + + // only for definitions + var PARSE_PARAMS = [ + { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + endsWithParent: true, + relevance: 0, + contains: [ + { // dots + className: 'literal', + begin: /\.\.\./, + }, + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE, + AT_COMMENT_MODE, + STRUCT_TYPE, + ] + } + ]; + + var FUNCTION_DEF = + { + className: "title", + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0, + }; + + var DEFINITION = function (beginKeywords, end, inherits) { + var mode = hljs.inherit( + { + className: "function", + beginKeywords: beginKeywords, + end: end, + excludeEnd: true, + contains: [].concat(PARSE_PARAMS), + }, + inherits || {} + ); + mode.contains.push(FUNCTION_DEF); + mode.contains.push(hljs.C_NUMBER_MODE); + mode.contains.push(hljs.C_BLOCK_COMMENT_MODE); + mode.contains.push(AT_COMMENT_MODE); + return mode; + }; + + var BUILT_IN_REF = + { // these are explicitly named internal function calls + className: 'built_in', + begin: '\\b(' + KEYWORDS.built_in.split(' ').join('|') + ')\\b', + }; + + var STRING_REF = + { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0, + }; + + var FUNCTION_REF = + { + //className: "fn_ref", + begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', + returnBegin: true, + keywords: KEYWORDS, + relevance: 0, + contains: [ + { + beginKeywords: KEYWORDS.keyword, + }, + BUILT_IN_REF, + { // ambiguously named function calls get a relevance of 0 + className: 'built_in', + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0, + }, + ], + }; + + var FUNCTION_REF_PARAMS = + { + //className: "fn_ref_params", + begin: /\(/, + end: /\)/, + relevance: 0, + keywords: { built_in: KEYWORDS.built_in, literal: KEYWORDS.literal }, + contains: [ + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE, + AT_COMMENT_MODE, + BUILT_IN_REF, + FUNCTION_REF, + STRING_REF, + 'self', + ], + }; + + FUNCTION_REF.contains.push(FUNCTION_REF_PARAMS); + + return { + name: 'GAUSS', + aliases: ['gss'], + case_insensitive: true, // language is case-insensitive + keywords: KEYWORDS, + illegal: /(\{[%#]|[%#]\}| <- )/, + contains: [ + hljs.C_NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + AT_COMMENT_MODE, + STRING_REF, + PREPROCESSOR, + { + className: 'keyword', + begin: /\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/, + }, + DEFINITION('proc keyword', ';'), + DEFINITION('fn', '='), + { + beginKeywords: 'for threadfor', + end: /;/, + //end: /\(/, + relevance: 0, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + AT_COMMENT_MODE, + FUNCTION_REF_PARAMS, + ], + }, + { // custom method guard + // excludes method names from keyword processing + variants: [ + { begin: hljs.UNDERSCORE_IDENT_RE + '\\.' + hljs.UNDERSCORE_IDENT_RE, }, + { begin: hljs.UNDERSCORE_IDENT_RE + '\\s*=', }, + ], + relevance: 0, + }, + FUNCTION_REF, + STRUCT_TYPE, + ] + }; +} + +module.exports = gauss; diff --git a/node_modules/highlight.js/lib/languages/gcode.js b/node_modules/highlight.js/lib/languages/gcode.js @@ -0,0 +1,77 @@ +/* + Language: G-code (ISO 6983) + Contributors: Adam Joseph Cook <adam.joseph.cook@gmail.com> + Description: G-code syntax highlighter for Fanuc and other common CNC machine tool controls. + Website: https://www.sis.se/api/document/preview/911952/ + */ + +function gcode(hljs) { + var GCODE_IDENT_RE = '[A-Z_][A-Z0-9_.]*'; + var GCODE_CLOSE_RE = '\\%'; + var GCODE_KEYWORDS = { + $pattern: GCODE_IDENT_RE, + keyword: 'IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT ' + + 'EQ LT GT NE GE LE OR XOR' + }; + var GCODE_START = { + className: 'meta', + begin: '([O])([0-9]+)' + }; + var GCODE_CODE = [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.COMMENT(/\(/, /\)/), + hljs.inherit(hljs.C_NUMBER_MODE, {begin: '([-+]?([0-9]*\\.?[0-9]+\\.?))|' + hljs.C_NUMBER_RE}), + hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + { + className: 'name', + begin: '([G])([0-9]+\\.?[0-9]?)' + }, + { + className: 'name', + begin: '([M])([0-9]+\\.?[0-9]?)' + }, + { + className: 'attr', + begin: '(VC|VS|#)', + end: '(\\d+)' + }, + { + className: 'attr', + begin: '(VZOFX|VZOFY|VZOFZ)' + }, + { + className: 'built_in', + begin: '(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)', + end: '([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])' + }, + { + className: 'symbol', + variants: [ + { + begin: 'N', end: '\\d+', + illegal: '\\W' + } + ] + } + ]; + + return { + name: 'G-code (ISO 6983)', + aliases: ['nc'], + // Some implementations (CNC controls) of G-code are interoperable with uppercase and lowercase letters seamlessly. + // However, most prefer all uppercase and uppercase is customary. + case_insensitive: true, + keywords: GCODE_KEYWORDS, + contains: [ + { + className: 'meta', + begin: GCODE_CLOSE_RE + }, + GCODE_START + ].concat(GCODE_CODE) + }; +} + +module.exports = gcode; diff --git a/node_modules/highlight.js/lib/languages/gherkin.js b/node_modules/highlight.js/lib/languages/gherkin.js @@ -0,0 +1,46 @@ +/* + Language: Gherkin + Author: Sam Pikesley (@pikesley) <sam.pikesley@theodi.org> + Description: Gherkin is the format for cucumber specifications. It is a domain specific language which helps you to describe business behavior without the need to go into detail of implementation. + Website: https://cucumber.io/docs/gherkin/ + */ + +function gherkin (hljs) { + return { + name: 'Gherkin', + aliases: ['feature'], + keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When', + contains: [ + { + className: 'symbol', + begin: '\\*', + relevance: 0 + }, + { + className: 'meta', + begin: '@[^@\\s]+' + }, + { + begin: '\\|', end: '\\|\\w*$', + contains: [ + { + className: 'string', + begin: '[^|]+' + } + ] + }, + { + className: 'variable', + begin: '<', end: '>' + }, + hljs.HASH_COMMENT_MODE, + { + className: 'string', + begin: '"""', end: '"""' + }, + hljs.QUOTE_STRING_MODE + ] + }; +} + +module.exports = gherkin; diff --git a/node_modules/highlight.js/lib/languages/glsl.js b/node_modules/highlight.js/lib/languages/glsl.js @@ -0,0 +1,127 @@ +/* +Language: GLSL +Description: OpenGL Shading Language +Author: Sergey Tikhomirov <sergey@tikhomirov.io> +Website: https://en.wikipedia.org/wiki/OpenGL_Shading_Language +Category: graphics +*/ + +function glsl(hljs) { + return { + name: 'GLSL', + keywords: { + keyword: + // Statements + 'break continue discard do else for if return while switch case default ' + + // Qualifiers + 'attribute binding buffer ccw centroid centroid varying coherent column_major const cw ' + + 'depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing ' + + 'flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant ' + + 'invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y ' + + 'local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left ' + + 'out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f '+ + 'r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict ' + + 'rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 ' + + 'rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 ' + + 'rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip ' + + 'triangles triangles_adjacency uniform varying vertices volatile writeonly', + type: + 'atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 ' + + 'dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray ' + + 'iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer ' + + 'iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray ' + + 'image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray ' + + 'isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D ' + + 'isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 ' + + 'mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray ' + + 'sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow ' + + 'sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D ' + + 'samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow ' + + 'image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect ' + + 'uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray ' + + 'usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D ' + + 'samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void', + built_in: + // Constants + 'gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes ' + + 'gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms ' + + 'gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers ' + + 'gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits ' + + 'gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize ' + + 'gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters ' + + 'gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors ' + + 'gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers ' + + 'gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents ' + + 'gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits ' + + 'gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents ' + + 'gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset ' + + 'gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms ' + + 'gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits ' + + 'gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents ' + + 'gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters ' + + 'gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents ' + + 'gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents ' + + 'gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits ' + + 'gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors ' + + 'gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms ' + + 'gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits ' + + 'gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset ' + + // Variables + 'gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial ' + + 'gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color ' + + 'gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord ' + + 'gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor ' + + 'gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial ' + + 'gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel ' + + 'gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix ' + + 'gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose ' + + 'gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose ' + + 'gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 ' + + 'gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 ' + + 'gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ ' + + 'gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord ' + + 'gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse ' + + 'gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask ' + + 'gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter ' + + 'gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose ' + + 'gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out ' + + // Functions + 'EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin ' + + 'asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement ' + + 'atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier ' + + 'bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross ' + + 'dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB ' + + 'floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan ' + + 'greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap ' + + 'imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad ' + + 'imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset ' + + 'interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log ' + + 'log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer ' + + 'memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 ' + + 'normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 ' + + 'packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod ' + + 'shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh ' + + 'smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod ' + + 'texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod ' + + 'texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod ' + + 'textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset ' + + 'textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset ' + + 'textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod ' + + 'textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 ' + + 'unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow', + literal: 'true false' + }, + illegal: '"', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_NUMBER_MODE, + { + className: 'meta', + begin: '#', end: '$' + } + ] + }; +} + +module.exports = glsl; diff --git a/node_modules/highlight.js/lib/languages/gml.js b/node_modules/highlight.js/lib/languages/gml.js @@ -0,0 +1,883 @@ +/* +Language: GML +Author: Meseta <meseta@gmail.com> +Description: Game Maker Language for GameMaker Studio 2 +Website: https://docs2.yoyogames.com +Category: scripting +*/ + +function gml(hljs) { + var GML_KEYWORDS = { + keyword: 'begin end if then else while do for break continue with until ' + + 'repeat exit and or xor not return mod div switch case default var ' + + 'globalvar enum #macro #region #endregion', + built_in: 'is_real is_string is_array is_undefined is_int32 is_int64 ' + + 'is_ptr is_vec3 is_vec4 is_matrix is_bool typeof ' + + 'variable_global_exists variable_global_get variable_global_set ' + + 'variable_instance_exists variable_instance_get variable_instance_set ' + + 'variable_instance_get_names array_length_1d array_length_2d ' + + 'array_height_2d array_equals array_create array_copy random ' + + 'random_range irandom irandom_range random_set_seed random_get_seed ' + + 'randomize randomise choose abs round floor ceil sign frac sqrt sqr ' + + 'exp ln log2 log10 sin cos tan arcsin arccos arctan arctan2 dsin dcos ' + + 'dtan darcsin darccos darctan darctan2 degtorad radtodeg power logn ' + + 'min max mean median clamp lerp dot_product dot_product_3d ' + + 'dot_product_normalised dot_product_3d_normalised ' + + 'dot_product_normalized dot_product_3d_normalized math_set_epsilon ' + + 'math_get_epsilon angle_difference point_distance_3d point_distance ' + + 'point_direction lengthdir_x lengthdir_y real string int64 ptr ' + + 'string_format chr ansi_char ord string_length string_byte_length ' + + 'string_pos string_copy string_char_at string_ord_at string_byte_at ' + + 'string_set_byte_at string_delete string_insert string_lower ' + + 'string_upper string_repeat string_letters string_digits ' + + 'string_lettersdigits string_replace string_replace_all string_count ' + + 'string_hash_to_newline clipboard_has_text clipboard_set_text ' + + 'clipboard_get_text date_current_datetime date_create_datetime ' + + 'date_valid_datetime date_inc_year date_inc_month date_inc_week ' + + 'date_inc_day date_inc_hour date_inc_minute date_inc_second ' + + 'date_get_year date_get_month date_get_week date_get_day ' + + 'date_get_hour date_get_minute date_get_second date_get_weekday ' + + 'date_get_day_of_year date_get_hour_of_year date_get_minute_of_year ' + + 'date_get_second_of_year date_year_span date_month_span ' + + 'date_week_span date_day_span date_hour_span date_minute_span ' + + 'date_second_span date_compare_datetime date_compare_date ' + + 'date_compare_time date_date_of date_time_of date_datetime_string ' + + 'date_date_string date_time_string date_days_in_month ' + + 'date_days_in_year date_leap_year date_is_today date_set_timezone ' + + 'date_get_timezone game_set_speed game_get_speed motion_set ' + + 'motion_add place_free place_empty place_meeting place_snapped ' + + 'move_random move_snap move_towards_point move_contact_solid ' + + 'move_contact_all move_outside_solid move_outside_all ' + + 'move_bounce_solid move_bounce_all move_wrap distance_to_point ' + + 'distance_to_object position_empty position_meeting path_start ' + + 'path_end mp_linear_step mp_potential_step mp_linear_step_object ' + + 'mp_potential_step_object mp_potential_settings mp_linear_path ' + + 'mp_potential_path mp_linear_path_object mp_potential_path_object ' + + 'mp_grid_create mp_grid_destroy mp_grid_clear_all mp_grid_clear_cell ' + + 'mp_grid_clear_rectangle mp_grid_add_cell mp_grid_get_cell ' + + 'mp_grid_add_rectangle mp_grid_add_instances mp_grid_path ' + + 'mp_grid_draw mp_grid_to_ds_grid collision_point collision_rectangle ' + + 'collision_circle collision_ellipse collision_line ' + + 'collision_point_list collision_rectangle_list collision_circle_list ' + + 'collision_ellipse_list collision_line_list instance_position_list ' + + 'instance_place_list point_in_rectangle ' + + 'point_in_triangle point_in_circle rectangle_in_rectangle ' + + 'rectangle_in_triangle rectangle_in_circle instance_find ' + + 'instance_exists instance_number instance_position instance_nearest ' + + 'instance_furthest instance_place instance_create_depth ' + + 'instance_create_layer instance_copy instance_change instance_destroy ' + + 'position_destroy position_change instance_id_get ' + + 'instance_deactivate_all instance_deactivate_object ' + + 'instance_deactivate_region instance_activate_all ' + + 'instance_activate_object instance_activate_region room_goto ' + + 'room_goto_previous room_goto_next room_previous room_next ' + + 'room_restart game_end game_restart game_load game_save ' + + 'game_save_buffer game_load_buffer event_perform event_user ' + + 'event_perform_object event_inherited show_debug_message ' + + 'show_debug_overlay debug_event debug_get_callstack alarm_get ' + + 'alarm_set font_texture_page_size keyboard_set_map keyboard_get_map ' + + 'keyboard_unset_map keyboard_check keyboard_check_pressed ' + + 'keyboard_check_released keyboard_check_direct keyboard_get_numlock ' + + 'keyboard_set_numlock keyboard_key_press keyboard_key_release ' + + 'keyboard_clear io_clear mouse_check_button ' + + 'mouse_check_button_pressed mouse_check_button_released ' + + 'mouse_wheel_up mouse_wheel_down mouse_clear draw_self draw_sprite ' + + 'draw_sprite_pos draw_sprite_ext draw_sprite_stretched ' + + 'draw_sprite_stretched_ext draw_sprite_tiled draw_sprite_tiled_ext ' + + 'draw_sprite_part draw_sprite_part_ext draw_sprite_general draw_clear ' + + 'draw_clear_alpha draw_point draw_line draw_line_width draw_rectangle ' + + 'draw_roundrect draw_roundrect_ext draw_triangle draw_circle ' + + 'draw_ellipse draw_set_circle_precision draw_arrow draw_button ' + + 'draw_path draw_healthbar draw_getpixel draw_getpixel_ext ' + + 'draw_set_colour draw_set_color draw_set_alpha draw_get_colour ' + + 'draw_get_color draw_get_alpha merge_colour make_colour_rgb ' + + 'make_colour_hsv colour_get_red colour_get_green colour_get_blue ' + + 'colour_get_hue colour_get_saturation colour_get_value merge_color ' + + 'make_color_rgb make_color_hsv color_get_red color_get_green ' + + 'color_get_blue color_get_hue color_get_saturation color_get_value ' + + 'merge_color screen_save screen_save_part draw_set_font ' + + 'draw_set_halign draw_set_valign draw_text draw_text_ext string_width ' + + 'string_height string_width_ext string_height_ext ' + + 'draw_text_transformed draw_text_ext_transformed draw_text_colour ' + + 'draw_text_ext_colour draw_text_transformed_colour ' + + 'draw_text_ext_transformed_colour draw_text_color draw_text_ext_color ' + + 'draw_text_transformed_color draw_text_ext_transformed_color ' + + 'draw_point_colour draw_line_colour draw_line_width_colour ' + + 'draw_rectangle_colour draw_roundrect_colour ' + + 'draw_roundrect_colour_ext draw_triangle_colour draw_circle_colour ' + + 'draw_ellipse_colour draw_point_color draw_line_color ' + + 'draw_line_width_color draw_rectangle_color draw_roundrect_color ' + + 'draw_roundrect_color_ext draw_triangle_color draw_circle_color ' + + 'draw_ellipse_color draw_primitive_begin draw_vertex ' + + 'draw_vertex_colour draw_vertex_color draw_primitive_end ' + + 'sprite_get_uvs font_get_uvs sprite_get_texture font_get_texture ' + + 'texture_get_width texture_get_height texture_get_uvs ' + + 'draw_primitive_begin_texture draw_vertex_texture ' + + 'draw_vertex_texture_colour draw_vertex_texture_color ' + + 'texture_global_scale surface_create surface_create_ext ' + + 'surface_resize surface_free surface_exists surface_get_width ' + + 'surface_get_height surface_get_texture surface_set_target ' + + 'surface_set_target_ext surface_reset_target surface_depth_disable ' + + 'surface_get_depth_disable draw_surface draw_surface_stretched ' + + 'draw_surface_tiled draw_surface_part draw_surface_ext ' + + 'draw_surface_stretched_ext draw_surface_tiled_ext ' + + 'draw_surface_part_ext draw_surface_general surface_getpixel ' + + 'surface_getpixel_ext surface_save surface_save_part surface_copy ' + + 'surface_copy_part application_surface_draw_enable ' + + 'application_get_position application_surface_enable ' + + 'application_surface_is_enabled display_get_width display_get_height ' + + 'display_get_orientation display_get_gui_width display_get_gui_height ' + + 'display_reset display_mouse_get_x display_mouse_get_y ' + + 'display_mouse_set display_set_ui_visibility ' + + 'window_set_fullscreen window_get_fullscreen ' + + 'window_set_caption window_set_min_width window_set_max_width ' + + 'window_set_min_height window_set_max_height window_get_visible_rects ' + + 'window_get_caption window_set_cursor window_get_cursor ' + + 'window_set_colour window_get_colour window_set_color ' + + 'window_get_color window_set_position window_set_size ' + + 'window_set_rectangle window_center window_get_x window_get_y ' + + 'window_get_width window_get_height window_mouse_get_x ' + + 'window_mouse_get_y window_mouse_set window_view_mouse_get_x ' + + 'window_view_mouse_get_y window_views_mouse_get_x ' + + 'window_views_mouse_get_y audio_listener_position ' + + 'audio_listener_velocity audio_listener_orientation ' + + 'audio_emitter_position audio_emitter_create audio_emitter_free ' + + 'audio_emitter_exists audio_emitter_pitch audio_emitter_velocity ' + + 'audio_emitter_falloff audio_emitter_gain audio_play_sound ' + + 'audio_play_sound_on audio_play_sound_at audio_stop_sound ' + + 'audio_resume_music audio_music_is_playing audio_resume_sound ' + + 'audio_pause_sound audio_pause_music audio_channel_num ' + + 'audio_sound_length audio_get_type audio_falloff_set_model ' + + 'audio_play_music audio_stop_music audio_master_gain audio_music_gain ' + + 'audio_sound_gain audio_sound_pitch audio_stop_all audio_resume_all ' + + 'audio_pause_all audio_is_playing audio_is_paused audio_exists ' + + 'audio_sound_set_track_position audio_sound_get_track_position ' + + 'audio_emitter_get_gain audio_emitter_get_pitch audio_emitter_get_x ' + + 'audio_emitter_get_y audio_emitter_get_z audio_emitter_get_vx ' + + 'audio_emitter_get_vy audio_emitter_get_vz ' + + 'audio_listener_set_position audio_listener_set_velocity ' + + 'audio_listener_set_orientation audio_listener_get_data ' + + 'audio_set_master_gain audio_get_master_gain audio_sound_get_gain ' + + 'audio_sound_get_pitch audio_get_name audio_sound_set_track_position ' + + 'audio_sound_get_track_position audio_create_stream ' + + 'audio_destroy_stream audio_create_sync_group ' + + 'audio_destroy_sync_group audio_play_in_sync_group ' + + 'audio_start_sync_group audio_stop_sync_group audio_pause_sync_group ' + + 'audio_resume_sync_group audio_sync_group_get_track_pos ' + + 'audio_sync_group_debug audio_sync_group_is_playing audio_debug ' + + 'audio_group_load audio_group_unload audio_group_is_loaded ' + + 'audio_group_load_progress audio_group_name audio_group_stop_all ' + + 'audio_group_set_gain audio_create_buffer_sound ' + + 'audio_free_buffer_sound audio_create_play_queue ' + + 'audio_free_play_queue audio_queue_sound audio_get_recorder_count ' + + 'audio_get_recorder_info audio_start_recording audio_stop_recording ' + + 'audio_sound_get_listener_mask audio_emitter_get_listener_mask ' + + 'audio_get_listener_mask audio_sound_set_listener_mask ' + + 'audio_emitter_set_listener_mask audio_set_listener_mask ' + + 'audio_get_listener_count audio_get_listener_info audio_system ' + + 'show_message show_message_async clickable_add clickable_add_ext ' + + 'clickable_change clickable_change_ext clickable_delete ' + + 'clickable_exists clickable_set_style show_question ' + + 'show_question_async get_integer get_string get_integer_async ' + + 'get_string_async get_login_async get_open_filename get_save_filename ' + + 'get_open_filename_ext get_save_filename_ext show_error ' + + 'highscore_clear highscore_add highscore_value highscore_name ' + + 'draw_highscore sprite_exists sprite_get_name sprite_get_number ' + + 'sprite_get_width sprite_get_height sprite_get_xoffset ' + + 'sprite_get_yoffset sprite_get_bbox_left sprite_get_bbox_right ' + + 'sprite_get_bbox_top sprite_get_bbox_bottom sprite_save ' + + 'sprite_save_strip sprite_set_cache_size sprite_set_cache_size_ext ' + + 'sprite_get_tpe sprite_prefetch sprite_prefetch_multi sprite_flush ' + + 'sprite_flush_multi sprite_set_speed sprite_get_speed_type ' + + 'sprite_get_speed font_exists font_get_name font_get_fontname ' + + 'font_get_bold font_get_italic font_get_first font_get_last ' + + 'font_get_size font_set_cache_size path_exists path_get_name ' + + 'path_get_length path_get_time path_get_kind path_get_closed ' + + 'path_get_precision path_get_number path_get_point_x path_get_point_y ' + + 'path_get_point_speed path_get_x path_get_y path_get_speed ' + + 'script_exists script_get_name timeline_add timeline_delete ' + + 'timeline_clear timeline_exists timeline_get_name ' + + 'timeline_moment_clear timeline_moment_add_script timeline_size ' + + 'timeline_max_moment object_exists object_get_name object_get_sprite ' + + 'object_get_solid object_get_visible object_get_persistent ' + + 'object_get_mask object_get_parent object_get_physics ' + + 'object_is_ancestor room_exists room_get_name sprite_set_offset ' + + 'sprite_duplicate sprite_assign sprite_merge sprite_add ' + + 'sprite_replace sprite_create_from_surface sprite_add_from_surface ' + + 'sprite_delete sprite_set_alpha_from_sprite sprite_collision_mask ' + + 'font_add_enable_aa font_add_get_enable_aa font_add font_add_sprite ' + + 'font_add_sprite_ext font_replace font_replace_sprite ' + + 'font_replace_sprite_ext font_delete path_set_kind path_set_closed ' + + 'path_set_precision path_add path_assign path_duplicate path_append ' + + 'path_delete path_add_point path_insert_point path_change_point ' + + 'path_delete_point path_clear_points path_reverse path_mirror ' + + 'path_flip path_rotate path_rescale path_shift script_execute ' + + 'object_set_sprite object_set_solid object_set_visible ' + + 'object_set_persistent object_set_mask room_set_width room_set_height ' + + 'room_set_persistent room_set_background_colour ' + + 'room_set_background_color room_set_view room_set_viewport ' + + 'room_get_viewport room_set_view_enabled room_add room_duplicate ' + + 'room_assign room_instance_add room_instance_clear room_get_camera ' + + 'room_set_camera asset_get_index asset_get_type ' + + 'file_text_open_from_string file_text_open_read file_text_open_write ' + + 'file_text_open_append file_text_close file_text_write_string ' + + 'file_text_write_real file_text_writeln file_text_read_string ' + + 'file_text_read_real file_text_readln file_text_eof file_text_eoln ' + + 'file_exists file_delete file_rename file_copy directory_exists ' + + 'directory_create directory_destroy file_find_first file_find_next ' + + 'file_find_close file_attributes filename_name filename_path ' + + 'filename_dir filename_drive filename_ext filename_change_ext ' + + 'file_bin_open file_bin_rewrite file_bin_close file_bin_position ' + + 'file_bin_size file_bin_seek file_bin_write_byte file_bin_read_byte ' + + 'parameter_count parameter_string environment_get_variable ' + + 'ini_open_from_string ini_open ini_close ini_read_string ' + + 'ini_read_real ini_write_string ini_write_real ini_key_exists ' + + 'ini_section_exists ini_key_delete ini_section_delete ' + + 'ds_set_precision ds_exists ds_stack_create ds_stack_destroy ' + + 'ds_stack_clear ds_stack_copy ds_stack_size ds_stack_empty ' + + 'ds_stack_push ds_stack_pop ds_stack_top ds_stack_write ds_stack_read ' + + 'ds_queue_create ds_queue_destroy ds_queue_clear ds_queue_copy ' + + 'ds_queue_size ds_queue_empty ds_queue_enqueue ds_queue_dequeue ' + + 'ds_queue_head ds_queue_tail ds_queue_write ds_queue_read ' + + 'ds_list_create ds_list_destroy ds_list_clear ds_list_copy ' + + 'ds_list_size ds_list_empty ds_list_add ds_list_insert ' + + 'ds_list_replace ds_list_delete ds_list_find_index ds_list_find_value ' + + 'ds_list_mark_as_list ds_list_mark_as_map ds_list_sort ' + + 'ds_list_shuffle ds_list_write ds_list_read ds_list_set ds_map_create ' + + 'ds_map_destroy ds_map_clear ds_map_copy ds_map_size ds_map_empty ' + + 'ds_map_add ds_map_add_list ds_map_add_map ds_map_replace ' + + 'ds_map_replace_map ds_map_replace_list ds_map_delete ds_map_exists ' + + 'ds_map_find_value ds_map_find_previous ds_map_find_next ' + + 'ds_map_find_first ds_map_find_last ds_map_write ds_map_read ' + + 'ds_map_secure_save ds_map_secure_load ds_map_secure_load_buffer ' + + 'ds_map_secure_save_buffer ds_map_set ds_priority_create ' + + 'ds_priority_destroy ds_priority_clear ds_priority_copy ' + + 'ds_priority_size ds_priority_empty ds_priority_add ' + + 'ds_priority_change_priority ds_priority_find_priority ' + + 'ds_priority_delete_value ds_priority_delete_min ds_priority_find_min ' + + 'ds_priority_delete_max ds_priority_find_max ds_priority_write ' + + 'ds_priority_read ds_grid_create ds_grid_destroy ds_grid_copy ' + + 'ds_grid_resize ds_grid_width ds_grid_height ds_grid_clear ' + + 'ds_grid_set ds_grid_add ds_grid_multiply ds_grid_set_region ' + + 'ds_grid_add_region ds_grid_multiply_region ds_grid_set_disk ' + + 'ds_grid_add_disk ds_grid_multiply_disk ds_grid_set_grid_region ' + + 'ds_grid_add_grid_region ds_grid_multiply_grid_region ds_grid_get ' + + 'ds_grid_get_sum ds_grid_get_max ds_grid_get_min ds_grid_get_mean ' + + 'ds_grid_get_disk_sum ds_grid_get_disk_min ds_grid_get_disk_max ' + + 'ds_grid_get_disk_mean ds_grid_value_exists ds_grid_value_x ' + + 'ds_grid_value_y ds_grid_value_disk_exists ds_grid_value_disk_x ' + + 'ds_grid_value_disk_y ds_grid_shuffle ds_grid_write ds_grid_read ' + + 'ds_grid_sort ds_grid_set ds_grid_get effect_create_below ' + + 'effect_create_above effect_clear part_type_create part_type_destroy ' + + 'part_type_exists part_type_clear part_type_shape part_type_sprite ' + + 'part_type_size part_type_scale part_type_orientation part_type_life ' + + 'part_type_step part_type_death part_type_speed part_type_direction ' + + 'part_type_gravity part_type_colour1 part_type_colour2 ' + + 'part_type_colour3 part_type_colour_mix part_type_colour_rgb ' + + 'part_type_colour_hsv part_type_color1 part_type_color2 ' + + 'part_type_color3 part_type_color_mix part_type_color_rgb ' + + 'part_type_color_hsv part_type_alpha1 part_type_alpha2 ' + + 'part_type_alpha3 part_type_blend part_system_create ' + + 'part_system_create_layer part_system_destroy part_system_exists ' + + 'part_system_clear part_system_draw_order part_system_depth ' + + 'part_system_position part_system_automatic_update ' + + 'part_system_automatic_draw part_system_update part_system_drawit ' + + 'part_system_get_layer part_system_layer part_particles_create ' + + 'part_particles_create_colour part_particles_create_color ' + + 'part_particles_clear part_particles_count part_emitter_create ' + + 'part_emitter_destroy part_emitter_destroy_all part_emitter_exists ' + + 'part_emitter_clear part_emitter_region part_emitter_burst ' + + 'part_emitter_stream external_call external_define external_free ' + + 'window_handle window_device matrix_get matrix_set ' + + 'matrix_build_identity matrix_build matrix_build_lookat ' + + 'matrix_build_projection_ortho matrix_build_projection_perspective ' + + 'matrix_build_projection_perspective_fov matrix_multiply ' + + 'matrix_transform_vertex matrix_stack_push matrix_stack_pop ' + + 'matrix_stack_multiply matrix_stack_set matrix_stack_clear ' + + 'matrix_stack_top matrix_stack_is_empty browser_input_capture ' + + 'os_get_config os_get_info os_get_language os_get_region ' + + 'os_lock_orientation display_get_dpi_x display_get_dpi_y ' + + 'display_set_gui_size display_set_gui_maximise ' + + 'display_set_gui_maximize device_mouse_dbclick_enable ' + + 'display_set_timing_method display_get_timing_method ' + + 'display_set_sleep_margin display_get_sleep_margin virtual_key_add ' + + 'virtual_key_hide virtual_key_delete virtual_key_show ' + + 'draw_enable_drawevent draw_enable_swf_aa draw_set_swf_aa_level ' + + 'draw_get_swf_aa_level draw_texture_flush draw_flush ' + + 'gpu_set_blendenable gpu_set_ztestenable gpu_set_zfunc ' + + 'gpu_set_zwriteenable gpu_set_lightingenable gpu_set_fog ' + + 'gpu_set_cullmode gpu_set_blendmode gpu_set_blendmode_ext ' + + 'gpu_set_blendmode_ext_sepalpha gpu_set_colorwriteenable ' + + 'gpu_set_colourwriteenable gpu_set_alphatestenable ' + + 'gpu_set_alphatestref gpu_set_alphatestfunc gpu_set_texfilter ' + + 'gpu_set_texfilter_ext gpu_set_texrepeat gpu_set_texrepeat_ext ' + + 'gpu_set_tex_filter gpu_set_tex_filter_ext gpu_set_tex_repeat ' + + 'gpu_set_tex_repeat_ext gpu_set_tex_mip_filter ' + + 'gpu_set_tex_mip_filter_ext gpu_set_tex_mip_bias ' + + 'gpu_set_tex_mip_bias_ext gpu_set_tex_min_mip gpu_set_tex_min_mip_ext ' + + 'gpu_set_tex_max_mip gpu_set_tex_max_mip_ext gpu_set_tex_max_aniso ' + + 'gpu_set_tex_max_aniso_ext gpu_set_tex_mip_enable ' + + 'gpu_set_tex_mip_enable_ext gpu_get_blendenable gpu_get_ztestenable ' + + 'gpu_get_zfunc gpu_get_zwriteenable gpu_get_lightingenable ' + + 'gpu_get_fog gpu_get_cullmode gpu_get_blendmode gpu_get_blendmode_ext ' + + 'gpu_get_blendmode_ext_sepalpha gpu_get_blendmode_src ' + + 'gpu_get_blendmode_dest gpu_get_blendmode_srcalpha ' + + 'gpu_get_blendmode_destalpha gpu_get_colorwriteenable ' + + 'gpu_get_colourwriteenable gpu_get_alphatestenable ' + + 'gpu_get_alphatestref gpu_get_alphatestfunc gpu_get_texfilter ' + + 'gpu_get_texfilter_ext gpu_get_texrepeat gpu_get_texrepeat_ext ' + + 'gpu_get_tex_filter gpu_get_tex_filter_ext gpu_get_tex_repeat ' + + 'gpu_get_tex_repeat_ext gpu_get_tex_mip_filter ' + + 'gpu_get_tex_mip_filter_ext gpu_get_tex_mip_bias ' + + 'gpu_get_tex_mip_bias_ext gpu_get_tex_min_mip gpu_get_tex_min_mip_ext ' + + 'gpu_get_tex_max_mip gpu_get_tex_max_mip_ext gpu_get_tex_max_aniso ' + + 'gpu_get_tex_max_aniso_ext gpu_get_tex_mip_enable ' + + 'gpu_get_tex_mip_enable_ext gpu_push_state gpu_pop_state ' + + 'gpu_get_state gpu_set_state draw_light_define_ambient ' + + 'draw_light_define_direction draw_light_define_point ' + + 'draw_light_enable draw_set_lighting draw_light_get_ambient ' + + 'draw_light_get draw_get_lighting shop_leave_rating url_get_domain ' + + 'url_open url_open_ext url_open_full get_timer achievement_login ' + + 'achievement_logout achievement_post achievement_increment ' + + 'achievement_post_score achievement_available ' + + 'achievement_show_achievements achievement_show_leaderboards ' + + 'achievement_load_friends achievement_load_leaderboard ' + + 'achievement_send_challenge achievement_load_progress ' + + 'achievement_reset achievement_login_status achievement_get_pic ' + + 'achievement_show_challenge_notifications achievement_get_challenges ' + + 'achievement_event achievement_show achievement_get_info ' + + 'cloud_file_save cloud_string_save cloud_synchronise ads_enable ' + + 'ads_disable ads_setup ads_engagement_launch ads_engagement_available ' + + 'ads_engagement_active ads_event ads_event_preload ' + + 'ads_set_reward_callback ads_get_display_height ads_get_display_width ' + + 'ads_move ads_interstitial_available ads_interstitial_display ' + + 'device_get_tilt_x device_get_tilt_y device_get_tilt_z ' + + 'device_is_keypad_open device_mouse_check_button ' + + 'device_mouse_check_button_pressed device_mouse_check_button_released ' + + 'device_mouse_x device_mouse_y device_mouse_raw_x device_mouse_raw_y ' + + 'device_mouse_x_to_gui device_mouse_y_to_gui iap_activate iap_status ' + + 'iap_enumerate_products iap_restore_all iap_acquire iap_consume ' + + 'iap_product_details iap_purchase_details facebook_init ' + + 'facebook_login facebook_status facebook_graph_request ' + + 'facebook_dialog facebook_logout facebook_launch_offerwall ' + + 'facebook_post_message facebook_send_invite facebook_user_id ' + + 'facebook_accesstoken facebook_check_permission ' + + 'facebook_request_read_permissions ' + + 'facebook_request_publish_permissions gamepad_is_supported ' + + 'gamepad_get_device_count gamepad_is_connected ' + + 'gamepad_get_description gamepad_get_button_threshold ' + + 'gamepad_set_button_threshold gamepad_get_axis_deadzone ' + + 'gamepad_set_axis_deadzone gamepad_button_count gamepad_button_check ' + + 'gamepad_button_check_pressed gamepad_button_check_released ' + + 'gamepad_button_value gamepad_axis_count gamepad_axis_value ' + + 'gamepad_set_vibration gamepad_set_colour gamepad_set_color ' + + 'os_is_paused window_has_focus code_is_compiled http_get ' + + 'http_get_file http_post_string http_request json_encode json_decode ' + + 'zip_unzip load_csv base64_encode base64_decode md5_string_unicode ' + + 'md5_string_utf8 md5_file os_is_network_connected sha1_string_unicode ' + + 'sha1_string_utf8 sha1_file os_powersave_enable analytics_event ' + + 'analytics_event_ext win8_livetile_tile_notification ' + + 'win8_livetile_tile_clear win8_livetile_badge_notification ' + + 'win8_livetile_badge_clear win8_livetile_queue_enable ' + + 'win8_secondarytile_pin win8_secondarytile_badge_notification ' + + 'win8_secondarytile_delete win8_livetile_notification_begin ' + + 'win8_livetile_notification_secondary_begin ' + + 'win8_livetile_notification_expiry win8_livetile_notification_tag ' + + 'win8_livetile_notification_text_add ' + + 'win8_livetile_notification_image_add win8_livetile_notification_end ' + + 'win8_appbar_enable win8_appbar_add_element ' + + 'win8_appbar_remove_element win8_settingscharm_add_entry ' + + 'win8_settingscharm_add_html_entry win8_settingscharm_add_xaml_entry ' + + 'win8_settingscharm_set_xaml_property ' + + 'win8_settingscharm_get_xaml_property win8_settingscharm_remove_entry ' + + 'win8_share_image win8_share_screenshot win8_share_file ' + + 'win8_share_url win8_share_text win8_search_enable ' + + 'win8_search_disable win8_search_add_suggestions ' + + 'win8_device_touchscreen_available win8_license_initialize_sandbox ' + + 'win8_license_trial_version winphone_license_trial_version ' + + 'winphone_tile_title winphone_tile_count winphone_tile_back_title ' + + 'winphone_tile_back_content winphone_tile_back_content_wide ' + + 'winphone_tile_front_image winphone_tile_front_image_small ' + + 'winphone_tile_front_image_wide winphone_tile_back_image ' + + 'winphone_tile_back_image_wide winphone_tile_background_colour ' + + 'winphone_tile_background_color winphone_tile_icon_image ' + + 'winphone_tile_small_icon_image winphone_tile_wide_content ' + + 'winphone_tile_cycle_images winphone_tile_small_background_image ' + + 'physics_world_create physics_world_gravity ' + + 'physics_world_update_speed physics_world_update_iterations ' + + 'physics_world_draw_debug physics_pause_enable physics_fixture_create ' + + 'physics_fixture_set_kinematic physics_fixture_set_density ' + + 'physics_fixture_set_awake physics_fixture_set_restitution ' + + 'physics_fixture_set_friction physics_fixture_set_collision_group ' + + 'physics_fixture_set_sensor physics_fixture_set_linear_damping ' + + 'physics_fixture_set_angular_damping physics_fixture_set_circle_shape ' + + 'physics_fixture_set_box_shape physics_fixture_set_edge_shape ' + + 'physics_fixture_set_polygon_shape physics_fixture_set_chain_shape ' + + 'physics_fixture_add_point physics_fixture_bind ' + + 'physics_fixture_bind_ext physics_fixture_delete physics_apply_force ' + + 'physics_apply_impulse physics_apply_angular_impulse ' + + 'physics_apply_local_force physics_apply_local_impulse ' + + 'physics_apply_torque physics_mass_properties physics_draw_debug ' + + 'physics_test_overlap physics_remove_fixture physics_set_friction ' + + 'physics_set_density physics_set_restitution physics_get_friction ' + + 'physics_get_density physics_get_restitution ' + + 'physics_joint_distance_create physics_joint_rope_create ' + + 'physics_joint_revolute_create physics_joint_prismatic_create ' + + 'physics_joint_pulley_create physics_joint_wheel_create ' + + 'physics_joint_weld_create physics_joint_friction_create ' + + 'physics_joint_gear_create physics_joint_enable_motor ' + + 'physics_joint_get_value physics_joint_set_value physics_joint_delete ' + + 'physics_particle_create physics_particle_delete ' + + 'physics_particle_delete_region_circle ' + + 'physics_particle_delete_region_box ' + + 'physics_particle_delete_region_poly physics_particle_set_flags ' + + 'physics_particle_set_category_flags physics_particle_draw ' + + 'physics_particle_draw_ext physics_particle_count ' + + 'physics_particle_get_data physics_particle_get_data_particle ' + + 'physics_particle_group_begin physics_particle_group_circle ' + + 'physics_particle_group_box physics_particle_group_polygon ' + + 'physics_particle_group_add_point physics_particle_group_end ' + + 'physics_particle_group_join physics_particle_group_delete ' + + 'physics_particle_group_count physics_particle_group_get_data ' + + 'physics_particle_group_get_mass physics_particle_group_get_inertia ' + + 'physics_particle_group_get_centre_x ' + + 'physics_particle_group_get_centre_y physics_particle_group_get_vel_x ' + + 'physics_particle_group_get_vel_y physics_particle_group_get_ang_vel ' + + 'physics_particle_group_get_x physics_particle_group_get_y ' + + 'physics_particle_group_get_angle physics_particle_set_group_flags ' + + 'physics_particle_get_group_flags physics_particle_get_max_count ' + + 'physics_particle_get_radius physics_particle_get_density ' + + 'physics_particle_get_damping physics_particle_get_gravity_scale ' + + 'physics_particle_set_max_count physics_particle_set_radius ' + + 'physics_particle_set_density physics_particle_set_damping ' + + 'physics_particle_set_gravity_scale network_create_socket ' + + 'network_create_socket_ext network_create_server ' + + 'network_create_server_raw network_connect network_connect_raw ' + + 'network_send_packet network_send_raw network_send_broadcast ' + + 'network_send_udp network_send_udp_raw network_set_timeout ' + + 'network_set_config network_resolve network_destroy buffer_create ' + + 'buffer_write buffer_read buffer_seek buffer_get_surface ' + + 'buffer_set_surface buffer_delete buffer_exists buffer_get_type ' + + 'buffer_get_alignment buffer_poke buffer_peek buffer_save ' + + 'buffer_save_ext buffer_load buffer_load_ext buffer_load_partial ' + + 'buffer_copy buffer_fill buffer_get_size buffer_tell buffer_resize ' + + 'buffer_md5 buffer_sha1 buffer_base64_encode buffer_base64_decode ' + + 'buffer_base64_decode_ext buffer_sizeof buffer_get_address ' + + 'buffer_create_from_vertex_buffer ' + + 'buffer_create_from_vertex_buffer_ext buffer_copy_from_vertex_buffer ' + + 'buffer_async_group_begin buffer_async_group_option ' + + 'buffer_async_group_end buffer_load_async buffer_save_async ' + + 'gml_release_mode gml_pragma steam_activate_overlay ' + + 'steam_is_overlay_enabled steam_is_overlay_activated ' + + 'steam_get_persona_name steam_initialised ' + + 'steam_is_cloud_enabled_for_app steam_is_cloud_enabled_for_account ' + + 'steam_file_persisted steam_get_quota_total steam_get_quota_free ' + + 'steam_file_write steam_file_write_file steam_file_read ' + + 'steam_file_delete steam_file_exists steam_file_size steam_file_share ' + + 'steam_is_screenshot_requested steam_send_screenshot ' + + 'steam_is_user_logged_on steam_get_user_steam_id steam_user_owns_dlc ' + + 'steam_user_installed_dlc steam_set_achievement steam_get_achievement ' + + 'steam_clear_achievement steam_set_stat_int steam_set_stat_float ' + + 'steam_set_stat_avg_rate steam_get_stat_int steam_get_stat_float ' + + 'steam_get_stat_avg_rate steam_reset_all_stats ' + + 'steam_reset_all_stats_achievements steam_stats_ready ' + + 'steam_create_leaderboard steam_upload_score steam_upload_score_ext ' + + 'steam_download_scores_around_user steam_download_scores ' + + 'steam_download_friends_scores steam_upload_score_buffer ' + + 'steam_upload_score_buffer_ext steam_current_game_language ' + + 'steam_available_languages steam_activate_overlay_browser ' + + 'steam_activate_overlay_user steam_activate_overlay_store ' + + 'steam_get_user_persona_name steam_get_app_id ' + + 'steam_get_user_account_id steam_ugc_download steam_ugc_create_item ' + + 'steam_ugc_start_item_update steam_ugc_set_item_title ' + + 'steam_ugc_set_item_description steam_ugc_set_item_visibility ' + + 'steam_ugc_set_item_tags steam_ugc_set_item_content ' + + 'steam_ugc_set_item_preview steam_ugc_submit_item_update ' + + 'steam_ugc_get_item_update_progress steam_ugc_subscribe_item ' + + 'steam_ugc_unsubscribe_item steam_ugc_num_subscribed_items ' + + 'steam_ugc_get_subscribed_items steam_ugc_get_item_install_info ' + + 'steam_ugc_get_item_update_info steam_ugc_request_item_details ' + + 'steam_ugc_create_query_user steam_ugc_create_query_user_ex ' + + 'steam_ugc_create_query_all steam_ugc_create_query_all_ex ' + + 'steam_ugc_query_set_cloud_filename_filter ' + + 'steam_ugc_query_set_match_any_tag steam_ugc_query_set_search_text ' + + 'steam_ugc_query_set_ranked_by_trend_days ' + + 'steam_ugc_query_add_required_tag steam_ugc_query_add_excluded_tag ' + + 'steam_ugc_query_set_return_long_description ' + + 'steam_ugc_query_set_return_total_only ' + + 'steam_ugc_query_set_allow_cached_response steam_ugc_send_query ' + + 'shader_set shader_get_name shader_reset shader_current ' + + 'shader_is_compiled shader_get_sampler_index shader_get_uniform ' + + 'shader_set_uniform_i shader_set_uniform_i_array shader_set_uniform_f ' + + 'shader_set_uniform_f_array shader_set_uniform_matrix ' + + 'shader_set_uniform_matrix_array shader_enable_corner_id ' + + 'texture_set_stage texture_get_texel_width texture_get_texel_height ' + + 'shaders_are_supported vertex_format_begin vertex_format_end ' + + 'vertex_format_delete vertex_format_add_position ' + + 'vertex_format_add_position_3d vertex_format_add_colour ' + + 'vertex_format_add_color vertex_format_add_normal ' + + 'vertex_format_add_texcoord vertex_format_add_textcoord ' + + 'vertex_format_add_custom vertex_create_buffer ' + + 'vertex_create_buffer_ext vertex_delete_buffer vertex_begin ' + + 'vertex_end vertex_position vertex_position_3d vertex_colour ' + + 'vertex_color vertex_argb vertex_texcoord vertex_normal vertex_float1 ' + + 'vertex_float2 vertex_float3 vertex_float4 vertex_ubyte4 ' + + 'vertex_submit vertex_freeze vertex_get_number vertex_get_buffer_size ' + + 'vertex_create_buffer_from_buffer ' + + 'vertex_create_buffer_from_buffer_ext push_local_notification ' + + 'push_get_first_local_notification push_get_next_local_notification ' + + 'push_cancel_local_notification skeleton_animation_set ' + + 'skeleton_animation_get skeleton_animation_mix ' + + 'skeleton_animation_set_ext skeleton_animation_get_ext ' + + 'skeleton_animation_get_duration skeleton_animation_get_frames ' + + 'skeleton_animation_clear skeleton_skin_set skeleton_skin_get ' + + 'skeleton_attachment_set skeleton_attachment_get ' + + 'skeleton_attachment_create skeleton_collision_draw_set ' + + 'skeleton_bone_data_get skeleton_bone_data_set ' + + 'skeleton_bone_state_get skeleton_bone_state_set skeleton_get_minmax ' + + 'skeleton_get_num_bounds skeleton_get_bounds ' + + 'skeleton_animation_get_frame skeleton_animation_set_frame ' + + 'draw_skeleton draw_skeleton_time draw_skeleton_instance ' + + 'draw_skeleton_collision skeleton_animation_list skeleton_skin_list ' + + 'skeleton_slot_data layer_get_id layer_get_id_at_depth ' + + 'layer_get_depth layer_create layer_destroy layer_destroy_instances ' + + 'layer_add_instance layer_has_instance layer_set_visible ' + + 'layer_get_visible layer_exists layer_x layer_y layer_get_x ' + + 'layer_get_y layer_hspeed layer_vspeed layer_get_hspeed ' + + 'layer_get_vspeed layer_script_begin layer_script_end layer_shader ' + + 'layer_get_script_begin layer_get_script_end layer_get_shader ' + + 'layer_set_target_room layer_get_target_room layer_reset_target_room ' + + 'layer_get_all layer_get_all_elements layer_get_name layer_depth ' + + 'layer_get_element_layer layer_get_element_type layer_element_move ' + + 'layer_force_draw_depth layer_is_draw_depth_forced ' + + 'layer_get_forced_depth layer_background_get_id ' + + 'layer_background_exists layer_background_create ' + + 'layer_background_destroy layer_background_visible ' + + 'layer_background_change layer_background_sprite ' + + 'layer_background_htiled layer_background_vtiled ' + + 'layer_background_stretch layer_background_yscale ' + + 'layer_background_xscale layer_background_blend ' + + 'layer_background_alpha layer_background_index layer_background_speed ' + + 'layer_background_get_visible layer_background_get_sprite ' + + 'layer_background_get_htiled layer_background_get_vtiled ' + + 'layer_background_get_stretch layer_background_get_yscale ' + + 'layer_background_get_xscale layer_background_get_blend ' + + 'layer_background_get_alpha layer_background_get_index ' + + 'layer_background_get_speed layer_sprite_get_id layer_sprite_exists ' + + 'layer_sprite_create layer_sprite_destroy layer_sprite_change ' + + 'layer_sprite_index layer_sprite_speed layer_sprite_xscale ' + + 'layer_sprite_yscale layer_sprite_angle layer_sprite_blend ' + + 'layer_sprite_alpha layer_sprite_x layer_sprite_y ' + + 'layer_sprite_get_sprite layer_sprite_get_index ' + + 'layer_sprite_get_speed layer_sprite_get_xscale ' + + 'layer_sprite_get_yscale layer_sprite_get_angle ' + + 'layer_sprite_get_blend layer_sprite_get_alpha layer_sprite_get_x ' + + 'layer_sprite_get_y layer_tilemap_get_id layer_tilemap_exists ' + + 'layer_tilemap_create layer_tilemap_destroy tilemap_tileset tilemap_x ' + + 'tilemap_y tilemap_set tilemap_set_at_pixel tilemap_get_tileset ' + + 'tilemap_get_tile_width tilemap_get_tile_height tilemap_get_width ' + + 'tilemap_get_height tilemap_get_x tilemap_get_y tilemap_get ' + + 'tilemap_get_at_pixel tilemap_get_cell_x_at_pixel ' + + 'tilemap_get_cell_y_at_pixel tilemap_clear draw_tilemap draw_tile ' + + 'tilemap_set_global_mask tilemap_get_global_mask tilemap_set_mask ' + + 'tilemap_get_mask tilemap_get_frame tile_set_empty tile_set_index ' + + 'tile_set_flip tile_set_mirror tile_set_rotate tile_get_empty ' + + 'tile_get_index tile_get_flip tile_get_mirror tile_get_rotate ' + + 'layer_tile_exists layer_tile_create layer_tile_destroy ' + + 'layer_tile_change layer_tile_xscale layer_tile_yscale ' + + 'layer_tile_blend layer_tile_alpha layer_tile_x layer_tile_y ' + + 'layer_tile_region layer_tile_visible layer_tile_get_sprite ' + + 'layer_tile_get_xscale layer_tile_get_yscale layer_tile_get_blend ' + + 'layer_tile_get_alpha layer_tile_get_x layer_tile_get_y ' + + 'layer_tile_get_region layer_tile_get_visible ' + + 'layer_instance_get_instance instance_activate_layer ' + + 'instance_deactivate_layer camera_create camera_create_view ' + + 'camera_destroy camera_apply camera_get_active camera_get_default ' + + 'camera_set_default camera_set_view_mat camera_set_proj_mat ' + + 'camera_set_update_script camera_set_begin_script ' + + 'camera_set_end_script camera_set_view_pos camera_set_view_size ' + + 'camera_set_view_speed camera_set_view_border camera_set_view_angle ' + + 'camera_set_view_target camera_get_view_mat camera_get_proj_mat ' + + 'camera_get_update_script camera_get_begin_script ' + + 'camera_get_end_script camera_get_view_x camera_get_view_y ' + + 'camera_get_view_width camera_get_view_height camera_get_view_speed_x ' + + 'camera_get_view_speed_y camera_get_view_border_x ' + + 'camera_get_view_border_y camera_get_view_angle ' + + 'camera_get_view_target view_get_camera view_get_visible ' + + 'view_get_xport view_get_yport view_get_wport view_get_hport ' + + 'view_get_surface_id view_set_camera view_set_visible view_set_xport ' + + 'view_set_yport view_set_wport view_set_hport view_set_surface_id ' + + 'gesture_drag_time gesture_drag_distance gesture_flick_speed ' + + 'gesture_double_tap_time gesture_double_tap_distance ' + + 'gesture_pinch_distance gesture_pinch_angle_towards ' + + 'gesture_pinch_angle_away gesture_rotate_time gesture_rotate_angle ' + + 'gesture_tap_count gesture_get_drag_time gesture_get_drag_distance ' + + 'gesture_get_flick_speed gesture_get_double_tap_time ' + + 'gesture_get_double_tap_distance gesture_get_pinch_distance ' + + 'gesture_get_pinch_angle_towards gesture_get_pinch_angle_away ' + + 'gesture_get_rotate_time gesture_get_rotate_angle ' + + 'gesture_get_tap_count keyboard_virtual_show keyboard_virtual_hide ' + + 'keyboard_virtual_status keyboard_virtual_height', + literal: 'self other all noone global local undefined pointer_invalid ' + + 'pointer_null path_action_stop path_action_restart ' + + 'path_action_continue path_action_reverse true false pi GM_build_date ' + + 'GM_version GM_runtime_version timezone_local timezone_utc ' + + 'gamespeed_fps gamespeed_microseconds ev_create ev_destroy ev_step ' + + 'ev_alarm ev_keyboard ev_mouse ev_collision ev_other ev_draw ' + + 'ev_draw_begin ev_draw_end ev_draw_pre ev_draw_post ev_keypress ' + + 'ev_keyrelease ev_trigger ev_left_button ev_right_button ' + + 'ev_middle_button ev_no_button ev_left_press ev_right_press ' + + 'ev_middle_press ev_left_release ev_right_release ev_middle_release ' + + 'ev_mouse_enter ev_mouse_leave ev_mouse_wheel_up ev_mouse_wheel_down ' + + 'ev_global_left_button ev_global_right_button ev_global_middle_button ' + + 'ev_global_left_press ev_global_right_press ev_global_middle_press ' + + 'ev_global_left_release ev_global_right_release ' + + 'ev_global_middle_release ev_joystick1_left ev_joystick1_right ' + + 'ev_joystick1_up ev_joystick1_down ev_joystick1_button1 ' + + 'ev_joystick1_button2 ev_joystick1_button3 ev_joystick1_button4 ' + + 'ev_joystick1_button5 ev_joystick1_button6 ev_joystick1_button7 ' + + 'ev_joystick1_button8 ev_joystick2_left ev_joystick2_right ' + + 'ev_joystick2_up ev_joystick2_down ev_joystick2_button1 ' + + 'ev_joystick2_button2 ev_joystick2_button3 ev_joystick2_button4 ' + + 'ev_joystick2_button5 ev_joystick2_button6 ev_joystick2_button7 ' + + 'ev_joystick2_button8 ev_outside ev_boundary ev_game_start ' + + 'ev_game_end ev_room_start ev_room_end ev_no_more_lives ' + + 'ev_animation_end ev_end_of_path ev_no_more_health ev_close_button ' + + 'ev_user0 ev_user1 ev_user2 ev_user3 ev_user4 ev_user5 ev_user6 ' + + 'ev_user7 ev_user8 ev_user9 ev_user10 ev_user11 ev_user12 ev_user13 ' + + 'ev_user14 ev_user15 ev_step_normal ev_step_begin ev_step_end ev_gui ' + + 'ev_gui_begin ev_gui_end ev_cleanup ev_gesture ev_gesture_tap ' + + 'ev_gesture_double_tap ev_gesture_drag_start ev_gesture_dragging ' + + 'ev_gesture_drag_end ev_gesture_flick ev_gesture_pinch_start ' + + 'ev_gesture_pinch_in ev_gesture_pinch_out ev_gesture_pinch_end ' + + 'ev_gesture_rotate_start ev_gesture_rotating ev_gesture_rotate_end ' + + 'ev_global_gesture_tap ev_global_gesture_double_tap ' + + 'ev_global_gesture_drag_start ev_global_gesture_dragging ' + + 'ev_global_gesture_drag_end ev_global_gesture_flick ' + + 'ev_global_gesture_pinch_start ev_global_gesture_pinch_in ' + + 'ev_global_gesture_pinch_out ev_global_gesture_pinch_end ' + + 'ev_global_gesture_rotate_start ev_global_gesture_rotating ' + + 'ev_global_gesture_rotate_end vk_nokey vk_anykey vk_enter vk_return ' + + 'vk_shift vk_control vk_alt vk_escape vk_space vk_backspace vk_tab ' + + 'vk_pause vk_printscreen vk_left vk_right vk_up vk_down vk_home ' + + 'vk_end vk_delete vk_insert vk_pageup vk_pagedown vk_f1 vk_f2 vk_f3 ' + + 'vk_f4 vk_f5 vk_f6 vk_f7 vk_f8 vk_f9 vk_f10 vk_f11 vk_f12 vk_numpad0 ' + + 'vk_numpad1 vk_numpad2 vk_numpad3 vk_numpad4 vk_numpad5 vk_numpad6 ' + + 'vk_numpad7 vk_numpad8 vk_numpad9 vk_divide vk_multiply vk_subtract ' + + 'vk_add vk_decimal vk_lshift vk_lcontrol vk_lalt vk_rshift ' + + 'vk_rcontrol vk_ralt mb_any mb_none mb_left mb_right mb_middle ' + + 'c_aqua c_black c_blue c_dkgray c_fuchsia c_gray c_green c_lime ' + + 'c_ltgray c_maroon c_navy c_olive c_purple c_red c_silver c_teal ' + + 'c_white c_yellow c_orange fa_left fa_center fa_right fa_top ' + + 'fa_middle fa_bottom pr_pointlist pr_linelist pr_linestrip ' + + 'pr_trianglelist pr_trianglestrip pr_trianglefan bm_complex bm_normal ' + + 'bm_add bm_max bm_subtract bm_zero bm_one bm_src_colour ' + + 'bm_inv_src_colour bm_src_color bm_inv_src_color bm_src_alpha ' + + 'bm_inv_src_alpha bm_dest_alpha bm_inv_dest_alpha bm_dest_colour ' + + 'bm_inv_dest_colour bm_dest_color bm_inv_dest_color bm_src_alpha_sat ' + + 'tf_point tf_linear tf_anisotropic mip_off mip_on mip_markedonly ' + + 'audio_falloff_none audio_falloff_inverse_distance ' + + 'audio_falloff_inverse_distance_clamped audio_falloff_linear_distance ' + + 'audio_falloff_linear_distance_clamped ' + + 'audio_falloff_exponent_distance ' + + 'audio_falloff_exponent_distance_clamped audio_old_system ' + + 'audio_new_system audio_mono audio_stereo audio_3d cr_default cr_none ' + + 'cr_arrow cr_cross cr_beam cr_size_nesw cr_size_ns cr_size_nwse ' + + 'cr_size_we cr_uparrow cr_hourglass cr_drag cr_appstart cr_handpoint ' + + 'cr_size_all spritespeed_framespersecond ' + + 'spritespeed_framespergameframe asset_object asset_unknown ' + + 'asset_sprite asset_sound asset_room asset_path asset_script ' + + 'asset_font asset_timeline asset_tiles asset_shader fa_readonly ' + + 'fa_hidden fa_sysfile fa_volumeid fa_directory fa_archive ' + + 'ds_type_map ds_type_list ds_type_stack ds_type_queue ds_type_grid ' + + 'ds_type_priority ef_explosion ef_ring ef_ellipse ef_firework ' + + 'ef_smoke ef_smokeup ef_star ef_spark ef_flare ef_cloud ef_rain ' + + 'ef_snow pt_shape_pixel pt_shape_disk pt_shape_square pt_shape_line ' + + 'pt_shape_star pt_shape_circle pt_shape_ring pt_shape_sphere ' + + 'pt_shape_flare pt_shape_spark pt_shape_explosion pt_shape_cloud ' + + 'pt_shape_smoke pt_shape_snow ps_distr_linear ps_distr_gaussian ' + + 'ps_distr_invgaussian ps_shape_rectangle ps_shape_ellipse ' + + 'ps_shape_diamond ps_shape_line ty_real ty_string dll_cdecl ' + + 'dll_stdcall matrix_view matrix_projection matrix_world os_win32 ' + + 'os_windows os_macosx os_ios os_android os_symbian os_linux ' + + 'os_unknown os_winphone os_tizen os_win8native ' + + 'os_wiiu os_3ds os_psvita os_bb10 os_ps4 os_xboxone ' + + 'os_ps3 os_xbox360 os_uwp os_tvos os_switch ' + + 'browser_not_a_browser browser_unknown browser_ie browser_firefox ' + + 'browser_chrome browser_safari browser_safari_mobile browser_opera ' + + 'browser_tizen browser_edge browser_windows_store browser_ie_mobile ' + + 'device_ios_unknown device_ios_iphone device_ios_iphone_retina ' + + 'device_ios_ipad device_ios_ipad_retina device_ios_iphone5 ' + + 'device_ios_iphone6 device_ios_iphone6plus device_emulator ' + + 'device_tablet display_landscape display_landscape_flipped ' + + 'display_portrait display_portrait_flipped tm_sleep tm_countvsyncs ' + + 'of_challenge_win of_challen ge_lose of_challenge_tie ' + + 'leaderboard_type_number leaderboard_type_time_mins_secs ' + + 'cmpfunc_never cmpfunc_less cmpfunc_equal cmpfunc_lessequal ' + + 'cmpfunc_greater cmpfunc_notequal cmpfunc_greaterequal cmpfunc_always ' + + 'cull_noculling cull_clockwise cull_counterclockwise lighttype_dir ' + + 'lighttype_point iap_ev_storeload iap_ev_product iap_ev_purchase ' + + 'iap_ev_consume iap_ev_restore iap_storeload_ok iap_storeload_failed ' + + 'iap_status_uninitialised iap_status_unavailable iap_status_loading ' + + 'iap_status_available iap_status_processing iap_status_restoring ' + + 'iap_failed iap_unavailable iap_available iap_purchased iap_canceled ' + + 'iap_refunded fb_login_default fb_login_fallback_to_webview ' + + 'fb_login_no_fallback_to_webview fb_login_forcing_webview ' + + 'fb_login_use_system_account fb_login_forcing_safari ' + + 'phy_joint_anchor_1_x phy_joint_anchor_1_y phy_joint_anchor_2_x ' + + 'phy_joint_anchor_2_y phy_joint_reaction_force_x ' + + 'phy_joint_reaction_force_y phy_joint_reaction_torque ' + + 'phy_joint_motor_speed phy_joint_angle phy_joint_motor_torque ' + + 'phy_joint_max_motor_torque phy_joint_translation phy_joint_speed ' + + 'phy_joint_motor_force phy_joint_max_motor_force phy_joint_length_1 ' + + 'phy_joint_length_2 phy_joint_damping_ratio phy_joint_frequency ' + + 'phy_joint_lower_angle_limit phy_joint_upper_angle_limit ' + + 'phy_joint_angle_limits phy_joint_max_length phy_joint_max_torque ' + + 'phy_joint_max_force phy_debug_render_aabb ' + + 'phy_debug_render_collision_pairs phy_debug_render_coms ' + + 'phy_debug_render_core_shapes phy_debug_render_joints ' + + 'phy_debug_render_obb phy_debug_render_shapes ' + + 'phy_particle_flag_water phy_particle_flag_zombie ' + + 'phy_particle_flag_wall phy_particle_flag_spring ' + + 'phy_particle_flag_elastic phy_particle_flag_viscous ' + + 'phy_particle_flag_powder phy_particle_flag_tensile ' + + 'phy_particle_flag_colourmixing phy_particle_flag_colormixing ' + + 'phy_particle_group_flag_solid phy_particle_group_flag_rigid ' + + 'phy_particle_data_flag_typeflags phy_particle_data_flag_position ' + + 'phy_particle_data_flag_velocity phy_particle_data_flag_colour ' + + 'phy_particle_data_flag_color phy_particle_data_flag_category ' + + 'achievement_our_info achievement_friends_info ' + + 'achievement_leaderboard_info achievement_achievement_info ' + + 'achievement_filter_all_players achievement_filter_friends_only ' + + 'achievement_filter_favorites_only ' + + 'achievement_type_achievement_challenge ' + + 'achievement_type_score_challenge achievement_pic_loaded ' + + 'achievement_show_ui achievement_show_profile ' + + 'achievement_show_leaderboard achievement_show_achievement ' + + 'achievement_show_bank achievement_show_friend_picker ' + + 'achievement_show_purchase_prompt network_socket_tcp ' + + 'network_socket_udp network_socket_bluetooth network_type_connect ' + + 'network_type_disconnect network_type_data ' + + 'network_type_non_blocking_connect network_config_connect_timeout ' + + 'network_config_use_non_blocking_socket ' + + 'network_config_enable_reliable_udp ' + + 'network_config_disable_reliable_udp buffer_fixed buffer_grow ' + + 'buffer_wrap buffer_fast buffer_vbuffer buffer_network buffer_u8 ' + + 'buffer_s8 buffer_u16 buffer_s16 buffer_u32 buffer_s32 buffer_u64 ' + + 'buffer_f16 buffer_f32 buffer_f64 buffer_bool buffer_text ' + + 'buffer_string buffer_surface_copy buffer_seek_start ' + + 'buffer_seek_relative buffer_seek_end ' + + 'buffer_generalerror buffer_outofspace buffer_outofbounds ' + + 'buffer_invalidtype text_type button_type input_type ANSI_CHARSET ' + + 'DEFAULT_CHARSET EASTEUROPE_CHARSET RUSSIAN_CHARSET SYMBOL_CHARSET ' + + 'SHIFTJIS_CHARSET HANGEUL_CHARSET GB2312_CHARSET CHINESEBIG5_CHARSET ' + + 'JOHAB_CHARSET HEBREW_CHARSET ARABIC_CHARSET GREEK_CHARSET ' + + 'TURKISH_CHARSET VIETNAMESE_CHARSET THAI_CHARSET MAC_CHARSET ' + + 'BALTIC_CHARSET OEM_CHARSET gp_face1 gp_face2 gp_face3 gp_face4 ' + + 'gp_shoulderl gp_shoulderr gp_shoulderlb gp_shoulderrb gp_select ' + + 'gp_start gp_stickl gp_stickr gp_padu gp_padd gp_padl gp_padr ' + + 'gp_axislh gp_axislv gp_axisrh gp_axisrv ov_friends ov_community ' + + 'ov_players ov_settings ov_gamegroup ov_achievements lb_sort_none ' + + 'lb_sort_ascending lb_sort_descending lb_disp_none lb_disp_numeric ' + + 'lb_disp_time_sec lb_disp_time_ms ugc_result_success ' + + 'ugc_filetype_community ugc_filetype_microtrans ugc_visibility_public ' + + 'ugc_visibility_friends_only ugc_visibility_private ' + + 'ugc_query_RankedByVote ugc_query_RankedByPublicationDate ' + + 'ugc_query_AcceptedForGameRankedByAcceptanceDate ' + + 'ugc_query_RankedByTrend ' + + 'ugc_query_FavoritedByFriendsRankedByPublicationDate ' + + 'ugc_query_CreatedByFriendsRankedByPublicationDate ' + + 'ugc_query_RankedByNumTimesReported ' + + 'ugc_query_CreatedByFollowedUsersRankedByPublicationDate ' + + 'ugc_query_NotYetRated ugc_query_RankedByTotalVotesAsc ' + + 'ugc_query_RankedByVotesUp ugc_query_RankedByTextSearch ' + + 'ugc_sortorder_CreationOrderDesc ugc_sortorder_CreationOrderAsc ' + + 'ugc_sortorder_TitleAsc ugc_sortorder_LastUpdatedDesc ' + + 'ugc_sortorder_SubscriptionDateDesc ugc_sortorder_VoteScoreDesc ' + + 'ugc_sortorder_ForModeration ugc_list_Published ugc_list_VotedOn ' + + 'ugc_list_VotedUp ugc_list_VotedDown ugc_list_WillVoteLater ' + + 'ugc_list_Favorited ugc_list_Subscribed ugc_list_UsedOrPlayed ' + + 'ugc_list_Followed ugc_match_Items ugc_match_Items_Mtx ' + + 'ugc_match_Items_ReadyToUse ugc_match_Collections ugc_match_Artwork ' + + 'ugc_match_Videos ugc_match_Screenshots ugc_match_AllGuides ' + + 'ugc_match_WebGuides ugc_match_IntegratedGuides ' + + 'ugc_match_UsableInGame ugc_match_ControllerBindings ' + + 'vertex_usage_position vertex_usage_colour vertex_usage_color ' + + 'vertex_usage_normal vertex_usage_texcoord vertex_usage_textcoord ' + + 'vertex_usage_blendweight vertex_usage_blendindices ' + + 'vertex_usage_psize vertex_usage_tangent vertex_usage_binormal ' + + 'vertex_usage_fog vertex_usage_depth vertex_usage_sample ' + + 'vertex_type_float1 vertex_type_float2 vertex_type_float3 ' + + 'vertex_type_float4 vertex_type_colour vertex_type_color ' + + 'vertex_type_ubyte4 layerelementtype_undefined ' + + 'layerelementtype_background layerelementtype_instance ' + + 'layerelementtype_oldtilemap layerelementtype_sprite ' + + 'layerelementtype_tilemap layerelementtype_particlesystem ' + + 'layerelementtype_tile tile_rotate tile_flip tile_mirror ' + + 'tile_index_mask kbv_type_default kbv_type_ascii kbv_type_url ' + + 'kbv_type_email kbv_type_numbers kbv_type_phone kbv_type_phone_name ' + + 'kbv_returnkey_default kbv_returnkey_go kbv_returnkey_google ' + + 'kbv_returnkey_join kbv_returnkey_next kbv_returnkey_route ' + + 'kbv_returnkey_search kbv_returnkey_send kbv_returnkey_yahoo ' + + 'kbv_returnkey_done kbv_returnkey_continue kbv_returnkey_emergency ' + + 'kbv_autocapitalize_none kbv_autocapitalize_words ' + + 'kbv_autocapitalize_sentences kbv_autocapitalize_characters', + symbol: 'argument_relative argument argument0 argument1 argument2 ' + + 'argument3 argument4 argument5 argument6 argument7 argument8 ' + + 'argument9 argument10 argument11 argument12 argument13 argument14 ' + + 'argument15 argument_count x y xprevious yprevious xstart ystart ' + + 'hspeed vspeed direction speed friction gravity gravity_direction ' + + 'path_index path_position path_positionprevious path_speed ' + + 'path_scale path_orientation path_endaction object_index id solid ' + + 'persistent mask_index instance_count instance_id room_speed fps ' + + 'fps_real current_time current_year current_month current_day ' + + 'current_weekday current_hour current_minute current_second alarm ' + + 'timeline_index timeline_position timeline_speed timeline_running ' + + 'timeline_loop room room_first room_last room_width room_height ' + + 'room_caption room_persistent score lives health show_score ' + + 'show_lives show_health caption_score caption_lives caption_health ' + + 'event_type event_number event_object event_action ' + + 'application_surface gamemaker_pro gamemaker_registered ' + + 'gamemaker_version error_occurred error_last debug_mode ' + + 'keyboard_key keyboard_lastkey keyboard_lastchar keyboard_string ' + + 'mouse_x mouse_y mouse_button mouse_lastbutton cursor_sprite ' + + 'visible sprite_index sprite_width sprite_height sprite_xoffset ' + + 'sprite_yoffset image_number image_index image_speed depth ' + + 'image_xscale image_yscale image_angle image_alpha image_blend ' + + 'bbox_left bbox_right bbox_top bbox_bottom layer background_colour ' + + 'background_showcolour background_color background_showcolor ' + + 'view_enabled view_current view_visible view_xview view_yview ' + + 'view_wview view_hview view_xport view_yport view_wport view_hport ' + + 'view_angle view_hborder view_vborder view_hspeed view_vspeed ' + + 'view_object view_surface_id view_camera game_id game_display_name ' + + 'game_project_name game_save_id working_directory temp_directory ' + + 'program_directory browser_width browser_height os_type os_device ' + + 'os_browser os_version display_aa async_load delta_time ' + + 'webgl_enabled event_data iap_data phy_rotation phy_position_x ' + + 'phy_position_y phy_angular_velocity phy_linear_velocity_x ' + + 'phy_linear_velocity_y phy_speed_x phy_speed_y phy_speed ' + + 'phy_angular_damping phy_linear_damping phy_bullet ' + + 'phy_fixed_rotation phy_active phy_mass phy_inertia phy_com_x ' + + 'phy_com_y phy_dynamic phy_kinematic phy_sleeping ' + + 'phy_collision_points phy_collision_x phy_collision_y ' + + 'phy_col_normal_x phy_col_normal_y phy_position_xprevious ' + + 'phy_position_yprevious' + }; + + return { + name: 'GML', + aliases: ['gml', 'GML'], + case_insensitive: false, // language is case-insensitive + keywords: GML_KEYWORDS, + + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = gml; diff --git a/node_modules/highlight.js/lib/languages/go.js b/node_modules/highlight.js/lib/languages/go.js @@ -0,0 +1,65 @@ +/* +Language: Go +Author: Stephan Kountso aka StepLg <steplg@gmail.com> +Contributors: Evgeny Stepanischev <imbolk@gmail.com> +Description: Google go language (golang). For info about language +Website: http://golang.org/ +Category: common, system +*/ + +function go(hljs) { + var GO_KEYWORDS = { + keyword: + 'break default func interface select case map struct chan else goto package switch ' + + 'const fallthrough if range type continue for import return var go defer ' + + 'bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 ' + + 'uint16 uint32 uint64 int uint uintptr rune', + literal: + 'true false iota nil', + built_in: + 'append cap close complex copy imag len make new panic print println real recover delete' + }; + return { + name: 'Go', + aliases: ['golang'], + keywords: GO_KEYWORDS, + illegal: '</', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'string', + variants: [ + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + {begin: '`', end: '`'}, + ] + }, + { + className: 'number', + variants: [ + {begin: hljs.C_NUMBER_RE + '[i]', relevance: 1}, + hljs.C_NUMBER_MODE + ] + }, + { + begin: /:=/ // relevance booster + }, + { + className: 'function', + beginKeywords: 'func', end: '\\s*(\\{|$)', excludeEnd: true, + contains: [ + hljs.TITLE_MODE, + { + className: 'params', + begin: /\(/, end: /\)/, + keywords: GO_KEYWORDS, + illegal: /["']/ + } + ] + } + ] + }; +} + +module.exports = go; diff --git a/node_modules/highlight.js/lib/languages/golo.js b/node_modules/highlight.js/lib/languages/golo.js @@ -0,0 +1,32 @@ +/* +Language: Golo +Author: Philippe Charriere <ph.charriere@gmail.com> +Description: a lightweight dynamic language for the JVM +Website: http://golo-lang.org/ +*/ + +function golo(hljs) { + return { + name: 'Golo', + keywords: { + keyword: + 'println readln print import module function local return let var ' + + 'while for foreach times in case when match with break continue ' + + 'augment augmentation each find filter reduce ' + + 'if then else otherwise try catch finally raise throw orIfNull ' + + 'DynamicObject|10 DynamicVariable struct Observable map set vector list array', + literal: + 'true false null' + }, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'meta', begin: '@[A-Za-z]+' + } + ] + } +} + +module.exports = golo; diff --git a/node_modules/highlight.js/lib/languages/gradle.js b/node_modules/highlight.js/lib/languages/gradle.js @@ -0,0 +1,44 @@ +/* +Language: Gradle +Description: Gradle is an open-source build automation tool focused on flexibility and performance. +Website: https://gradle.org +Author: Damian Mee <mee.damian@gmail.com> +*/ + +function gradle(hljs) { + return { + name: 'Gradle', + case_insensitive: true, + keywords: { + keyword: + 'task project allprojects subprojects artifacts buildscript configurations ' + + 'dependencies repositories sourceSets description delete from into include ' + + 'exclude source classpath destinationDir includes options sourceCompatibility ' + + 'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' + + 'def abstract break case catch continue default do else extends final finally ' + + 'for if implements instanceof native new private protected public return static ' + + 'switch synchronized throw throws transient try volatile while strictfp package ' + + 'import false null super this true antlrtask checkstyle codenarc copy boolean ' + + 'byte char class double float int interface long short void compile runTime ' + + 'file fileTree abs any append asList asWritable call collect compareTo count ' + + 'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' + + 'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' + + 'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' + + 'newReader newWriter next plus pop power previous print println push putAt read ' + + 'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' + + 'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' + + 'withStream withWriter withWriterAppend write writeLine' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE, + hljs.REGEXP_MODE + + ] + } +} + +module.exports = gradle; diff --git a/node_modules/highlight.js/lib/languages/groovy.js b/node_modules/highlight.js/lib/languages/groovy.js @@ -0,0 +1,159 @@ +/** + * @param {string} value + * @returns {RegExp} + * */ + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function lookahead(re) { + return concat('(?=', re, ')'); +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/* + Language: Groovy + Author: Guillaume Laforge <glaforge@gmail.com> + Description: Groovy programming language implementation inspired from Vsevolod's Java mode + Website: https://groovy-lang.org + */ + +function variants(variants, obj = {}) { + obj.variants = variants; + return obj; +} + +function groovy(hljs) { + const IDENT_RE = '[A-Za-z0-9_$]+'; + const COMMENT = variants([ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.COMMENT( + '/\\*\\*', + '\\*/', + { + relevance : 0, + contains : [ + { + // eat up @'s in emails to prevent them to be recognized as doctags + begin: /\w+@/, relevance: 0 + }, { + className : 'doctag', + begin : '@[A-Za-z]+' + } + ] + } + ) + ]); + const REGEXP = { + className: 'regexp', + begin: /~?\/[^\/\n]+\//, + contains: [ + hljs.BACKSLASH_ESCAPE + ] + }; + const NUMBER = variants([ + hljs.BINARY_NUMBER_MODE, + hljs.C_NUMBER_MODE, + ]); + const STRING = variants([ + { + begin: /"""/, + end: /"""/ + }, { + begin: /'''/, + end: /'''/ + }, { + begin: "\\$/", + end: "/\\$", + relevance: 10 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + ], + { className: "string" } + ); + + return { + name: 'Groovy', + keywords: { + built_in: 'this super', + literal: 'true false null', + keyword: + 'byte short char int long boolean float double void ' + + // groovy specific keywords + 'def as in assert trait ' + + // common keywords with Java + 'abstract static volatile transient public private protected synchronized final ' + + 'class interface enum if else for while switch case break default continue ' + + 'throw throws try catch finally implements extends new import package return instanceof' + }, + contains: [ + hljs.SHEBANG(), + COMMENT, + STRING, + REGEXP, + NUMBER, + { + className: 'class', + beginKeywords: 'class interface trait enum', end: '{', + illegal: ':', + contains: [ + {beginKeywords: 'extends implements'}, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + className: 'meta', begin: '@[A-Za-z]+' + }, + { + // highlight map keys and named parameters as attrs + className: 'attr', begin: IDENT_RE + '[ \t]*:' + }, + { + // catch middle element of the ternary operator + // to avoid highlight it as a label, named parameter, or map key + begin: /\?/, + end: /:/, + contains: [ + COMMENT, + STRING, + REGEXP, + NUMBER, + 'self' + ] + }, + { + // highlight labeled statements + className: 'symbol', + begin: '^[ \t]*' + lookahead(IDENT_RE + ':'), + excludeBegin: true, + end: IDENT_RE + ':', + relevance: 0 + } + ], + illegal: /#|<\// + }; +} + +module.exports = groovy; diff --git a/node_modules/highlight.js/lib/languages/haml.js b/node_modules/highlight.js/lib/languages/haml.js @@ -0,0 +1,117 @@ +/* +Language: HAML +Requires: ruby.js +Author: Dan Allen <dan.j.allen@gmail.com> +Website: http://haml.info +Category: template +*/ + +// TODO support filter tags like :javascript, support inline HTML +function haml(hljs) { + return { + name: 'HAML', + case_insensitive: true, + contains: [ + { + className: 'meta', + begin: '^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$', + relevance: 10 + }, + // FIXME these comments should be allowed to span indented lines + hljs.COMMENT( + '^\\s*(!=#|=#|-#|/).*$', + false, + { + relevance: 0 + } + ), + { + begin: '^\\s*(-|=|!=)(?!#)', + starts: { + end: '\\n', + subLanguage: 'ruby' + } + }, + { + className: 'tag', + begin: '^\\s*%', + contains: [ + { + className: 'selector-tag', + begin: '\\w+' + }, + { + className: 'selector-id', + begin: '#[\\w-]+' + }, + { + className: 'selector-class', + begin: '\\.[\\w-]+' + }, + { + begin: '{\\s*', + end: '\\s*}', + contains: [ + { + begin: ':\\w+\\s*=>', + end: ',\\s+', + returnBegin: true, + endsWithParent: true, + contains: [ + { + className: 'attr', + begin: ':\\w+' + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + begin: '\\w+', + relevance: 0 + } + ] + } + ] + }, + { + begin: '\\(\\s*', + end: '\\s*\\)', + excludeEnd: true, + contains: [ + { + begin: '\\w+\\s*=', + end: '\\s+', + returnBegin: true, + endsWithParent: true, + contains: [ + { + className: 'attr', + begin: '\\w+', + relevance: 0 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + begin: '\\w+', + relevance: 0 + } + ] + } + ] + } + ] + }, + { + begin: '^\\s*[=~]\\s*' + }, + { + begin: '#{', + starts: { + end: '}', + subLanguage: 'ruby' + } + } + ] + }; +} + +module.exports = haml; diff --git a/node_modules/highlight.js/lib/languages/handlebars.js b/node_modules/highlight.js/lib/languages/handlebars.js @@ -0,0 +1,270 @@ +/** + * @param {string} value + * @returns {RegExp} + * */ + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/* +Language: Handlebars +Requires: xml.js +Author: Robin Ward <robin.ward@gmail.com> +Description: Matcher for Handlebars as well as EmberJS additions. +Website: https://handlebarsjs.com +Category: template +*/ + +function handlebars(hljs) { + const BUILT_INS = { + 'builtin-name': [ + 'action', + 'bindattr', + 'collection', + 'component', + 'concat', + 'debugger', + 'each', + 'each-in', + 'get', + 'hash', + 'if', + 'in', + 'input', + 'link-to', + 'loc', + 'log', + 'lookup', + 'mut', + 'outlet', + 'partial', + 'query-params', + 'render', + 'template', + 'textarea', + 'unbound', + 'unless', + 'view', + 'with', + 'yield' + ].join(" ") + }; + + const LITERALS = { + literal: [ + 'true', + 'false', + 'undefined', + 'null' + ].join(" ") + }; + + // as defined in https://handlebarsjs.com/guide/expressions.html#literal-segments + // this regex matches literal segments like ' abc ' or [ abc ] as well as helpers and paths + // like a/b, ./abc/cde, and abc.bcd + + const DOUBLE_QUOTED_ID_REGEX=/".*?"/; + const SINGLE_QUOTED_ID_REGEX=/'.*?'/; + const BRACKET_QUOTED_ID_REGEX=/\[.*?\]/; + const PLAIN_ID_REGEX=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/; + const PATH_DELIMITER_REGEX=/\.|\//; + + const IDENTIFIER_REGEX = concat( + '(', + SINGLE_QUOTED_ID_REGEX, '|', + DOUBLE_QUOTED_ID_REGEX, '|', + BRACKET_QUOTED_ID_REGEX, '|', + PLAIN_ID_REGEX, '|', + PATH_DELIMITER_REGEX, + ')+' + ); + + // identifier followed by a equal-sign (without the equal sign) + const HASH_PARAM_REGEX = concat( + '(', + BRACKET_QUOTED_ID_REGEX, '|', + PLAIN_ID_REGEX, + ')(?==)' + ); + + const HELPER_NAME_OR_PATH_EXPRESSION = { + begin: IDENTIFIER_REGEX, + lexemes: /[\w.\/]+/ + }; + + const HELPER_PARAMETER = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + keywords: LITERALS + }); + + const SUB_EXPRESSION = { + begin: /\(/, + end: /\)/ + // the "contains" is added below when all necessary sub-modes are defined + }; + + const HASH = { + // fka "attribute-assignment", parameters of the form 'key=value' + className: 'attr', + begin: HASH_PARAM_REGEX, + relevance: 0, + starts: { + begin: /=/, + end: /=/, + starts: { + contains: [ + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + HELPER_PARAMETER, + SUB_EXPRESSION + ] + } + } + }; + + const BLOCK_PARAMS = { + // parameters of the form '{{#with x as | y |}}...{{/with}}' + begin: /as\s+\|/, + keywords: { keyword: 'as' }, + end: /\|/, + contains: [ + { + // define sub-mode in order to prevent highlighting of block-parameter named "as" + begin: /\w+/ + } + ] + }; + + const HELPER_PARAMETERS = { + contains: [ + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + BLOCK_PARAMS, + HASH, + HELPER_PARAMETER, + SUB_EXPRESSION + ], + returnEnd: true + // the property "end" is defined through inheritance when the mode is used. If depends + // on the surrounding mode, but "endsWithParent" does not work here (i.e. it includes the + // end-token of the surrounding mode) + }; + + const SUB_EXPRESSION_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + className: 'name', + keywords: BUILT_INS, + starts: hljs.inherit(HELPER_PARAMETERS, { + end: /\)/, + }) + }); + + SUB_EXPRESSION.contains = [ + SUB_EXPRESSION_CONTENTS + ]; + + const OPENING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + keywords: BUILT_INS, + className: 'name', + starts: hljs.inherit(HELPER_PARAMETERS, { + end: /}}/, + }) + }); + + const CLOSING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + keywords: BUILT_INS, + className: 'name' + }); + + const BASIC_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + className: 'name', + keywords: BUILT_INS, + starts: hljs.inherit(HELPER_PARAMETERS, { + end: /}}/, + }) + }); + + const ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH = {begin: /\\\{\{/, skip: true}; + const PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH = {begin: /\\\\(?=\{\{)/, skip: true}; + + return { + name: 'Handlebars', + aliases: ['hbs', 'html.hbs', 'html.handlebars', 'htmlbars'], + case_insensitive: true, + subLanguage: 'xml', + contains: [ + ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH, + PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH, + hljs.COMMENT(/\{\{!--/, /--\}\}/), + hljs.COMMENT(/\{\{!/, /\}\}/), + { + // open raw block "{{{{raw}}}} content not evaluated {{{{/raw}}}}" + className: 'template-tag', + begin: /\{\{\{\{(?!\/)/, + end: /\}\}\}\}/, + contains: [OPENING_BLOCK_MUSTACHE_CONTENTS], + starts: {end: /\{\{\{\{\//, returnEnd: true, subLanguage: 'xml'} + }, + { + // close raw block + className: 'template-tag', + begin: /\{\{\{\{\//, + end: /\}\}\}\}/, + contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS] + }, + { + // open block statement + className: 'template-tag', + begin: /\{\{#/, + end: /\}\}/, + contains: [OPENING_BLOCK_MUSTACHE_CONTENTS], + }, + { + className: 'template-tag', + begin: /\{\{(?=else\}\})/, + end: /\}\}/, + keywords: 'else' + }, + { + // closing block statement + className: 'template-tag', + begin: /\{\{\//, + end: /\}\}/, + contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS], + }, + { + // template variable or helper-call that is NOT html-escaped + className: 'template-variable', + begin: /\{\{\{/, + end: /\}\}\}/, + contains: [BASIC_MUSTACHE_CONTENTS] + }, + { + // template variable or helper-call that is html-escaped + className: 'template-variable', + begin: /\{\{/, + end: /\}\}/, + contains: [BASIC_MUSTACHE_CONTENTS] + } + ] + }; +} + +module.exports = handlebars; diff --git a/node_modules/highlight.js/lib/languages/haskell.js b/node_modules/highlight.js/lib/languages/haskell.js @@ -0,0 +1,132 @@ +/* +Language: Haskell +Author: Jeremy Hull <sourdrums@gmail.com> +Contributors: Zena Treep <zena.treep@gmail.com> +Website: https://www.haskell.org +Category: functional +*/ + +function haskell(hljs) { + var COMMENT = { + variants: [ + hljs.COMMENT('--', '$'), + hljs.COMMENT( + '{-', + '-}', + { + contains: ['self'] + } + ) + ] + }; + + var PRAGMA = { + className: 'meta', + begin: '{-#', end: '#-}' + }; + + var PREPROCESSOR = { + className: 'meta', + begin: '^#', end: '$' + }; + + var CONSTRUCTOR = { + className: 'type', + begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (build-in, infix). + relevance: 0 + }; + + var LIST = { + begin: '\\(', end: '\\)', + illegal: '"', + contains: [ + PRAGMA, + PREPROCESSOR, + {className: 'type', begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'}, + hljs.inherit(hljs.TITLE_MODE, {begin: '[_a-z][\\w\']*'}), + COMMENT + ] + }; + + var RECORD = { + begin: '{', end: '}', + contains: LIST.contains + }; + + return { + name: 'Haskell', + aliases: ['hs'], + keywords: + 'let in if then else case of where do module import hiding ' + + 'qualified type data newtype deriving class instance as default ' + + 'infix infixl infixr foreign export ccall stdcall cplusplus ' + + 'jvm dotnet safe unsafe family forall mdo proc rec', + contains: [ + + // Top-level constructions. + + { + beginKeywords: 'module', end: 'where', + keywords: 'module where', + contains: [LIST, COMMENT], + illegal: '\\W\\.|;' + }, + { + begin: '\\bimport\\b', end: '$', + keywords: 'import qualified as hiding', + contains: [LIST, COMMENT], + illegal: '\\W\\.|;' + }, + + { + className: 'class', + begin: '^(\\s*)?(class|instance)\\b', end: 'where', + keywords: 'class family instance where', + contains: [CONSTRUCTOR, LIST, COMMENT] + }, + { + className: 'class', + begin: '\\b(data|(new)?type)\\b', end: '$', + keywords: 'data family type newtype deriving', + contains: [PRAGMA, CONSTRUCTOR, LIST, RECORD, COMMENT] + }, + { + beginKeywords: 'default', end: '$', + contains: [CONSTRUCTOR, LIST, COMMENT] + }, + { + beginKeywords: 'infix infixl infixr', end: '$', + contains: [hljs.C_NUMBER_MODE, COMMENT] + }, + { + begin: '\\bforeign\\b', end: '$', + keywords: 'foreign import export ccall stdcall cplusplus jvm ' + + 'dotnet safe unsafe', + contains: [CONSTRUCTOR, hljs.QUOTE_STRING_MODE, COMMENT] + }, + { + className: 'meta', + begin: '#!\\/usr\\/bin\\/env\ runhaskell', end: '$' + }, + + // "Whitespaces". + + PRAGMA, + PREPROCESSOR, + + // Literals and names. + + // TODO: characters. + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + CONSTRUCTOR, + hljs.inherit(hljs.TITLE_MODE, {begin: '^[_a-z][\\w\']*'}), + + COMMENT, + + {begin: '->|<-'} // No markup, relevance booster + ] + }; +} + +module.exports = haskell; diff --git a/node_modules/highlight.js/lib/languages/haxe.js b/node_modules/highlight.js/lib/languages/haxe.js @@ -0,0 +1,120 @@ +/* +Language: Haxe +Description: Haxe is an open source toolkit based on a modern, high level, strictly typed programming language. +Author: Christopher Kaster <ikasoki@gmail.com> (Based on the actionscript.js language file by Alexander Myadzel) +Contributors: Kenton Hamaluik <kentonh@gmail.com> +Website: https://haxe.org +*/ + +function haxe(hljs) { + + var HAXE_BASIC_TYPES = 'Int Float String Bool Dynamic Void Array '; + + return { + name: 'Haxe', + aliases: ['hx'], + keywords: { + keyword: 'break case cast catch continue default do dynamic else enum extern ' + + 'for function here if import in inline never new override package private get set ' + + 'public return static super switch this throw trace try typedef untyped using var while ' + + HAXE_BASIC_TYPES, + built_in: + 'trace this', + literal: + 'true false null _' + }, + contains: [ + { className: 'string', // interpolate-able strings + begin: '\'', end: '\'', + contains: [ + hljs.BACKSLASH_ESCAPE, + { className: 'subst', // interpolation + begin: '\\$\\{', end: '\\}' + }, + { className: 'subst', // interpolation + begin: '\\$', end: '\\W}' + } + ] + }, + hljs.QUOTE_STRING_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_NUMBER_MODE, + { className: 'meta', // compiler meta + begin: '@:', end: '$' + }, + { className: 'meta', // compiler conditionals + begin: '#', end: '$', + keywords: {'meta-keyword': 'if else elseif end error'} + }, + { className: 'type', // function types + begin: ':[ \t]*', end: '[^A-Za-z0-9_ \t\\->]', + excludeBegin: true, excludeEnd: true, + relevance: 0 + }, + { className: 'type', // types + begin: ':[ \t]*', end: '\\W', + excludeBegin: true, excludeEnd: true + }, + { className: 'type', // instantiation + begin: 'new *', end: '\\W', + excludeBegin: true, excludeEnd: true + }, + { className: 'class', // enums + beginKeywords: 'enum', end: '\\{', + contains: [ + hljs.TITLE_MODE + ] + }, + { className: 'class', // abstracts + beginKeywords: 'abstract', end: '[\\{$]', + contains: [ + { className: 'type', + begin: '\\(', end: '\\)', + excludeBegin: true, excludeEnd: true + }, + { className: 'type', + begin: 'from +', end: '\\W', + excludeBegin: true, excludeEnd: true + }, + { className: 'type', + begin: 'to +', end: '\\W', + excludeBegin: true, excludeEnd: true + }, + hljs.TITLE_MODE + ], + keywords: { + keyword: 'abstract from to' + } + }, + { className: 'class', // classes + begin: '\\b(class|interface) +', end: '[\\{$]', excludeEnd: true, + keywords: 'class interface', + contains: [ + { className: 'keyword', + begin: '\\b(extends|implements) +', + keywords: 'extends implements', + contains: [ + { + className: 'type', + begin: hljs.IDENT_RE, + relevance: 0 + } + ] + }, + hljs.TITLE_MODE + ] + }, + { className: 'function', + beginKeywords: 'function', end: '\\(', excludeEnd: true, + illegal: '\\S', + contains: [ + hljs.TITLE_MODE + ] + } + ], + illegal: /<\// + }; +} + +module.exports = haxe; diff --git a/node_modules/highlight.js/lib/languages/hsp.js b/node_modules/highlight.js/lib/languages/hsp.js @@ -0,0 +1,57 @@ +/* +Language: HSP +Author: prince <MC.prince.0203@gmail.com> +Website: https://en.wikipedia.org/wiki/Hot_Soup_Processor +Category: scripting +*/ + +function hsp(hljs) { + return { + name: 'HSP', + case_insensitive: true, + keywords: { + $pattern: /[\w._]+/, + keyword: 'goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + + { + // multi-line string + className: 'string', + begin: '{"', end: '"}', + contains: [hljs.BACKSLASH_ESCAPE] + }, + + hljs.COMMENT(';', '$', {relevance: 0}), + + { + // pre-processor + className: 'meta', + begin: '#', end: '$', + keywords: {'meta-keyword': 'addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib'}, + contains: [ + hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}), + hljs.NUMBER_MODE, + hljs.C_NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + + { + // label + className: 'symbol', + begin: '^\\*(\\w+|@)' + }, + + hljs.NUMBER_MODE, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = hsp; diff --git a/node_modules/highlight.js/lib/languages/htmlbars.js b/node_modules/highlight.js/lib/languages/htmlbars.js @@ -0,0 +1,298 @@ +/** + * @param {string} value + * @returns {RegExp} + * */ + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/* +Language: Handlebars +Requires: xml.js +Author: Robin Ward <robin.ward@gmail.com> +Description: Matcher for Handlebars as well as EmberJS additions. +Website: https://handlebarsjs.com +Category: template +*/ + +function handlebars(hljs) { + const BUILT_INS = { + 'builtin-name': [ + 'action', + 'bindattr', + 'collection', + 'component', + 'concat', + 'debugger', + 'each', + 'each-in', + 'get', + 'hash', + 'if', + 'in', + 'input', + 'link-to', + 'loc', + 'log', + 'lookup', + 'mut', + 'outlet', + 'partial', + 'query-params', + 'render', + 'template', + 'textarea', + 'unbound', + 'unless', + 'view', + 'with', + 'yield' + ].join(" ") + }; + + const LITERALS = { + literal: [ + 'true', + 'false', + 'undefined', + 'null' + ].join(" ") + }; + + // as defined in https://handlebarsjs.com/guide/expressions.html#literal-segments + // this regex matches literal segments like ' abc ' or [ abc ] as well as helpers and paths + // like a/b, ./abc/cde, and abc.bcd + + const DOUBLE_QUOTED_ID_REGEX=/".*?"/; + const SINGLE_QUOTED_ID_REGEX=/'.*?'/; + const BRACKET_QUOTED_ID_REGEX=/\[.*?\]/; + const PLAIN_ID_REGEX=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/; + const PATH_DELIMITER_REGEX=/\.|\//; + + const IDENTIFIER_REGEX = concat( + '(', + SINGLE_QUOTED_ID_REGEX, '|', + DOUBLE_QUOTED_ID_REGEX, '|', + BRACKET_QUOTED_ID_REGEX, '|', + PLAIN_ID_REGEX, '|', + PATH_DELIMITER_REGEX, + ')+' + ); + + // identifier followed by a equal-sign (without the equal sign) + const HASH_PARAM_REGEX = concat( + '(', + BRACKET_QUOTED_ID_REGEX, '|', + PLAIN_ID_REGEX, + ')(?==)' + ); + + const HELPER_NAME_OR_PATH_EXPRESSION = { + begin: IDENTIFIER_REGEX, + lexemes: /[\w.\/]+/ + }; + + const HELPER_PARAMETER = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + keywords: LITERALS + }); + + const SUB_EXPRESSION = { + begin: /\(/, + end: /\)/ + // the "contains" is added below when all necessary sub-modes are defined + }; + + const HASH = { + // fka "attribute-assignment", parameters of the form 'key=value' + className: 'attr', + begin: HASH_PARAM_REGEX, + relevance: 0, + starts: { + begin: /=/, + end: /=/, + starts: { + contains: [ + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + HELPER_PARAMETER, + SUB_EXPRESSION + ] + } + } + }; + + const BLOCK_PARAMS = { + // parameters of the form '{{#with x as | y |}}...{{/with}}' + begin: /as\s+\|/, + keywords: { keyword: 'as' }, + end: /\|/, + contains: [ + { + // define sub-mode in order to prevent highlighting of block-parameter named "as" + begin: /\w+/ + } + ] + }; + + const HELPER_PARAMETERS = { + contains: [ + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + BLOCK_PARAMS, + HASH, + HELPER_PARAMETER, + SUB_EXPRESSION + ], + returnEnd: true + // the property "end" is defined through inheritance when the mode is used. If depends + // on the surrounding mode, but "endsWithParent" does not work here (i.e. it includes the + // end-token of the surrounding mode) + }; + + const SUB_EXPRESSION_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + className: 'name', + keywords: BUILT_INS, + starts: hljs.inherit(HELPER_PARAMETERS, { + end: /\)/, + }) + }); + + SUB_EXPRESSION.contains = [ + SUB_EXPRESSION_CONTENTS + ]; + + const OPENING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + keywords: BUILT_INS, + className: 'name', + starts: hljs.inherit(HELPER_PARAMETERS, { + end: /}}/, + }) + }); + + const CLOSING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + keywords: BUILT_INS, + className: 'name' + }); + + const BASIC_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, { + className: 'name', + keywords: BUILT_INS, + starts: hljs.inherit(HELPER_PARAMETERS, { + end: /}}/, + }) + }); + + const ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH = {begin: /\\\{\{/, skip: true}; + const PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH = {begin: /\\\\(?=\{\{)/, skip: true}; + + return { + name: 'Handlebars', + aliases: ['hbs', 'html.hbs', 'html.handlebars', 'htmlbars'], + case_insensitive: true, + subLanguage: 'xml', + contains: [ + ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH, + PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH, + hljs.COMMENT(/\{\{!--/, /--\}\}/), + hljs.COMMENT(/\{\{!/, /\}\}/), + { + // open raw block "{{{{raw}}}} content not evaluated {{{{/raw}}}}" + className: 'template-tag', + begin: /\{\{\{\{(?!\/)/, + end: /\}\}\}\}/, + contains: [OPENING_BLOCK_MUSTACHE_CONTENTS], + starts: {end: /\{\{\{\{\//, returnEnd: true, subLanguage: 'xml'} + }, + { + // close raw block + className: 'template-tag', + begin: /\{\{\{\{\//, + end: /\}\}\}\}/, + contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS] + }, + { + // open block statement + className: 'template-tag', + begin: /\{\{#/, + end: /\}\}/, + contains: [OPENING_BLOCK_MUSTACHE_CONTENTS], + }, + { + className: 'template-tag', + begin: /\{\{(?=else\}\})/, + end: /\}\}/, + keywords: 'else' + }, + { + // closing block statement + className: 'template-tag', + begin: /\{\{\//, + end: /\}\}/, + contains: [CLOSING_BLOCK_MUSTACHE_CONTENTS], + }, + { + // template variable or helper-call that is NOT html-escaped + className: 'template-variable', + begin: /\{\{\{/, + end: /\}\}\}/, + contains: [BASIC_MUSTACHE_CONTENTS] + }, + { + // template variable or helper-call that is html-escaped + className: 'template-variable', + begin: /\{\{/, + end: /\}\}/, + contains: [BASIC_MUSTACHE_CONTENTS] + } + ] + }; +} + +/* + Language: HTMLBars (legacy) + Requires: xml.js + Description: Matcher for Handlebars as well as EmberJS additions. + Website: https://github.com/tildeio/htmlbars + Category: template + */ + +function htmlbars(hljs) { + const definition = handlebars(hljs); + + definition.name = "HTMLbars"; + + // HACK: This lets handlebars do the auto-detection if it's been loaded (by + // default the build script will load in alphabetical order) and if not (perhaps + // an install is only using `htmlbars`, not `handlebars`) then this will still + // allow HTMLBars to participate in the auto-detection + + // worse case someone will have HTMLbars and handlebars competing for the same + // content and will need to change their setup to only require handlebars, but + // I don't consider this a breaking change + if (hljs.getLanguage("handlebars")) { + definition.disableAutodetect = true; + } + + return definition +} + +module.exports = htmlbars; diff --git a/node_modules/highlight.js/lib/languages/http.js b/node_modules/highlight.js/lib/languages/http.js @@ -0,0 +1,51 @@ +/* +Language: HTTP +Description: HTTP request and response headers with automatic body highlighting +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Category: common, protocols +Website: https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview +*/ + +function http(hljs) { + var VERSION = 'HTTP/[0-9\\.]+'; + return { + name: 'HTTP', + aliases: ['https'], + illegal: '\\S', + contains: [ + { + begin: '^' + VERSION, end: '$', + contains: [{className: 'number', begin: '\\b\\d{3}\\b'}] + }, + { + begin: '^[A-Z]+ (.*?) ' + VERSION + '$', returnBegin: true, end: '$', + contains: [ + { + className: 'string', + begin: ' ', end: ' ', + excludeBegin: true, excludeEnd: true + }, + { + begin: VERSION + }, + { + className: 'keyword', + begin: '[A-Z]+' + } + ] + }, + { + className: 'attribute', + begin: '^\\w', end: ': ', excludeEnd: true, + illegal: '\\n|\\s|=', + starts: {end: '$', relevance: 0} + }, + { + begin: '\\n\\n', + starts: {subLanguage: [], endsWithParent: true} + } + ] + }; +} + +module.exports = http; diff --git a/node_modules/highlight.js/lib/languages/hy.js b/node_modules/highlight.js/lib/languages/hy.js @@ -0,0 +1,107 @@ +/* +Language: Hy +Description: Hy is a wonderful dialect of Lisp that’s embedded in Python. +Author: Sergey Sobko <s.sobko@profitware.ru> +Website: http://docs.hylang.org/en/stable/ +Category: lisp +*/ + +function hy(hljs) { + var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>&#\''; + var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*'; + var keywords = { + $pattern: SYMBOL_RE, + 'builtin-name': + // keywords + '!= % %= & &= * ** **= *= *map ' + + '+ += , --build-class-- --import-- -= . / // //= ' + + '/= < << <<= <= = > >= >> >>= ' + + '@ @= ^ ^= abs accumulate all and any ap-compose ' + + 'ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ' + + 'ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast ' + + 'callable calling-module-name car case cdr chain chr coll? combinations compile ' + + 'compress cond cons cons? continue count curry cut cycle dec ' + + 'def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn ' + + 'defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir ' + + 'disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? ' + + 'end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first ' + + 'flatten float? fn fnc fnr for for* format fraction genexpr ' + + 'gensym get getattr global globals group-by hasattr hash hex id ' + + 'identity if if* if-not if-python2 import in inc input instance? ' + + 'integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even ' + + 'is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none ' + + 'is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass ' + + 'iter iterable? iterate iterator? keyword keyword? lambda last len let ' + + 'lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all ' + + 'map max merge-with method-decorator min multi-decorator multicombinations name neg? next ' + + 'none? nonlocal not not-in not? nth numeric? oct odd? open ' + + 'or ord partition permutations pos? post-route postwalk pow prewalk print ' + + 'product profile/calls profile/cpu put-route quasiquote quote raise range read read-str ' + + 'recursive-replace reduce remove repeat repeatedly repr require rest round route ' + + 'route-with-methods rwm second seq set-comp setattr setv some sorted string ' + + 'string? sum switch symbol? take take-nth take-while tee try unless ' + + 'unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms ' + + 'xi xor yield yield-from zero? zip zip-longest | |= ~' + }; + + var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?'; + + var SYMBOL = { + begin: SYMBOL_RE, + relevance: 0 + }; + var NUMBER = { + className: 'number', begin: SIMPLE_NUMBER_RE, + relevance: 0 + }; + var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}); + var COMMENT = hljs.COMMENT( + ';', + '$', + { + relevance: 0 + } + ); + var LITERAL = { + className: 'literal', + begin: /\b([Tt]rue|[Ff]alse|nil|None)\b/ + }; + var COLLECTION = { + begin: '[\\[\\{]', end: '[\\]\\}]' + }; + var HINT = { + className: 'comment', + begin: '\\^' + SYMBOL_RE + }; + var HINT_COL = hljs.COMMENT('\\^\\{', '\\}'); + var KEY = { + className: 'symbol', + begin: '[:]{1,2}' + SYMBOL_RE + }; + var LIST = { + begin: '\\(', end: '\\)' + }; + var BODY = { + endsWithParent: true, + relevance: 0 + }; + var NAME = { + keywords: keywords, + className: 'name', begin: SYMBOL_RE, + starts: BODY + }; + var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL]; + + LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY]; + BODY.contains = DEFAULT_CONTAINS; + COLLECTION.contains = DEFAULT_CONTAINS; + + return { + name: 'Hy', + aliases: ['hylang'], + illegal: /\S/, + contains: [hljs.SHEBANG(), LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL] + } +} + +module.exports = hy; diff --git a/node_modules/highlight.js/lib/languages/inform7.js b/node_modules/highlight.js/lib/languages/inform7.js @@ -0,0 +1,66 @@ +/* +Language: Inform 7 +Author: Bruno Dias <bruno.r.dias@gmail.com> +Description: Language definition for Inform 7, a DSL for writing parser interactive fiction. +Website: http://inform7.com +*/ + +function inform7(hljs) { + var START_BRACKET = '\\['; + var END_BRACKET = '\\]'; + return { + name: 'Inform 7', + aliases: ['i7'], + case_insensitive: true, + keywords: { + // Some keywords more or less unique to I7, for relevance. + keyword: + // kind: + 'thing room person man woman animal container ' + + 'supporter backdrop door ' + + // characteristic: + 'scenery open closed locked inside gender ' + + // verb: + 'is are say understand ' + + // misc keyword: + 'kind of rule' + }, + contains: [ + { + className: 'string', + begin: '"', end: '"', + relevance: 0, + contains: [ + { + className: 'subst', + begin: START_BRACKET, end: END_BRACKET + } + ] + }, + { + className: 'section', + begin: /^(Volume|Book|Part|Chapter|Section|Table)\b/, + end: '$' + }, + { + // Rule definition + // This is here for relevance. + begin: /^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/, + end: ':', + contains: [ + { + //Rule name + begin: '\\(This', end: '\\)' + } + ] + }, + { + className: 'comment', + begin: START_BRACKET, end: END_BRACKET, + contains: ['self'] + } + ] + }; +} + +module.exports = inform7; diff --git a/node_modules/highlight.js/lib/languages/ini.js b/node_modules/highlight.js/lib/languages/ini.js @@ -0,0 +1,143 @@ +/** + * @param {string} value + * @returns {RegExp} + * */ + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function lookahead(re) { + return concat('(?=', re, ')'); +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/** + * Any of the passed expresssions may match + * + * Creates a huge this | this | that | that match + * @param {(RegExp | string)[] } args + * @returns {string} + */ +function either(...args) { + const joined = '(' + args.map((x) => source(x)).join("|") + ")"; + return joined; +} + +/* +Language: TOML, also INI +Description: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. +Contributors: Guillaume Gomez <guillaume1.gomez@gmail.com> +Category: common, config +Website: https://github.com/toml-lang/toml +*/ + +function ini(hljs) { + var NUMBERS = { + className: 'number', + relevance: 0, + variants: [ + { begin: /([\+\-]+)?[\d]+_[\d_]+/ }, + { begin: hljs.NUMBER_RE } + ] + }; + var COMMENTS = hljs.COMMENT(); + COMMENTS.variants = [ + {begin: /;/, end: /$/}, + {begin: /#/, end: /$/}, + ]; + var VARIABLES = { + className: 'variable', + variants: [ + { begin: /\$[\w\d"][\w\d_]*/ }, + { begin: /\$\{(.*?)}/ } + ] + }; + var LITERALS = { + className: 'literal', + begin: /\bon|off|true|false|yes|no\b/ + }; + var STRINGS = { + className: "string", + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + { begin: "'''", end: "'''", relevance: 10 }, + { begin: '"""', end: '"""', relevance: 10 }, + { begin: '"', end: '"' }, + { begin: "'", end: "'" } + ] + }; + var ARRAY = { + begin: /\[/, end: /\]/, + contains: [ + COMMENTS, + LITERALS, + VARIABLES, + STRINGS, + NUMBERS, + 'self' + ], + relevance:0 + }; + + var BARE_KEY = /[A-Za-z0-9_-]+/; + var QUOTED_KEY_DOUBLE_QUOTE = /"(\\"|[^"])*"/; + var QUOTED_KEY_SINGLE_QUOTE = /'[^']*'/; + var ANY_KEY = either( + BARE_KEY, QUOTED_KEY_DOUBLE_QUOTE, QUOTED_KEY_SINGLE_QUOTE + ); + var DOTTED_KEY = concat( + ANY_KEY, '(\\s*\\.\\s*', ANY_KEY, ')*', + lookahead(/\s*=\s*[^#\s]/) + ); + + return { + name: 'TOML, also INI', + aliases: ['toml'], + case_insensitive: true, + illegal: /\S/, + contains: [ + COMMENTS, + { + className: 'section', + begin: /\[+/, end: /\]+/ + }, + { + begin: DOTTED_KEY, + className: 'attr', + starts: { + end: /$/, + contains: [ + COMMENTS, + ARRAY, + LITERALS, + VARIABLES, + STRINGS, + NUMBERS + ] + } + } + ] + }; +} + +module.exports = ini; diff --git a/node_modules/highlight.js/lib/languages/irpf90.js b/node_modules/highlight.js/lib/languages/irpf90.js @@ -0,0 +1,87 @@ +/* +Language: IRPF90 +Author: Anthony Scemama <scemama@irsamc.ups-tlse.fr> +Description: IRPF90 is an open-source Fortran code generator +Website: http://irpf90.ups-tlse.fr +Category: scientific +*/ + +function irpf90(hljs) { + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)' + }; + + var F_KEYWORDS = { + literal: '.False. .True.', + keyword: 'kind do while private call intrinsic where elsewhere ' + + 'type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then ' + + 'public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. ' + + 'goto save else use module select case ' + + 'access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit ' + + 'continue format pause cycle exit ' + + 'c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg ' + + 'synchronous nopass non_overridable pass protected volatile abstract extends import ' + + 'non_intrinsic value deferred generic final enumerator class associate bind enum ' + + 'c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t ' + + 'c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double ' + + 'c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr ' + + 'c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer ' + + 'c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor ' + + 'numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ' + + 'ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive ' + + 'pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure ' + + 'integer real character complex logical dimension allocatable|10 parameter ' + + 'external implicit|10 none double precision assign intent optional pointer ' + + 'target in out common equivalence data ' + + // IRPF90 special keywords + 'begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch ' + + 'soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read', + built_in: 'alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint ' + + 'dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl ' + + 'algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama ' + + 'iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod ' + + 'qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log ' + + 'log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate ' + + 'adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product ' + + 'eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul ' + + 'maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product ' + + 'radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind ' + + 'set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer ' + + 'dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ' + + 'ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode ' + + 'is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of ' + + 'acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 ' + + 'atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits ' + + 'bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr ' + + 'num_images parity popcnt poppar shifta shiftl shiftr this_image ' + + // IRPF90 special built_ins + 'IRP_ALIGN irp_here' + }; + return { + name: 'IRPF90', + case_insensitive: true, + keywords: F_KEYWORDS, + illegal: /\/\*/, + contains: [ + hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'string', relevance: 0}), + { + className: 'function', + beginKeywords: 'subroutine function program', + illegal: '[${=\\n]', + contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS] + }, + hljs.COMMENT('!', '$', {relevance: 0}), + hljs.COMMENT('begin_doc', 'end_doc', {relevance: 10}), + { + className: 'number', + // regex in both fortran and irpf90 should match + begin: '(?=\\b|\\+|\\-|\\.)(?:\\.|\\d+\\.?)\\d*([de][+-]?\\d+)?(_[a-z_\\d]+)?', + relevance: 0 + } + ] + }; +} + +module.exports = irpf90; diff --git a/node_modules/highlight.js/lib/languages/isbl.js b/node_modules/highlight.js/lib/languages/isbl.js @@ -0,0 +1,3180 @@ +/* +Language: ISBL +Author: Dmitriy Tarasov <dimatar@gmail.com> +Description: built-in language DIRECTUM +Category: enterprise +*/ + +function isbl(hljs) { + // Определение идентификаторов + var UNDERSCORE_IDENT_RE = "[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*"; + + // Определение имен функций + var FUNCTION_NAME_IDENT_RE = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*"; + + // keyword : ключевые слова + var KEYWORD = + "and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока " + + "except exitfor finally foreach все if если in в not не or или try while пока "; + + // SYSRES Constants + var sysres_constants = + "SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT " + + "SYSRES_CONST_ACCES_RIGHT_TYPE_FULL " + + "SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW " + + "SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_NO_ACCESS_VIEW " + + "SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_VIEW " + + "SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE " + + "SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE " + + "SYSRES_CONST_ACCESS_TYPE_CHANGE " + + "SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE " + + "SYSRES_CONST_ACCESS_TYPE_EXISTS " + + "SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE " + + "SYSRES_CONST_ACCESS_TYPE_FULL " + + "SYSRES_CONST_ACCESS_TYPE_FULL_CODE " + + "SYSRES_CONST_ACCESS_TYPE_VIEW " + + "SYSRES_CONST_ACCESS_TYPE_VIEW_CODE " + + "SYSRES_CONST_ACTION_TYPE_ABORT " + + "SYSRES_CONST_ACTION_TYPE_ACCEPT " + + "SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS " + + "SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT " + + "SYSRES_CONST_ACTION_TYPE_CHANGE_CARD " + + "SYSRES_CONST_ACTION_TYPE_CHANGE_KIND " + + "SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE " + + "SYSRES_CONST_ACTION_TYPE_CONTINUE " + + "SYSRES_CONST_ACTION_TYPE_COPY " + + "SYSRES_CONST_ACTION_TYPE_CREATE " + + "SYSRES_CONST_ACTION_TYPE_CREATE_VERSION " + + "SYSRES_CONST_ACTION_TYPE_DELETE " + + "SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT " + + "SYSRES_CONST_ACTION_TYPE_DELETE_VERSION " + + "SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS " + + "SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS " + + "SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE " + + "SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD " + + "SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD " + + "SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK " + + "SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK " + + "SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK " + + "SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK " + + "SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE " + + "SYSRES_CONST_ACTION_TYPE_LOCK " + + "SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER " + + "SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY " + + "SYSRES_CONST_ACTION_TYPE_MARK_AS_READED " + + "SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED " + + "SYSRES_CONST_ACTION_TYPE_MODIFY " + + "SYSRES_CONST_ACTION_TYPE_MODIFY_CARD " + + "SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE " + + "SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION " + + "SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE " + + "SYSRES_CONST_ACTION_TYPE_PERFORM " + + "SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY " + + "SYSRES_CONST_ACTION_TYPE_RESTART " + + "SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE " + + "SYSRES_CONST_ACTION_TYPE_REVISION " + + "SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL " + + "SYSRES_CONST_ACTION_TYPE_SIGN " + + "SYSRES_CONST_ACTION_TYPE_START " + + "SYSRES_CONST_ACTION_TYPE_UNLOCK " + + "SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER " + + "SYSRES_CONST_ACTION_TYPE_VERSION_STATE " + + "SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY " + + "SYSRES_CONST_ACTION_TYPE_VIEW " + + "SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY " + + "SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY " + + "SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY " + + "SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE " + + "SYSRES_CONST_ADD_REFERENCE_MODE_NAME " + + "SYSRES_CONST_ADDITION_REQUISITE_CODE " + + "SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE " + + "SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME " + + "SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME " + + "SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME " + + "SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE " + + "SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION " + + "SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS " + + "SYSRES_CONST_ALL_USERS_GROUP " + + "SYSRES_CONST_ALL_USERS_GROUP_NAME " + + "SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME " + + "SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE " + + "SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME " + + "SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_APPROVING_SIGNATURE_NAME " + + "SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE " + + "SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE " + + "SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE " + + "SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN " + + "SYSRES_CONST_ATTACH_TYPE_DOC " + + "SYSRES_CONST_ATTACH_TYPE_EDOC " + + "SYSRES_CONST_ATTACH_TYPE_FOLDER " + + "SYSRES_CONST_ATTACH_TYPE_JOB " + + "SYSRES_CONST_ATTACH_TYPE_REFERENCE " + + "SYSRES_CONST_ATTACH_TYPE_TASK " + + "SYSRES_CONST_AUTH_ENCODED_PASSWORD " + + "SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE " + + "SYSRES_CONST_AUTH_NOVELL " + + "SYSRES_CONST_AUTH_PASSWORD " + + "SYSRES_CONST_AUTH_PASSWORD_CODE " + + "SYSRES_CONST_AUTH_WINDOWS " + + "SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME " + + "SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE " + + "SYSRES_CONST_AUTO_ENUM_METHOD_FLAG " + + "SYSRES_CONST_AUTO_NUMERATION_CODE " + + "SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG " + + "SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE " + + "SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE " + + "SYSRES_CONST_AUTOTEXT_USAGE_ALL " + + "SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE " + + "SYSRES_CONST_AUTOTEXT_USAGE_SIGN " + + "SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE " + + "SYSRES_CONST_AUTOTEXT_USAGE_WORK " + + "SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE " + + "SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE " + + "SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE " + + "SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE " + + "SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE " + + "SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_BTN_PART " + + "SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE " + + "SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE " + + "SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE " + + "SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT " + + "SYSRES_CONST_CARD_PART " + + "SYSRES_CONST_CARD_REFERENCE_MODE_NAME " + + "SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE " + + "SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE " + + "SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE " + + "SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE " + + "SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE " + + "SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE " + + "SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE " + + "SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE " + + "SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE " + + "SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT " + + "SYSRES_CONST_CODE_COMPONENT_TYPE_URL " + + "SYSRES_CONST_CODE_REQUISITE_ACCESS " + + "SYSRES_CONST_CODE_REQUISITE_CODE " + + "SYSRES_CONST_CODE_REQUISITE_COMPONENT " + + "SYSRES_CONST_CODE_REQUISITE_DESCRIPTION " + + "SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT " + + "SYSRES_CONST_CODE_REQUISITE_RECORD " + + "SYSRES_CONST_COMMENT_REQ_CODE " + + "SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE " + + "SYSRES_CONST_COMP_CODE_GRD " + + "SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS " + + "SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS " + + "SYSRES_CONST_COMPONENT_TYPE_DOCS " + + "SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS " + + "SYSRES_CONST_COMPONENT_TYPE_EDOCS " + + "SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE " + + "SYSRES_CONST_COMPONENT_TYPE_OTHER " + + "SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES " + + "SYSRES_CONST_COMPONENT_TYPE_REFERENCES " + + "SYSRES_CONST_COMPONENT_TYPE_REPORTS " + + "SYSRES_CONST_COMPONENT_TYPE_SCRIPTS " + + "SYSRES_CONST_COMPONENT_TYPE_URL " + + "SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE " + + "SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION " + + "SYSRES_CONST_CONST_FIRM_STATUS_COMMON " + + "SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL " + + "SYSRES_CONST_CONST_NEGATIVE_VALUE " + + "SYSRES_CONST_CONST_POSITIVE_VALUE " + + "SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE " + + "SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE " + + "SYSRES_CONST_CONTENTS_REQUISITE_CODE " + + "SYSRES_CONST_DATA_TYPE_BOOLEAN " + + "SYSRES_CONST_DATA_TYPE_DATE " + + "SYSRES_CONST_DATA_TYPE_FLOAT " + + "SYSRES_CONST_DATA_TYPE_INTEGER " + + "SYSRES_CONST_DATA_TYPE_PICK " + + "SYSRES_CONST_DATA_TYPE_REFERENCE " + + "SYSRES_CONST_DATA_TYPE_STRING " + + "SYSRES_CONST_DATA_TYPE_TEXT " + + "SYSRES_CONST_DATA_TYPE_VARIANT " + + "SYSRES_CONST_DATE_CLOSE_REQ_CODE " + + "SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR " + + "SYSRES_CONST_DATE_OPEN_REQ_CODE " + + "SYSRES_CONST_DATE_REQUISITE " + + "SYSRES_CONST_DATE_REQUISITE_CODE " + + "SYSRES_CONST_DATE_REQUISITE_NAME " + + "SYSRES_CONST_DATE_REQUISITE_TYPE " + + "SYSRES_CONST_DATE_TYPE_CHAR " + + "SYSRES_CONST_DATETIME_FORMAT_VALUE " + + "SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE " + + "SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE " + + "SYSRES_CONST_DESCRIPTION_REQUISITE_CODE " + + "SYSRES_CONST_DET1_PART " + + "SYSRES_CONST_DET2_PART " + + "SYSRES_CONST_DET3_PART " + + "SYSRES_CONST_DET4_PART " + + "SYSRES_CONST_DET5_PART " + + "SYSRES_CONST_DET6_PART " + + "SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE " + + "SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE " + + "SYSRES_CONST_DETAIL_REQ_CODE " + + "SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE " + + "SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME " + + "SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE " + + "SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME " + + "SYSRES_CONST_DOCUMENT_STORAGES_CODE " + + "SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME " + + "SYSRES_CONST_DOUBLE_REQUISITE_CODE " + + "SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE " + + "SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE " + + "SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE " + + "SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE " + + "SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE " + + "SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE " + + "SYSRES_CONST_EDITORS_REFERENCE_CODE " + + "SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE " + + "SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE " + + "SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE " + + "SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE " + + "SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE " + + "SYSRES_CONST_EDOC_DATE_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_KIND_REFERENCE_CODE " + + "SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE " + + "SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE " + + "SYSRES_CONST_EDOC_NONE_ENCODE_CODE " + + "SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE " + + "SYSRES_CONST_EDOC_READONLY_ACCESS_CODE " + + "SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE " + + "SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE " + + "SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE " + + "SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE " + + "SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE " + + "SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE " + + "SYSRES_CONST_EDOC_WRITE_ACCES_CODE " + + "SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE " + + "SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE " + + "SYSRES_CONST_END_DATE_REQUISITE_CODE " + + "SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE " + + "SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE " + + "SYSRES_CONST_EXIST_CONST " + + "SYSRES_CONST_EXIST_VALUE " + + "SYSRES_CONST_EXPORT_LOCK_TYPE_ASK " + + "SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK " + + "SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK " + + "SYSRES_CONST_EXPORT_VERSION_TYPE_ASK " + + "SYSRES_CONST_EXPORT_VERSION_TYPE_LAST " + + "SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE " + + "SYSRES_CONST_EXTENSION_REQUISITE_CODE " + + "SYSRES_CONST_FILTER_NAME_REQUISITE_CODE " + + "SYSRES_CONST_FILTER_REQUISITE_CODE " + + "SYSRES_CONST_FILTER_TYPE_COMMON_CODE " + + "SYSRES_CONST_FILTER_TYPE_COMMON_NAME " + + "SYSRES_CONST_FILTER_TYPE_USER_CODE " + + "SYSRES_CONST_FILTER_TYPE_USER_NAME " + + "SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME " + + "SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR " + + "SYSRES_CONST_FLOAT_REQUISITE_TYPE " + + "SYSRES_CONST_FOLDER_AUTHOR_VALUE " + + "SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS " + + "SYSRES_CONST_FOLDER_KIND_COMPONENTS " + + "SYSRES_CONST_FOLDER_KIND_EDOCS " + + "SYSRES_CONST_FOLDER_KIND_JOBS " + + "SYSRES_CONST_FOLDER_KIND_TASKS " + + "SYSRES_CONST_FOLDER_TYPE_COMMON " + + "SYSRES_CONST_FOLDER_TYPE_COMPONENT " + + "SYSRES_CONST_FOLDER_TYPE_FAVORITES " + + "SYSRES_CONST_FOLDER_TYPE_INBOX " + + "SYSRES_CONST_FOLDER_TYPE_OUTBOX " + + "SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH " + + "SYSRES_CONST_FOLDER_TYPE_SEARCH " + + "SYSRES_CONST_FOLDER_TYPE_SHORTCUTS " + + "SYSRES_CONST_FOLDER_TYPE_USER " + + "SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG " + + "SYSRES_CONST_FULL_SUBSTITUTE_TYPE " + + "SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE " + + "SYSRES_CONST_FUNCTION_CANCEL_RESULT " + + "SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM " + + "SYSRES_CONST_FUNCTION_CATEGORY_USER " + + "SYSRES_CONST_FUNCTION_FAILURE_RESULT " + + "SYSRES_CONST_FUNCTION_SAVE_RESULT " + + "SYSRES_CONST_GENERATED_REQUISITE " + + "SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE " + + "SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE " + + "SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME " + + "SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE " + + "SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME " + + "SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE " + + "SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE " + + "SYSRES_CONST_GROUP_NAME_REQUISITE_CODE " + + "SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE " + + "SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE " + + "SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE " + + "SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE " + + "SYSRES_CONST_GROUP_USER_REQUISITE_CODE " + + "SYSRES_CONST_GROUPS_REFERENCE_CODE " + + "SYSRES_CONST_GROUPS_REQUISITE_CODE " + + "SYSRES_CONST_HIDDEN_MODE_NAME " + + "SYSRES_CONST_HIGH_LVL_REQUISITE_CODE " + + "SYSRES_CONST_HISTORY_ACTION_CREATE_CODE " + + "SYSRES_CONST_HISTORY_ACTION_DELETE_CODE " + + "SYSRES_CONST_HISTORY_ACTION_EDIT_CODE " + + "SYSRES_CONST_HOUR_CHAR " + + "SYSRES_CONST_ID_REQUISITE_CODE " + + "SYSRES_CONST_IDSPS_REQUISITE_CODE " + + "SYSRES_CONST_IMAGE_MODE_COLOR " + + "SYSRES_CONST_IMAGE_MODE_GREYSCALE " + + "SYSRES_CONST_IMAGE_MODE_MONOCHROME " + + "SYSRES_CONST_IMPORTANCE_HIGH " + + "SYSRES_CONST_IMPORTANCE_LOW " + + "SYSRES_CONST_IMPORTANCE_NORMAL " + + "SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE " + + "SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE " + + "SYSRES_CONST_INT_REQUISITE " + + "SYSRES_CONST_INT_REQUISITE_TYPE " + + "SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR " + + "SYSRES_CONST_INTEGER_TYPE_CHAR " + + "SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE " + + "SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE " + + "SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE " + + "SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE " + + "SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE " + + "SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE " + + "SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE " + + "SYSRES_CONST_JOB_BLOCK_DESCRIPTION " + + "SYSRES_CONST_JOB_KIND_CONTROL_JOB " + + "SYSRES_CONST_JOB_KIND_JOB " + + "SYSRES_CONST_JOB_KIND_NOTICE " + + "SYSRES_CONST_JOB_STATE_ABORTED " + + "SYSRES_CONST_JOB_STATE_COMPLETE " + + "SYSRES_CONST_JOB_STATE_WORKING " + + "SYSRES_CONST_KIND_REQUISITE_CODE " + + "SYSRES_CONST_KIND_REQUISITE_NAME " + + "SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE " + + "SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE " + + "SYSRES_CONST_KOD_INPUT_TYPE " + + "SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE " + + "SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE " + + "SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT " + + "SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT " + + "SYSRES_CONST_LINK_OBJECT_KIND_EDOC " + + "SYSRES_CONST_LINK_OBJECT_KIND_FOLDER " + + "SYSRES_CONST_LINK_OBJECT_KIND_JOB " + + "SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE " + + "SYSRES_CONST_LINK_OBJECT_KIND_TASK " + + "SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_LIST_REFERENCE_MODE_NAME " + + "SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE " + + "SYSRES_CONST_MAIN_VIEW_CODE " + + "SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG " + + "SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE " + + "SYSRES_CONST_MAXIMIZED_MODE_NAME " + + "SYSRES_CONST_ME_VALUE " + + "SYSRES_CONST_MESSAGE_ATTENTION_CAPTION " + + "SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION " + + "SYSRES_CONST_MESSAGE_ERROR_CAPTION " + + "SYSRES_CONST_MESSAGE_INFORMATION_CAPTION " + + "SYSRES_CONST_MINIMIZED_MODE_NAME " + + "SYSRES_CONST_MINUTE_CHAR " + + "SYSRES_CONST_MODULE_REQUISITE_CODE " + + "SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION " + + "SYSRES_CONST_MONTH_FORMAT_VALUE " + + "SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE " + + "SYSRES_CONST_NAME_REQUISITE_CODE " + + "SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE " + + "SYSRES_CONST_NAMEAN_INPUT_TYPE " + + "SYSRES_CONST_NEGATIVE_PICK_VALUE " + + "SYSRES_CONST_NEGATIVE_VALUE " + + "SYSRES_CONST_NO " + + "SYSRES_CONST_NO_PICK_VALUE " + + "SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE " + + "SYSRES_CONST_NO_VALUE " + + "SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE " + + "SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE " + + "SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE " + + "SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE " + + "SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE " + + "SYSRES_CONST_NORMAL_MODE_NAME " + + "SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE " + + "SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME " + + "SYSRES_CONST_NOTE_REQUISITE_CODE " + + "SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION " + + "SYSRES_CONST_NUM_REQUISITE " + + "SYSRES_CONST_NUM_STR_REQUISITE_CODE " + + "SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG " + + "SYSRES_CONST_NUMERATION_AUTO_STRONG " + + "SYSRES_CONST_NUMERATION_FROM_DICTONARY " + + "SYSRES_CONST_NUMERATION_MANUAL " + + "SYSRES_CONST_NUMERIC_TYPE_CHAR " + + "SYSRES_CONST_NUMREQ_REQUISITE_CODE " + + "SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE " + + "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE " + + "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE " + + "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE " + + "SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE " + + "SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX " + + "SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_ORIGINALREF_REQUISITE_CODE " + + "SYSRES_CONST_OURFIRM_REF_CODE " + + "SYSRES_CONST_OURFIRM_REQUISITE_CODE " + + "SYSRES_CONST_OURFIRM_VAR " + + "SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE " + + "SYSRES_CONST_PICK_NEGATIVE_RESULT " + + "SYSRES_CONST_PICK_POSITIVE_RESULT " + + "SYSRES_CONST_PICK_REQUISITE " + + "SYSRES_CONST_PICK_REQUISITE_TYPE " + + "SYSRES_CONST_PICK_TYPE_CHAR " + + "SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE " + + "SYSRES_CONST_PLATFORM_VERSION_COMMENT " + + "SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE " + + "SYSRES_CONST_POSITIVE_PICK_VALUE " + + "SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE " + + "SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE " + + "SYSRES_CONST_PRIORITY_REQUISITE_CODE " + + "SYSRES_CONST_QUALIFIED_TASK_TYPE " + + "SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE " + + "SYSRES_CONST_RECSTAT_REQUISITE_CODE " + + "SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_REF_REQUISITE " + + "SYSRES_CONST_REF_REQUISITE_TYPE " + + "SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE " + + "SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE " + + "SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE " + + "SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE " + + "SYSRES_CONST_REFERENCE_TYPE_CHAR " + + "SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME " + + "SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE " + + "SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE " + + "SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING " + + "SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN " + + "SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY " + + "SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE " + + "SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL " + + "SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE " + + "SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE " + + "SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE " + + "SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE " + + "SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE " + + "SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE " + + "SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE " + + "SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE " + + "SYSRES_CONST_REQ_MODE_AVAILABLE_CODE " + + "SYSRES_CONST_REQ_MODE_EDIT_CODE " + + "SYSRES_CONST_REQ_MODE_HIDDEN_CODE " + + "SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE " + + "SYSRES_CONST_REQ_MODE_VIEW_CODE " + + "SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE " + + "SYSRES_CONST_REQ_SECTION_VALUE " + + "SYSRES_CONST_REQ_TYPE_VALUE " + + "SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT " + + "SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL " + + "SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME " + + "SYSRES_CONST_REQUISITE_FORMAT_LEFT " + + "SYSRES_CONST_REQUISITE_FORMAT_RIGHT " + + "SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT " + + "SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE " + + "SYSRES_CONST_REQUISITE_SECTION_ACTIONS " + + "SYSRES_CONST_REQUISITE_SECTION_BUTTON " + + "SYSRES_CONST_REQUISITE_SECTION_BUTTONS " + + "SYSRES_CONST_REQUISITE_SECTION_CARD " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE10 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE11 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE12 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE13 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE14 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE15 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE16 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE17 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE18 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE19 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE2 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE20 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE21 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE22 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE23 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE24 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE3 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE4 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE5 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE6 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE7 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE8 " + + "SYSRES_CONST_REQUISITE_SECTION_TABLE9 " + + "SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE " + + "SYSRES_CONST_RIGHT_ALIGNMENT_CODE " + + "SYSRES_CONST_ROLES_REFERENCE_CODE " + + "SYSRES_CONST_ROUTE_STEP_AFTER_RUS " + + "SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS " + + "SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS " + + "SYSRES_CONST_ROUTE_TYPE_COMPLEX " + + "SYSRES_CONST_ROUTE_TYPE_PARALLEL " + + "SYSRES_CONST_ROUTE_TYPE_SERIAL " + + "SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE " + + "SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE " + + "SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE " + + "SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION " + + "SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE " + + "SYSRES_CONST_SEARCHES_COMPONENT_CONTENT " + + "SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME " + + "SYSRES_CONST_SEARCHES_EDOC_CONTENT " + + "SYSRES_CONST_SEARCHES_FOLDER_CONTENT " + + "SYSRES_CONST_SEARCHES_JOB_CONTENT " + + "SYSRES_CONST_SEARCHES_REFERENCE_CODE " + + "SYSRES_CONST_SEARCHES_TASK_CONTENT " + + "SYSRES_CONST_SECOND_CHAR " + + "SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_CODE " + + "SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE " + + "SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE " + + "SYSRES_CONST_SELECT_REFERENCE_MODE_NAME " + + "SYSRES_CONST_SELECT_TYPE_SELECTABLE " + + "SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD " + + "SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD " + + "SYSRES_CONST_SELECT_TYPE_UNSLECTABLE " + + "SYSRES_CONST_SERVER_TYPE_MAIN " + + "SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE " + + "SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE " + + "SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE " + + "SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE " + + "SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE " + + "SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE " + + "SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE " + + "SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE " + + "SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE " + + "SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE " + + "SYSRES_CONST_STATE_REQ_NAME " + + "SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE " + + "SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE " + + "SYSRES_CONST_STATE_REQUISITE_CODE " + + "SYSRES_CONST_STATIC_ROLE_TYPE_CODE " + + "SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE " + + "SYSRES_CONST_STATUS_VALUE_AUTOCLEANING " + + "SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE " + + "SYSRES_CONST_STATUS_VALUE_COMPLETE " + + "SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE " + + "SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE " + + "SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE " + + "SYSRES_CONST_STATUS_VALUE_RED_SQUARE " + + "SYSRES_CONST_STATUS_VALUE_SUSPEND " + + "SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE " + + "SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE " + + "SYSRES_CONST_STORAGE_TYPE_FILE " + + "SYSRES_CONST_STORAGE_TYPE_SQL_SERVER " + + "SYSRES_CONST_STR_REQUISITE " + + "SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE " + + "SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR " + + "SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR " + + "SYSRES_CONST_STRING_REQUISITE_CODE " + + "SYSRES_CONST_STRING_REQUISITE_TYPE " + + "SYSRES_CONST_STRING_TYPE_CHAR " + + "SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE " + + "SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION " + + "SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE " + + "SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE " + + "SYSRES_CONST_SYSTEM_VERSION_COMMENT " + + "SYSRES_CONST_TASK_ACCESS_TYPE_ALL " + + "SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS " + + "SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL " + + "SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION " + + "SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD " + + "SYSRES_CONST_TASK_ENCODE_TYPE_NONE " + + "SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD " + + "SYSRES_CONST_TASK_ROUTE_ALL_CONDITION " + + "SYSRES_CONST_TASK_ROUTE_AND_CONDITION " + + "SYSRES_CONST_TASK_ROUTE_OR_CONDITION " + + "SYSRES_CONST_TASK_STATE_ABORTED " + + "SYSRES_CONST_TASK_STATE_COMPLETE " + + "SYSRES_CONST_TASK_STATE_CONTINUED " + + "SYSRES_CONST_TASK_STATE_CONTROL " + + "SYSRES_CONST_TASK_STATE_INIT " + + "SYSRES_CONST_TASK_STATE_WORKING " + + "SYSRES_CONST_TASK_TITLE " + + "SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE " + + "SYSRES_CONST_TASK_TYPES_REFERENCE_CODE " + + "SYSRES_CONST_TEMPLATES_REFERENCE_CODE " + + "SYSRES_CONST_TEST_DATE_REQUISITE_NAME " + + "SYSRES_CONST_TEST_DEV_DATABASE_NAME " + + "SYSRES_CONST_TEST_DEV_SYSTEM_CODE " + + "SYSRES_CONST_TEST_EDMS_DATABASE_NAME " + + "SYSRES_CONST_TEST_EDMS_MAIN_CODE " + + "SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME " + + "SYSRES_CONST_TEST_EDMS_SECOND_CODE " + + "SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME " + + "SYSRES_CONST_TEST_EDMS_SYSTEM_CODE " + + "SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME " + + "SYSRES_CONST_TEXT_REQUISITE " + + "SYSRES_CONST_TEXT_REQUISITE_CODE " + + "SYSRES_CONST_TEXT_REQUISITE_TYPE " + + "SYSRES_CONST_TEXT_TYPE_CHAR " + + "SYSRES_CONST_TYPE_CODE_REQUISITE_CODE " + + "SYSRES_CONST_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR " + + "SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE " + + "SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE " + + "SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE " + + "SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE " + + "SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME " + + "SYSRES_CONST_USE_ACCESS_TYPE_CODE " + + "SYSRES_CONST_USE_ACCESS_TYPE_NAME " + + "SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE " + + "SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE " + + "SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE " + + "SYSRES_CONST_USER_CATEGORY_NORMAL " + + "SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE " + + "SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE " + + "SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE " + + "SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE " + + "SYSRES_CONST_USER_COMMON_CATEGORY " + + "SYSRES_CONST_USER_COMMON_CATEGORY_CODE " + + "SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE " + + "SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_USER_LOGIN_REQUISITE_CODE " + + "SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE " + + "SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE " + + "SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE " + + "SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE " + + "SYSRES_CONST_USER_SERVICE_CATEGORY " + + "SYSRES_CONST_USER_SERVICE_CATEGORY_CODE " + + "SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE " + + "SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME " + + "SYSRES_CONST_USER_STATUS_DEVELOPER_CODE " + + "SYSRES_CONST_USER_STATUS_DEVELOPER_NAME " + + "SYSRES_CONST_USER_STATUS_DISABLED_CODE " + + "SYSRES_CONST_USER_STATUS_DISABLED_NAME " + + "SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE " + + "SYSRES_CONST_USER_STATUS_USER_CODE " + + "SYSRES_CONST_USER_STATUS_USER_NAME " + + "SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED " + + "SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER " + + "SYSRES_CONST_USER_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE " + + "SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE " + + "SYSRES_CONST_USERS_REFERENCE_CODE " + + "SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME " + + "SYSRES_CONST_USERS_REQUISITE_CODE " + + "SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE " + + "SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE " + + "SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE " + + "SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE " + + "SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE " + + "SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME " + + "SYSRES_CONST_VIEW_DEFAULT_CODE " + + "SYSRES_CONST_VIEW_DEFAULT_NAME " + + "SYSRES_CONST_VIEWER_REQUISITE_CODE " + + "SYSRES_CONST_WAITING_BLOCK_DESCRIPTION " + + "SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING " + + "SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING " + + "SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE " + + "SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE " + + "SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE " + + "SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE " + + "SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE " + + "SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS " + + "SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS " + + "SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD " + + "SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT " + + "SYSRES_CONST_XML_ENCODING " + + "SYSRES_CONST_XREC_STAT_REQUISITE_CODE " + + "SYSRES_CONST_XRECID_FIELD_NAME " + + "SYSRES_CONST_YES " + + "SYSRES_CONST_YES_NO_2_REQUISITE_CODE " + + "SYSRES_CONST_YES_NO_REQUISITE_CODE " + + "SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE " + + "SYSRES_CONST_YES_PICK_VALUE " + + "SYSRES_CONST_YES_VALUE "; + + // Base constant + var base_constants = "CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE "; + + // Base group name + var base_group_name_constants = + "ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME "; + + // Decision block properties + var decision_block_properties_constants = + "DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY " + + "DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY "; + + // File extension + var file_extension_constants = + "ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION " + + "SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION "; + + // Job block properties + var job_block_properties_constants = + "JOB_BLOCK_ABORT_DEADLINE_PROPERTY " + + "JOB_BLOCK_AFTER_FINISH_EVENT " + + "JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT " + + "JOB_BLOCK_ATTACHMENT_PROPERTY " + + "JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY " + + "JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY " + + "JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT " + + "JOB_BLOCK_BEFORE_START_EVENT " + + "JOB_BLOCK_CREATED_JOBS_PROPERTY " + + "JOB_BLOCK_DEADLINE_PROPERTY " + + "JOB_BLOCK_EXECUTION_RESULTS_PROPERTY " + + "JOB_BLOCK_IS_PARALLEL_PROPERTY " + + "JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY " + + "JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " + + "JOB_BLOCK_JOB_TEXT_PROPERTY " + + "JOB_BLOCK_NAME_PROPERTY " + + "JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY " + + "JOB_BLOCK_PERFORMER_PROPERTY " + + "JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY " + + "JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " + + "JOB_BLOCK_SUBJECT_PROPERTY "; + + // Language code + var language_code_constants = "ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE "; + + // Launching external applications + var launching_external_applications_constants = + "smHidden smMaximized smMinimized smNormal wmNo wmYes "; + + // Link kind + var link_kind_constants = + "COMPONENT_TOKEN_LINK_KIND " + + "DOCUMENT_LINK_KIND " + + "EDOCUMENT_LINK_KIND " + + "FOLDER_LINK_KIND " + + "JOB_LINK_KIND " + + "REFERENCE_LINK_KIND " + + "TASK_LINK_KIND "; + + // Lock type + var lock_type_constants = + "COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE "; + + // Monitor block properties + var monitor_block_properties_constants = + "MONITOR_BLOCK_AFTER_FINISH_EVENT " + + "MONITOR_BLOCK_BEFORE_START_EVENT " + + "MONITOR_BLOCK_DEADLINE_PROPERTY " + + "MONITOR_BLOCK_INTERVAL_PROPERTY " + + "MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY " + + "MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " + + "MONITOR_BLOCK_NAME_PROPERTY " + + "MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " + + "MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY "; + + // Notice block properties + var notice_block_properties_constants = + "NOTICE_BLOCK_AFTER_FINISH_EVENT " + + "NOTICE_BLOCK_ATTACHMENT_PROPERTY " + + "NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY " + + "NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY " + + "NOTICE_BLOCK_BEFORE_START_EVENT " + + "NOTICE_BLOCK_CREATED_NOTICES_PROPERTY " + + "NOTICE_BLOCK_DEADLINE_PROPERTY " + + "NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " + + "NOTICE_BLOCK_NAME_PROPERTY " + + "NOTICE_BLOCK_NOTICE_TEXT_PROPERTY " + + "NOTICE_BLOCK_PERFORMER_PROPERTY " + + "NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " + + "NOTICE_BLOCK_SUBJECT_PROPERTY "; + + // Object events + var object_events_constants = + "dseAfterCancel " + + "dseAfterClose " + + "dseAfterDelete " + + "dseAfterDeleteOutOfTransaction " + + "dseAfterInsert " + + "dseAfterOpen " + + "dseAfterScroll " + + "dseAfterUpdate " + + "dseAfterUpdateOutOfTransaction " + + "dseBeforeCancel " + + "dseBeforeClose " + + "dseBeforeDelete " + + "dseBeforeDetailUpdate " + + "dseBeforeInsert " + + "dseBeforeOpen " + + "dseBeforeUpdate " + + "dseOnAnyRequisiteChange " + + "dseOnCloseRecord " + + "dseOnDeleteError " + + "dseOnOpenRecord " + + "dseOnPrepareUpdate " + + "dseOnUpdateError " + + "dseOnUpdateRatifiedRecord " + + "dseOnValidDelete " + + "dseOnValidUpdate " + + "reOnChange " + + "reOnChangeValues " + + "SELECTION_BEGIN_ROUTE_EVENT " + + "SELECTION_END_ROUTE_EVENT "; + + // Object params + var object_params_constants = + "CURRENT_PERIOD_IS_REQUIRED " + + "PREVIOUS_CARD_TYPE_NAME " + + "SHOW_RECORD_PROPERTIES_FORM "; + + // Other + var other_constants = + "ACCESS_RIGHTS_SETTING_DIALOG_CODE " + + "ADMINISTRATOR_USER_CODE " + + "ANALYTIC_REPORT_TYPE " + + "asrtHideLocal " + + "asrtHideRemote " + + "CALCULATED_ROLE_TYPE_CODE " + + "COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE " + + "DCTS_TEST_PROTOCOLS_FOLDER_PATH " + + "E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED " + + "E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER " + + "E_EDOC_VERSION_ALREDY_SIGNED " + + "E_EDOC_VERSION_ALREDY_SIGNED_BY_USER " + + "EDOC_TYPES_CODE_REQUISITE_FIELD_NAME " + + "EDOCUMENTS_ALIAS_NAME " + + "FILES_FOLDER_PATH " + + "FILTER_OPERANDS_DELIMITER " + + "FILTER_OPERATIONS_DELIMITER " + + "FORMCARD_NAME " + + "FORMLIST_NAME " + + "GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE " + + "GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE " + + "INTEGRATED_REPORT_TYPE " + + "IS_BUILDER_APPLICATION_ROLE " + + "IS_BUILDER_APPLICATION_ROLE2 " + + "IS_BUILDER_USERS " + + "ISBSYSDEV " + + "LOG_FOLDER_PATH " + + "mbCancel " + + "mbNo " + + "mbNoToAll " + + "mbOK " + + "mbYes " + + "mbYesToAll " + + "MEMORY_DATASET_DESRIPTIONS_FILENAME " + + "mrNo " + + "mrNoToAll " + + "mrYes " + + "mrYesToAll " + + "MULTIPLE_SELECT_DIALOG_CODE " + + "NONOPERATING_RECORD_FLAG_FEMININE " + + "NONOPERATING_RECORD_FLAG_MASCULINE " + + "OPERATING_RECORD_FLAG_FEMININE " + + "OPERATING_RECORD_FLAG_MASCULINE " + + "PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE " + + "PROGRAM_INITIATED_LOOKUP_ACTION " + + "ratDelete " + + "ratEdit " + + "ratInsert " + + "REPORT_TYPE " + + "REQUIRED_PICK_VALUES_VARIABLE " + + "rmCard " + + "rmList " + + "SBRTE_PROGID_DEV " + + "SBRTE_PROGID_RELEASE " + + "STATIC_ROLE_TYPE_CODE " + + "SUPPRESS_EMPTY_TEMPLATE_CREATION " + + "SYSTEM_USER_CODE " + + "UPDATE_DIALOG_DATASET " + + "USED_IN_OBJECT_HINT_PARAM " + + "USER_INITIATED_LOOKUP_ACTION " + + "USER_NAME_FORMAT " + + "USER_SELECTION_RESTRICTIONS " + + "WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH " + + "ELS_SUBTYPE_CONTROL_NAME " + + "ELS_FOLDER_KIND_CONTROL_NAME " + + "REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME "; + + // Privileges + var privileges_constants = + "PRIVILEGE_COMPONENT_FULL_ACCESS " + + "PRIVILEGE_DEVELOPMENT_EXPORT " + + "PRIVILEGE_DEVELOPMENT_IMPORT " + + "PRIVILEGE_DOCUMENT_DELETE " + + "PRIVILEGE_ESD " + + "PRIVILEGE_FOLDER_DELETE " + + "PRIVILEGE_MANAGE_ACCESS_RIGHTS " + + "PRIVILEGE_MANAGE_REPLICATION " + + "PRIVILEGE_MANAGE_SESSION_SERVER " + + "PRIVILEGE_OBJECT_FULL_ACCESS " + + "PRIVILEGE_OBJECT_VIEW " + + "PRIVILEGE_RESERVE_LICENSE " + + "PRIVILEGE_SYSTEM_CUSTOMIZE " + + "PRIVILEGE_SYSTEM_DEVELOP " + + "PRIVILEGE_SYSTEM_INSTALL " + + "PRIVILEGE_TASK_DELETE " + + "PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE " + + "PRIVILEGES_PSEUDOREFERENCE_CODE "; + + // Pseudoreference code + var pseudoreference_code_constants = + "ACCESS_TYPES_PSEUDOREFERENCE_CODE " + + "ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE " + + "ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE " + + "ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE " + + "AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE " + + "COMPONENTS_PSEUDOREFERENCE_CODE " + + "FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE " + + "GROUPS_PSEUDOREFERENCE_CODE " + + "RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE " + + "REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE " + + "REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE " + + "REFTYPES_PSEUDOREFERENCE_CODE " + + "REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE " + + "SEND_PROTOCOL_PSEUDOREFERENCE_CODE " + + "SUBSTITUTES_PSEUDOREFERENCE_CODE " + + "SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE " + + "UNITS_PSEUDOREFERENCE_CODE " + + "USERS_PSEUDOREFERENCE_CODE " + + "VIEWERS_PSEUDOREFERENCE_CODE "; + + // Requisite ISBCertificateType values + var requisite_ISBCertificateType_values_constants = + "CERTIFICATE_TYPE_ENCRYPT " + + "CERTIFICATE_TYPE_SIGN " + + "CERTIFICATE_TYPE_SIGN_AND_ENCRYPT "; + + // Requisite ISBEDocStorageType values + var requisite_ISBEDocStorageType_values_constants = + "STORAGE_TYPE_FILE " + + "STORAGE_TYPE_NAS_CIFS " + + "STORAGE_TYPE_SAPERION " + + "STORAGE_TYPE_SQL_SERVER "; + + // Requisite CompType2 values + var requisite_compType2_values_constants = + "COMPTYPE2_REQUISITE_DOCUMENTS_VALUE " + + "COMPTYPE2_REQUISITE_TASKS_VALUE " + + "COMPTYPE2_REQUISITE_FOLDERS_VALUE " + + "COMPTYPE2_REQUISITE_REFERENCES_VALUE "; + + // Requisite name + var requisite_name_constants = + "SYSREQ_CODE " + + "SYSREQ_COMPTYPE2 " + + "SYSREQ_CONST_AVAILABLE_FOR_WEB " + + "SYSREQ_CONST_COMMON_CODE " + + "SYSREQ_CONST_COMMON_VALUE " + + "SYSREQ_CONST_FIRM_CODE " + + "SYSREQ_CONST_FIRM_STATUS " + + "SYSREQ_CONST_FIRM_VALUE " + + "SYSREQ_CONST_SERVER_STATUS " + + "SYSREQ_CONTENTS " + + "SYSREQ_DATE_OPEN " + + "SYSREQ_DATE_CLOSE " + + "SYSREQ_DESCRIPTION " + + "SYSREQ_DESCRIPTION_LOCALIZE_ID " + + "SYSREQ_DOUBLE " + + "SYSREQ_EDOC_ACCESS_TYPE " + + "SYSREQ_EDOC_AUTHOR " + + "SYSREQ_EDOC_CREATED " + + "SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE " + + "SYSREQ_EDOC_EDITOR " + + "SYSREQ_EDOC_ENCODE_TYPE " + + "SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME " + + "SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION " + + "SYSREQ_EDOC_EXPORT_DATE " + + "SYSREQ_EDOC_EXPORTER " + + "SYSREQ_EDOC_KIND " + + "SYSREQ_EDOC_LIFE_STAGE_NAME " + + "SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE " + + "SYSREQ_EDOC_MODIFIED " + + "SYSREQ_EDOC_NAME " + + "SYSREQ_EDOC_NOTE " + + "SYSREQ_EDOC_QUALIFIED_ID " + + "SYSREQ_EDOC_SESSION_KEY " + + "SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME " + + "SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION " + + "SYSREQ_EDOC_SIGNATURE_TYPE " + + "SYSREQ_EDOC_SIGNED " + + "SYSREQ_EDOC_STORAGE " + + "SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE " + + "SYSREQ_EDOC_STORAGES_CHECK_RIGHTS " + + "SYSREQ_EDOC_STORAGES_COMPUTER_NAME " + + "SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE " + + "SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE " + + "SYSREQ_EDOC_STORAGES_FUNCTION " + + "SYSREQ_EDOC_STORAGES_INITIALIZED " + + "SYSREQ_EDOC_STORAGES_LOCAL_PATH " + + "SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME " + + "SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT " + + "SYSREQ_EDOC_STORAGES_SERVER_NAME " + + "SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME " + + "SYSREQ_EDOC_STORAGES_TYPE " + + "SYSREQ_EDOC_TEXT_MODIFIED " + + "SYSREQ_EDOC_TYPE_ACT_CODE " + + "SYSREQ_EDOC_TYPE_ACT_DESCRIPTION " + + "SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID " + + "SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE " + + "SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS " + + "SYSREQ_EDOC_TYPE_ACT_SECTION " + + "SYSREQ_EDOC_TYPE_ADD_PARAMS " + + "SYSREQ_EDOC_TYPE_COMMENT " + + "SYSREQ_EDOC_TYPE_EVENT_TEXT " + + "SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR " + + "SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID " + + "SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID " + + "SYSREQ_EDOC_TYPE_NUMERATION_METHOD " + + "SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE " + + "SYSREQ_EDOC_TYPE_REQ_CODE " + + "SYSREQ_EDOC_TYPE_REQ_DESCRIPTION " + + "SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID " + + "SYSREQ_EDOC_TYPE_REQ_IS_LEADING " + + "SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED " + + "SYSREQ_EDOC_TYPE_REQ_NUMBER " + + "SYSREQ_EDOC_TYPE_REQ_ON_CHANGE " + + "SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS " + + "SYSREQ_EDOC_TYPE_REQ_ON_SELECT " + + "SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND " + + "SYSREQ_EDOC_TYPE_REQ_SECTION " + + "SYSREQ_EDOC_TYPE_VIEW_CARD " + + "SYSREQ_EDOC_TYPE_VIEW_CODE " + + "SYSREQ_EDOC_TYPE_VIEW_COMMENT " + + "SYSREQ_EDOC_TYPE_VIEW_IS_MAIN " + + "SYSREQ_EDOC_TYPE_VIEW_NAME " + + "SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID " + + "SYSREQ_EDOC_VERSION_AUTHOR " + + "SYSREQ_EDOC_VERSION_CRC " + + "SYSREQ_EDOC_VERSION_DATA " + + "SYSREQ_EDOC_VERSION_EDITOR " + + "SYSREQ_EDOC_VERSION_EXPORT_DATE " + + "SYSREQ_EDOC_VERSION_EXPORTER " + + "SYSREQ_EDOC_VERSION_HIDDEN " + + "SYSREQ_EDOC_VERSION_LIFE_STAGE " + + "SYSREQ_EDOC_VERSION_MODIFIED " + + "SYSREQ_EDOC_VERSION_NOTE " + + "SYSREQ_EDOC_VERSION_SIGNATURE_TYPE " + + "SYSREQ_EDOC_VERSION_SIGNED " + + "SYSREQ_EDOC_VERSION_SIZE " + + "SYSREQ_EDOC_VERSION_SOURCE " + + "SYSREQ_EDOC_VERSION_TEXT_MODIFIED " + + "SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE " + + "SYSREQ_FOLDER_KIND " + + "SYSREQ_FUNC_CATEGORY " + + "SYSREQ_FUNC_COMMENT " + + "SYSREQ_FUNC_GROUP " + + "SYSREQ_FUNC_GROUP_COMMENT " + + "SYSREQ_FUNC_GROUP_NUMBER " + + "SYSREQ_FUNC_HELP " + + "SYSREQ_FUNC_PARAM_DEF_VALUE " + + "SYSREQ_FUNC_PARAM_IDENT " + + "SYSREQ_FUNC_PARAM_NUMBER " + + "SYSREQ_FUNC_PARAM_TYPE " + + "SYSREQ_FUNC_TEXT " + + "SYSREQ_GROUP_CATEGORY " + + "SYSREQ_ID " + + "SYSREQ_LAST_UPDATE " + + "SYSREQ_LEADER_REFERENCE " + + "SYSREQ_LINE_NUMBER " + + "SYSREQ_MAIN_RECORD_ID " + + "SYSREQ_NAME " + + "SYSREQ_NAME_LOCALIZE_ID " + + "SYSREQ_NOTE " + + "SYSREQ_ORIGINAL_RECORD " + + "SYSREQ_OUR_FIRM " + + "SYSREQ_PROFILING_SETTINGS_BATCH_LOGING " + + "SYSREQ_PROFILING_SETTINGS_BATCH_SIZE " + + "SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED " + + "SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED " + + "SYSREQ_PROFILING_SETTINGS_START_LOGGED " + + "SYSREQ_RECORD_STATUS " + + "SYSREQ_REF_REQ_FIELD_NAME " + + "SYSREQ_REF_REQ_FORMAT " + + "SYSREQ_REF_REQ_GENERATED " + + "SYSREQ_REF_REQ_LENGTH " + + "SYSREQ_REF_REQ_PRECISION " + + "SYSREQ_REF_REQ_REFERENCE " + + "SYSREQ_REF_REQ_SECTION " + + "SYSREQ_REF_REQ_STORED " + + "SYSREQ_REF_REQ_TOKENS " + + "SYSREQ_REF_REQ_TYPE " + + "SYSREQ_REF_REQ_VIEW " + + "SYSREQ_REF_TYPE_ACT_CODE " + + "SYSREQ_REF_TYPE_ACT_DESCRIPTION " + + "SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID " + + "SYSREQ_REF_TYPE_ACT_ON_EXECUTE " + + "SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS " + + "SYSREQ_REF_TYPE_ACT_SECTION " + + "SYSREQ_REF_TYPE_ADD_PARAMS " + + "SYSREQ_REF_TYPE_COMMENT " + + "SYSREQ_REF_TYPE_COMMON_SETTINGS " + + "SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME " + + "SYSREQ_REF_TYPE_EVENT_TEXT " + + "SYSREQ_REF_TYPE_MAIN_LEADING_REF " + + "SYSREQ_REF_TYPE_NAME_IN_SINGULAR " + + "SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID " + + "SYSREQ_REF_TYPE_NAME_LOCALIZE_ID " + + "SYSREQ_REF_TYPE_NUMERATION_METHOD " + + "SYSREQ_REF_TYPE_REQ_CODE " + + "SYSREQ_REF_TYPE_REQ_DESCRIPTION " + + "SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID " + + "SYSREQ_REF_TYPE_REQ_IS_CONTROL " + + "SYSREQ_REF_TYPE_REQ_IS_FILTER " + + "SYSREQ_REF_TYPE_REQ_IS_LEADING " + + "SYSREQ_REF_TYPE_REQ_IS_REQUIRED " + + "SYSREQ_REF_TYPE_REQ_NUMBER " + + "SYSREQ_REF_TYPE_REQ_ON_CHANGE " + + "SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS " + + "SYSREQ_REF_TYPE_REQ_ON_SELECT " + + "SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND " + + "SYSREQ_REF_TYPE_REQ_SECTION " + + "SYSREQ_REF_TYPE_VIEW_CARD " + + "SYSREQ_REF_TYPE_VIEW_CODE " + + "SYSREQ_REF_TYPE_VIEW_COMMENT " + + "SYSREQ_REF_TYPE_VIEW_IS_MAIN " + + "SYSREQ_REF_TYPE_VIEW_NAME " + + "SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID " + + "SYSREQ_REFERENCE_TYPE_ID " + + "SYSREQ_STATE " + + "SYSREQ_STATЕ " + + "SYSREQ_SYSTEM_SETTINGS_VALUE " + + "SYSREQ_TYPE " + + "SYSREQ_UNIT " + + "SYSREQ_UNIT_ID " + + "SYSREQ_USER_GROUPS_GROUP_FULL_NAME " + + "SYSREQ_USER_GROUPS_GROUP_NAME " + + "SYSREQ_USER_GROUPS_GROUP_SERVER_NAME " + + "SYSREQ_USERS_ACCESS_RIGHTS " + + "SYSREQ_USERS_AUTHENTICATION " + + "SYSREQ_USERS_CATEGORY " + + "SYSREQ_USERS_COMPONENT " + + "SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC " + + "SYSREQ_USERS_DOMAIN " + + "SYSREQ_USERS_FULL_USER_NAME " + + "SYSREQ_USERS_GROUP " + + "SYSREQ_USERS_IS_MAIN_SERVER " + + "SYSREQ_USERS_LOGIN " + + "SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC " + + "SYSREQ_USERS_STATUS " + + "SYSREQ_USERS_USER_CERTIFICATE " + + "SYSREQ_USERS_USER_CERTIFICATE_INFO " + + "SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME " + + "SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION " + + "SYSREQ_USERS_USER_CERTIFICATE_STATE " + + "SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME " + + "SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT " + + "SYSREQ_USERS_USER_DEFAULT_CERTIFICATE " + + "SYSREQ_USERS_USER_DESCRIPTION " + + "SYSREQ_USERS_USER_GLOBAL_NAME " + + "SYSREQ_USERS_USER_LOGIN " + + "SYSREQ_USERS_USER_MAIN_SERVER " + + "SYSREQ_USERS_USER_TYPE " + + "SYSREQ_WORK_RULES_FOLDER_ID "; + + // Result + var result_constants = "RESULT_VAR_NAME RESULT_VAR_NAME_ENG "; + + // Rule identification + var rule_identification_constants = + "AUTO_NUMERATION_RULE_ID " + + "CANT_CHANGE_ID_REQUISITE_RULE_ID " + + "CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID " + + "CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID " + + "CHECK_CODE_REQUISITE_RULE_ID " + + "CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID " + + "CHECK_FILTRATER_CHANGES_RULE_ID " + + "CHECK_RECORD_INTERVAL_RULE_ID " + + "CHECK_REFERENCE_INTERVAL_RULE_ID " + + "CHECK_REQUIRED_DATA_FULLNESS_RULE_ID " + + "CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID " + + "MAKE_RECORD_UNRATIFIED_RULE_ID " + + "RESTORE_AUTO_NUMERATION_RULE_ID " + + "SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID " + + "SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID " + + "SET_IDSPS_VALUE_RULE_ID " + + "SET_NEXT_CODE_VALUE_RULE_ID " + + "SET_OURFIRM_BOUNDS_RULE_ID " + + "SET_OURFIRM_REQUISITE_RULE_ID "; + + // Script block properties + var script_block_properties_constants = + "SCRIPT_BLOCK_AFTER_FINISH_EVENT " + + "SCRIPT_BLOCK_BEFORE_START_EVENT " + + "SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY " + + "SCRIPT_BLOCK_NAME_PROPERTY " + + "SCRIPT_BLOCK_SCRIPT_PROPERTY "; + + // Subtask block properties + var subtask_block_properties_constants = + "SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY " + + "SUBTASK_BLOCK_AFTER_FINISH_EVENT " + + "SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT " + + "SUBTASK_BLOCK_ATTACHMENTS_PROPERTY " + + "SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY " + + "SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY " + + "SUBTASK_BLOCK_BEFORE_START_EVENT " + + "SUBTASK_BLOCK_CREATED_TASK_PROPERTY " + + "SUBTASK_BLOCK_CREATION_EVENT " + + "SUBTASK_BLOCK_DEADLINE_PROPERTY " + + "SUBTASK_BLOCK_IMPORTANCE_PROPERTY " + + "SUBTASK_BLOCK_INITIATOR_PROPERTY " + + "SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY " + + "SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " + + "SUBTASK_BLOCK_JOBS_TYPE_PROPERTY " + + "SUBTASK_BLOCK_NAME_PROPERTY " + + "SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY " + + "SUBTASK_BLOCK_PERFORMERS_PROPERTY " + + "SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY " + + "SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY " + + "SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY " + + "SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY " + + "SUBTASK_BLOCK_START_EVENT " + + "SUBTASK_BLOCK_STEP_CONTROL_PROPERTY " + + "SUBTASK_BLOCK_SUBJECT_PROPERTY " + + "SUBTASK_BLOCK_TASK_CONTROL_PROPERTY " + + "SUBTASK_BLOCK_TEXT_PROPERTY " + + "SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY " + + "SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY " + + "SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY "; + + // System component + var system_component_constants = + "SYSCOMP_CONTROL_JOBS " + + "SYSCOMP_FOLDERS " + + "SYSCOMP_JOBS " + + "SYSCOMP_NOTICES " + + "SYSCOMP_TASKS "; + + // System dialogs + var system_dialogs_constants = + "SYSDLG_CREATE_EDOCUMENT " + + "SYSDLG_CREATE_EDOCUMENT_VERSION " + + "SYSDLG_CURRENT_PERIOD " + + "SYSDLG_EDIT_FUNCTION_HELP " + + "SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE " + + "SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS " + + "SYSDLG_EXPORT_SINGLE_EDOCUMENT " + + "SYSDLG_IMPORT_EDOCUMENT " + + "SYSDLG_MULTIPLE_SELECT " + + "SYSDLG_SETUP_ACCESS_RIGHTS " + + "SYSDLG_SETUP_DEFAULT_RIGHTS " + + "SYSDLG_SETUP_FILTER_CONDITION " + + "SYSDLG_SETUP_SIGN_RIGHTS " + + "SYSDLG_SETUP_TASK_OBSERVERS " + + "SYSDLG_SETUP_TASK_ROUTE " + + "SYSDLG_SETUP_USERS_LIST " + + "SYSDLG_SIGN_EDOCUMENT " + + "SYSDLG_SIGN_MULTIPLE_EDOCUMENTS "; + + // System reference names + var system_reference_names_constants = + "SYSREF_ACCESS_RIGHTS_TYPES " + + "SYSREF_ADMINISTRATION_HISTORY " + + "SYSREF_ALL_AVAILABLE_COMPONENTS " + + "SYSREF_ALL_AVAILABLE_PRIVILEGES " + + "SYSREF_ALL_REPLICATING_COMPONENTS " + + "SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS " + + "SYSREF_CALENDAR_EVENTS " + + "SYSREF_COMPONENT_TOKEN_HISTORY " + + "SYSREF_COMPONENT_TOKENS " + + "SYSREF_COMPONENTS " + + "SYSREF_CONSTANTS " + + "SYSREF_DATA_RECEIVE_PROTOCOL " + + "SYSREF_DATA_SEND_PROTOCOL " + + "SYSREF_DIALOGS " + + "SYSREF_DIALOGS_REQUISITES " + + "SYSREF_EDITORS " + + "SYSREF_EDOC_CARDS " + + "SYSREF_EDOC_TYPES " + + "SYSREF_EDOCUMENT_CARD_REQUISITES " + + "SYSREF_EDOCUMENT_CARD_TYPES " + + "SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE " + + "SYSREF_EDOCUMENT_CARDS " + + "SYSREF_EDOCUMENT_HISTORY " + + "SYSREF_EDOCUMENT_KINDS " + + "SYSREF_EDOCUMENT_REQUISITES " + + "SYSREF_EDOCUMENT_SIGNATURES " + + "SYSREF_EDOCUMENT_TEMPLATES " + + "SYSREF_EDOCUMENT_TEXT_STORAGES " + + "SYSREF_EDOCUMENT_VIEWS " + + "SYSREF_FILTERER_SETUP_CONFLICTS " + + "SYSREF_FILTRATER_SETTING_CONFLICTS " + + "SYSREF_FOLDER_HISTORY " + + "SYSREF_FOLDERS " + + "SYSREF_FUNCTION_GROUPS " + + "SYSREF_FUNCTION_PARAMS " + + "SYSREF_FUNCTIONS " + + "SYSREF_JOB_HISTORY " + + "SYSREF_LINKS " + + "SYSREF_LOCALIZATION_DICTIONARY " + + "SYSREF_LOCALIZATION_LANGUAGES " + + "SYSREF_MODULES " + + "SYSREF_PRIVILEGES " + + "SYSREF_RECORD_HISTORY " + + "SYSREF_REFERENCE_REQUISITES " + + "SYSREF_REFERENCE_TYPE_VIEWS " + + "SYSREF_REFERENCE_TYPES " + + "SYSREF_REFERENCES " + + "SYSREF_REFERENCES_REQUISITES " + + "SYSREF_REMOTE_SERVERS " + + "SYSREF_REPLICATION_SESSIONS_LOG " + + "SYSREF_REPLICATION_SESSIONS_PROTOCOL " + + "SYSREF_REPORTS " + + "SYSREF_ROLES " + + "SYSREF_ROUTE_BLOCK_GROUPS " + + "SYSREF_ROUTE_BLOCKS " + + "SYSREF_SCRIPTS " + + "SYSREF_SEARCHES " + + "SYSREF_SERVER_EVENTS " + + "SYSREF_SERVER_EVENTS_HISTORY " + + "SYSREF_STANDARD_ROUTE_GROUPS " + + "SYSREF_STANDARD_ROUTES " + + "SYSREF_STATUSES " + + "SYSREF_SYSTEM_SETTINGS " + + "SYSREF_TASK_HISTORY " + + "SYSREF_TASK_KIND_GROUPS " + + "SYSREF_TASK_KINDS " + + "SYSREF_TASK_RIGHTS " + + "SYSREF_TASK_SIGNATURES " + + "SYSREF_TASKS " + + "SYSREF_UNITS " + + "SYSREF_USER_GROUPS " + + "SYSREF_USER_GROUPS_REFERENCE " + + "SYSREF_USER_SUBSTITUTION " + + "SYSREF_USERS " + + "SYSREF_USERS_REFERENCE " + + "SYSREF_VIEWERS " + + "SYSREF_WORKING_TIME_CALENDARS "; + + // Table name + var table_name_constants = + "ACCESS_RIGHTS_TABLE_NAME " + + "EDMS_ACCESS_TABLE_NAME " + + "EDOC_TYPES_TABLE_NAME "; + + // Test + var test_constants = + "TEST_DEV_DB_NAME " + + "TEST_DEV_SYSTEM_CODE " + + "TEST_EDMS_DB_NAME " + + "TEST_EDMS_MAIN_CODE " + + "TEST_EDMS_MAIN_DB_NAME " + + "TEST_EDMS_SECOND_CODE " + + "TEST_EDMS_SECOND_DB_NAME " + + "TEST_EDMS_SYSTEM_CODE " + + "TEST_ISB5_MAIN_CODE " + + "TEST_ISB5_SECOND_CODE " + + "TEST_SQL_SERVER_2005_NAME " + + "TEST_SQL_SERVER_NAME "; + + // Using the dialog windows + var using_the_dialog_windows_constants = + "ATTENTION_CAPTION " + + "cbsCommandLinks " + + "cbsDefault " + + "CONFIRMATION_CAPTION " + + "ERROR_CAPTION " + + "INFORMATION_CAPTION " + + "mrCancel " + + "mrOk "; + + // Using the document + var using_the_document_constants = + "EDOC_VERSION_ACTIVE_STAGE_CODE " + + "EDOC_VERSION_DESIGN_STAGE_CODE " + + "EDOC_VERSION_OBSOLETE_STAGE_CODE "; + + // Using the EA and encryption + var using_the_EA_and_encryption_constants = + "cpDataEnciphermentEnabled " + + "cpDigitalSignatureEnabled " + + "cpID " + + "cpIssuer " + + "cpPluginVersion " + + "cpSerial " + + "cpSubjectName " + + "cpSubjSimpleName " + + "cpValidFromDate " + + "cpValidToDate "; + + // Using the ISBL-editor + var using_the_ISBL_editor_constants = + "ISBL_SYNTAX " + "NO_SYNTAX " + "XML_SYNTAX "; + + // Wait block properties + var wait_block_properties_constants = + "WAIT_BLOCK_AFTER_FINISH_EVENT " + + "WAIT_BLOCK_BEFORE_START_EVENT " + + "WAIT_BLOCK_DEADLINE_PROPERTY " + + "WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY " + + "WAIT_BLOCK_NAME_PROPERTY " + + "WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY "; + + // SYSRES Common + var sysres_common_constants = + "SYSRES_COMMON " + + "SYSRES_CONST " + + "SYSRES_MBFUNC " + + "SYSRES_SBDATA " + + "SYSRES_SBGUI " + + "SYSRES_SBINTF " + + "SYSRES_SBREFDSC " + + "SYSRES_SQLERRORS " + + "SYSRES_SYSCOMP "; + + // Константы ==> built_in + var CONSTANTS = + sysres_constants + + base_constants + + base_group_name_constants + + decision_block_properties_constants + + file_extension_constants + + job_block_properties_constants + + language_code_constants + + launching_external_applications_constants + + link_kind_constants + + lock_type_constants + + monitor_block_properties_constants + + notice_block_properties_constants + + object_events_constants + + object_params_constants + + other_constants + + privileges_constants + + pseudoreference_code_constants + + requisite_ISBCertificateType_values_constants + + requisite_ISBEDocStorageType_values_constants + + requisite_compType2_values_constants + + requisite_name_constants + + result_constants + + rule_identification_constants + + script_block_properties_constants + + subtask_block_properties_constants + + system_component_constants + + system_dialogs_constants + + system_reference_names_constants + + table_name_constants + + test_constants + + using_the_dialog_windows_constants + + using_the_document_constants + + using_the_EA_and_encryption_constants + + using_the_ISBL_editor_constants + + wait_block_properties_constants + + sysres_common_constants; + + // enum TAccountType + var TAccountType = "atUser atGroup atRole "; + + // enum TActionEnabledMode + var TActionEnabledMode = + "aemEnabledAlways " + + "aemDisabledAlways " + + "aemEnabledOnBrowse " + + "aemEnabledOnEdit " + + "aemDisabledOnBrowseEmpty "; + + // enum TAddPosition + var TAddPosition = "apBegin apEnd "; + + // enum TAlignment + var TAlignment = "alLeft alRight "; + + // enum TAreaShowMode + var TAreaShowMode = + "asmNever " + + "asmNoButCustomize " + + "asmAsLastTime " + + "asmYesButCustomize " + + "asmAlways "; + + // enum TCertificateInvalidationReason + var TCertificateInvalidationReason = "cirCommon cirRevoked "; + + // enum TCertificateType + var TCertificateType = "ctSignature ctEncode ctSignatureEncode "; + + // enum TCheckListBoxItemState + var TCheckListBoxItemState = "clbUnchecked clbChecked clbGrayed "; + + // enum TCloseOnEsc + var TCloseOnEsc = "ceISB ceAlways ceNever "; + + // enum TCompType + var TCompType = + "ctDocument " + + "ctReference " + + "ctScript " + + "ctUnknown " + + "ctReport " + + "ctDialog " + + "ctFunction " + + "ctFolder " + + "ctEDocument " + + "ctTask " + + "ctJob " + + "ctNotice " + + "ctControlJob "; + + // enum TConditionFormat + var TConditionFormat = "cfInternal cfDisplay "; + + // enum TConnectionIntent + var TConnectionIntent = "ciUnspecified ciWrite ciRead "; + + // enum TContentKind + var TContentKind = + "ckFolder " + + "ckEDocument " + + "ckTask " + + "ckJob " + + "ckComponentToken " + + "ckAny " + + "ckReference " + + "ckScript " + + "ckReport " + + "ckDialog "; + + // enum TControlType + var TControlType = + "ctISBLEditor " + + "ctBevel " + + "ctButton " + + "ctCheckListBox " + + "ctComboBox " + + "ctComboEdit " + + "ctGrid " + + "ctDBCheckBox " + + "ctDBComboBox " + + "ctDBEdit " + + "ctDBEllipsis " + + "ctDBMemo " + + "ctDBNavigator " + + "ctDBRadioGroup " + + "ctDBStatusLabel " + + "ctEdit " + + "ctGroupBox " + + "ctInplaceHint " + + "ctMemo " + + "ctPanel " + + "ctListBox " + + "ctRadioButton " + + "ctRichEdit " + + "ctTabSheet " + + "ctWebBrowser " + + "ctImage " + + "ctHyperLink " + + "ctLabel " + + "ctDBMultiEllipsis " + + "ctRibbon " + + "ctRichView " + + "ctInnerPanel " + + "ctPanelGroup " + + "ctBitButton "; + + // enum TCriterionContentType + var TCriterionContentType = + "cctDate " + + "cctInteger " + + "cctNumeric " + + "cctPick " + + "cctReference " + + "cctString " + + "cctText "; + + // enum TCultureType + var TCultureType = "cltInternal cltPrimary cltGUI "; + + // enum TDataSetEventType + var TDataSetEventType = + "dseBeforeOpen " + + "dseAfterOpen " + + "dseBeforeClose " + + "dseAfterClose " + + "dseOnValidDelete " + + "dseBeforeDelete " + + "dseAfterDelete " + + "dseAfterDeleteOutOfTransaction " + + "dseOnDeleteError " + + "dseBeforeInsert " + + "dseAfterInsert " + + "dseOnValidUpdate " + + "dseBeforeUpdate " + + "dseOnUpdateRatifiedRecord " + + "dseAfterUpdate " + + "dseAfterUpdateOutOfTransaction " + + "dseOnUpdateError " + + "dseAfterScroll " + + "dseOnOpenRecord " + + "dseOnCloseRecord " + + "dseBeforeCancel " + + "dseAfterCancel " + + "dseOnUpdateDeadlockError " + + "dseBeforeDetailUpdate " + + "dseOnPrepareUpdate " + + "dseOnAnyRequisiteChange "; + + // enum TDataSetState + var TDataSetState = "dssEdit dssInsert dssBrowse dssInActive "; + + // enum TDateFormatType + var TDateFormatType = "dftDate dftShortDate dftDateTime dftTimeStamp "; + + // enum TDateOffsetType + var TDateOffsetType = "dotDays dotHours dotMinutes dotSeconds "; + + // enum TDateTimeKind + var TDateTimeKind = "dtkndLocal dtkndUTC "; + + // enum TDeaAccessRights + var TDeaAccessRights = "arNone arView arEdit arFull "; + + // enum TDocumentDefaultAction + var TDocumentDefaultAction = "ddaView ddaEdit "; + + // enum TEditMode + var TEditMode = + "emLock " + + "emEdit " + + "emSign " + + "emExportWithLock " + + "emImportWithUnlock " + + "emChangeVersionNote " + + "emOpenForModify " + + "emChangeLifeStage " + + "emDelete " + + "emCreateVersion " + + "emImport " + + "emUnlockExportedWithLock " + + "emStart " + + "emAbort " + + "emReInit " + + "emMarkAsReaded " + + "emMarkAsUnreaded " + + "emPerform " + + "emAccept " + + "emResume " + + "emChangeRights " + + "emEditRoute " + + "emEditObserver " + + "emRecoveryFromLocalCopy " + + "emChangeWorkAccessType " + + "emChangeEncodeTypeToCertificate " + + "emChangeEncodeTypeToPassword " + + "emChangeEncodeTypeToNone " + + "emChangeEncodeTypeToCertificatePassword " + + "emChangeStandardRoute " + + "emGetText " + + "emOpenForView " + + "emMoveToStorage " + + "emCreateObject " + + "emChangeVersionHidden " + + "emDeleteVersion " + + "emChangeLifeCycleStage " + + "emApprovingSign " + + "emExport " + + "emContinue " + + "emLockFromEdit " + + "emUnLockForEdit " + + "emLockForServer " + + "emUnlockFromServer " + + "emDelegateAccessRights " + + "emReEncode "; + + // enum TEditorCloseObservType + var TEditorCloseObservType = "ecotFile ecotProcess "; + + // enum TEdmsApplicationAction + var TEdmsApplicationAction = "eaGet eaCopy eaCreate eaCreateStandardRoute "; + + // enum TEDocumentLockType + var TEDocumentLockType = "edltAll edltNothing edltQuery "; + + // enum TEDocumentStepShowMode + var TEDocumentStepShowMode = "essmText essmCard "; + + // enum TEDocumentStepVersionType + var TEDocumentStepVersionType = "esvtLast esvtLastActive esvtSpecified "; + + // enum TEDocumentStorageFunction + var TEDocumentStorageFunction = "edsfExecutive edsfArchive "; + + // enum TEDocumentStorageType + var TEDocumentStorageType = "edstSQLServer edstFile "; + + // enum TEDocumentVersionSourceType + var TEDocumentVersionSourceType = + "edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile "; + + // enum TEDocumentVersionState + var TEDocumentVersionState = "vsDefault vsDesign vsActive vsObsolete "; + + // enum TEncodeType + var TEncodeType = "etNone etCertificate etPassword etCertificatePassword "; + + // enum TExceptionCategory + var TExceptionCategory = "ecException ecWarning ecInformation "; + + // enum TExportedSignaturesType + var TExportedSignaturesType = "estAll estApprovingOnly "; + + // enum TExportedVersionType + var TExportedVersionType = "evtLast evtLastActive evtQuery "; + + // enum TFieldDataType + var TFieldDataType = + "fdtString " + + "fdtNumeric " + + "fdtInteger " + + "fdtDate " + + "fdtText " + + "fdtUnknown " + + "fdtWideString " + + "fdtLargeInteger "; + + // enum TFolderType + var TFolderType = + "ftInbox " + + "ftOutbox " + + "ftFavorites " + + "ftCommonFolder " + + "ftUserFolder " + + "ftComponents " + + "ftQuickLaunch " + + "ftShortcuts " + + "ftSearch "; + + // enum TGridRowHeight + var TGridRowHeight = "grhAuto " + "grhX1 " + "grhX2 " + "grhX3 "; + + // enum THyperlinkType + var THyperlinkType = "hltText " + "hltRTF " + "hltHTML "; + + // enum TImageFileFormat + var TImageFileFormat = + "iffBMP " + + "iffJPEG " + + "iffMultiPageTIFF " + + "iffSinglePageTIFF " + + "iffTIFF " + + "iffPNG "; + + // enum TImageMode + var TImageMode = "im8bGrayscale " + "im24bRGB " + "im1bMonochrome "; + + // enum TImageType + var TImageType = "itBMP " + "itJPEG " + "itWMF " + "itPNG "; + + // enum TInplaceHintKind + var TInplaceHintKind = + "ikhInformation " + "ikhWarning " + "ikhError " + "ikhNoIcon "; + + // enum TISBLContext + var TISBLContext = + "icUnknown " + + "icScript " + + "icFunction " + + "icIntegratedReport " + + "icAnalyticReport " + + "icDataSetEventHandler " + + "icActionHandler " + + "icFormEventHandler " + + "icLookUpEventHandler " + + "icRequisiteChangeEventHandler " + + "icBeforeSearchEventHandler " + + "icRoleCalculation " + + "icSelectRouteEventHandler " + + "icBlockPropertyCalculation " + + "icBlockQueryParamsEventHandler " + + "icChangeSearchResultEventHandler " + + "icBlockEventHandler " + + "icSubTaskInitEventHandler " + + "icEDocDataSetEventHandler " + + "icEDocLookUpEventHandler " + + "icEDocActionHandler " + + "icEDocFormEventHandler " + + "icEDocRequisiteChangeEventHandler " + + "icStructuredConversionRule " + + "icStructuredConversionEventBefore " + + "icStructuredConversionEventAfter " + + "icWizardEventHandler " + + "icWizardFinishEventHandler " + + "icWizardStepEventHandler " + + "icWizardStepFinishEventHandler " + + "icWizardActionEnableEventHandler " + + "icWizardActionExecuteEventHandler " + + "icCreateJobsHandler " + + "icCreateNoticesHandler " + + "icBeforeLookUpEventHandler " + + "icAfterLookUpEventHandler " + + "icTaskAbortEventHandler " + + "icWorkflowBlockActionHandler " + + "icDialogDataSetEventHandler " + + "icDialogActionHandler " + + "icDialogLookUpEventHandler " + + "icDialogRequisiteChangeEventHandler " + + "icDialogFormEventHandler " + + "icDialogValidCloseEventHandler " + + "icBlockFormEventHandler " + + "icTaskFormEventHandler " + + "icReferenceMethod " + + "icEDocMethod " + + "icDialogMethod " + + "icProcessMessageHandler "; + + // enum TItemShow + var TItemShow = "isShow " + "isHide " + "isByUserSettings "; + + // enum TJobKind + var TJobKind = "jkJob " + "jkNotice " + "jkControlJob "; + + // enum TJoinType + var TJoinType = "jtInner " + "jtLeft " + "jtRight " + "jtFull " + "jtCross "; + + // enum TLabelPos + var TLabelPos = "lbpAbove " + "lbpBelow " + "lbpLeft " + "lbpRight "; + + // enum TLicensingType + var TLicensingType = "eltPerConnection " + "eltPerUser "; + + // enum TLifeCycleStageFontColor + var TLifeCycleStageFontColor = + "sfcUndefined " + + "sfcBlack " + + "sfcGreen " + + "sfcRed " + + "sfcBlue " + + "sfcOrange " + + "sfcLilac "; + + // enum TLifeCycleStageFontStyle + var TLifeCycleStageFontStyle = "sfsItalic " + "sfsStrikeout " + "sfsNormal "; + + // enum TLockableDevelopmentComponentType + var TLockableDevelopmentComponentType = + "ldctStandardRoute " + + "ldctWizard " + + "ldctScript " + + "ldctFunction " + + "ldctRouteBlock " + + "ldctIntegratedReport " + + "ldctAnalyticReport " + + "ldctReferenceType " + + "ldctEDocumentType " + + "ldctDialog " + + "ldctServerEvents "; + + // enum TMaxRecordCountRestrictionType + var TMaxRecordCountRestrictionType = + "mrcrtNone " + "mrcrtUser " + "mrcrtMaximal " + "mrcrtCustom "; + + // enum TRangeValueType + var TRangeValueType = + "vtEqual " + "vtGreaterOrEqual " + "vtLessOrEqual " + "vtRange "; + + // enum TRelativeDate + var TRelativeDate = + "rdYesterday " + + "rdToday " + + "rdTomorrow " + + "rdThisWeek " + + "rdThisMonth " + + "rdThisYear " + + "rdNextMonth " + + "rdNextWeek " + + "rdLastWeek " + + "rdLastMonth "; + + // enum TReportDestination + var TReportDestination = "rdWindow " + "rdFile " + "rdPrinter "; + + // enum TReqDataType + var TReqDataType = + "rdtString " + + "rdtNumeric " + + "rdtInteger " + + "rdtDate " + + "rdtReference " + + "rdtAccount " + + "rdtText " + + "rdtPick " + + "rdtUnknown " + + "rdtLargeInteger " + + "rdtDocument "; + + // enum TRequisiteEventType + var TRequisiteEventType = "reOnChange " + "reOnChangeValues "; + + // enum TSBTimeType + var TSBTimeType = "ttGlobal " + "ttLocal " + "ttUser " + "ttSystem "; + + // enum TSearchShowMode + var TSearchShowMode = + "ssmBrowse " + "ssmSelect " + "ssmMultiSelect " + "ssmBrowseModal "; + + // enum TSelectMode + var TSelectMode = "smSelect " + "smLike " + "smCard "; + + // enum TSignatureType + var TSignatureType = "stNone " + "stAuthenticating " + "stApproving "; + + // enum TSignerContentType + var TSignerContentType = "sctString " + "sctStream "; + + // enum TStringsSortType + var TStringsSortType = "sstAnsiSort " + "sstNaturalSort "; + + // enum TStringValueType + var TStringValueType = "svtEqual " + "svtContain "; + + // enum TStructuredObjectAttributeType + var TStructuredObjectAttributeType = + "soatString " + + "soatNumeric " + + "soatInteger " + + "soatDatetime " + + "soatReferenceRecord " + + "soatText " + + "soatPick " + + "soatBoolean " + + "soatEDocument " + + "soatAccount " + + "soatIntegerCollection " + + "soatNumericCollection " + + "soatStringCollection " + + "soatPickCollection " + + "soatDatetimeCollection " + + "soatBooleanCollection " + + "soatReferenceRecordCollection " + + "soatEDocumentCollection " + + "soatAccountCollection " + + "soatContents " + + "soatUnknown "; + + // enum TTaskAbortReason + var TTaskAbortReason = "tarAbortByUser " + "tarAbortByWorkflowException "; + + // enum TTextValueType + var TTextValueType = "tvtAllWords " + "tvtExactPhrase " + "tvtAnyWord "; + + // enum TUserObjectStatus + var TUserObjectStatus = + "usNone " + + "usCompleted " + + "usRedSquare " + + "usBlueSquare " + + "usYellowSquare " + + "usGreenSquare " + + "usOrangeSquare " + + "usPurpleSquare " + + "usFollowUp "; + + // enum TUserType + var TUserType = + "utUnknown " + + "utUser " + + "utDeveloper " + + "utAdministrator " + + "utSystemDeveloper " + + "utDisconnected "; + + // enum TValuesBuildType + var TValuesBuildType = + "btAnd " + "btDetailAnd " + "btOr " + "btNotOr " + "btOnly "; + + // enum TViewMode + var TViewMode = "vmView " + "vmSelect " + "vmNavigation "; + + // enum TViewSelectionMode + var TViewSelectionMode = + "vsmSingle " + "vsmMultiple " + "vsmMultipleCheck " + "vsmNoSelection "; + + // enum TWizardActionType + var TWizardActionType = + "wfatPrevious " + "wfatNext " + "wfatCancel " + "wfatFinish "; + + // enum TWizardFormElementProperty + var TWizardFormElementProperty = + "wfepUndefined " + + "wfepText3 " + + "wfepText6 " + + "wfepText9 " + + "wfepSpinEdit " + + "wfepDropDown " + + "wfepRadioGroup " + + "wfepFlag " + + "wfepText12 " + + "wfepText15 " + + "wfepText18 " + + "wfepText21 " + + "wfepText24 " + + "wfepText27 " + + "wfepText30 " + + "wfepRadioGroupColumn1 " + + "wfepRadioGroupColumn2 " + + "wfepRadioGroupColumn3 "; + + // enum TWizardFormElementType + var TWizardFormElementType = + "wfetQueryParameter " + "wfetText " + "wfetDelimiter " + "wfetLabel "; + + // enum TWizardParamType + var TWizardParamType = + "wptString " + + "wptInteger " + + "wptNumeric " + + "wptBoolean " + + "wptDateTime " + + "wptPick " + + "wptText " + + "wptUser " + + "wptUserList " + + "wptEDocumentInfo " + + "wptEDocumentInfoList " + + "wptReferenceRecordInfo " + + "wptReferenceRecordInfoList " + + "wptFolderInfo " + + "wptTaskInfo " + + "wptContents " + + "wptFileName " + + "wptDate "; + + // enum TWizardStepResult + var TWizardStepResult = + "wsrComplete " + + "wsrGoNext " + + "wsrGoPrevious " + + "wsrCustom " + + "wsrCancel " + + "wsrGoFinal "; + + // enum TWizardStepType + var TWizardStepType = + "wstForm " + + "wstEDocument " + + "wstTaskCard " + + "wstReferenceRecordCard " + + "wstFinal "; + + // enum TWorkAccessType + var TWorkAccessType = "waAll " + "waPerformers " + "waManual "; + + // enum TWorkflowBlockType + var TWorkflowBlockType = + "wsbStart " + + "wsbFinish " + + "wsbNotice " + + "wsbStep " + + "wsbDecision " + + "wsbWait " + + "wsbMonitor " + + "wsbScript " + + "wsbConnector " + + "wsbSubTask " + + "wsbLifeCycleStage " + + "wsbPause "; + + // enum TWorkflowDataType + var TWorkflowDataType = + "wdtInteger " + + "wdtFloat " + + "wdtString " + + "wdtPick " + + "wdtDateTime " + + "wdtBoolean " + + "wdtTask " + + "wdtJob " + + "wdtFolder " + + "wdtEDocument " + + "wdtReferenceRecord " + + "wdtUser " + + "wdtGroup " + + "wdtRole " + + "wdtIntegerCollection " + + "wdtFloatCollection " + + "wdtStringCollection " + + "wdtPickCollection " + + "wdtDateTimeCollection " + + "wdtBooleanCollection " + + "wdtTaskCollection " + + "wdtJobCollection " + + "wdtFolderCollection " + + "wdtEDocumentCollection " + + "wdtReferenceRecordCollection " + + "wdtUserCollection " + + "wdtGroupCollection " + + "wdtRoleCollection " + + "wdtContents " + + "wdtUserList " + + "wdtSearchDescription " + + "wdtDeadLine " + + "wdtPickSet " + + "wdtAccountCollection "; + + // enum TWorkImportance + var TWorkImportance = "wiLow " + "wiNormal " + "wiHigh "; + + // enum TWorkRouteType + var TWorkRouteType = "wrtSoft " + "wrtHard "; + + // enum TWorkState + var TWorkState = + "wsInit " + + "wsRunning " + + "wsDone " + + "wsControlled " + + "wsAborted " + + "wsContinued "; + + // enum TWorkTextBuildingMode + var TWorkTextBuildingMode = + "wtmFull " + "wtmFromCurrent " + "wtmOnlyCurrent "; + + // Перечисления + var ENUMS = + TAccountType + + TActionEnabledMode + + TAddPosition + + TAlignment + + TAreaShowMode + + TCertificateInvalidationReason + + TCertificateType + + TCheckListBoxItemState + + TCloseOnEsc + + TCompType + + TConditionFormat + + TConnectionIntent + + TContentKind + + TControlType + + TCriterionContentType + + TCultureType + + TDataSetEventType + + TDataSetState + + TDateFormatType + + TDateOffsetType + + TDateTimeKind + + TDeaAccessRights + + TDocumentDefaultAction + + TEditMode + + TEditorCloseObservType + + TEdmsApplicationAction + + TEDocumentLockType + + TEDocumentStepShowMode + + TEDocumentStepVersionType + + TEDocumentStorageFunction + + TEDocumentStorageType + + TEDocumentVersionSourceType + + TEDocumentVersionState + + TEncodeType + + TExceptionCategory + + TExportedSignaturesType + + TExportedVersionType + + TFieldDataType + + TFolderType + + TGridRowHeight + + THyperlinkType + + TImageFileFormat + + TImageMode + + TImageType + + TInplaceHintKind + + TISBLContext + + TItemShow + + TJobKind + + TJoinType + + TLabelPos + + TLicensingType + + TLifeCycleStageFontColor + + TLifeCycleStageFontStyle + + TLockableDevelopmentComponentType + + TMaxRecordCountRestrictionType + + TRangeValueType + + TRelativeDate + + TReportDestination + + TReqDataType + + TRequisiteEventType + + TSBTimeType + + TSearchShowMode + + TSelectMode + + TSignatureType + + TSignerContentType + + TStringsSortType + + TStringValueType + + TStructuredObjectAttributeType + + TTaskAbortReason + + TTextValueType + + TUserObjectStatus + + TUserType + + TValuesBuildType + + TViewMode + + TViewSelectionMode + + TWizardActionType + + TWizardFormElementProperty + + TWizardFormElementType + + TWizardParamType + + TWizardStepResult + + TWizardStepType + + TWorkAccessType + + TWorkflowBlockType + + TWorkflowDataType + + TWorkImportance + + TWorkRouteType + + TWorkState + + TWorkTextBuildingMode; + + // Системные функции ==> SYSFUNCTIONS + var system_functions = + "AddSubString " + + "AdjustLineBreaks " + + "AmountInWords " + + "Analysis " + + "ArrayDimCount " + + "ArrayHighBound " + + "ArrayLowBound " + + "ArrayOf " + + "ArrayReDim " + + "Assert " + + "Assigned " + + "BeginOfMonth " + + "BeginOfPeriod " + + "BuildProfilingOperationAnalysis " + + "CallProcedure " + + "CanReadFile " + + "CArrayElement " + + "CDataSetRequisite " + + "ChangeDate " + + "ChangeReferenceDataset " + + "Char " + + "CharPos " + + "CheckParam " + + "CheckParamValue " + + "CompareStrings " + + "ConstantExists " + + "ControlState " + + "ConvertDateStr " + + "Copy " + + "CopyFile " + + "CreateArray " + + "CreateCachedReference " + + "CreateConnection " + + "CreateDialog " + + "CreateDualListDialog " + + "CreateEditor " + + "CreateException " + + "CreateFile " + + "CreateFolderDialog " + + "CreateInputDialog " + + "CreateLinkFile " + + "CreateList " + + "CreateLock " + + "CreateMemoryDataSet " + + "CreateObject " + + "CreateOpenDialog " + + "CreateProgress " + + "CreateQuery " + + "CreateReference " + + "CreateReport " + + "CreateSaveDialog " + + "CreateScript " + + "CreateSQLPivotFunction " + + "CreateStringList " + + "CreateTreeListSelectDialog " + + "CSelectSQL " + + "CSQL " + + "CSubString " + + "CurrentUserID " + + "CurrentUserName " + + "CurrentVersion " + + "DataSetLocateEx " + + "DateDiff " + + "DateTimeDiff " + + "DateToStr " + + "DayOfWeek " + + "DeleteFile " + + "DirectoryExists " + + "DisableCheckAccessRights " + + "DisableCheckFullShowingRestriction " + + "DisableMassTaskSendingRestrictions " + + "DropTable " + + "DupeString " + + "EditText " + + "EnableCheckAccessRights " + + "EnableCheckFullShowingRestriction " + + "EnableMassTaskSendingRestrictions " + + "EndOfMonth " + + "EndOfPeriod " + + "ExceptionExists " + + "ExceptionsOff " + + "ExceptionsOn " + + "Execute " + + "ExecuteProcess " + + "Exit " + + "ExpandEnvironmentVariables " + + "ExtractFileDrive " + + "ExtractFileExt " + + "ExtractFileName " + + "ExtractFilePath " + + "ExtractParams " + + "FileExists " + + "FileSize " + + "FindFile " + + "FindSubString " + + "FirmContext " + + "ForceDirectories " + + "Format " + + "FormatDate " + + "FormatNumeric " + + "FormatSQLDate " + + "FormatString " + + "FreeException " + + "GetComponent " + + "GetComponentLaunchParam " + + "GetConstant " + + "GetLastException " + + "GetReferenceRecord " + + "GetRefTypeByRefID " + + "GetTableID " + + "GetTempFolder " + + "IfThen " + + "In " + + "IndexOf " + + "InputDialog " + + "InputDialogEx " + + "InteractiveMode " + + "IsFileLocked " + + "IsGraphicFile " + + "IsNumeric " + + "Length " + + "LoadString " + + "LoadStringFmt " + + "LocalTimeToUTC " + + "LowerCase " + + "Max " + + "MessageBox " + + "MessageBoxEx " + + "MimeDecodeBinary " + + "MimeDecodeString " + + "MimeEncodeBinary " + + "MimeEncodeString " + + "Min " + + "MoneyInWords " + + "MoveFile " + + "NewID " + + "Now " + + "OpenFile " + + "Ord " + + "Precision " + + "Raise " + + "ReadCertificateFromFile " + + "ReadFile " + + "ReferenceCodeByID " + + "ReferenceNumber " + + "ReferenceRequisiteMode " + + "ReferenceRequisiteValue " + + "RegionDateSettings " + + "RegionNumberSettings " + + "RegionTimeSettings " + + "RegRead " + + "RegWrite " + + "RenameFile " + + "Replace " + + "Round " + + "SelectServerCode " + + "SelectSQL " + + "ServerDateTime " + + "SetConstant " + + "SetManagedFolderFieldsState " + + "ShowConstantsInputDialog " + + "ShowMessage " + + "Sleep " + + "Split " + + "SQL " + + "SQL2XLSTAB " + + "SQLProfilingSendReport " + + "StrToDate " + + "SubString " + + "SubStringCount " + + "SystemSetting " + + "Time " + + "TimeDiff " + + "Today " + + "Transliterate " + + "Trim " + + "UpperCase " + + "UserStatus " + + "UTCToLocalTime " + + "ValidateXML " + + "VarIsClear " + + "VarIsEmpty " + + "VarIsNull " + + "WorkTimeDiff " + + "WriteFile " + + "WriteFileEx " + + "WriteObjectHistory " + + "Анализ " + + "БазаДанных " + + "БлокЕсть " + + "БлокЕстьРасш " + + "БлокИнфо " + + "БлокСнять " + + "БлокСнятьРасш " + + "БлокУстановить " + + "Ввод " + + "ВводМеню " + + "ВедС " + + "ВедСпр " + + "ВерхняяГраницаМассива " + + "ВнешПрогр " + + "Восст " + + "ВременнаяПапка " + + "Время " + + "ВыборSQL " + + "ВыбратьЗапись " + + "ВыделитьСтр " + + "Вызвать " + + "Выполнить " + + "ВыпПрогр " + + "ГрафическийФайл " + + "ГруппаДополнительно " + + "ДатаВремяСерв " + + "ДеньНедели " + + "ДиалогДаНет " + + "ДлинаСтр " + + "ДобПодстр " + + "ЕПусто " + + "ЕслиТо " + + "ЕЧисло " + + "ЗамПодстр " + + "ЗаписьСправочника " + + "ЗначПоляСпр " + + "ИДТипСпр " + + "ИзвлечьДиск " + + "ИзвлечьИмяФайла " + + "ИзвлечьПуть " + + "ИзвлечьРасширение " + + "ИзмДат " + + "ИзменитьРазмерМассива " + + "ИзмеренийМассива " + + "ИмяОрг " + + "ИмяПоляСпр " + + "Индекс " + + "ИндикаторЗакрыть " + + "ИндикаторОткрыть " + + "ИндикаторШаг " + + "ИнтерактивныйРежим " + + "ИтогТблСпр " + + "КодВидВедСпр " + + "КодВидСпрПоИД " + + "КодПоAnalit " + + "КодСимвола " + + "КодСпр " + + "КолПодстр " + + "КолПроп " + + "КонМес " + + "Конст " + + "КонстЕсть " + + "КонстЗнач " + + "КонТран " + + "КопироватьФайл " + + "КопияСтр " + + "КПериод " + + "КСтрТблСпр " + + "Макс " + + "МаксСтрТблСпр " + + "Массив " + + "Меню " + + "МенюРасш " + + "Мин " + + "НаборДанныхНайтиРасш " + + "НаимВидСпр " + + "НаимПоAnalit " + + "НаимСпр " + + "НастроитьПереводыСтрок " + + "НачМес " + + "НачТран " + + "НижняяГраницаМассива " + + "НомерСпр " + + "НПериод " + + "Окно " + + "Окр " + + "Окружение " + + "ОтлИнфДобавить " + + "ОтлИнфУдалить " + + "Отчет " + + "ОтчетАнал " + + "ОтчетИнт " + + "ПапкаСуществует " + + "Пауза " + + "ПВыборSQL " + + "ПереименоватьФайл " + + "Переменные " + + "ПереместитьФайл " + + "Подстр " + + "ПоискПодстр " + + "ПоискСтр " + + "ПолучитьИДТаблицы " + + "ПользовательДополнительно " + + "ПользовательИД " + + "ПользовательИмя " + + "ПользовательСтатус " + + "Прервать " + + "ПроверитьПараметр " + + "ПроверитьПараметрЗнач " + + "ПроверитьУсловие " + + "РазбСтр " + + "РазнВремя " + + "РазнДат " + + "РазнДатаВремя " + + "РазнРабВремя " + + "РегУстВрем " + + "РегУстДат " + + "РегУстЧсл " + + "РедТекст " + + "РеестрЗапись " + + "РеестрСписокИменПарам " + + "РеестрЧтение " + + "РеквСпр " + + "РеквСпрПр " + + "Сегодня " + + "Сейчас " + + "Сервер " + + "СерверПроцессИД " + + "СертификатФайлСчитать " + + "СжПроб " + + "Символ " + + "СистемаДиректумКод " + + "СистемаИнформация " + + "СистемаКод " + + "Содержит " + + "СоединениеЗакрыть " + + "СоединениеОткрыть " + + "СоздатьДиалог " + + "СоздатьДиалогВыбораИзДвухСписков " + + "СоздатьДиалогВыбораПапки " + + "СоздатьДиалогОткрытияФайла " + + "СоздатьДиалогСохраненияФайла " + + "СоздатьЗапрос " + + "СоздатьИндикатор " + + "СоздатьИсключение " + + "СоздатьКэшированныйСправочник " + + "СоздатьМассив " + + "СоздатьНаборДанных " + + "СоздатьОбъект " + + "СоздатьОтчет " + + "СоздатьПапку " + + "СоздатьРедактор " + + "СоздатьСоединение " + + "СоздатьСписок " + + "СоздатьСписокСтрок " + + "СоздатьСправочник " + + "СоздатьСценарий " + + "СоздСпр " + + "СостСпр " + + "Сохр " + + "СохрСпр " + + "СписокСистем " + + "Спр " + + "Справочник " + + "СпрБлокЕсть " + + "СпрБлокСнять " + + "СпрБлокСнятьРасш " + + "СпрБлокУстановить " + + "СпрИзмНабДан " + + "СпрКод " + + "СпрНомер " + + "СпрОбновить " + + "СпрОткрыть " + + "СпрОтменить " + + "СпрПарам " + + "СпрПолеЗнач " + + "СпрПолеИмя " + + "СпрРекв " + + "СпрРеквВведЗн " + + "СпрРеквНовые " + + "СпрРеквПр " + + "СпрРеквПредЗн " + + "СпрРеквРежим " + + "СпрРеквТипТекст " + + "СпрСоздать " + + "СпрСост " + + "СпрСохранить " + + "СпрТблИтог " + + "СпрТблСтр " + + "СпрТблСтрКол " + + "СпрТблСтрМакс " + + "СпрТблСтрМин " + + "СпрТблСтрПред " + + "СпрТблСтрСлед " + + "СпрТблСтрСозд " + + "СпрТблСтрУд " + + "СпрТекПредст " + + "СпрУдалить " + + "СравнитьСтр " + + "СтрВерхРегистр " + + "СтрНижнРегистр " + + "СтрТблСпр " + + "СумПроп " + + "Сценарий " + + "СценарийПарам " + + "ТекВерсия " + + "ТекОрг " + + "Точн " + + "Тран " + + "Транслитерация " + + "УдалитьТаблицу " + + "УдалитьФайл " + + "УдСпр " + + "УдСтрТблСпр " + + "Уст " + + "УстановкиКонстант " + + "ФайлАтрибутСчитать " + + "ФайлАтрибутУстановить " + + "ФайлВремя " + + "ФайлВремяУстановить " + + "ФайлВыбрать " + + "ФайлЗанят " + + "ФайлЗаписать " + + "ФайлИскать " + + "ФайлКопировать " + + "ФайлМожноЧитать " + + "ФайлОткрыть " + + "ФайлПереименовать " + + "ФайлПерекодировать " + + "ФайлПереместить " + + "ФайлПросмотреть " + + "ФайлРазмер " + + "ФайлСоздать " + + "ФайлСсылкаСоздать " + + "ФайлСуществует " + + "ФайлСчитать " + + "ФайлУдалить " + + "ФмтSQLДат " + + "ФмтДат " + + "ФмтСтр " + + "ФмтЧсл " + + "Формат " + + "ЦМассивЭлемент " + + "ЦНаборДанныхРеквизит " + + "ЦПодстр "; + + // Предопределенные переменные ==> built_in + var predefined_variables = + "AltState " + + "Application " + + "CallType " + + "ComponentTokens " + + "CreatedJobs " + + "CreatedNotices " + + "ControlState " + + "DialogResult " + + "Dialogs " + + "EDocuments " + + "EDocumentVersionSource " + + "Folders " + + "GlobalIDs " + + "Job " + + "Jobs " + + "InputValue " + + "LookUpReference " + + "LookUpRequisiteNames " + + "LookUpSearch " + + "Object " + + "ParentComponent " + + "Processes " + + "References " + + "Requisite " + + "ReportName " + + "Reports " + + "Result " + + "Scripts " + + "Searches " + + "SelectedAttachments " + + "SelectedItems " + + "SelectMode " + + "Sender " + + "ServerEvents " + + "ServiceFactory " + + "ShiftState " + + "SubTask " + + "SystemDialogs " + + "Tasks " + + "Wizard " + + "Wizards " + + "Work " + + "ВызовСпособ " + + "ИмяОтчета " + + "РеквЗнач "; + + // Интерфейсы ==> type + var interfaces = + "IApplication " + + "IAccessRights " + + "IAccountRepository " + + "IAccountSelectionRestrictions " + + "IAction " + + "IActionList " + + "IAdministrationHistoryDescription " + + "IAnchors " + + "IApplication " + + "IArchiveInfo " + + "IAttachment " + + "IAttachmentList " + + "ICheckListBox " + + "ICheckPointedList " + + "IColumn " + + "IComponent " + + "IComponentDescription " + + "IComponentToken " + + "IComponentTokenFactory " + + "IComponentTokenInfo " + + "ICompRecordInfo " + + "IConnection " + + "IContents " + + "IControl " + + "IControlJob " + + "IControlJobInfo " + + "IControlList " + + "ICrypto " + + "ICrypto2 " + + "ICustomJob " + + "ICustomJobInfo " + + "ICustomListBox " + + "ICustomObjectWizardStep " + + "ICustomWork " + + "ICustomWorkInfo " + + "IDataSet " + + "IDataSetAccessInfo " + + "IDataSigner " + + "IDateCriterion " + + "IDateRequisite " + + "IDateRequisiteDescription " + + "IDateValue " + + "IDeaAccessRights " + + "IDeaObjectInfo " + + "IDevelopmentComponentLock " + + "IDialog " + + "IDialogFactory " + + "IDialogPickRequisiteItems " + + "IDialogsFactory " + + "IDICSFactory " + + "IDocRequisite " + + "IDocumentInfo " + + "IDualListDialog " + + "IECertificate " + + "IECertificateInfo " + + "IECertificates " + + "IEditControl " + + "IEditorForm " + + "IEdmsExplorer " + + "IEdmsObject " + + "IEdmsObjectDescription " + + "IEdmsObjectFactory " + + "IEdmsObjectInfo " + + "IEDocument " + + "IEDocumentAccessRights " + + "IEDocumentDescription " + + "IEDocumentEditor " + + "IEDocumentFactory " + + "IEDocumentInfo " + + "IEDocumentStorage " + + "IEDocumentVersion " + + "IEDocumentVersionListDialog " + + "IEDocumentVersionSource " + + "IEDocumentWizardStep " + + "IEDocVerSignature " + + "IEDocVersionState " + + "IEnabledMode " + + "IEncodeProvider " + + "IEncrypter " + + "IEvent " + + "IEventList " + + "IException " + + "IExternalEvents " + + "IExternalHandler " + + "IFactory " + + "IField " + + "IFileDialog " + + "IFolder " + + "IFolderDescription " + + "IFolderDialog " + + "IFolderFactory " + + "IFolderInfo " + + "IForEach " + + "IForm " + + "IFormTitle " + + "IFormWizardStep " + + "IGlobalIDFactory " + + "IGlobalIDInfo " + + "IGrid " + + "IHasher " + + "IHistoryDescription " + + "IHyperLinkControl " + + "IImageButton " + + "IImageControl " + + "IInnerPanel " + + "IInplaceHint " + + "IIntegerCriterion " + + "IIntegerList " + + "IIntegerRequisite " + + "IIntegerValue " + + "IISBLEditorForm " + + "IJob " + + "IJobDescription " + + "IJobFactory " + + "IJobForm " + + "IJobInfo " + + "ILabelControl " + + "ILargeIntegerCriterion " + + "ILargeIntegerRequisite " + + "ILargeIntegerValue " + + "ILicenseInfo " + + "ILifeCycleStage " + + "IList " + + "IListBox " + + "ILocalIDInfo " + + "ILocalization " + + "ILock " + + "IMemoryDataSet " + + "IMessagingFactory " + + "IMetadataRepository " + + "INotice " + + "INoticeInfo " + + "INumericCriterion " + + "INumericRequisite " + + "INumericValue " + + "IObject " + + "IObjectDescription " + + "IObjectImporter " + + "IObjectInfo " + + "IObserver " + + "IPanelGroup " + + "IPickCriterion " + + "IPickProperty " + + "IPickRequisite " + + "IPickRequisiteDescription " + + "IPickRequisiteItem " + + "IPickRequisiteItems " + + "IPickValue " + + "IPrivilege " + + "IPrivilegeList " + + "IProcess " + + "IProcessFactory " + + "IProcessMessage " + + "IProgress " + + "IProperty " + + "IPropertyChangeEvent " + + "IQuery " + + "IReference " + + "IReferenceCriterion " + + "IReferenceEnabledMode " + + "IReferenceFactory " + + "IReferenceHistoryDescription " + + "IReferenceInfo " + + "IReferenceRecordCardWizardStep " + + "IReferenceRequisiteDescription " + + "IReferencesFactory " + + "IReferenceValue " + + "IRefRequisite " + + "IReport " + + "IReportFactory " + + "IRequisite " + + "IRequisiteDescription " + + "IRequisiteDescriptionList " + + "IRequisiteFactory " + + "IRichEdit " + + "IRouteStep " + + "IRule " + + "IRuleList " + + "ISchemeBlock " + + "IScript " + + "IScriptFactory " + + "ISearchCriteria " + + "ISearchCriterion " + + "ISearchDescription " + + "ISearchFactory " + + "ISearchFolderInfo " + + "ISearchForObjectDescription " + + "ISearchResultRestrictions " + + "ISecuredContext " + + "ISelectDialog " + + "IServerEvent " + + "IServerEventFactory " + + "IServiceDialog " + + "IServiceFactory " + + "ISignature " + + "ISignProvider " + + "ISignProvider2 " + + "ISignProvider3 " + + "ISimpleCriterion " + + "IStringCriterion " + + "IStringList " + + "IStringRequisite " + + "IStringRequisiteDescription " + + "IStringValue " + + "ISystemDialogsFactory " + + "ISystemInfo " + + "ITabSheet " + + "ITask " + + "ITaskAbortReasonInfo " + + "ITaskCardWizardStep " + + "ITaskDescription " + + "ITaskFactory " + + "ITaskInfo " + + "ITaskRoute " + + "ITextCriterion " + + "ITextRequisite " + + "ITextValue " + + "ITreeListSelectDialog " + + "IUser " + + "IUserList " + + "IValue " + + "IView " + + "IWebBrowserControl " + + "IWizard " + + "IWizardAction " + + "IWizardFactory " + + "IWizardFormElement " + + "IWizardParam " + + "IWizardPickParam " + + "IWizardReferenceParam " + + "IWizardStep " + + "IWorkAccessRights " + + "IWorkDescription " + + "IWorkflowAskableParam " + + "IWorkflowAskableParams " + + "IWorkflowBlock " + + "IWorkflowBlockResult " + + "IWorkflowEnabledMode " + + "IWorkflowParam " + + "IWorkflowPickParam " + + "IWorkflowReferenceParam " + + "IWorkState " + + "IWorkTreeCustomNode " + + "IWorkTreeJobNode " + + "IWorkTreeTaskNode " + + "IXMLEditorForm " + + "SBCrypto "; + + // built_in : встроенные или библиотечные объекты (константы, перечисления) + var BUILTIN = CONSTANTS + ENUMS; + + // class: встроенные наборы значений, системные объекты, фабрики + var CLASS = predefined_variables; + + // literal : примитивные типы + var LITERAL = "null true false nil "; + + // number : числа + var NUMBERS = { + className: "number", + begin: hljs.NUMBER_RE, + relevance: 0, + }; + + // string : строки + var STRINGS = { + className: "string", + variants: [{ begin: '"', end: '"' }, { begin: "'", end: "'" }], + }; + + // Токены + var DOCTAGS = { + className: "doctag", + begin: "\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b", + relevance: 0, + }; + + // Однострочный комментарий + var ISBL_LINE_COMMENT_MODE = { + className: "comment", + begin: "//", + end: "$", + relevance: 0, + contains: [hljs.PHRASAL_WORDS_MODE, DOCTAGS], + }; + + // Многострочный комментарий + var ISBL_BLOCK_COMMENT_MODE = { + className: "comment", + begin: "/\\*", + end: "\\*/", + relevance: 0, + contains: [hljs.PHRASAL_WORDS_MODE, DOCTAGS], + }; + + // comment : комментарии + var COMMENTS = { + variants: [ISBL_LINE_COMMENT_MODE, ISBL_BLOCK_COMMENT_MODE], + }; + + // keywords : ключевые слова + var KEYWORDS = { + $pattern: UNDERSCORE_IDENT_RE, + keyword: KEYWORD, + built_in: BUILTIN, + class: CLASS, + literal: LITERAL, + }; + + // methods : методы + var METHODS = { + begin: "\\.\\s*" + hljs.UNDERSCORE_IDENT_RE, + keywords: KEYWORDS, + relevance: 0, + }; + + // type : встроенные типы + var TYPES = { + className: "type", + begin: ":[ \\t]*(" + interfaces.trim().replace(/\s/g, "|") + ")", + end: "[ \\t]*=", + excludeEnd: true, + }; + + // variables : переменные + var VARIABLES = { + className: "variable", + keywords: KEYWORDS, + begin: UNDERSCORE_IDENT_RE, + relevance: 0, + contains: [TYPES, METHODS], + }; + + // Имена функций + var FUNCTION_TITLE = FUNCTION_NAME_IDENT_RE + "\\("; + + var TITLE_MODE = { + className: "title", + keywords: { + $pattern: UNDERSCORE_IDENT_RE, + built_in: system_functions, + }, + begin: FUNCTION_TITLE, + end: "\\(", + returnBegin: true, + excludeEnd: true, + }; + + // function : функции + var FUNCTIONS = { + className: "function", + begin: FUNCTION_TITLE, + end: "\\)$", + returnBegin: true, + keywords: KEYWORDS, + illegal: "[\\[\\]\\|\\$\\?%,~#@]", + contains: [TITLE_MODE, METHODS, VARIABLES, STRINGS, NUMBERS, COMMENTS], + }; + + return { + name: 'ISBL', + aliases: ["isbl"], + case_insensitive: true, + keywords: KEYWORDS, + illegal: "\\$|\\?|%|,|;$|~|#|@|</", + contains: [ + FUNCTIONS, + TYPES, + METHODS, + VARIABLES, + STRINGS, + NUMBERS, + COMMENTS, + ], + }; +} + +module.exports = isbl; diff --git a/node_modules/highlight.js/lib/languages/java.js b/node_modules/highlight.js/lib/languages/java.js @@ -0,0 +1,192 @@ +/** + * @param {string} value + * @returns {RegExp} + * */ + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function optional(re) { + return concat('(', re, ')?'); +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/** + * Any of the passed expresssions may match + * + * Creates a huge this | this | that | that match + * @param {(RegExp | string)[] } args + * @returns {string} + */ +function either(...args) { + const joined = '(' + args.map((x) => source(x)).join("|") + ")"; + return joined; +} + +/* +Language: Java +Author: Vsevolod Solovyov <vsevolod.solovyov@gmail.com> +Category: common, enterprise +Website: https://www.java.com/ +*/ + +function java(hljs) { + var JAVA_IDENT_RE = '[\u00C0-\u02B8a-zA-Z_$][\u00C0-\u02B8a-zA-Z_$0-9]*'; + var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\s*,\\s*' + JAVA_IDENT_RE + ')*>)?'; + var KEYWORDS = 'false synchronized int abstract float private char boolean var static null if const ' + + 'for true while long strictfp finally protected import native final void ' + + 'enum else break transient catch instanceof byte super volatile case assert short ' + + 'package default double public try this switch continue throws protected public private ' + + 'module requires exports do'; + + var ANNOTATION = { + className: 'meta', + begin: '@' + JAVA_IDENT_RE, + contains: [ + { + begin: /\(/, + end: /\)/, + contains: ["self"] // allow nested () inside our annotation + }, + ] + }; + /** + * A given sequence, possibly with underscores + * @type {(s: string | RegExp) => string} */ + var SEQUENCE_ALLOWING_UNDERSCORES = (seq) => concat('[', seq, ']+([', seq, '_]*[', seq, ']+)?'); + var JAVA_NUMBER_MODE = { + className: 'number', + variants: [ + { begin: `\\b(0[bB]${SEQUENCE_ALLOWING_UNDERSCORES('01')})[lL]?` }, // binary + { begin: `\\b(0${SEQUENCE_ALLOWING_UNDERSCORES('0-7')})[dDfFlL]?` }, // octal + { + begin: concat( + /\b0[xX]/, + either( + concat(SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9'), /\./, SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9')), + concat(SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9'), /\.?/), + concat(/\./, SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9')) + ), + /([pP][+-]?(\d+))?/, + /[fFdDlL]?/ // decimal & fp mixed for simplicity + ) + }, + // scientific notation + { begin: concat( + /\b/, + either( + concat(/\d*\./, SEQUENCE_ALLOWING_UNDERSCORES("\\d")), // .3, 3.3, 3.3_3 + SEQUENCE_ALLOWING_UNDERSCORES("\\d") // 3, 3_3 + ), + /[eE][+-]?[\d]+[dDfF]?/) + }, + // decimal & fp mixed for simplicity + { begin: concat( + /\b/, + SEQUENCE_ALLOWING_UNDERSCORES(/\d/), + optional(/\.?/), + optional(SEQUENCE_ALLOWING_UNDERSCORES(/\d/)), + /[dDfFlL]?/) + } + ], + relevance: 0 + }; + + return { + name: 'Java', + aliases: ['jsp'], + keywords: KEYWORDS, + illegal: /<\/|#/, + contains: [ + hljs.COMMENT( + '/\\*\\*', + '\\*/', + { + relevance: 0, + contains: [ + { + // eat up @'s in emails to prevent them to be recognized as doctags + begin: /\w+@/, relevance: 0 + }, + { + className: 'doctag', + begin: '@[A-Za-z]+' + } + ] + } + ), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'class', + beginKeywords: 'class interface enum', end: /[{;=]/, excludeEnd: true, + keywords: 'class interface enum', + illegal: /[:"\[\]]/, + contains: [ + { beginKeywords: 'extends implements' }, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + // Expression keywords prevent 'keyword Name(...)' from being + // recognized as a function definition + beginKeywords: 'new throw return else', + relevance: 0 + }, + { + className: 'function', + begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/, + excludeEnd: true, + keywords: KEYWORDS, + contains: [ + { + begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, + relevance: 0, + contains: [hljs.UNDERSCORE_TITLE_MODE] + }, + { + className: 'params', + begin: /\(/, end: /\)/, + keywords: KEYWORDS, + relevance: 0, + contains: [ + ANNOTATION, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + JAVA_NUMBER_MODE, + ANNOTATION + ] + }; +} + +module.exports = java; diff --git a/node_modules/highlight.js/lib/languages/javascript.js b/node_modules/highlight.js/lib/languages/javascript.js @@ -0,0 +1,454 @@ +const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; +const KEYWORDS = [ + "as", // for exports + "in", + "of", + "if", + "for", + "while", + "finally", + "var", + "new", + "function", + "do", + "return", + "void", + "else", + "break", + "catch", + "instanceof", + "with", + "throw", + "case", + "default", + "try", + "switch", + "continue", + "typeof", + "delete", + "let", + "yield", + "const", + "class", + // JS handles these with a special rule + // "get", + // "set", + "debugger", + "async", + "await", + "static", + "import", + "from", + "export", + "extends" +]; +const LITERALS = [ + "true", + "false", + "null", + "undefined", + "NaN", + "Infinity" +]; + +const TYPES = [ + "Intl", + "DataView", + "Number", + "Math", + "Date", + "String", + "RegExp", + "Object", + "Function", + "Boolean", + "Error", + "Symbol", + "Set", + "Map", + "WeakSet", + "WeakMap", + "Proxy", + "Reflect", + "JSON", + "Promise", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Float32Array", + "Array", + "Uint8Array", + "Uint8ClampedArray", + "ArrayBuffer" +]; + +const ERROR_TYPES = [ + "EvalError", + "InternalError", + "RangeError", + "ReferenceError", + "SyntaxError", + "TypeError", + "URIError" +]; + +const BUILT_IN_GLOBALS = [ + "setInterval", + "setTimeout", + "clearInterval", + "clearTimeout", + + "require", + "exports", + + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "unescape" +]; + +const BUILT_IN_VARIABLES = [ + "arguments", + "this", + "super", + "console", + "window", + "document", + "localStorage", + "module", + "global" // Node.js +]; + +const BUILT_INS = [].concat( + BUILT_IN_GLOBALS, + BUILT_IN_VARIABLES, + TYPES, + ERROR_TYPES +); + +/** + * @param {string} value + * @returns {RegExp} + * */ + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + + return re.source; +} + +/** + * @param {RegExp | string } re + * @returns {string} + */ +function lookahead(re) { + return concat('(?=', re, ')'); +} + +/** + * @param {...(RegExp | string) } args + * @returns {string} + */ +function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; +} + +/* +Language: JavaScript +Description: JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. +Category: common, scripting +Website: https://developer.mozilla.org/en-US/docs/Web/JavaScript +*/ + +function javascript(hljs) { + var IDENT_RE$1 = IDENT_RE; + var FRAGMENT = { + begin: '<>', + end: '</>' + }; + var XML_TAG = { + begin: /<[A-Za-z0-9\\._:-]+/, + end: /\/[A-Za-z0-9\\._:-]+>|\/>/ + }; + var KEYWORDS$1 = { + $pattern: IDENT_RE, + keyword: KEYWORDS.join(" "), + literal: LITERALS.join(" "), + built_in: BUILT_INS.join(" ") + }; + var NUMBER = { + className: 'number', + variants: [ + { begin: '\\b(0[bB][01]+)n?' }, + { begin: '\\b(0[oO][0-7]+)n?' }, + { begin: hljs.C_NUMBER_RE + 'n?' } + ], + relevance: 0 + }; + var SUBST = { + className: 'subst', + begin: '\\$\\{', end: '\\}', + keywords: KEYWORDS$1, + contains: [] // defined later + }; + var HTML_TEMPLATE = { + begin: 'html`', end: '', + starts: { + end: '`', returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: 'xml', + } + }; + var CSS_TEMPLATE = { + begin: 'css`', end: '', + starts: { + end: '`', returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: 'css', + } + }; + var TEMPLATE_STRING = { + className: 'string', + begin: '`', end: '`', + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ] + }; + SUBST.contains = [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + TEMPLATE_STRING, + NUMBER, + hljs.REGEXP_MODE + ]; + var PARAMS_CONTAINS = SUBST.contains.concat([ + // eat recursive parens in sub expressions + { begin: /\(/, end: /\)/, + contains: ["self"].concat(SUBST.contains, [hljs.C_BLOCK_COMMENT_MODE, hljs.C_LINE_COMMENT_MODE]) + }, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_LINE_COMMENT_MODE + ]); + var PARAMS = { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + contains: PARAMS_CONTAINS + }; + + return { + name: 'JavaScript', + aliases: ['js', 'jsx', 'mjs', 'cjs'], + keywords: KEYWORDS$1, + contains: [ + hljs.SHEBANG({ + binary: "node", + relevance: 5 + }), + { + className: 'meta', + relevance: 10, + begin: /^\s*['"]use (strict|asm)['"]/ + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + TEMPLATE_STRING, + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT( + '/\\*\\*', + '\\*/', + { + relevance : 0, + contains : [ + { + className : 'doctag', + begin : '@[A-Za-z]+', + contains : [ + { + className: 'type', + begin: '\\{', + end: '\\}', + relevance: 0 + }, + { + className: 'variable', + begin: IDENT_RE$1 + '(?=\\s*(-)|$)', + endsParent: true, + relevance: 0 + }, + // eat spaces (not newlines) so we can find + // types or variables + { + begin: /(?=[^\n])\s/, + relevance: 0 + }, + ] + } + ] + } + ), + hljs.C_BLOCK_COMMENT_MODE, + NUMBER, + { // object attr container + begin: concat(/[{,\n]\s*/, + // we need to look ahead to make sure that we actually have an + // attribute coming up so we don't steal a comma from a potential + // "value" container + // + // NOTE: this might not work how you think. We don't actually always + // enter this mode and stay. Instead it might merely match `, + // <comments up next>` and then immediately end after the , because it + // fails to find any actual attrs. But this still does the job because + // it prevents the value contain rule from grabbing this instead and + // prevening this rule from firing when we actually DO have keys. + lookahead(concat( + // we also need to allow for multiple possible comments inbetween + // the first key:value pairing + /(((\/\/.*$)|(\/\*(.|\n)*\*\/))\s*)*/, + IDENT_RE$1 + '\\s*:'))), + relevance: 0, + contains: [ + { + className: 'attr', + begin: IDENT_RE$1 + lookahead('\\s*:'), + relevance: 0, + }, + ] + }, + { // "value" container + begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*', + keywords: 'return throw case', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.REGEXP_MODE, + { + className: 'function', + // we have to count the parens to make sure we actually have the + // correct bounding ( ) before the =>. There could be any number of + // sub-expressions inside also surrounded by parens. + begin: '(\\([^(]*' + + '(\\([^(]*' + + '(\\([^(]*' + + '\\))?' + + '\\))?' + + '\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>', returnBegin: true, + end: '\\s*=>', + contains: [ + { + className: 'params', + variants: [ + { + begin: hljs.UNDERSCORE_IDENT_RE + }, + { + className: null, + begin: /\(\s*\)/, + skip: true + }, + { + begin: /\(/, end: /\)/, + excludeBegin: true, excludeEnd: true, + keywords: KEYWORDS$1, + contains: PARAMS_CONTAINS + } + ] + } + ] + }, + { // could be a comma delimited list of params to a function call + begin: /,/, relevance: 0, + }, + { + className: '', + begin: /\s/, + end: /\s*/, + skip: true, + }, + { // JSX + variants: [ + { begin: FRAGMENT.begin, end: FRAGMENT.end }, + { begin: XML_TAG.begin, end: XML_TAG.end } + ], + subLanguage: 'xml', + contains: [ + { + begin: XML_TAG.begin, end: XML_TAG.end, skip: true, + contains: ['self'] + } + ] + }, + ], + relevance: 0 + }, + { + className: 'function', + beginKeywords: 'function', end: /\{/, excludeEnd: true, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE$1}), + PARAMS + ], + illegal: /\[|%/ + }, + { + begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` + }, + + hljs.METHOD_GUARD, + { // ES6 class + className: 'class', + beginKeywords: 'class', end: /[{;=]/, excludeEnd: true, + illegal: /[:"\[\]]/, + contains: [ + {beginKeywords: 'extends'}, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + beginKeywords: 'constructor', end: /\{/, excludeEnd: true + }, + { + begin: '(get|set)\\s+(?=' + IDENT_RE$1 + '\\()', + end: /{/, + keywords: "get set", + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE$1}), + { begin: /\(\)/ }, // eat to avoid empty params + PARAMS + ] + + } + ], + illegal: /#(?!!)/ + }; +} + +module.exports = javascript; diff --git a/node_modules/highlight.js/lib/languages/javascript.old.js b/node_modules/highlight.js/lib/languages/javascript.old.js @@ -0,0 +1,8 @@ +/* eslint-disable no-unreachable */ + +function javascript_old(hljs) { + + return hljs.requireLanguage("typescript").rawDefinition(); +} + +module.exports = javascript_old; diff --git a/node_modules/highlight.js/lib/languages/jboss-cli.js b/node_modules/highlight.js/lib/languages/jboss-cli.js @@ -0,0 +1,57 @@ +/* + Language: JBoss CLI + Author: Raphaël Parrëe <rparree@edc4it.com> + Description: language definition jboss cli + Website: https://docs.jboss.org/author/display/WFLY/Command+Line+Interface + Category: config + */ + +function jbossCli (hljs) { + var PARAM = { + begin: /[\w-]+ *=/, returnBegin: true, + relevance: 0, + contains: [{className: 'attr', begin: /[\w-]+/}] + }; + var PARAMSBLOCK = { + className: 'params', + begin: /\(/, + end: /\)/, + contains: [PARAM], + relevance : 0 + }; + var OPERATION = { + className: 'function', + begin: /:[\w\-.]+/, + relevance: 0 + }; + var PATH = { + className: 'string', + begin: /\B(([\/.])[\w\-.\/=]+)+/, + }; + var COMMAND_PARAMS = { + className: 'params', + begin: /--[\w\-=\/]+/, + }; + return { + name: 'JBoss CLI', + aliases: ['wildfly-cli'], + keywords: { + $pattern: '[a-z\-]+', + keyword: 'alias batch cd clear command connect connection-factory connection-info data-source deploy ' + + 'deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls ' + + 'patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias ' + + 'undeploy unset version xa-data-source', // module + literal: 'true false' + }, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + COMMAND_PARAMS, + OPERATION, + PATH, + PARAMSBLOCK + ] + } +} + +module.exports = jbossCli; diff --git a/node_modules/highlight.js/lib/languages/json.js b/node_modules/highlight.js/lib/languages/json.js @@ -0,0 +1,54 @@ +/* +Language: JSON +Description: JSON (JavaScript Object Notation) is a lightweight data-interchange format. +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Website: http://www.json.org +Category: common, protocols +*/ + +function json(hljs) { + var LITERALS = {literal: 'true false null'}; + var ALLOWED_COMMENTS = [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ]; + var TYPES = [ + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ]; + var VALUE_CONTAINER = { + end: ',', endsWithParent: true, excludeEnd: true, + contains: TYPES, + keywords: LITERALS + }; + var OBJECT = { + begin: '{', end: '}', + contains: [ + { + className: 'attr', + begin: /"/, end: /"/, + contains: [hljs.BACKSLASH_ESCAPE], + illegal: '\\n', + }, + hljs.inherit(VALUE_CONTAINER, {begin: /:/}) + ].concat(ALLOWED_COMMENTS), + illegal: '\\S' + }; + var ARRAY = { + begin: '\\[', end: '\\]', + contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents + illegal: '\\S' + }; + TYPES.push(OBJECT, ARRAY); + ALLOWED_COMMENTS.forEach(function(rule) { + TYPES.push(rule); + }); + return { + name: 'JSON', + contains: TYPES, + keywords: LITERALS, + illegal: '\\S' + }; +} + +module.exports = json; diff --git a/node_modules/highlight.js/lib/languages/julia-repl.js b/node_modules/highlight.js/lib/languages/julia-repl.js @@ -0,0 +1,50 @@ +/* +Language: Julia REPL +Description: Julia REPL sessions +Author: Morten Piibeleht <morten.piibeleht@gmail.com> +Website: https://julialang.org +Requires: julia.js + +The Julia REPL code blocks look something like the following: + + julia> function foo(x) + x + 1 + end + foo (generic function with 1 method) + +They start on a new line with "julia>". Usually there should also be a space after this, but +we also allow the code to start right after the > character. The code may run over multiple +lines, but the additional lines must start with six spaces (i.e. be indented to match +"julia>"). The rest of the code is assumed to be output from the executed code and will be +left un-highlighted. + +Using simply spaces to identify line continuations may get a false-positive if the output +also prints out six spaces, but such cases should be rare. +*/ + +function juliaRepl(hljs) { + return { + name: 'Julia REPL', + contains: [ + { + className: 'meta', + begin: /^julia>/, + relevance: 10, + starts: { + // end the highlighting if we are on a new line and the line does not have at + // least six spaces in the beginning + end: /^(?![ ]{6})/, + subLanguage: 'julia' + }, + // jldoctest Markdown blocks are used in the Julia manual and package docs indicate + // code snippets that should be verified when the documentation is built. They can be + // either REPL-like or script-like, but are usually REPL-like and therefore we apply + // julia-repl highlighting to them. More information can be found in Documenter's + // manual: https://juliadocs.github.io/Documenter.jl/latest/man/doctests.html + aliases: ['jldoctest'] + } + ] + } +} + +module.exports = juliaRepl; diff --git a/node_modules/highlight.js/lib/languages/julia.js b/node_modules/highlight.js/lib/languages/julia.js @@ -0,0 +1,173 @@ +/* +Language: Julia +Description: Julia is a high-level, high-performance, dynamic programming language. +Author: Kenta Sato <bicycle1885@gmail.com> +Contributors: Alex Arslan <ararslan@comcast.net> +Website: https://julialang.org +*/ + +function julia(hljs) { + // Since there are numerous special names in Julia, it is too much trouble + // to maintain them by hand. Hence these names (i.e. keywords, literals and + // built-ins) are automatically generated from Julia v0.6 itself through + // the following scripts for each. + + // ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names + var VARIABLE_NAME_RE = '[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*'; + + var KEYWORDS = { + $pattern: VARIABLE_NAME_RE, + // # keyword generator, multi-word keywords handled manually below + // foreach(println, ["in", "isa", "where"]) + // for kw in Base.REPLCompletions.complete_keyword("") + // if !(contains(kw, " ") || kw == "struct") + // println(kw) + // end + // end + keyword: + 'in isa where ' + + 'baremodule begin break catch ccall const continue do else elseif end export false finally for function ' + + 'global if import importall let local macro module quote return true try using while ' + + // legacy, to be deprecated in the next release + 'type immutable abstract bitstype typealias ', + + // # literal generator + // println("true") + // println("false") + // for name in Base.REPLCompletions.completions("", 0)[1] + // try + // v = eval(Symbol(name)) + // if !(v isa Function || v isa Type || v isa TypeVar || v isa Module || v isa Colon) + // println(name) + // end + // end + // end + literal: + 'true false ' + + 'ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort ' + + 'NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway ' + + 'RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im ' + + 'nothing pi γ π φ ', + + // # built_in generator: + // for name in Base.REPLCompletions.completions("", 0)[1] + // try + // v = eval(Symbol(name)) + // if v isa Type || v isa TypeVar + // println(name) + // end + // end + // end + built_in: + 'ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet ' + + 'AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat ' + + 'AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal '+ + 'BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException ' + + 'CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager ' + + 'Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ' + + 'ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t ' + + 'Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict ' + + 'DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ' + + 'ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function ' + + 'Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear ' + + 'IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException ' + + 'InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix ' + + 'MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict ' + + 'OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe ' + + 'PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ' + + 'ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode ' + + 'RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed ' + + 'SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange ' + + 'StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal ' + + 'Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry ' + + 'TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError ' + + 'UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector ' + + 'VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool ' + }; + + // placeholder for recursive self-reference + var DEFAULT = { + keywords: KEYWORDS, illegal: /<\// + }; + + // ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/ + var NUMBER = { + className: 'number', + // supported numeric literals: + // * binary literal (e.g. 0x10) + // * octal literal (e.g. 0o76543210) + // * hexadecimal literal (e.g. 0xfedcba876543210) + // * hexadecimal floating point literal (e.g. 0x1p0, 0x1.2p2) + // * decimal literal (e.g. 9876543210, 100_000_000) + // * floating pointe literal (e.g. 1.2, 1.2f, .2, 1., 1.2e10, 1.2e-10) + begin: /(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/, + relevance: 0 + }; + + var CHAR = { + className: 'string', + begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/ + }; + + var INTERPOLATION = { + className: 'subst', + begin: /\$\(/, end: /\)/, + keywords: KEYWORDS + }; + + var INTERPOLATED_VARIABLE = { + className: 'variable', + begin: '\\$' + VARIABLE_NAME_RE + }; + + // TODO: neatly escape normal code in string literal + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE], + variants: [ + { begin: /\w*"""/, end: /"""\w*/, relevance: 10 }, + { begin: /\w*"/, end: /"\w*/ } + ] + }; + + var COMMAND = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE], + begin: '`', end: '`' + }; + + var MACROCALL = { + className: 'meta', + begin: '@' + VARIABLE_NAME_RE + }; + + var COMMENT = { + className: 'comment', + variants: [ + { begin: '#=', end: '=#', relevance: 10 }, + { begin: '#', end: '$' } + ] + }; + + DEFAULT.name = 'Julia'; + DEFAULT.contains = [ + NUMBER, + CHAR, + STRING, + COMMAND, + MACROCALL, + COMMENT, + hljs.HASH_COMMENT_MODE, + { + className: 'keyword', + begin: + '\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b' + }, + {begin: /<:/} // relevance booster + ]; + INTERPOLATION.contains = DEFAULT.contains; + + return DEFAULT; +} + +module.exports = julia; diff --git a/node_modules/highlight.js/lib/languages/kotlin.js b/node_modules/highlight.js/lib/languages/kotlin.js @@ -0,0 +1,226 @@ +/* + Language: Kotlin + Description: Kotlin is an OSS statically typed programming language that targets the JVM, Android, JavaScript and Native. + Author: Sergey Mashkov <cy6erGn0m@gmail.com> + Website: https://kotlinlang.org + Category: common + */ + + +function kotlin(hljs) { + var KEYWORDS = { + keyword: + 'abstract as val var vararg get set class object open private protected public noinline ' + + 'crossinline dynamic final enum if else do while for when throw try catch finally ' + + 'import package is in fun override companion reified inline lateinit init ' + + 'interface annotation data sealed internal infix operator out by constructor super ' + + 'tailrec where const inner suspend typealias external expect actual', + built_in: + 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing', + literal: + 'true false null' + }; + var KEYWORDS_WITH_LABEL = { + className: 'keyword', + begin: /\b(break|continue|return|this)\b/, + starts: { + contains: [ + { + className: 'symbol', + begin: /@\w+/ + } + ] + } + }; + var LABEL = { + className: 'symbol', begin: hljs.UNDERSCORE_IDENT_RE + '@' + }; + + // for string templates + var SUBST = { + className: 'subst', + begin: '\\${', end: '}', contains: [hljs.C_NUMBER_MODE] + }; + var VARIABLE = { + className: 'variable', begin: '\\$' + hljs.UNDERSCORE_IDENT_RE + }; + var STRING = { + className: 'string', + variants: [ + { + begin: '"""', end: '"""(?=[^"])', + contains: [VARIABLE, SUBST] + }, + // Can't use built-in modes easily, as we want to use STRING in the meta + // context as 'meta-string' and there's no syntax to remove explicitly set + // classNames in built-in modes. + { + begin: '\'', end: '\'', + illegal: /\n/, + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: '"', end: '"', + illegal: /\n/, + contains: [hljs.BACKSLASH_ESCAPE, VARIABLE, SUBST] + } + ] + }; + SUBST.contains.push(STRING); + + var ANNOTATION_USE_SITE = { + className: 'meta', begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?' + }; + var ANNOTATION = { + className: 'meta', begin: '@' + hljs.UNDERSCORE_IDENT_RE, + contains: [ + { + begin: /\(/, end: /\)/, + contains: [ + hljs.inherit(STRING, {className: 'meta-string'}) + ] + } + ] + }; + + // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals + // According to the doc above, the number mode of kotlin is the same as java 8, + // so the code below is copied from java.js + var KOTLIN_NUMBER_RE = '\\b' + + '(' + + '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b... + '|' + + '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x... + '|' + + '(' + + '([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' + + '|' + + '\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' + + ')' + + '([eE][-+]?\\d+)?' + // octal, decimal, float + ')' + + '[lLfF]?'; + var KOTLIN_NUMBER_MODE = { + className: 'number', + begin: KOTLIN_NUMBER_RE, + relevance: 0 + }; + var KOTLIN_NESTED_COMMENT = hljs.COMMENT( + '/\\*', '\\*/', + { contains: [ hljs.C_BLOCK_COMMENT_MODE ] } + ); + var KOTLIN_PAREN_TYPE = { + variants: [ + { className: 'type', + begin: hljs.UNDERSCORE_IDENT_RE + }, + { begin: /\(/, end: /\)/, + contains: [] //defined later + } + ] + }; + var KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE; + KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ]; + KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ]; + + return { + name: 'Kotlin', + aliases: ['kt'], + keywords: KEYWORDS, + contains : [ + hljs.COMMENT( + '/\\*\\*', + '\\*/', + { + relevance : 0, + contains : [{ + className : 'doctag', + begin : '@[A-Za-z]+' + }] + } + ), + hljs.C_LINE_COMMENT_MODE, + KOTLIN_NESTED_COMMENT, + KEYWORDS_WITH_LABEL, + LABEL, + ANNOTATION_USE_SITE, + ANNOTATION, + { + className: 'function', + beginKeywords: 'fun', end: '[(]|$', + returnBegin: true, + excludeEnd: true, + keywords: KEYWORDS, + illegal: /fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/, + relevance: 5, + contains: [ + { + begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, + relevance: 0, + contains: [hljs.UNDERSCORE_TITLE_MODE] + }, + { + className: 'type', + begin: /</, end: />/, keywords: 'reified', + relevance: 0 + }, + { + className: 'params', + begin: /\(/, end: /\)/, + endsParent: true, + keywords: KEYWORDS, + relevance: 0, + contains: [ + { + begin: /:/, end: /[=,\/]/, endsWithParent: true, + contains: [ + KOTLIN_PAREN_TYPE, + hljs.C_LINE_COMMENT_MODE, + KOTLIN_NESTED_COMMENT + ], + relevance: 0 + }, + hljs.C_LINE_COMMENT_MODE, + KOTLIN_NESTED_COMMENT, + ANNOTATION_USE_SITE, + ANNOTATION, + STRING, + hljs.C_NUMBER_MODE + ] + }, + KOTLIN_NESTED_COMMENT + ] + }, + { + className: 'class', + beginKeywords: 'class interface trait', end: /[:\{(]|$/, // remove 'trait' when removed from KEYWORDS + excludeEnd: true, + illegal: 'extends implements', + contains: [ + {beginKeywords: 'public protected internal private constructor'}, + hljs.UNDERSCORE_TITLE_MODE, + { + className: 'type', + begin: /</, end: />/, excludeBegin: true, excludeEnd: true, + relevance: 0 + }, + { + className: 'type', + begin: /[,:]\s*/, end: /[<\(,]|$/, excludeBegin: true, returnEnd: true + }, + ANNOTATION_USE_SITE, + ANNOTATION + ] + }, + STRING, + { + className: 'meta', + begin: "^#!/usr/bin/env", end: '$', + illegal: '\n' + }, + KOTLIN_NUMBER_MODE + ] + }; +} + +module.exports = kotlin; diff --git a/node_modules/highlight.js/lib/languages/lasso.js b/node_modules/highlight.js/lib/languages/lasso.js @@ -0,0 +1,171 @@ +/* +Language: Lasso +Author: Eric Knibbe <eric@lassosoft.com> +Description: Lasso is a language and server platform for database-driven web applications. This definition handles Lasso 9 syntax and LassoScript for Lasso 8.6 and earlier. +Website: http://www.lassosoft.com/What-Is-Lasso +*/ + +function lasso(hljs) { + var LASSO_IDENT_RE = '[a-zA-Z_][\\w.]*'; + var LASSO_ANGLE_RE = '<\\?(lasso(script)?|=)'; + var LASSO_CLOSE_RE = '\\]|\\?>'; + var LASSO_KEYWORDS = { + $pattern: LASSO_IDENT_RE + '|&[lg]t;', + literal: + 'true false none minimal full all void and or not ' + + 'bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft', + built_in: + 'array date decimal duration integer map pair string tag xml null ' + + 'boolean bytes keyword list locale queue set stack staticarray ' + + 'local var variable global data self inherited currentcapture givenblock', + keyword: + 'cache database_names database_schemanames database_tablenames ' + + 'define_tag define_type email_batch encode_set html_comment handle ' + + 'handle_error header if inline iterate ljax_target link ' + + 'link_currentaction link_currentgroup link_currentrecord link_detail ' + + 'link_firstgroup link_firstrecord link_lastgroup link_lastrecord ' + + 'link_nextgroup link_nextrecord link_prevgroup link_prevrecord log ' + + 'loop namespace_using output_none portal private protect records ' + + 'referer referrer repeating resultset rows search_args ' + + 'search_arguments select sort_args sort_arguments thread_atomic ' + + 'value_list while abort case else fail_if fail_ifnot fail if_empty ' + + 'if_false if_null if_true loop_abort loop_continue loop_count params ' + + 'params_up return return_value run_children soap_definetag ' + + 'soap_lastrequest soap_lastresponse tag_name ascending average by ' + + 'define descending do equals frozen group handle_failure import in ' + + 'into join let match max min on order parent protected provide public ' + + 'require returnhome skip split_thread sum take thread to trait type ' + + 'where with yield yieldhome' + }; + var HTML_COMMENT = hljs.COMMENT( + '<!--', + '-->', + { + relevance: 0 + } + ); + var LASSO_NOPROCESS = { + className: 'meta', + begin: '\\[noprocess\\]', + starts: { + end: '\\[/noprocess\\]', + returnEnd: true, + contains: [HTML_COMMENT] + } + }; + var LASSO_START = { + className: 'meta', + begin: '\\[/noprocess|' + LASSO_ANGLE_RE + }; + var LASSO_DATAMEMBER = { + className: 'symbol', + begin: '\'' + LASSO_IDENT_RE + '\'' + }; + var LASSO_CODE = [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|(-?infinity|NaN)\\b'}), + hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + { + className: 'string', + begin: '`', end: '`' + }, + { // variables + variants: [ + { + begin: '[#$]' + LASSO_IDENT_RE + }, + { + begin: '#', end: '\\d+', + illegal: '\\W' + } + ] + }, + { + className: 'type', + begin: '::\\s*', end: LASSO_IDENT_RE, + illegal: '\\W' + }, + { + className: 'params', + variants: [ + { + begin: '-(?!infinity)' + LASSO_IDENT_RE, + relevance: 0 + }, + { + begin: '(\\.\\.\\.)' + } + ] + }, + { + begin: /(->|\.)\s*/, + relevance: 0, + contains: [LASSO_DATAMEMBER] + }, + { + className: 'class', + beginKeywords: 'define', + returnEnd: true, end: '\\(|=>', + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: LASSO_IDENT_RE + '(=(?!>))?|[-+*/%](?!>)'}) + ] + } + ]; + return { + name: 'Lasso', + aliases: ['ls', 'lassoscript'], + case_insensitive: true, + keywords: LASSO_KEYWORDS, + contains: [ + { + className: 'meta', + begin: LASSO_CLOSE_RE, + relevance: 0, + starts: { // markup + end: '\\[|' + LASSO_ANGLE_RE, + returnEnd: true, + relevance: 0, + contains: [HTML_COMMENT] + } + }, + LASSO_NOPROCESS, + LASSO_START, + { + className: 'meta', + begin: '\\[no_square_brackets', + starts: { + end: '\\[/no_square_brackets\\]', // not implemented in the language + keywords: LASSO_KEYWORDS, + contains: [ + { + className: 'meta', + begin: LASSO_CLOSE_RE, + relevance: 0, + starts: { + end: '\\[noprocess\\]|' + LASSO_ANGLE_RE, + returnEnd: true, + contains: [HTML_COMMENT] + } + }, + LASSO_NOPROCESS, + LASSO_START + ].concat(LASSO_CODE) + } + }, + { + className: 'meta', + begin: '\\[', + relevance: 0 + }, + { + className: 'meta', + begin: '^#!', end:'lasso9$', + relevance: 10 + } + ].concat(LASSO_CODE) + }; +} + +module.exports = lasso; diff --git a/node_modules/highlight.js/lib/languages/latex.js b/node_modules/highlight.js/lib/languages/latex.js @@ -0,0 +1,72 @@ +/* +Language: LaTeX +Author: Vladimir Moskva <vladmos@gmail.com> +Website: https://www.latex-project.org +Category: markup +*/ + +function latex(hljs) { + var COMMAND = { + className: 'tag', + begin: /\\/, + relevance: 0, + contains: [ + { + className: 'name', + variants: [ + {begin: /[a-zA-Z\u0430-\u044f\u0410-\u042f]+[*]?/}, + {begin: /[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/} + ], + starts: { + endsWithParent: true, + relevance: 0, + contains: [ + { + className: 'string', // because it looks like attributes in HTML tags + variants: [ + {begin: /\[/, end: /\]/}, + {begin: /\{/, end: /\}/} + ] + }, + { + begin: /\s*=\s*/, endsWithParent: true, + relevance: 0, + contains: [ + { + className: 'number', + begin: /-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/ + } + ] + } + ] + } + } + ] + }; + + return { + name: 'LaTeX', + aliases: ['tex'], + contains: [ + COMMAND, + { + className: 'formula', + contains: [COMMAND], + relevance: 0, + variants: [ + {begin: /\$\$/, end: /\$\$/}, + {begin: /\$/, end: /\$/} + ] + }, + hljs.COMMENT( + '%', + '$', + { + relevance: 0 + } + ) + ] + }; +} + +module.exports = latex; diff --git a/node_modules/highlight.js/lib/languages/ldif.js b/node_modules/highlight.js/lib/languages/ldif.js @@ -0,0 +1,31 @@ +/* +Language: LDIF +Contributors: Jacob Childress <jacobc@gmail.com> +Category: enterprise, config +Website: https://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format +*/ +function ldif(hljs) { + return { + name: 'LDIF', + contains: [ + { + className: 'attribute', + begin: '^dn', end: ': ', excludeEnd: true, + starts: {end: '$', relevance: 0}, + relevance: 10 + }, + { + className: 'attribute', + begin: '^\\w', end: ': ', excludeEnd: true, + starts: {end: '$', relevance: 0} + }, + { + className: 'literal', + begin: '^-', end: '$' + }, + hljs.HASH_COMMENT_MODE + ] + }; +} + +module.exports = ldif; diff --git a/node_modules/highlight.js/lib/languages/leaf.js b/node_modules/highlight.js/lib/languages/leaf.js @@ -0,0 +1,48 @@ +/* +Language: Leaf +Author: Hale Chan <halechan@qq.com> +Description: Based on the Leaf reference from https://vapor.github.io/documentation/guide/leaf.html. +*/ + +function leaf (hljs) { + return { + name: 'Leaf', + contains: [ + { + className: 'function', + begin: '#+' + '[A-Za-z_0-9]*' + '\\(', + end:' {', + returnBegin: true, + excludeEnd: true, + contains : [ + { + className: 'keyword', + begin: '#+' + }, + { + className: 'title', + begin: '[A-Za-z_][A-Za-z_0-9]*' + }, + { + className: 'params', + begin: '\\(', end: '\\)', + endsParent: true, + contains: [ + { + className: 'string', + begin: '"', + end: '"' + }, + { + className: 'variable', + begin: '[A-Za-z_][A-Za-z_0-9]*' + } + ] + } + ] + } + ] + }; +} + +module.exports = leaf; diff --git a/node_modules/highlight.js/lib/languages/less.js b/node_modules/highlight.js/lib/languages/less.js @@ -0,0 +1,150 @@ +/* +Language: Less +Description: It's CSS, with just a little more. +Author: Max Mikhailov <seven.phases.max@gmail.com> +Website: http://lesscss.org +Category: common, css +*/ + +function less(hljs) { + var IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit + var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})'; + + /* Generic Modes */ + + var RULES = [], VALUE = []; // forward def. for recursive modes + + var STRING_MODE = function(c) { return { + // Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings) + className: 'string', begin: '~?' + c + '.*?' + c + };}; + + var IDENT_MODE = function(name, begin, relevance) { return { + className: name, begin: begin, relevance: relevance + };}; + + var PARENS_MODE = { + // used only to properly balance nested parens inside mixin call, def. arg list + begin: '\\(', end: '\\)', contains: VALUE, relevance: 0 + }; + + // generic Less highlighter (used almost everywhere except selectors): + VALUE.push( + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + STRING_MODE("'"), + STRING_MODE('"'), + hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :( + { + begin: '(url|data-uri)\\(', + starts: {className: 'string', end: '[\\)\\n]', excludeEnd: true} + }, + IDENT_MODE('number', '#[0-9A-Fa-f]+\\b'), + PARENS_MODE, + IDENT_MODE('variable', '@@?' + IDENT_RE, 10), + IDENT_MODE('variable', '@{' + IDENT_RE + '}'), + IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string + { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding): + className: 'attribute', begin: IDENT_RE + '\\s*:', end: ':', returnBegin: true, excludeEnd: true + }, + { + className: 'meta', + begin: '!important' + } + ); + + var VALUE_WITH_RULESETS = VALUE.concat({ + begin: '{', end: '}', contains: RULES + }); + + var MIXIN_GUARD_MODE = { + beginKeywords: 'when', endsWithParent: true, + contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match + }; + + /* Rule-Level Modes */ + + var RULE_MODE = { + begin: INTERP_IDENT_RE + '\\s*:', returnBegin: true, end: '[;}]', + relevance: 0, + contains: [ + { + className: 'attribute', + begin: INTERP_IDENT_RE, end: ':', excludeEnd: true, + starts: { + endsWithParent: true, illegal: '[<=$]', + relevance: 0, + contains: VALUE + } + } + ] + }; + + var AT_RULE_MODE = { + className: 'keyword', + begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b', + starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0} + }; + + // variable definitions and calls + var VAR_RULE_MODE = { + className: 'variable', + variants: [ + // using more strict pattern for higher relevance to increase chances of Less detection. + // this is *the only* Less specific statement used in most of the sources, so... + // (we’ll still often loose to the css-parser unless there's '//' comment, + // simply because 1 variable just can't beat 99 properties :) + {begin: '@' + IDENT_RE + '\\s*:', relevance: 15}, + {begin: '@' + IDENT_RE} + ], + starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS} + }; + + var SELECTOR_MODE = { + // first parse unambiguous selectors (i.e. those not starting with tag) + // then fall into the scary lookahead-discriminator variant. + // this mode also handles mixin definitions and calls + variants: [{ + begin: '[\\.#:&\\[>]', end: '[;{}]' // mixin calls end with ';' + }, { + begin: INTERP_IDENT_RE, end: '{' + }], + returnBegin: true, + returnEnd: true, + illegal: '[<=\'$"]', + relevance: 0, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + MIXIN_GUARD_MODE, + IDENT_MODE('keyword', 'all\\b'), + IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag + IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags" + IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE), + IDENT_MODE('selector-class', '\\.' + INTERP_IDENT_RE, 0), + IDENT_MODE('selector-tag', '&', 0), + {className: 'selector-attr', begin: '\\[', end: '\\]'}, + {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/}, + {begin: '\\(', end: '\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins + {begin: '!important'} // eat !important after mixin call or it will be colored as tag + ] + }; + + RULES.push( + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + AT_RULE_MODE, + VAR_RULE_MODE, + RULE_MODE, + SELECTOR_MODE + ); + + return { + name: 'Less', + case_insensitive: true, + illegal: '[=>\'/<($"]', + contains: RULES + }; +} + +module.exports = less; diff --git a/node_modules/highlight.js/lib/languages/lisp.js b/node_modules/highlight.js/lib/languages/lisp.js @@ -0,0 +1,108 @@ +/* +Language: Lisp +Description: Generic lisp syntax +Author: Vasily Polovnyov <vast@whiteants.net> +Category: lisp +*/ + +function lisp(hljs) { + var LISP_IDENT_RE = '[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*'; + var MEC_RE = '\\|[^]*?\\|'; + var LISP_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?'; + var LITERAL = { + className: 'literal', + begin: '\\b(t{1}|nil)\\b' + }; + var NUMBER = { + className: 'number', + variants: [ + {begin: LISP_SIMPLE_NUMBER_RE, relevance: 0}, + {begin: '#(b|B)[0-1]+(/[0-1]+)?'}, + {begin: '#(o|O)[0-7]+(/[0-7]+)?'}, + {begin: '#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?'}, + {begin: '#(c|C)\\(' + LISP_SIMPLE_NUMBER_RE + ' +' + LISP_SIMPLE_NUMBER_RE, end: '\\)'} + ] + }; + var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}); + var COMMENT = hljs.COMMENT( + ';', '$', + { + relevance: 0 + } + ); + var VARIABLE = { + begin: '\\*', end: '\\*' + }; + var KEYWORD = { + className: 'symbol', + begin: '[:&]' + LISP_IDENT_RE + }; + var IDENT = { + begin: LISP_IDENT_RE, + relevance: 0 + }; + var MEC = { + begin: MEC_RE + }; + var QUOTED_LIST = { + begin: '\\(', end: '\\)', + contains: ['self', LITERAL, STRING, NUMBER, IDENT] + }; + var QUOTED = { + contains: [NUMBER, STRING, VARIABLE, KEYWORD, QUOTED_LIST, IDENT], + variants: [ + { + begin: '[\'`]\\(', end: '\\)' + }, + { + begin: '\\(quote ', end: '\\)', + keywords: {name: 'quote'} + }, + { + begin: '\'' + MEC_RE + } + ] + }; + var QUOTED_ATOM = { + variants: [ + {begin: '\'' + LISP_IDENT_RE}, + {begin: '#\'' + LISP_IDENT_RE + '(::' + LISP_IDENT_RE + ')*'} + ] + }; + var LIST = { + begin: '\\(\\s*', end: '\\)' + }; + var BODY = { + endsWithParent: true, + relevance: 0 + }; + LIST.contains = [ + { + className: 'name', + variants: [ + {begin: LISP_IDENT_RE}, + {begin: MEC_RE} + ] + }, + BODY + ]; + BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC, IDENT]; + + return { + name: 'Lisp', + illegal: /\S/, + contains: [ + NUMBER, + hljs.SHEBANG(), + LITERAL, + STRING, + COMMENT, + QUOTED, + QUOTED_ATOM, + LIST, + IDENT + ] + }; +} + +module.exports = lisp; diff --git a/node_modules/highlight.js/lib/languages/livecodeserver.js b/node_modules/highlight.js/lib/languages/livecodeserver.js @@ -0,0 +1,172 @@ +/* +Language: LiveCode +Author: Ralf Bitter <rabit@revigniter.com> +Description: Language definition for LiveCode server accounting for revIgniter (a web application framework) characteristics. +Version: 1.1 +Date: 2019-04-17 +Category: enterprise +*/ + +function livecodeserver(hljs) { + var VARIABLE = { + className: 'variable', + variants: [ + {begin: '\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)'}, + {begin: '\\$_[A-Z]+'} + ], + relevance: 0 + }; + var COMMENT_MODES = [ + hljs.C_BLOCK_COMMENT_MODE, + hljs.HASH_COMMENT_MODE, + hljs.COMMENT('--', '$'), + hljs.COMMENT('[^:]//', '$') + ]; + var TITLE1 = hljs.inherit(hljs.TITLE_MODE, { + variants: [ + {begin: '\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*'}, + {begin: '\\b_[a-z0-9\\-]+'} + ] + }); + var TITLE2 = hljs.inherit(hljs.TITLE_MODE, {begin: '\\b([A-Za-z0-9_\\-]+)\\b'}); + return { + name: 'LiveCode', + case_insensitive: false, + keywords: { + keyword: + '$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER ' + + 'codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph ' + + 'after byte bytes english the until http forever descending using line real8 with seventh ' + + 'for stdout finally element word words fourth before black ninth sixth characters chars stderr ' + + 'uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid ' + + 'at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 ' + + 'int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat ' + + 'end repeat URL in try into switch to words https token binfile each tenth as ticks tick ' + + 'system real4 by dateItems without char character ascending eighth whole dateTime numeric short ' + + 'first ftp integer abbreviated abbr abbrev private case while if ' + + 'div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within ' + + 'contains ends with begins the keys of keys', + literal: + 'SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE ' + + 'QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO ' + + 'six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five ' + + 'quote empty one true return cr linefeed right backslash null seven tab three two ' + + 'RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK ' + + 'FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK', + built_in: + 'put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode ' + + 'base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum ' + + 'cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress ' + + 'constantNames cos date dateFormat decompress difference directories ' + + 'diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global ' + + 'globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset ' + + 'keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders ' + + 'libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 ' + + 'longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec ' + + 'millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar ' + + 'numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets ' + + 'paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation ' + + 'populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile ' + + 'revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull ' + + 'revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered ' + + 'revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames ' + + 'revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull ' + + 'revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections ' + + 'revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype ' + + 'revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext ' + + 'revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames ' + + 'revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase ' + + 'revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute ' + + 'revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces ' + + 'revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode ' + + 'revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling ' + + 'revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error ' + + 'revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute ' + + 'revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort ' + + 'revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree ' + + 'revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance ' + + 'sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound ' + + 'stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper ' + + 'transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames ' + + 'variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet ' + + 'xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process ' + + 'combine constant convert create new alias folder directory decrypt delete variable word line folder ' + + 'directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile ' + + 'libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver ' + + 'libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime ' + + 'libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename ' + + 'replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase ' + + 'revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees ' + + 'revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord ' + + 'revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase ' + + 'revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD ' + + 'revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost ' + + 'revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData ' + + 'revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel ' + + 'revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback ' + + 'revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop ' + + 'subtract symmetric union unload vectorDotProduct wait write' + }, + contains: [ + VARIABLE, + { + className: 'keyword', + begin: '\\bend\\sif\\b' + }, + { + className: 'function', + beginKeywords: 'function', end: '$', + contains: [ + VARIABLE, + TITLE2, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.BINARY_NUMBER_MODE, + hljs.C_NUMBER_MODE, + TITLE1 + ] + }, + { + className: 'function', + begin: '\\bend\\s+', end: '$', + keywords: 'end', + contains: [ + TITLE2, + TITLE1 + ], + relevance: 0 + }, + { + beginKeywords: 'command on', end: '$', + contains: [ + VARIABLE, + TITLE2, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.BINARY_NUMBER_MODE, + hljs.C_NUMBER_MODE, + TITLE1 + ] + }, + { + className: 'meta', + variants: [ + { + begin: '<\\?(rev|lc|livecode)', + relevance: 10 + }, + { begin: '<\\?' }, + { begin: '\\?>' } + ] + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.BINARY_NUMBER_MODE, + hljs.C_NUMBER_MODE, + TITLE1 + ].concat(COMMENT_MODES), + illegal: ';$|^\\[|^=|&|{' + }; +} + +module.exports = livecodeserver; diff --git a/node_modules/highlight.js/lib/languages/livescript.js b/node_modules/highlight.js/lib/languages/livescript.js @@ -0,0 +1,335 @@ +const KEYWORDS = [ + "as", // for exports + "in", + "of", + "if", + "for", + "while", + "finally", + "var", + "new", + "function", + "do", + "return", + "void", + "else", + "break", + "catch", + "instanceof", + "with", + "throw", + "case", + "default", + "try", + "switch", + "continue", + "typeof", + "delete", + "let", + "yield", + "const", + "class", + // JS handles these with a special rule + // "get", + // "set", + "debugger", + "async", + "await", + "static", + "import", + "from", + "export", + "extends" +]; +const LITERALS = [ + "true", + "false", + "null", + "undefined", + "NaN", + "Infinity" +]; + +const TYPES = [ + "Intl", + "DataView", + "Number", + "Math", + "Date", + "String", + "RegExp", + "Object", + "Function", + "Boolean", + "Error", + "Symbol", + "Set", + "Map", + "WeakSet", + "WeakMap", + "Proxy", + "Reflect", + "JSON", + "Promise", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Float32Array", + "Array", + "Uint8Array", + "Uint8ClampedArray", + "ArrayBuffer" +]; + +const ERROR_TYPES = [ + "EvalError", + "InternalError", + "RangeError", + "ReferenceError", + "SyntaxError", + "TypeError", + "URIError" +]; + +const BUILT_IN_GLOBALS = [ + "setInterval", + "setTimeout", + "clearInterval", + "clearTimeout", + + "require", + "exports", + + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "unescape" +]; + +const BUILT_IN_VARIABLES = [ + "arguments", + "this", + "super", + "console", + "window", + "document", + "localStorage", + "module", + "global" // Node.js +]; + +const BUILT_INS = [].concat( + BUILT_IN_GLOBALS, + BUILT_IN_VARIABLES, + TYPES, + ERROR_TYPES +); + +/* +Language: LiveScript +Author: Taneli Vatanen <taneli.vatanen@gmail.com> +Contributors: Jen Evers-Corvina <jen@sevvie.net> +Origin: coffeescript.js +Description: LiveScript is a programming language that transcompiles to JavaScript. For info about language see http://livescript.net/ +Website: https://livescript.net +Category: scripting +*/ + +function livescript(hljs) { + var LIVESCRIPT_BUILT_INS = [ + 'npm', + 'print' + ]; + var LIVESCRIPT_LITERALS = [ + 'yes', + 'no', + 'on', + 'off', + 'it', + 'that', + 'void' + ]; + var LIVESCRIPT_KEYWORDS = [ + 'then', + 'unless', + 'until', + 'loop', + 'of', + 'by', + 'when', + 'and', + 'or', + 'is', + 'isnt', + 'not', + 'it', + 'that', + 'otherwise', + 'from', + 'to', + 'til', + 'fallthrough', + 'case', + 'enum', + 'native', + 'list', + 'map', + '__hasProp', + '__extends', + '__slice', + '__bind', + '__indexOf' + ]; + var KEYWORDS$1 = { + keyword: KEYWORDS.concat(LIVESCRIPT_KEYWORDS).join(" "), + literal: LITERALS.concat(LIVESCRIPT_LITERALS).join(" "), + built_in: BUILT_INS.concat(LIVESCRIPT_BUILT_INS).join(" ") + }; + var JS_IDENT_RE = '[A-Za-z$_](?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*'; + var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE}); + var SUBST = { + className: 'subst', + begin: /#\{/, end: /}/, + keywords: KEYWORDS$1 + }; + var SUBST_SIMPLE = { + className: 'subst', + begin: /#[A-Za-z$_]/, end: /(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/, + keywords: KEYWORDS$1 + }; + var EXPRESSIONS = [ + hljs.BINARY_NUMBER_MODE, + { + className: 'number', + begin: '(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)', + relevance: 0, + starts: {end: '(\\s*/)?', relevance: 0} // a number tries to eat the following slash to prevent treating it as a regexp + }, + { + className: 'string', + variants: [ + { + begin: /'''/, end: /'''/, + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: /'/, end: /'/, + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: /"""/, end: /"""/, + contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE] + }, + { + begin: /"/, end: /"/, + contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE] + }, + { + begin: /\\/, end: /(\s|$)/, + excludeEnd: true + } + ] + }, + { + className: 'regexp', + variants: [ + { + begin: '//', end: '//[gim]*', + contains: [SUBST, hljs.HASH_COMMENT_MODE] + }, + { + // regex can't start with space to parse x / 2 / 3 as two divisions + // regex can't start with *, and it supports an "illegal" in the main mode + begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W)/ + } + ] + }, + { + begin: '@' + JS_IDENT_RE + }, + { + begin: '``', end: '``', + excludeBegin: true, excludeEnd: true, + subLanguage: 'javascript' + } + ]; + SUBST.contains = EXPRESSIONS; + + var PARAMS = { + className: 'params', + begin: '\\(', returnBegin: true, + /* We need another contained nameless mode to not have every nested + pair of parens to be called "params" */ + contains: [ + { + begin: /\(/, end: /\)/, + keywords: KEYWORDS$1, + contains: ['self'].concat(EXPRESSIONS) + } + ] + }; + + var SYMBOLS = { + begin: '(#=>|=>|\\|>>|-?->|\\!->)' + }; + + return { + name: 'LiveScript', + aliases: ['ls'], + keywords: KEYWORDS$1, + illegal: /\/\*/, + contains: EXPRESSIONS.concat([ + hljs.COMMENT('\\/\\*', '\\*\\/'), + hljs.HASH_COMMENT_MODE, + SYMBOLS, // relevance booster + { + className: 'function', + contains: [TITLE, PARAMS], + returnBegin: true, + variants: [ + { + begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?', end: '\\->\\*?' + }, + { + begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?', end: '[-~]{1,2}>\\*?' + }, + { + begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?', end: '!?[-~]{1,2}>\\*?' + } + ] + }, + { + className: 'class', + beginKeywords: 'class', + end: '$', + illegal: /[:="\[\]]/, + contains: [ + { + beginKeywords: 'extends', + endsWithParent: true, + illegal: /[:="\[\]]/, + contains: [TITLE] + }, + TITLE + ] + }, + { + begin: JS_IDENT_RE + ':', end: ':', + returnBegin: true, returnEnd: true, + relevance: 0 + } + ]) + }; +} + +module.exports = livescript; diff --git a/node_modules/highlight.js/lib/languages/llvm.js b/node_modules/highlight.js/lib/languages/llvm.js @@ -0,0 +1,98 @@ +/* +Language: LLVM IR +Author: Michael Rodler <contact@f0rki.at> +Description: language used as intermediate representation in the LLVM compiler framework +Website: https://llvm.org/docs/LangRef.html +Category: assembler +*/ + +function llvm(hljs) { + var identifier = '([-a-zA-Z$._][\\w\\-$.]*)'; + return { + name: 'LLVM IR', + keywords: + 'begin end true false declare define global ' + + 'constant private linker_private internal ' + + 'available_externally linkonce linkonce_odr weak ' + + 'weak_odr appending dllimport dllexport common ' + + 'default hidden protected extern_weak external ' + + 'thread_local zeroinitializer undef null to tail ' + + 'target triple datalayout volatile nuw nsw nnan ' + + 'ninf nsz arcp fast exact inbounds align ' + + 'addrspace section alias module asm sideeffect ' + + 'gc dbg linker_private_weak attributes blockaddress ' + + 'initialexec localdynamic localexec prefix unnamed_addr ' + + 'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' + + 'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' + + 'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' + + 'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' + + 'cc c signext zeroext inreg sret nounwind ' + + 'noreturn noalias nocapture byval nest readnone ' + + 'readonly inlinehint noinline alwaysinline optsize ssp ' + + 'sspreq noredzone noimplicitfloat naked builtin cold ' + + 'nobuiltin noduplicate nonlazybind optnone returns_twice ' + + 'sanitize_address sanitize_memory sanitize_thread sspstrong ' + + 'uwtable returned type opaque eq ne slt sgt ' + + 'sle sge ult ugt ule uge oeq one olt ogt ' + + 'ole oge ord uno ueq une x acq_rel acquire ' + + 'alignstack atomic catch cleanup filter inteldialect ' + + 'max min monotonic nand personality release seq_cst ' + + 'singlethread umax umin unordered xchg add fadd ' + + 'sub fsub mul fmul udiv sdiv fdiv urem srem ' + + 'frem shl lshr ashr and or xor icmp fcmp ' + + 'phi call trunc zext sext fptrunc fpext uitofp ' + + 'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' + + 'addrspacecast select va_arg ret br switch invoke ' + + 'unwind unreachable indirectbr landingpad resume ' + + 'malloc alloca free load store getelementptr ' + + 'extractelement insertelement shufflevector getresult ' + + 'extractvalue insertvalue atomicrmw cmpxchg fence ' + + 'argmemonly double', + contains: [ + { + className: 'keyword', + begin: 'i\\d+' + }, + hljs.COMMENT( + ';', '\\n', {relevance: 0} + ), + // Double quote string + hljs.QUOTE_STRING_MODE, + { + className: 'string', + variants: [ + // Double-quoted string + { begin: '"', end: '[^\\\\]"' }, + ], + relevance: 0 + }, + { + className: 'title', + variants: [ + { begin: '@' + identifier }, + { begin: '@\\d+' }, + { begin: '!' + identifier }, + { begin: '!\\d+' + identifier } + ] + }, + { + className: 'symbol', + variants: [ + { begin: '%' + identifier }, + { begin: '%\\d+' }, + { begin: '#\\d+' }, + ] + }, + { + className: 'number', + variants: [ + { begin: '0[xX][a-fA-F0-9]+' }, + { begin: '-?\\d+(?:[.]\\d+)?(?:[eE][-+]?\\d+(?:[.]\\d+)?)?' } + ], + relevance: 0 + }, + ] + }; +} + +module.exports = llvm; diff --git a/node_modules/highlight.js/lib/languages/lsl.js b/node_modules/highlight.js/lib/languages/lsl.js @@ -0,0 +1,94 @@ +/* +Language: LSL (Linden Scripting Language) +Description: The Linden Scripting Language is used in Second Life by Linden Labs. +Author: Builder's Brewery <buildersbrewery@gmail.com> +Website: http://wiki.secondlife.com/wiki/LSL_Portal +Category: scripting +*/ + +function lsl(hljs) { + + var LSL_STRING_ESCAPE_CHARS = { + className: 'subst', + begin: /\\[tn"\\]/ + }; + + var LSL_STRINGS = { + className: 'string', + begin: '"', + end: '"', + contains: [ + LSL_STRING_ESCAPE_CHARS + ] + }; + + var LSL_NUMBERS = { + className: 'number', + begin: hljs.C_NUMBER_RE + }; + + var LSL_CONSTANTS = { + className: 'literal', + variants: [ + { + begin: '\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b' + }, + { + begin: '\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(?:ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(?:_TAG)?|CREATOR|ATTACHED_(?:POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALLOW_UNSIT|ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(?:INVALID_(?:AGENT|LINK_OBJECT)|NO(?:T_EXPERIENCE|_(?:ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b' + }, + { + begin: '\\b(?:FALSE|TRUE)\\b' + }, + { + begin: '\\b(?:ZERO_ROTATION)\\b' + }, + { + begin: '\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b' + }, + { + begin: '\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b' + } + ] + }; + + var LSL_FUNCTIONS = { + className: 'built_in', + begin: '\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|SitOnLink|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b' + }; + + return { + name: 'LSL (Linden Scripting Language)', + illegal: ':', + contains: [ + LSL_STRINGS, + { + className: 'comment', + variants: [ + hljs.COMMENT('//', '$'), + hljs.COMMENT('/\\*', '\\*/') + ], + relevance: 0 + }, + LSL_NUMBERS, + { + className: 'section', + variants: [ + { + begin: '\\b(?:state|default)\\b' + }, + { + begin: '\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b' + } + ] + }, + LSL_FUNCTIONS, + LSL_CONSTANTS, + { + className: 'type', + begin: '\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b' + } + ] + }; +} + +module.exports = lsl; diff --git a/node_modules/highlight.js/lib/languages/lua.js b/node_modules/highlight.js/lib/languages/lua.js @@ -0,0 +1,76 @@ +/* +Language: Lua +Description: Lua is a powerful, efficient, lightweight, embeddable scripting language. +Author: Andrew Fedorov <dmmdrs@mail.ru> +Category: common, scripting +Website: https://www.lua.org +*/ + +function lua(hljs) { + var OPENING_LONG_BRACKET = '\\[=*\\['; + var CLOSING_LONG_BRACKET = '\\]=*\\]'; + var LONG_BRACKETS = { + begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, + contains: ['self'] + }; + var COMMENTS = [ + hljs.COMMENT('--(?!' + OPENING_LONG_BRACKET + ')', '$'), + hljs.COMMENT( + '--' + OPENING_LONG_BRACKET, + CLOSING_LONG_BRACKET, + { + contains: [LONG_BRACKETS], + relevance: 10 + } + ) + ]; + return { + name: 'Lua', + keywords: { + $pattern: hljs.UNDERSCORE_IDENT_RE, + literal: "true false nil", + keyword: "and break do else elseif end for goto if in local not or repeat return then until while", + built_in: + //Metatags and globals: + '_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len ' + + '__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert ' + + //Standard methods and properties: + 'collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring ' + + 'module next pairs pcall print rawequal rawget rawset require select setfenv ' + + 'setmetatable tonumber tostring type unpack xpcall arg self ' + + //Library methods and properties (one line per library): + 'coroutine resume yield status wrap create running debug getupvalue ' + + 'debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv ' + + 'io lines write close flush open output type read stderr stdin input stdout popen tmpfile ' + + 'math 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 ' + + 'os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall ' + + 'string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower ' + + 'table setn insert getn foreachi maxn foreach concat sort remove' + }, + contains: COMMENTS.concat([ + { + className: 'function', + beginKeywords: 'function', end: '\\)', + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'}), + { + className: 'params', + begin: '\\(', endsWithParent: true, + contains: COMMENTS + } + ].concat(COMMENTS) + }, + hljs.C_NUMBER_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, + contains: [LONG_BRACKETS], + relevance: 5 + } + ]) + }; +} + +module.exports = lua; diff --git a/node_modules/highlight.js/lib/languages/makefile.js b/node_modules/highlight.js/lib/languages/makefile.js @@ -0,0 +1,86 @@ +/* +Language: Makefile +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Contributors: Joël Porquet <joel@porquet.org> +Website: https://www.gnu.org/software/make/manual/html_node/Introduction.html +Category: common +*/ + +function makefile(hljs) { + /* Variables: simple (eg $(var)) and special (eg $@) */ + var VARIABLE = { + className: 'variable', + variants: [ + { + begin: '\\$\\(' + hljs.UNDERSCORE_IDENT_RE + '\\)', + contains: [hljs.BACKSLASH_ESCAPE], + }, + { + begin: /\$[@%<?\^\+\*]/ + }, + ] + }; + /* Quoted string with variables inside */ + var QUOTE_STRING = { + className: 'string', + begin: /"/, end: /"/, + contains: [ + hljs.BACKSLASH_ESCAPE, + VARIABLE, + ] + }; + /* Function: $(func arg,...) */ + var FUNC = { + className: 'variable', + begin: /\$\([\w-]+\s/, end: /\)/, + keywords: { + built_in: + 'subst patsubst strip findstring filter filter-out sort ' + + 'word wordlist firstword lastword dir notdir suffix basename ' + + 'addsuffix addprefix join wildcard realpath abspath error warning ' + + 'shell origin flavor foreach if or and call eval file value', + }, + contains: [ + VARIABLE, + ] + }; + /* Variable assignment */ + var ASSIGNMENT = { + begin: '^' + hljs.UNDERSCORE_IDENT_RE + '\\s*(?=[:+?]?=)' + }; + /* Meta targets (.PHONY) */ + var META = { + className: 'meta', + begin: /^\.PHONY:/, end: /$/, + keywords: { + $pattern: /[\.\w]+/, + 'meta-keyword': '.PHONY' + } + }; + /* Targets */ + var TARGET = { + className: 'section', + begin: /^[^\s]+:/, end: /$/, + contains: [VARIABLE,] + }; + return { + name: 'Makefile', + aliases: ['mk', 'mak'], + keywords: { + $pattern: /[\w-]+/, + keyword: 'define endef undefine ifdef ifndef ifeq ifneq else endif ' + + 'include -include sinclude override export unexport private vpath' + }, + contains: [ + hljs.HASH_COMMENT_MODE, + VARIABLE, + QUOTE_STRING, + FUNC, + ASSIGNMENT, + META, + TARGET, + ] + }; +} + +module.exports = makefile; diff --git a/node_modules/highlight.js/lib/languages/markdown.js b/node_modules/highlight.js/lib/languages/markdown.js @@ -0,0 +1,157 @@ +/* +Language: Markdown +Requires: xml.js +Author: John Crepezzi <john.crepezzi@gmail.com> +Website: https://daringfireball.net/projects/markdown/ +Category: common, markup +*/ + +function markdown(hljs) { + const INLINE_HTML = { + begin: '<', end: '>', + subLanguage: 'xml', + relevance: 0 + }; + const HORIZONTAL_RULE = { + begin: '^[-\\*]{3,}', end: '$' + }; + const CODE = { + className: 'code', + variants: [ + // TODO: fix to allow these to work with sublanguage also + { begin: '(`{3,})(.|\\n)*?\\1`*[ ]*', }, + { begin: '(~{3,})(.|\\n)*?\\1~*[ ]*', }, + // needed to allow markdown as a sublanguage to work + { begin: '```', end: '```+[ ]*$' }, + { begin: '~~~', end: '~~~+[ ]*$' }, + { begin: '`.+?`' }, + { + begin: '(?=^( {4}|\\t))', + // use contains to gobble up multiple lines to allow the block to be whatever size + // but only have a single open/close tag vs one per line + contains: [ + { begin: '^( {4}|\\t)', end: '(\\n)$' } + ], + relevance: 0 + } + ] + }; + const LIST = { + className: 'bullet', + begin: '^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)', + end: '\\s+', + excludeEnd: true + }; + const LINK_REFERENCE = { + begin: /^\[[^\n]+\]:/, + returnBegin: true, + contains: [ + { + className: 'symbol', + begin: /\[/, end: /\]/, + excludeBegin: true, excludeEnd: true + }, + { + className: 'link', + begin: /:\s*/, end: /$/, + excludeBegin: true + } + ] + }; + const LINK = { + begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]', + returnBegin: true, + contains: [ + { + className: 'string', + begin: '\\[', end: '\\]', + excludeBegin: true, + returnEnd: true, + relevance: 0 + }, + { + className: 'link', + begin: '\\]\\(', end: '\\)', + excludeBegin: true, excludeEnd: true + }, + { + className: 'symbol', + begin: '\\]\\[', end: '\\]', + excludeBegin: true, excludeEnd: true + } + ], + relevance: 10 + }; + const BOLD = { + className: 'strong', + contains: [], + variants: [ + {begin: /_{2}/, end: /_{2}/ }, + {begin: /\*{2}/, end: /\*{2}/ } + ] + }; + const ITALIC = { + className: 'emphasis', + contains: [], + variants: [ + { begin: /\*(?!\*)/, end: /\*/ }, + { begin: /_(?!_)/, end: /_/, relevance: 0}, + ] + }; + BOLD.contains.push(ITALIC); + ITALIC.contains.push(BOLD); + + var CONTAINABLE = [ + INLINE_HTML, + LINK + ]; + + BOLD.contains = BOLD.contains.concat(CONTAINABLE); + ITALIC.contains = ITALIC.contains.concat(CONTAINABLE); + + CONTAINABLE = CONTAINABLE.concat(BOLD,ITALIC); + + const HEADER = { + className: 'section', + variants: [ + { + begin: '^#{1,6}', + end: '$', + contains: CONTAINABLE + }, + { + begin: '(?=^.+?\\n[=-]{2,}$)', + contains: [ + { begin: '^[=-]*$' }, + { begin: '^', end: "\\n", contains: CONTAINABLE }, + ] + } + ] + }; + + const BLOCKQUOTE = { + className: 'quote', + begin: '^>\\s+', + contains: CONTAINABLE, + end: '$', + }; + + return { + name: 'Markdown', + aliases: ['md', 'mkdown', 'mkd'], + contains: [ + HEADER, + INLINE_HTML, + LIST, + BOLD, + ITALIC, + BLOCKQUOTE, + CODE, + HORIZONTAL_RULE, + LINK, + LINK_REFERENCE + ] + }; +} + +module.exports = markdown; diff --git a/node_modules/highlight.js/lib/languages/mathematica.js b/node_modules/highlight.js/lib/languages/mathematica.js @@ -0,0 +1,61 @@ +/* +Language: Mathematica +Description: Wolfram Mathematica (usually termed Mathematica) is a modern technical computing system spanning most areas of technical computing. +Authors: Daniel Kvasnicka <dkvasnicka@vendavo.com>, Jan Poeschko <jan@poeschko.com> +Website: https://www.wolfram.com/mathematica/ +Category: scientific +*/ + +function mathematica(hljs) { + return { + name: 'Mathematica', + aliases: ['mma', 'wl'], + // + // The list of "keywords" (System` symbols) was determined by evaluating the following Wolfram Language code in Mathematica 12.0: + // + // StringRiffle[ + // "'" <> StringRiffle[#, " "] <> "'" & /@ + // Values[GroupBy[ + // Select[Names["System`*"], + // StringStartsQ[#, CharacterRange["A", "Z"] | "$"] &], + // First[Characters[#]] &]], " +\n"] + // + keywords: { + $pattern: '(\\$|\\b)' + hljs.IDENT_RE + '\\b', + keyword: 'AASTriangle AbelianGroup Abort AbortKernels AbortProtect AbortScheduledTask Above Abs AbsArg AbsArgPlot Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AcceptanceThreshold AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Activate Active ActiveClassification ActiveClassificationObject ActiveItem ActivePrediction ActivePredictionObject ActiveStyle AcyclicGraphQ AddOnHelpPath AddSides AddTo AddToSearchIndex AddUsers AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AdministrativeDivisionData AffineHalfSpace AffineSpace AffineStateSpaceModel AffineTransform After AggregatedEntityClass AggregationLayer AircraftData AirportData AirPressureData AirTemperatureData AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowAdultContent AllowedCloudExtraParameters AllowedCloudParameterExtensions AllowedDimensions AllowedFrequencyRange AllowedHeads AllowGroupClose AllowIncomplete AllowInlineCells AllowKernelInitialization AllowLooseGrammar AllowReverseGroupClose AllowScriptLevelChange AllTrue Alphabet AlphabeticOrder AlphabeticSort AlphaChannel AlternateImage AlternatingFactorial AlternatingGroup AlternativeHypothesis Alternatives AltitudeMethod AmbientLight AmbiguityFunction AmbiguityList Analytic AnatomyData AnatomyForm AnatomyPlot3D AnatomySkinStyle AnatomyStyling AnchoredSearch And AndersonDarlingTest AngerJ AngleBisector AngleBracket AnglePath AnglePath3D AngleVector AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning AnimationRunTime AnimationTimeIndex Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotate Annotation AnnotationDelete AnnotationNames AnnotationRules AnnotationValue Annuity AnnuityDue Annulus AnomalyDetection AnomalyDetectorFunction Anonymous Antialiasing AntihermitianMatrixQ Antisymmetric AntisymmetricMatrixQ Antonyms AnyOrder AnySubset AnyTrue Apart ApartSquareFree APIFunction Appearance AppearanceElements AppearanceRules AppellF1 Append AppendCheck AppendLayer AppendTo ApplicationIdentificationKey Apply ApplySides ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcCurvature ARCHProcess ArcLength ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Area Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess Around AroundReplace ARProcess Array ArrayComponents ArrayDepth ArrayFilter ArrayFlatten ArrayMesh ArrayPad ArrayPlot ArrayQ ArrayResample ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads ASATriangle Ask AskAppend AskConfirm AskDisplay AskedQ AskedValue AskFunction AskState AskTemplateDisplay AspectRatio AspectRatioFixed Assert AssociateTo Association AssociationFormat AssociationMap AssociationQ AssociationThread AssumeDeterministic Assuming Assumptions AstronomicalData AsymptoticDSolveValue AsymptoticEqual AsymptoticEquivalent AsymptoticGreater AsymptoticGreaterEqual AsymptoticIntegrate AsymptoticLess AsymptoticLessEqual AsymptoticOutputTracker AsymptoticRSolveValue AsymptoticSolve AsymptoticSum Asynchronous AsynchronousTaskObject AsynchronousTasks Atom AtomCoordinates AtomCount AtomDiagramCoordinates AtomList AtomQ AttentionLayer Attributes Audio AudioAmplify AudioAnnotate AudioAnnotationLookup AudioBlockMap AudioCapture AudioChannelAssignment AudioChannelCombine AudioChannelMix AudioChannels AudioChannelSeparate AudioData AudioDelay AudioDelete AudioDevice AudioDistance AudioFade AudioFrequencyShift AudioGenerator AudioIdentify AudioInputDevice AudioInsert AudioIntervals AudioJoin AudioLabel AudioLength AudioLocalMeasurements AudioLooping AudioLoudness AudioMeasurements AudioNormalize AudioOutputDevice AudioOverlay AudioPad AudioPan AudioPartition AudioPause AudioPitchShift AudioPlay AudioPlot AudioQ AudioRecord AudioReplace AudioResample AudioReverb AudioSampleRate AudioSpectralMap AudioSpectralTransformation AudioSplit AudioStop AudioStream AudioStreams AudioTimeStretch AudioTrim AudioType AugmentedPolyhedron AugmentedSymmetricPolynomial Authenticate Authentication AuthenticationDialog AutoAction Autocomplete AutocompletionFunction AutoCopy AutocorrelationTest AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutoQuoteCharacters AutoRefreshed AutoRemove AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords AutoSubmitting Axes AxesEdge AxesLabel AxesOrigin AxesStyle AxiomaticTheory Axis ' + + 'BabyMonsterGroupB Back Background BackgroundAppearance BackgroundTasksSettings Backslash Backsubstitution Backward Ball Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarcodeImage BarcodeRecognize BaringhausHenzeTest BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseDecode BaseEncode BaseForm Baseline BaselinePosition BaseStyle BasicRecurrentLayer BatchNormalizationLayer BatchSize BatesDistribution BattleLemarieWavelet BayesianMaximization BayesianMaximizationObject BayesianMinimization BayesianMinimizationObject Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized Between BetweennessCentrality BeveledPolyhedron BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryDeserialize BinaryDistance BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinarySerialize BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BiquadraticFilterModel BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor BiweightLocation BiweightMidvariance Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockchainAddressData BlockchainBase BlockchainBlockData BlockchainContractValue BlockchainData BlockchainGet BlockchainKeyEncode BlockchainPut BlockchainTokenData BlockchainTransaction BlockchainTransactionData BlockchainTransactionSign BlockchainTransactionSubmit BlockMap BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bond BondCount BondList BondQ Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms BooleanQ BooleanRegion Booleans BooleanStrings BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryDiscretizeGraphics BoundaryDiscretizeRegion BoundaryMesh BoundaryMeshRegion BoundaryMeshRegionQ BoundaryStyle BoundedRegionQ BoundingRegion Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxObject BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break BridgeData BrightnessEqualize BroadcastStationData Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurve3DBoxOptions BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BSplineSurface3DBoxOptions BubbleChart BubbleChart3D BubbleScale BubbleSizes BuildingData BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteArray ByteArrayFormat ByteArrayQ ByteArrayToString ByteCount ByteOrdering ' + + 'C CachedValue CacheGraphics CachePersistence CalendarConvert CalendarData CalendarType Callout CalloutMarker CalloutStyle CallPacket CanberraDistance Cancel CancelButton CandlestickChart CanonicalGraph CanonicalizePolygon CanonicalizePolyhedron CanonicalName CanonicalWarpingCorrespondence CanonicalWarpingDistance CantorMesh CantorStaircase Cap CapForm CapitalDifferentialD Capitalize CapsuleShape CaptureRunning CardinalBSplineBasis CarlemanLinearize CarmichaelLambda CaseOrdering Cases CaseSensitive Cashflow Casoratian Catalan CatalanNumber Catch Catenate CatenateLayer CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling CelestialSystem Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEvaluationLanguage CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellLabelStyle CellLabelTemplate CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterArray CenterDot CentralFeature CentralMoment CentralMomentGeneratingFunction Cepstrogram CepstrogramArray CepstrumArray CForm ChampernowneNumber ChangeOptions ChannelBase ChannelBrokerAction ChannelDatabin ChannelHistoryLength ChannelListen ChannelListener ChannelListeners ChannelListenerWait ChannelObject ChannelPreSendFunction ChannelReceiverFunction ChannelSend ChannelSubscribers ChanVeseBinarize Character CharacterCounts CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterName CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop ChromaticityPlot ChromaticityPlot3D ChromaticPolynomial Circle CircleBox CircleDot CircleMinus CirclePlus CirclePoints CircleThrough CircleTimes CirculantGraph CircularOrthogonalMatrixDistribution CircularQuaternionMatrixDistribution CircularRealMatrixDistribution CircularSymplecticMatrixDistribution CircularUnitaryMatrixDistribution Circumsphere CityData ClassifierFunction ClassifierInformation ClassifierMeasurements ClassifierMeasurementsObject Classify ClassPriors Clear ClearAll ClearAttributes ClearCookies ClearPermissions ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipPlanesStyle ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent CloudAccountData CloudBase CloudConnect CloudDeploy CloudDirectory CloudDisconnect CloudEvaluate CloudExport CloudExpression CloudExpressions CloudFunction CloudGet CloudImport CloudLoggingData CloudObject CloudObjectInformation CloudObjectInformationData CloudObjectNameFormat CloudObjects CloudObjectURLType CloudPublish CloudPut CloudRenderingMethod CloudSave CloudShare CloudSubmit CloudSymbol CloudUnshare ClusterClassify ClusterDissimilarityFunction ClusteringComponents ClusteringTree CMYKColor Coarse CodeAssistOptions Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorBalance ColorCombine ColorConvert ColorCoverage ColorData ColorDataFunction ColorDetect ColorDistance ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQ ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorsNear ColorSpace ColorToneMapping Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CombinedEntityClass CombinerFunction CometData CommonDefaultFormatTypes Commonest CommonestFilter CommonName CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompanyData CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledCodeFunction CompiledFunction CompilerOptions Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComplexListPlot ComplexPlot ComplexPlot3D ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries CompositeQ Composition CompoundElement CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData ComputeUncertainty Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath ConformAudio ConformImages Congruent ConicHullRegion ConicHullRegion3DBox ConicHullRegionBox ConicOptimization Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphComponents ConnectedGraphQ ConnectedMeshComponents ConnectedMoleculeComponents ConnectedMoleculeQ ConnectionSettings ConnectLibraryCallbackFunction ConnectSystemModelComponents ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray ConstantArrayLayer ConstantImage ConstantPlusLayer ConstantRegionQ Constants ConstantTimesLayer ConstellationData ConstrainedMax ConstrainedMin Construct Containing ContainsAll ContainsAny ContainsExactly ContainsNone ContainsOnly ContentFieldOptions ContentLocationFunction ContentObject ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTask ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean ContrastiveLossLayer Control ControlActive ControlAlignment ControlGroupContentsBox ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket ConvexHullMesh ConvexPolygonQ ConvexPolyhedronQ ConvolutionLayer Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CookieFunction Cookies CoordinateBoundingBox CoordinateBoundingBoxArray CoordinateBounds CoordinateBoundsArray CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDatabin CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CountDistinct CountDistinctBy CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Counts CountsBy Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateCellID CreateChannel CreateCloudExpression CreateDatabin CreateDataSystemModel CreateDialog CreateDirectory CreateDocument CreateFile CreateIntermediateDirectories CreateManagedLibraryExpression CreateNotebook CreatePalette CreatePalettePacket CreatePermissionsGroup CreateScheduledTask CreateSearchIndex CreateSystemModel CreateTemporary CreateUUID CreateWindow CriterionFunction CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossEntropyLossLayer CrossingCount CrossingDetect CrossingPolygon CrossMatrix Csc Csch CTCLossLayer Cube CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrencyConvert CurrentDate CurrentImage CurrentlySpeakingPacket CurrentNotebookImage CurrentScreenImage CurrentValue Curry CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition ' + + 'D DagumDistribution DamData DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DatabaseConnect DatabaseDisconnect DatabaseReference Databin DatabinAdd DatabinRemove Databins DatabinUpload DataCompression DataDistribution DataRange DataReversed Dataset Date DateBounds Dated DateDelimiters DateDifference DatedUnit DateFormat DateFunction DateHistogram DateList DateListLogPlot DateListPlot DateListStepPlot DateObject DateObjectQ DateOverlapsQ DatePattern DatePlus DateRange DateReduction DateString DateTicksFormat DateValue DateWithinQ DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayHemisphere DaylightQ DayMatchQ DayName DayNightTerminator DayPlus DayRange DayRound DeBruijnGraph DeBruijnSequence Debug DebugTag Decapitalize Decimal DecimalForm DeclareKnownSymbols DeclarePackage Decompose DeconvolutionLayer Decrement Decrypt DecryptFile DedekindEta DeepSpaceProbeData Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultPrintPrecision DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValue DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod DefineResourceFunction Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic DEigensystem DEigenvalues Deinitialization Del DelaunayMesh Delayed Deletable Delete DeleteAnomalies DeleteBorderComponents DeleteCases DeleteChannel DeleteCloudExpression DeleteContents DeleteDirectory DeleteDuplicates DeleteDuplicatesBy DeleteFile DeleteMissing DeleteObject DeletePermissionsKey DeleteSearchIndex DeleteSmallComponents DeleteStopwords DeleteWithContents DeletionWarning DelimitedArray DelimitedSequence Delimiter DelimiterFlashTime DelimiterMatching Delimiters DeliveryFunction Dendrogram Denominator DensityGraphics DensityHistogram DensityPlot DensityPlot3D DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DerivedKey DescriptorStateSpace DesignMatrix DestroyAfterEvaluation Det DeviceClose DeviceConfigure DeviceExecute DeviceExecuteAsynchronous DeviceObject DeviceOpen DeviceOpenQ DeviceRead DeviceReadBuffer DeviceReadLatest DeviceReadList DeviceReadTimeSeries Devices DeviceStreams DeviceWrite DeviceWriteBuffer DGaussianWavelet DiacriticalPositioning Diagonal DiagonalizableMatrixQ DiagonalMatrix DiagonalMatrixQ Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DictionaryWordQ DifferenceDelta DifferenceOrder DifferenceQuotient DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitalSignature DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralAngle DihedralGroup Dilation DimensionalCombinations DimensionalMeshComponents DimensionReduce DimensionReducerFunction DimensionReduction Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletBeta DirichletCharacter DirichletCondition DirichletConvolve DirichletDistribution DirichletEta DirichletL DirichletLambda DirichletTransform DirichletWindow DisableConsolePrintPacket DisableFormatting DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLimit DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscreteMaxLimit DiscreteMinLimit DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform DiscretizeGraphics DiscretizeRegion Discriminant DisjointQ Disjunction Disk DiskBox DiskMatrix DiskSegment Dispatch DispatchQ DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceMatrix DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers DivideSides Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentGenerator DocumentGeneratorInformation DocumentGeneratorInformationData DocumentGenerators DocumentNotebook DocumentWeightingRules Dodecahedron DomainRegistrationInformation DominantColors DOSTextFormat Dot DotDashed DotEqual DotLayer DotPlusLayer Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DropoutLayer DSolve DSolveValue Dt DualLinearProgramming DualPolyhedron DualSystemsModel DumpGet DumpSave DuplicateFreeQ Duration Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicGeoGraphics DynamicImage DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions ' + + 'E EarthImpactData EarthquakeData EccentricityCentrality Echo EchoFunction EclipseType EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeContract EdgeCost EdgeCount EdgeCoverQ EdgeCycleMatrix EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight EdgeWeightedGraphQ Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData ElementwiseLayer ElidedForms Eliminate EliminationOrder Ellipsoid EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmbedCode EmbeddedHTML EmbeddedService EmbeddingLayer EmbeddingObject EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EmptyRegion EnableConsolePrintPacket Enabled Encode Encrypt EncryptedObject EncryptFile End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfBuffer EndOfFile EndOfLine EndOfString EndPackage EngineEnvironment EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entity EntityClass EntityClassList EntityCopies EntityFunction EntityGroup EntityInstance EntityList EntityPrefetch EntityProperties EntityProperty EntityPropertyClass EntityRegister EntityStore EntityStores EntityTypeName EntityUnregister EntityValue Entropy EntropyFilter Environment Epilog EpilogFunction Equal EqualColumns EqualRows EqualTilde EqualTo EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EscapeRadius EstimatedBackground EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerAngles EulerCharacteristic EulerE EulerGamma EulerianGraphQ EulerMatrix EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluateScheduledTask EvaluationBox EvaluationCell EvaluationCompletionAction EvaluationData EvaluationElements EvaluationEnvironment EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels EventSeries ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludedLines ExcludedPhysicalQuantities ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog ExoplanetData Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi ExpirationDate Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportByteArray ExportForm ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpressionUUID ExpToTrig ExtendedEntityClass ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalBundle ExternalCall ExternalDataCharacterEncoding ExternalEvaluate ExternalFunction ExternalFunctionName ExternalObject ExternalOptions ExternalSessionObject ExternalSessions ExternalTypeSignature ExternalValue Extract ExtractArchive ExtractLayer ExtremeValueDistribution ' + + 'FaceForm FaceGrids FaceGridsStyle FacialFeatures Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail Failure FailureAction FailureDistribution FailureQ False FareySequence FARIMAProcess FeatureDistance FeatureExtract FeatureExtraction FeatureExtractor FeatureExtractorFunction FeatureNames FeatureNearest FeatureSpacePlot FeatureSpacePlot3D FeatureTypes FEDisableConsolePrintPacket FeedbackLinearize FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket FetalGrowthData Fibonacci Fibonorial FieldCompletionFunction FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileConvert FileDate FileExistsQ FileExtension FileFormat FileHandler FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameForms FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileSize FileSystemMap FileSystemScan FileTemplate FileTemplateApply FileType FilledCurve FilledCurveBox FilledCurveBoxOptions Filling FillingStyle FillingTransform FilteredEntityClass FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindAnomalies FindArgMax FindArgMin FindChannels FindClique FindClusters FindCookies FindCurvePath FindCycle FindDevices FindDistribution FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEdgeIndependentPaths FindEquationalProof FindEulerianCycle FindExternalEvaluators FindFaces FindFile FindFit FindFormula FindFundamentalCycles FindGeneratingFunction FindGeoLocation FindGeometricConjectures FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindHamiltonianPath FindHiddenMarkovStates FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMatchingColor FindMaximum FindMaximumFlow FindMaxValue FindMeshDefects FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindMoleculeSubstructure FindPath FindPeaks FindPermutation FindPostmanTour FindProcessParameters FindRepeat FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindSpanningTree FindSystemModelEquilibrium FindTextualAnswer FindThreshold FindTransientRepeat FindVertexCover FindVertexCut FindVertexIndependentPaths Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstCase FirstPassageTimeDistribution FirstPosition FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FitRegularization FittedModel FixedOrder FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlattenLayer FlatTopWindow FlipView Floor FlowPolynomial FlushPrintOutputPacket Fold FoldList FoldPair FoldPairList FollowRedirects Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FormControl FormFunction FormLayoutFunction FormObject FormPage FormTheme FormulaData FormulaLookup FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalGaussianNoiseProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameRate FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrenetSerretSystem FrequencySamplingFilterKernel FresnelC FresnelF FresnelG FresnelS Friday FrobeniusNumber FrobeniusSolve FromAbsoluteTime FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS FromEntity FromJulianDate FromLetterNumber FromPolarCoordinates FromRomanNumeral FromSphericalCoordinates FromUnixTime Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullInformationOutputRegulator FullOptions FullRegion FullSimplify Function FunctionCompile FunctionCompileExport FunctionCompileExportByteArray FunctionCompileExportLibrary FunctionCompileExportString FunctionDomain FunctionExpand FunctionInterpolation FunctionPeriod FunctionRange FunctionSpace FussellVeselyImportance' + + 'GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins GalaxyData GalleryView Gamma GammaDistribution GammaRegularized GapPenalty GARCHProcess GatedRecurrentLayer Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianOrthogonalMatrixDistribution GaussianSymplecticMatrixDistribution GaussianUnitaryMatrixDistribution GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateAsymmetricKeyPair GenerateConditions GeneratedCell GeneratedDocumentBinding GenerateDerivedKey GenerateDigitalSignature GenerateDocument GeneratedParameters GeneratedQuantityMagnitudes GenerateHTTPResponse GenerateSecuredAuthenticationKey GenerateSymmetricKey GeneratingFunction GeneratorDescription GeneratorHistoryLength GeneratorOutputType Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeoAntipode GeoArea GeoArraySize GeoBackground GeoBoundingBox GeoBounds GeoBoundsRegion GeoBubbleChart GeoCenter GeoCircle GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDisk GeoDisplacement GeoDistance GeoDistanceList GeoElevationData GeoEntities GeoGraphics GeogravityModelData GeoGridDirectionDifference GeoGridLines GeoGridLinesStyle GeoGridPosition GeoGridRange GeoGridRangePadding GeoGridUnitArea GeoGridUnitDistance GeoGridVector GeoGroup GeoHemisphere GeoHemisphereBoundary GeoHistogram GeoIdentify GeoImage GeoLabels GeoLength GeoListPlot GeoLocation GeologicalPeriodData GeomagneticModelData GeoMarker GeometricAssertion GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricScene GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoModel GeoNearest GeoPath GeoPosition GeoPositionENU GeoPositionXYZ GeoProjection GeoProjectionData GeoRange GeoRangePadding GeoRegionValuePlot GeoResolution GeoScaleBar GeoServer GeoSmoothHistogram GeoStreamPlot GeoStyling GeoStylingImageFunction GeoVariant GeoVector GeoVectorENU GeoVectorPlot GeoVectorXYZ GeoVisibleRegion GeoVisibleRegionBoundary GeoWithinQ GeoZoomLevel GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenAngle GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter GrammarApply GrammarRules GrammarToken Graph Graph3D GraphAssortativity GraphAutomorphismGroup GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel Greater GreaterEqual GreaterEqualLess GreaterEqualThan GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterThan GreaterTilde Green GreenFunction Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupBy GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators Groupings GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain GroupTogetherGrouping GroupTogetherNestedGrouping GrowCutComponents Gudermannian GuidedFilter GumbelDistribution ' + + 'HaarWavelet HadamardMatrix HalfLine HalfNormalDistribution HalfPlane HalfSpace HamiltonianGraphQ HammingDistance HammingWindow HandlerFunctions HandlerFunctionsKeys HankelH1 HankelH2 HankelMatrix HankelTransform HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash Haversine HazardFunction Head HeadCompose HeaderLines Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings Here HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenMarkovProcess HiddenSurface Highlighted HighlightGraph HighlightImage HighlightMesh HighpassFilter HigmanSimsGroupHS HilbertCurve HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HistoricalPeriodData HitMissTransform HITSCentrality HjorthDistribution HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HostLookup HotellingTSquareDistribution HoytDistribution HTMLSave HTTPErrorResponse HTTPRedirect HTTPRequest HTTPRequestData HTTPResponse Hue HumanGrowthData HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyperplane Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData ' + + 'I IconData Iconize IconizedObject IconRules Icosahedron Identity IdentityMatrix If IgnoreCase IgnoreDiacritics IgnorePunctuation IgnoreSpellCheck IgnoringInactive Im Image Image3D Image3DProjection Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageApplyIndexed ImageAspectRatio ImageAssemble ImageAugmentationLayer ImageBoundingBoxes ImageCache ImageCacheValid ImageCapture ImageCaptureFunction ImageCases ImageChannels ImageClip ImageCollage ImageColorSpace ImageCompose ImageContainsQ ImageContents ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDisplacements ImageDistance ImageEffect ImageExposureCombine ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageFocusCombine ImageForestingComponents ImageFormattingWidth ImageForwardTransformation ImageGraphics ImageHistogram ImageIdentify ImageInstanceQ ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarker ImageMarkers ImageMeasurements ImageMesh ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImagePosition ImagePreviewFunction ImagePyramid ImagePyramidApply ImageQ ImageRangeCache ImageRecolor ImageReflect ImageRegion ImageResize ImageResolution ImageRestyle ImageRotate ImageRotated ImageSaliencyFilter ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions ImagingDevice ImplicitRegion Implies Import ImportAutoReplacements ImportByteArray ImportOptions ImportString ImprovementImportance In Inactivate Inactive IncidenceGraph IncidenceList IncidenceMatrix IncludeAromaticBonds IncludeConstantBasis IncludeDefinitions IncludeDirectories IncludeFileExtension IncludeGeneratorTasks IncludeHydrogens IncludeInflections IncludeMetaInformation IncludePods IncludeQuantities IncludeRelatedTables IncludeSingularTerm IncludeWindowTimes Increment IndefiniteMatrixQ Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentPhysicalQuantity IndependentUnit IndependentUnitDimension IndependentVertexSetQ Indeterminate IndeterminateThreshold IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers InfiniteLine InfinitePlane Infinity Infix InflationAdjust InflationMethod Information InformationData InformationDataGrid Inherited InheritScope InhomogeneousPoissonProcess InitialEvaluationHistory Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InitializationObjects InitializationValue Initialize InitialSeeding InlineCounterAssignments InlineCounterIncrements InlineRules Inner InnerPolygon InnerPolyhedron Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionFunction InsertionPointObject InsertLinebreaks InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Insphere Install InstallService InstanceNormalizationLayer InString Integer IntegerDigits IntegerExponent IntegerLength IntegerName IntegerPart IntegerPartitions IntegerQ IntegerReverse Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction Interpreter InterpretTemplate InterquartileRange Interrupt InterruptSettings IntersectingQ Intersection Interval IntervalIntersection IntervalMarkers IntervalMarkersStyle IntervalMemberQ IntervalSlider IntervalUnion Into Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHankelTransform InverseHaversine InverseImagePyramid InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InverseMellinTransform InversePermutation InverseRadon InverseRadonTransform InverseSeries InverseShortTimeFourier InverseSpectrogram InverseSurvivalFunction InverseTransformedRegion InverseWaveletTransform InverseWeierstrassP InverseWishartMatrixDistribution InverseZTransform Invisible InvisibleApplication InvisibleTimes IPAddress IrreduciblePolynomialQ IslandData IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemAspectRatio ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess ' + + 'JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join JoinAcross Joined JoinedCurve JoinedCurveBox JoinedCurveBoxOptions JoinForm JordanDecomposition JordanModelDecomposition JulianDate JuliaSetBoettcher JuliaSetIterationCount JuliaSetPlot JuliaSetPoints ' + + 'K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KEdgeConnectedComponents KEdgeConnectedGraphQ KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelFunction KernelMixtureDistribution Kernels Ket Key KeyCollisionFunction KeyComplement KeyDrop KeyDropFrom KeyExistsQ KeyFreeQ KeyIntersection KeyMap KeyMemberQ KeypointStrength Keys KeySelect KeySort KeySortBy KeyTake KeyUnion KeyValueMap KeyValuePattern Khinchin KillProcess KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnapsackSolve KnightTourGraph KnotData KnownUnitQ KochCurve KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter KVertexConnectedComponents KVertexConnectedGraphQ ' + + 'LABColor Label Labeled LabeledSlider LabelingFunction LabelingSize LabelStyle LabelVisibility LaguerreL LakeData LambdaComponents LambertW LaminaData LanczosWindow LandauDistribution Language LanguageCategory LanguageData LanguageIdentify LanguageOptions LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCHColor LCM LeaderSize LeafCount LeapYearQ LearnDistribution LearnedDistribution LearningRate LearningRateMultipliers LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessEqualThan LessFullEqual LessGreater LessLess LessSlantEqual LessThan LessTilde LetterCharacter LetterCounts LetterNumber LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryDataType LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox Line3DBoxOptions LinearFilter LinearFractionalOptimization LinearFractionalTransform LinearGradientImage LinearizingTransformationData LinearLayer LinearModelFit LinearOffsetFunction LinearOptimization LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBoxOptions LineBreak LinebreakAdjustments LineBreakChart LinebreakSemicolonWeighting LineBreakWithin LineColor LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRankCentrality LinkRead LinkReadHeld LinkReadyQ Links LinkService LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot ListDensityPlot3D Listen ListFormat ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListSliceContourPlot3D ListSliceDensityPlot3D ListSliceVectorPlot3D ListStepPlot ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalAdaptiveBinarize LocalCache LocalClusteringCoefficient LocalizeDefinitions LocalizeVariables LocalObject LocalObjects LocalResponseNormalizationLayer LocalSubmit LocalSymbol LocalTime LocalTimeZone LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogisticSigmoid LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongestOrderedSequence LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow LongShortTermMemoryLayer Lookup Loopback LoopFreeGraphQ LossFunction LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowerTriangularMatrixQ LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LunarEclipse LUVColor LyapunovSolve LyonsGroupLy ' + + 'MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MailAddressValidation MailExecute MailFolder MailItem MailReceiverFunction MailResponseFunction MailSearch MailServerConnect MailServerConnection MailSettings MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules ManagedLibraryExpressionID ManagedLibraryExpressionQ MandelbrotSetBoettcher MandelbrotSetDistance MandelbrotSetIterationCount MandelbrotSetMemberQ MandelbrotSetPlot MangoldtLambda ManhattanDistance Manipulate Manipulator MannedSpaceMissionData MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarchenkoPasturDistribution MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicalFunctionData MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixNormalDistribution MatrixPlot MatrixPower MatrixPropertyDistribution MatrixQ MatrixRank MatrixTDistribution Max MaxBend MaxCellMeasure MaxColorDistance MaxDetect MaxDuration MaxExtraBandwidths MaxExtraConditions MaxFeatureDisplacement MaxFeatures MaxFilter MaximalBy Maximize MaxItems MaxIterations MaxLimit MaxMemoryUsed MaxMixtureKernels MaxOverlapFraction MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxTrainingRounds MaxValue MaxwellDistribution MaxWordGap McLaughlinGroupMcL Mean MeanAbsoluteLossLayer MeanAround MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter MeanSquaredLossLayer Median MedianDeviation MedianFilter MedicalTestData Medium MeijerG MeijerGReduce MeixnerDistribution MellinConvolve MellinTransform MemberQ MemoryAvailable MemoryConstrained MemoryConstraint MemoryInUse MengerMesh Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuList MenuPacket MenuSortingValue MenuStyle MenuView Merge MergeDifferences MergingFunction MersennePrimeExponent MersennePrimeExponentQ Mesh MeshCellCentroid MeshCellCount MeshCellHighlight MeshCellIndex MeshCellLabel MeshCellMarker MeshCellMeasure MeshCellQuality MeshCells MeshCellShapeFunction MeshCellStyle MeshCoordinates MeshFunctions MeshPrimitives MeshQualityGoal MeshRange MeshRefinementFunction MeshRegion MeshRegionQ MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageObject MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation MeteorShowerData Method MethodOptions MexicanHatWavelet MeyerWavelet Midpoint Min MinColorDistance MinDetect MineralData MinFilter MinimalBy MinimalPolynomial MinimalStateSpaceModel Minimize MinimumTimeIncrement MinIntervalSize MinkowskiQuestionMark MinLimit MinMax MinorPlanetData Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingBehavior MissingDataMethod MissingDataRules MissingQ MissingString MissingStyle MissingValuePattern MittagLefflerE MixedFractionParts MixedGraphQ MixedMagnitude MixedRadix MixedRadixQuantity MixedUnit MixtureDistribution Mod Modal Mode Modular ModularInverse ModularLambda Module Modulus MoebiusMu Molecule MoleculeContainsQ MoleculeEquivalentQ MoleculeGraph MoleculeModify MoleculePattern MoleculePlot MoleculePlot3D MoleculeProperty MoleculeQ MoleculeValue Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction MomentOfInertia Monday Monitor MonomialList MonomialOrder MonsterGroupM MoonPhase MoonPosition MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform MortalityData Most MountainData MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovieData MovingAverage MovingMap MovingMedian MoyalDistribution Multicolumn MultiedgeStyle MultigraphQ MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity MultiplySides Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution ' + + 'N NakagamiDistribution NameQ Names NamespaceBox NamespaceBoxOptions Nand NArgMax NArgMin NBernoulliB NBodySimulation NBodySimulationData NCache NDEigensystem NDEigenvalues NDSolve NDSolveValue Nearest NearestFunction NearestNeighborGraph NearestTo NebulaData NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeDefiniteMatrixQ NegativeIntegers NegativeMultinomialDistribution NegativeRationals NegativeReals NegativeSemidefiniteMatrixQ NeighborhoodData NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestGraph NestList NestWhile NestWhileList NetAppend NetBidirectionalOperator NetChain NetDecoder NetDelete NetDrop NetEncoder NetEvaluationMode NetExtract NetFlatten NetFoldOperator NetGraph NetInformation NetInitialize NetInsert NetInsertSharedArrays NetJoin NetMapOperator NetMapThreadOperator NetMeasurements NetModel NetNestOperator NetPairEmbeddingOperator NetPort NetPortGradient NetPrepend NetRename NetReplace NetReplacePart NetSharedArray NetStateObject NetTake NetTrain NetTrainResultsObject NetworkPacketCapture NetworkPacketRecording NetworkPacketRecordingDuring NetworkPacketTrace NeumannValue NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextCell NextDate NextPrime NextScheduledTaskTime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NightHemisphere NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants NondimensionalizationTransform None NoneTrue NonlinearModelFit NonlinearStateSpaceModel NonlocalMeansFilter NonNegative NonNegativeIntegers NonNegativeRationals NonNegativeReals NonPositive NonPositiveIntegers NonPositiveRationals NonPositiveReals Nor NorlundB Norm Normal NormalDistribution NormalGrouping NormalizationLayer Normalize Normalized NormalizedSquaredEuclideanDistance NormalMatrixQ NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookImport NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookTemplate NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde Nothing NotHumpDownHump NotHumpEqual NotificationFunction NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar Now NoWhitespace NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms NuclearExplosionData NuclearReactorData Null NullRecords NullSpace NullWords Number NumberCompose NumberDecompose NumberExpand NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberLinePlot NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumeratorDenominator NumericalOrder NumericalSort NumericArray NumericArrayQ NumericArrayType NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot ' + + 'O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OceanData Octahedron OddQ Off Offset OLEData On ONanGroupON Once OneIdentity Opacity OpacityFunction OpacityFunctionScaling Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionalElement OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering OrderingBy OrderingLayer Orderless OrderlessPatternSequence OrnsteinUhlenbeckProcess Orthogonalize OrthogonalMatrixQ Out Outer OuterPolygon OuterPolyhedron OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OverwriteTarget OwenT OwnValues ' + + 'Package PackingMethod PaddedForm Padding PaddingLayer PaddingSize PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageTheme PageWidth Pagination PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath PalindromeQ Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo Parallelepiped ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds Parallelogram ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParametricRegion ParentBox ParentCell ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParentNotebook ParetoDistribution ParetoPickandsDistribution ParkData Part PartBehavior PartialCorrelationFunction PartialD ParticleAcceleratorData ParticleData Partition PartitionGranularity PartitionsP PartitionsQ PartLayer PartOfSpeech PartProtection ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteAutoQuoteCharacters PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PeakDetect PeanoCurve PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PercentForm PerfectNumber PerfectNumberQ PerformanceGoal Perimeter PeriodicBoundaryCondition PeriodicInterpolation Periodogram PeriodogramArray Permanent Permissions PermissionsGroup PermissionsGroupMemberQ PermissionsGroups PermissionsKey PermissionsKeys PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PerpendicularBisector PersistenceLocation PersistenceTime PersistentObject PersistentObjects PersistentValue PersonData PERTDistribution PetersenGraph PhaseMargins PhaseRange PhysicalSystemData Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest PingTime Pink PitchRecognize Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarAngle PlanarGraph PlanarGraphQ PlanckRadiationLaw PlaneCurveData PlanetaryMoonData PlanetData PlantData Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLabels PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangeClipPlanesStyle PlotRangePadding PlotRegion PlotStyle PlotTheme Pluralize Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox Point3DBoxOptions PointBox PointBoxOptions PointFigureChart PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonalNumber PolygonAngle PolygonBox PolygonBoxOptions PolygonCoordinates PolygonDecomposition PolygonHoleScale PolygonIntersections PolygonScale Polyhedron PolyhedronAngle PolyhedronCoordinates PolyhedronData PolyhedronDecomposition PolyhedronGenus PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PoolingLayer PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position PositionIndex Positive PositiveDefiniteMatrixQ PositiveIntegers PositiveRationals PositiveReals PositiveSemidefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerRange PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement Predict PredictionRoot PredictorFunction PredictorInformation PredictorMeasurements PredictorMeasurementsObject PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependLayer PrependTo PreprocessingRules PreserveColor PreserveImageOptions Previous PreviousCell PreviousDate PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitivePolynomialQ PrimitiveRoot PrimitiveRootList PrincipalComponents PrincipalValue Print PrintableASCIIQ PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment Printout3D Printout3DPreviewer PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateKey PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessConnection ProcessDirectory ProcessEnvironment Processes ProcessEstimator ProcessInformation ProcessObject ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessStatus ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm ProofObject Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse PsychrometricPropertyData PublicKey PublisherID PulsarData PunctuationCharacter Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions ' + + 'QBinomial QFactorial QGamma QHypergeometricPFQ QnDispersion QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ QuadraticOptimization Quantile QuantilePlot Quantity QuantityArray QuantityDistribution QuantityForm QuantityMagnitude QuantityQ QuantityUnit QuantityVariable QuantityVariableCanonicalUnit QuantityVariableDimensions QuantityVariableIdentifier QuantityVariablePhysicalQuantity Quartics QuartileDeviation Quartiles QuartileSkewness Query QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder ' + + 'RadialGradientImage RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RadonTransform RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Ramp Random RandomChoice RandomColor RandomComplex RandomEntity RandomFunction RandomGeoPosition RandomGraph RandomImage RandomInstance RandomInteger RandomPermutation RandomPoint RandomPolygon RandomPolyhedron RandomPrime RandomReal RandomSample RandomSeed RandomSeeding RandomVariate RandomWalkProcess RandomWord Range RangeFilter RangeSpecification RankedMax RankedMin RarerProbability Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadByteArray ReadLine ReadList ReadProtected ReadString Real RealAbs RealBlockDiagonalForm RealDigits RealExponent Reals RealSign Reap RecognitionPrior RecognitionThreshold Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RectangularRepeatingElement RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate Region RegionBinarize RegionBoundary RegionBounds RegionCentroid RegionDifference RegionDimension RegionDisjoint RegionDistance RegionDistanceFunction RegionEmbeddingDimension RegionEqual RegionFunction RegionImage RegionIntersection RegionMeasure RegionMember RegionMemberFunction RegionMoment RegionNearest RegionNearestFunction RegionPlot RegionPlot3D RegionProduct RegionQ RegionResize RegionSize RegionSymmetricDifference RegionUnion RegionWithin RegisterExternalEvaluator RegularExpression Regularization RegularlySampledQ RegularPolygon ReIm ReImLabels ReImPlot ReImStyle Reinstall RelationalDatabase RelationGraph Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot RemoteAuthorizationCaching RemoteConnect RemoteConnectionObject RemoteFile RemoteRun RemoteRunProcess Remove RemoveAlphaChannel RemoveAsynchronousTask RemoveAudioStream RemoveBackground RemoveChannelListener RemoveChannelSubscribers Removed RemoveDiacritics RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RemoveUsers RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart RepairMesh Repeated RepeatedNull RepeatedString RepeatedTiming RepeatingElement Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated ReplicateLayer RequiredPhysicalQuantities Resampling ResamplingAlgorithmData ResamplingMethod Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask ReshapeLayer Residue ResizeLayer Resolve ResourceAcquire ResourceData ResourceFunction ResourceObject ResourceRegister ResourceRemove ResourceSearch ResourceSubmissionObject ResourceSubmit ResourceSystemBase ResourceUpdate ResponseForm Rest RestartInterval Restricted Resultant ResumePacket Return ReturnEntersInput ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnReceiptFunction ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseSort ReverseSortBy ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ RiemannXi Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightComposition RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity RollPitchYawAngles RollPitchYawMatrix RomanNumeral Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RSolveValue RudinShapiro RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulePlot RulerUnits Run RunProcess RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity ' + + 'SameQ SameTest SampledEntityClass SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SASTriangle SatelliteData SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveConnection SaveDefinitions SavitzkyGolayMatrix SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTask ScheduledTaskActiveQ ScheduledTaskInformation ScheduledTaskInformationData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScientificNotationThreshold ScorerGi ScorerGiPrime ScorerHi ScorerHiPrime ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptForm ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition SearchAdjustment SearchIndexObject SearchIndices SearchQueryString SearchResultObject Sec Sech SechDistribution SecondOrderConeOptimization SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SecuredAuthenticationKey SecuredAuthenticationKeys SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook SelectFirst Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemanticImport SemanticImportString SemanticInterpretation SemialgebraicComponentInstances SemidefiniteOptimization SendMail SendMessage Sequence SequenceAlignment SequenceAttentionLayer SequenceCases SequenceCount SequenceFold SequenceFoldList SequenceForm SequenceHold SequenceLastLayer SequenceMostLayer SequencePosition SequencePredict SequencePredictorFunction SequenceReplace SequenceRestLayer SequenceReverseLayer SequenceSplit Series SeriesCoefficient SeriesData ServiceConnect ServiceDisconnect ServiceExecute ServiceObject ServiceRequest ServiceResponse ServiceSubmit SessionSubmit SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetCloudDirectory SetCookies SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPermissions SetPrecision SetProperty SetSecuredAuthenticationKey SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemModel SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetUsers SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share SharingList Sharpen ShearingMatrix ShearingTransform ShellRegion ShenCastanMatrix ShiftedGompertzDistribution ShiftRegisterSequence Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortTimeFourier ShortTimeFourierData ShortUpArrow Show ShowAutoConvert ShowAutoSpellCheck ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowCodeAssist ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiderealTime SiegelTheta SiegelTukeyTest SierpinskiCurve SierpinskiMesh Sign Signature SignedRankTest SignedRegionDistance SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ SimplePolygonQ SimplePolyhedronQ Simplex Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution SkinStyle Skip SliceContourPlot3D SliceDensityPlot3D SliceDistribution SliceVectorPlot3D Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDecomposition SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SnDispersion Snippet SnubPolyhedron SocialMediaData Socket SocketConnect SocketListen SocketListener SocketObject SocketOpen SocketReadMessage SocketReadyQ Sockets SocketWaitAll SocketWaitNext SoftmaxLayer SokalSneathDissimilarity SolarEclipse SolarSystemFeatureData SolidAngle SolidData SolidRegionQ Solve SolveAlways SolveDelayed Sort SortBy SortedBy SortedEntityClass Sound SoundAndGraphics SoundNote SoundVolume SourceLink Sow Space SpaceCurveData SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution SpatialMedian SpatialTransformationLayer Speak SpeakTextPacket SpearmanRankTest SpearmanRho SpeciesData SpecificityGoal SpectralLineData Spectrogram SpectrogramArray Specularity SpeechRecognize SpeechSynthesize SpellingCorrection SpellingCorrectionList SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SpherePoints SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SphericalShell SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquareMatrixQ SquareRepeatingElement SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave SSSTriangle StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackedDateListPlot StackedListPlot StackInhibit StadiumShape StandardAtmosphereData StandardDeviation StandardDeviationFilter StandardForm Standardize Standardized StandardOceanData StandbyDistribution Star StarClusterData StarData StarGraph StartAsynchronousTask StartExternalSession StartingStepSize StartOfLine StartOfString StartProcess StartScheduledTask StartupSound StartWebSession StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StateTransformationLinearize StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StereochemistryElements StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StoppingPowerData StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamMarkers StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringContainsQ StringCount StringDelete StringDrop StringEndsQ StringExpression StringExtract StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPadLeft StringPadRight StringPart StringPartition StringPosition StringQ StringRepeat StringReplace StringReplaceList StringReplacePart StringReverse StringRiffle StringRotateLeft StringRotateRight StringSkeleton StringSplit StringStartsQ StringTake StringTemplate StringToByteArray StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleData StyleDefinitions StyleForm StyleHints StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subdivide Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subsequences Subset SubsetEqual SubsetMap SubsetQ Subsets SubStar SubstitutionSystem Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubtractSides SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde Success SuchThat Sum SumConvergence SummationLayer Sunday SunPosition Sunrise Sunset SuperDagger SuperMinus SupernovaData SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceArea SurfaceColor SurfaceData SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricKey SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Synonyms Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SynthesizeMissingValues SystemDialogInput SystemException SystemGet SystemHelpPath SystemInformation SystemInformationData SystemInstall SystemModel SystemModeler SystemModelExamples SystemModelLinearize SystemModelParametricSimulate SystemModelPlot SystemModelProgressReporting SystemModelReliability SystemModels SystemModelSimulate SystemModelSimulateSensitivity SystemModelSimulationData SystemOpen SystemOptions SystemProcessData SystemProcesses SystemsConnectionsModel SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelLinearity SystemsModelMerge SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemsModelVectorRelativeOrders SystemStub SystemTest ' + + 'Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TableViewBoxBackground TableViewBoxOptions TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeDrop TakeLargest TakeLargestBy TakeList TakeSmallest TakeSmallestBy TakeWhile Tally Tan Tanh TargetDevice TargetFunctions TargetSystem TargetUnits TaskAbort TaskExecute TaskObject TaskRemove TaskResume Tasks TaskSuspend TaskWait TautologyQ TelegraphProcess TemplateApply TemplateArgBox TemplateBox TemplateBoxOptions TemplateEvaluate TemplateExpression TemplateIf TemplateObject TemplateSequence TemplateSlot TemplateSlotSequence TemplateUnevaluated TemplateVerbatim TemplateWith TemporalData TemporalRegularity Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge TestID TestReport TestReportObject TestResultObject Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCases TextCell TextClipboardType TextContents TextData TextElement TextForm TextGrid TextJustification TextLine TextPacket TextParagraph TextPosition TextRecognize TextSearch TextSearchReport TextSentences TextString TextStructure TextStyle TextTranslation Texture TextureCoordinateFunction TextureCoordinateScaling TextWords Therefore ThermodynamicData ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreadingLayer ThreeJSymbol Threshold Through Throw ThueMorse Thumbnail Thursday Ticks TicksStyle TideData Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint TimeDirection TimeFormat TimeGoal TimelinePlot TimeObject TimeObjectQ Times TimesBy TimeSeries TimeSeriesAggregate TimeSeriesForecast TimeSeriesInsert TimeSeriesInvertibility TimeSeriesMap TimeSeriesMapThread TimeSeriesModel TimeSeriesModelFit TimeSeriesResample TimeSeriesRescale TimeSeriesShift TimeSeriesThread TimeSeriesWindow TimeUsed TimeValue TimeWarpingCorrespondence TimeWarpingDistance TimeZone TimeZoneConvert TimeZoneOffset Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate Today ToDiscreteTimeModel ToEntity ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase Tomorrow ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform ToPolarCoordinates TopologicalSort ToRadicals ToRules ToSphericalCoordinates ToString Total TotalHeight TotalLayer TotalVariationFilter TotalWidth TouchPosition TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TrackingFunction TracyWidomDistribution TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TrainingProgressCheckpointing TrainingProgressFunction TrainingProgressMeasurements TrainingProgressReporting TrainingStoppingCriterion TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationClass TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField TransformedProcess TransformedRegion TransitionDirection TransitionDuration TransitionEffect TransitiveClosureGraph TransitiveReductionGraph Translate TranslationOptions TranslationTransform Transliterate Transparent TransparentColor Transpose TransposeLayer TrapSelection TravelDirections TravelDirectionsData TravelDistance TravelDistanceList TravelMethod TravelTime TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle Triangle TriangleCenter TriangleConstruct TriangleMeasurement TriangleWave TriangularDistribution TriangulateMesh Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean TrimmedVariance TropicalStormData True TrueQ TruncatedDistribution TruncatedPolyhedron TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBoxOptions TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow TunnelData Tuples TuranGraph TuringMachine TuttePolynomial TwoWayRule Typed TypeSpecifier ' + + 'UnateQ Uncompress UnconstrainedParameters Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UnderseaFeatureData UndirectedEdge UndirectedGraph UndirectedGraphQ UndoOptions UndoTrackedVariables Unequal UnequalTo Unevaluated UniformDistribution UniformGraphDistribution UniformPolyhedron UniformSumDistribution Uninstall Union UnionPlus Unique UnitaryMatrixQ UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitSystem UnitTriangle UnitVector UnitVectorLayer UnityDimensions UniverseModelData UniversityData UnixTime Unprotect UnregisterExternalEvaluator UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpdateSearchIndex UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize UpperTriangularMatrixQ Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpTo UpValues URL URLBuild URLDecode URLDispatcher URLDownload URLDownloadSubmit URLEncode URLExecute URLExpand URLFetch URLFetchAsynchronous URLParse URLQueryDecode URLQueryEncode URLRead URLResponseTime URLSave URLSaveAsynchronous URLShorten URLSubmit UseGraphicsRange UserDefinedWavelet Using UsingFrontEnd UtilityFunction ' + + 'V2Get ValenceErrorHandling ValidationLength ValidationSet Value ValueBox ValueBoxOptions ValueDimensions ValueForm ValuePreprocessingFunction ValueQ Values ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorAround VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorGreater VectorGreaterEqual VectorLess VectorLessEqual VectorMarkers VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerificationTest VerifyConvergence VerifyDerivedKey VerifyDigitalSignature VerifyInterpretation VerifySecurityCertificates VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexContract VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight VertexWeightedGraphQ Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewProjection ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoiceStyleData VoigtDistribution VolcanoData Volume VonMisesDistribution VoronoiMesh ' + + 'WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WarpingCorrespondence WarpingDistance WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeatherForecastData WebAudioSearch WebElementObject WeberE WebExecute WebImage WebImageSearch WebSearch WebSessionObject WebSessions WebWindowObject Wedge Wednesday WeibullDistribution WeierstrassE1 WeierstrassE2 WeierstrassE3 WeierstrassEta1 WeierstrassEta2 WeierstrassEta3 WeierstrassHalfPeriods WeierstrassHalfPeriodW1 WeierstrassHalfPeriodW2 WeierstrassHalfPeriodW3 WeierstrassInvariantG2 WeierstrassInvariantG3 WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White WhiteNoiseProcess WhitePoint Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WikipediaData WikipediaSearch WilksW WilksWTest WindDirectionData WindingCount WindingPolygon WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowPersistentStyles WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth WindSpeedData WindVectorData WinsorizedMean WinsorizedVariance WishartMatrixDistribution With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult WolframLanguageData Word WordBoundary WordCharacter WordCloud WordCount WordCounts WordData WordDefinition WordFrequency WordFrequencyData WordList WordOrientation WordSearch WordSelectionFunction WordSeparators WordSpacings WordStem WordTranslation WorkingPrecision WrapAround Write WriteLine WriteString Wronskian ' + + 'XMLElement XMLObject XMLTemplate Xnor Xor XYZColor ' + + 'Yellow Yesterday YuleDissimilarity ' + + 'ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZIPCodeData ZipfDistribution ZoomCenter ZoomFactor ZTest ZTransform ' + + '$Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AllowExternalChannelFunctions $AssertFunction $Assumptions $AsynchronousTask $AudioInputDevices $AudioOutputDevices $BaseDirectory $BatchInput $BatchOutput $BlockchainBase $BoxForms $ByteOrdering $CacheBaseDirectory $Canceled $ChannelBase $CharacterEncoding $CharacterEncodings $CloudBase $CloudConnected $CloudCreditsAvailable $CloudEvaluation $CloudExpressionBase $CloudObjectNameFormat $CloudObjectURLType $CloudRootDirectory $CloudSymbolBase $CloudUserID $CloudUserUUID $CloudVersion $CloudVersionNumber $CloudWolframEngineVersionNumber $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $Cookies $CookieStore $CreationDate $CurrentLink $CurrentTask $CurrentWebSession $DateStringFormat $DefaultAudioInputDevice $DefaultAudioOutputDevice $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultLocalBase $DefaultMailbox $DefaultNetworkInterface $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $EmbedCodeEnvironments $EmbeddableServices $EntityStores $Epilog $EvaluationCloudBase $EvaluationCloudObject $EvaluationEnvironment $ExportFormats $Failed $FinancialDataSource $FontFamilies $FormatType $FrontEnd $FrontEndSession $GeoEntityTypes $GeoLocation $GeoLocationCity $GeoLocationCountry $GeoLocationPrecision $GeoLocationSource $HistoryLength $HomeDirectory $HTMLExportRules $HTTPCookies $HTTPRequest $IgnoreEOF $ImageFormattingWidth $ImagingDevice $ImagingDevices $ImportFormats $IncomingMailSettings $InitialDirectory $Initialization $InitializationContexts $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $InterpreterTypes $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $LocalBase $LocalSymbolBase $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $MobilePhone $ModuleNumber $NetworkConnected $NetworkInterfaces $NetworkLicense $NewMessage $NewSymbol $Notebooks $NoValue $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $Permissions $PermissionsGroupBase $PersistenceBase $PersistencePath $PipeSupported $PlotTheme $Post $Pre $PreferencesDirectory $PreInitialization $PrePrint $PreRead $PrintForms $PrintLiteral $Printout3DPreviewer $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $PublisherID $RandomState $RecursionLimit $RegisteredDeviceClasses $RegisteredUserName $ReleaseNumber $RequesterAddress $RequesterWolframID $RequesterWolframUUID $ResourceSystemBase $RootDirectory $ScheduledTask $ScriptCommandLine $ScriptInputString $SecuredAuthenticationKeyTokens $ServiceCreditsAvailable $Services $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SourceLink $SSHAuthentication $SummaryBoxDataSizeLimit $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemMemory $SystemShell $SystemTimeZone $SystemWordLength $TemplatePath $TemporaryDirectory $TemporaryPrefix $TestFileName $TextStyle $TimedOut $TimeUnit $TimeZone $TimeZoneEntity $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $UnitSystem $Urgent $UserAddOnsDirectory $UserAgentLanguages $UserAgentMachine $UserAgentName $UserAgentOperatingSystem $UserAgentString $UserAgentVersion $UserBaseDirectory $UserDocumentsDirectory $Username $UserName $UserURLBase $Version $VersionNumber $VoiceStyles $WolframID $WolframUUID' + }, + contains: [ + hljs.COMMENT('\\(\\*', '\\*\\)', {contains: ['self']}), + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = mathematica; diff --git a/node_modules/highlight.js/lib/languages/matlab.js b/node_modules/highlight.js/lib/languages/matlab.js @@ -0,0 +1,106 @@ +/* +Language: Matlab +Author: Denis Bardadym <bardadymchik@gmail.com> +Contributors: Eugene Nizhibitsky <nizhibitsky@ya.ru>, Egor Rogov <e.rogov@postgrespro.ru> +Website: https://www.mathworks.com/products/matlab.html +Category: scientific +*/ + +/* + Formal syntax is not published, helpful link: + https://github.com/kornilova-l/matlab-IntelliJ-plugin/blob/master/src/main/grammar/Matlab.bnf +*/ +function matlab(hljs) { + + var TRANSPOSE_RE = '(\'|\\.\')+'; + var TRANSPOSE = { + relevance: 0, + contains: [ + { begin: TRANSPOSE_RE } + ] + }; + + return { + name: 'Matlab', + keywords: { + keyword: + 'arguments break case catch classdef continue else elseif end enumeration events for function ' + + 'global if methods otherwise parfor persistent properties return spmd switch try while', + built_in: + 'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' + + 'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' + + 'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' + + 'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' + + 'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' + + 'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' + + 'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' + + 'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' + + 'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' + + 'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' + + 'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' + + 'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan ' + + 'isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal ' + + 'rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table ' + + 'readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun ' + + 'legend intersect ismember procrustes hold num2cell ' + }, + illegal: '(//|"|#|/\\*|\\s+/\\w+)', + contains: [ + { + className: 'function', + beginKeywords: 'function', end: '$', + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: 'params', + variants: [ + {begin: '\\(', end: '\\)'}, + {begin: '\\[', end: '\\]'} + ] + } + ] + }, + { + className: 'built_in', + begin: /true|false/, + relevance: 0, + starts: TRANSPOSE + }, + { + begin: '[a-zA-Z][a-zA-Z_0-9]*' + TRANSPOSE_RE, + relevance: 0 + }, + { + className: 'number', + begin: hljs.C_NUMBER_RE, + relevance: 0, + starts: TRANSPOSE + }, + { + className: 'string', + begin: '\'', end: '\'', + contains: [ + hljs.BACKSLASH_ESCAPE, + {begin: '\'\''}] + }, + { + begin: /\]|}|\)/, + relevance: 0, + starts: TRANSPOSE + }, + { + className: 'string', + begin: '"', end: '"', + contains: [ + hljs.BACKSLASH_ESCAPE, + {begin: '""'} + ], + starts: TRANSPOSE + }, + hljs.COMMENT('^\\s*\\%\\{\\s*$', '^\\s*\\%\\}\\s*$'), + hljs.COMMENT('\\%', '$') + ] + }; +} + +module.exports = matlab; diff --git a/node_modules/highlight.js/lib/languages/maxima.js b/node_modules/highlight.js/lib/languages/maxima.js @@ -0,0 +1,415 @@ +/* +Language: Maxima +Author: Robert Dodier <robert.dodier@gmail.com> +Website: http://maxima.sourceforge.net +Category: scientific +*/ + +function maxima(hljs) { + var KEYWORDS = 'if then else elseif for thru do while unless step in and or not'; + var LITERALS = 'true false unknown inf minf ind und %e %i %pi %phi %gamma'; + var BUILTIN_FUNCTIONS = + ' abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate' + + ' addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix' + + ' adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type' + + ' alias allroots alphacharp alphanumericp amortization %and annuity_fv' + + ' annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2' + + ' applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply' + + ' arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger' + + ' asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order' + + ' asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method' + + ' av average_degree backtrace bars barsplot barsplot_description base64 base64_decode' + + ' bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx' + + ' bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify' + + ' bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized' + + ' bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp' + + ' bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition' + + ' block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description' + + ' break bug_report build_info|10 buildq build_sample burn cabs canform canten' + + ' cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli' + + ' cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform' + + ' cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel' + + ' cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial' + + ' cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson' + + ' cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay' + + ' ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic' + + ' cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2' + + ' charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps' + + ' chinese cholesky christof chromatic_index chromatic_number cint circulant_graph' + + ' clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph' + + ' clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse' + + ' collectterms columnop columnspace columnswap columnvector combination combine' + + ' comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph' + + ' complete_graph complex_number_p components compose_functions concan concat' + + ' conjugate conmetderiv connected_components connect_vertices cons constant' + + ' constantp constituent constvalue cont2part content continuous_freq contortion' + + ' contour_plot contract contract_edge contragrad contrib_ode convert coord' + + ' copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1' + + ' covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline' + + ' ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph' + + ' cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate' + + ' declare declare_constvalue declare_dimensions declare_fundamental_dimensions' + + ' declare_fundamental_units declare_qty declare_translated declare_unit_conversion' + + ' declare_units declare_weights decsym defcon define define_alt_display define_variable' + + ' defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten' + + ' delta demo demoivre denom depends derivdegree derivlist describe desolve' + + ' determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag' + + ' diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export' + + ' dimacs_import dimension dimensionless dimensions dimensions_as_list direct' + + ' directory discrete_freq disjoin disjointp disolate disp dispcon dispform' + + ' dispfun dispJordan display disprule dispterms distrib divide divisors divsum' + + ' dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart' + + ' draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring' + + ' edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth' + + ' einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome' + + ' ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using' + + ' ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi' + + ' ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp' + + ' equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors' + + ' euler ev eval_string evenp every evolution evolution2d evundiff example exp' + + ' expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci' + + ' expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li' + + ' expintegral_shi expintegral_si explicit explose exponentialize express expt' + + ' exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum' + + ' factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements' + + ' fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge' + + ' file_search file_type fillarray findde find_root find_root_abs find_root_error' + + ' find_root_rel first fix flatten flength float floatnump floor flower_snark' + + ' flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran' + + ' fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp' + + ' foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s' + + ' from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp' + + ' fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units' + + ' fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized' + + ' gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide' + + ' gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym' + + ' geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean' + + ' geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string' + + ' get_pixel get_plot_option get_tex_environment get_tex_environment_default' + + ' get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close' + + ' gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum' + + ' gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import' + + ' graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery' + + ' graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph' + + ' grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path' + + ' hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite' + + ' hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description' + + ' hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph' + + ' icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy' + + ' ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart' + + ' imetric implicit implicit_derivative implicit_plot indexed_tensor indices' + + ' induced_subgraph inferencep inference_result infix info_display init_atensor' + + ' init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions' + + ' integrate intersect intersection intervalp intopois intosum invariant1 invariant2' + + ' inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc' + + ' inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns' + + ' inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint' + + ' invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph' + + ' is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate' + + ' isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph' + + ' items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc' + + ' jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd' + + ' jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill' + + ' killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis' + + ' kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform' + + ' kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete' + + ' kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace' + + ' kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2' + + ' kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson' + + ' kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange' + + ' laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp' + + ' lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length' + + ' let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit' + + ' Lindstedt linear linearinterpol linear_program linear_regression line_graph' + + ' linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials' + + ' listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry' + + ' log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst' + + ' lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact' + + ' lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub' + + ' lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma' + + ' make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country' + + ' make_polygon make_random_state make_rgb_picture makeset make_string_input_stream' + + ' make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom' + + ' maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display' + + ' mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker' + + ' max max_clique max_degree max_flow maximize_lp max_independent_set max_matching' + + ' maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform' + + ' mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete' + + ' mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic' + + ' mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t' + + ' mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull' + + ' median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree' + + ' min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor' + + ' minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton' + + ' mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions' + + ' multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff' + + ' multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary' + + ' natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext' + + ' newdet new_graph newline newton new_variable next_prime nicedummies niceindices' + + ' ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp' + + ' nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst' + + ' nthroot nullity nullspace num numbered_boundaries numberp number_to_octets' + + ' num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai' + + ' nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin' + + ' oid_to_octets op opena opena_binary openr openr_binary openw openw_binary' + + ' operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless' + + ' orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap' + + ' out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface' + + ' parg parGosper parse_string parse_timedate part part2cont partfrac partition' + + ' partition_set partpol path_digraph path_graph pathname_directory pathname_name' + + ' pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform' + + ' pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete' + + ' pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal' + + ' pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal' + + ' pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t' + + ' pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph' + + ' petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding' + + ' playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff' + + ' poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar' + + ' polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion' + + ' poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal' + + ' poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal' + + ' poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation' + + ' poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm' + + ' poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form' + + ' poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part' + + ' poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension' + + ' poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod' + + ' powerseries powerset prefix prev_prime primep primes principal_components' + + ' print printf printfile print_graph printpois printprops prodrac product properties' + + ' propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct' + + ' puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp' + + ' quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile' + + ' quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2' + + ' quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f' + + ' quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel' + + ' quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal' + + ' quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t' + + ' quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t' + + ' quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan' + + ' radius random random_bernoulli random_beta random_binomial random_bipartite_graph' + + ' random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform' + + ' random_exp random_f random_gamma random_general_finite_discrete random_geometric' + + ' random_graph random_graph1 random_gumbel random_hypergeometric random_laplace' + + ' random_logistic random_lognormal random_negative_binomial random_network' + + ' random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto' + + ' random_permutation random_poisson random_rayleigh random_regular_graph random_student_t' + + ' random_tournament random_tree random_weibull range rank rat ratcoef ratdenom' + + ' ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump' + + ' ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array' + + ' read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline' + + ' read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate' + + ' realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar' + + ' rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus' + + ' rem remainder remarray rembox remcomps remcon remcoord remfun remfunction' + + ' remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions' + + ' remove_fundamental_units remove_plot_option remove_vertex rempart remrule' + + ' remsym remvalue rename rename_file reset reset_displays residue resolvante' + + ' resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein' + + ' resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer' + + ' rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann' + + ' rinvariant risch rk rmdir rncombine romberg room rootscontract round row' + + ' rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i' + + ' scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description' + + ' scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second' + + ' sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight' + + ' setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state' + + ' set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications' + + ' set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path' + + ' show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform' + + ' simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert' + + ' sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial' + + ' skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp' + + ' skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric' + + ' skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic' + + ' skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t' + + ' skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t' + + ' skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph' + + ' smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve' + + ' solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export' + + ' sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1' + + ' spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition' + + ' sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus' + + ' ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot' + + ' starplot_description status std std1 std_bernoulli std_beta std_binomial' + + ' std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma' + + ' std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace' + + ' std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t' + + ' std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull' + + ' stemplot stirling stirling1 stirling2 strim striml strimr string stringout' + + ' stringp strong_components struve_h struve_l sublis sublist sublist_indices' + + ' submatrix subsample subset subsetp subst substinpart subst_parallel substpart' + + ' substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext' + + ' symbolp symmdifference symmetricp system take_channel take_inference tan' + + ' tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract' + + ' tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference' + + ' test_normality test_proportion test_proportions_difference test_rank_sum' + + ' test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display' + + ' texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter' + + ' toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep' + + ' totalfourier totient tpartpol trace tracematrix trace_options transform_sample' + + ' translate translate_file transpose treefale tree_reduce treillis treinat' + + ' triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate' + + ' truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph' + + ' truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget' + + ' ultraspherical underlying_graph undiff union unique uniteigenvectors unitp' + + ' units unit_step unitvector unorder unsum untellrat untimer' + + ' untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli' + + ' var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform' + + ' var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel' + + ' var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial' + + ' var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson' + + ' var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp' + + ' verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance' + + ' vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle' + + ' vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j' + + ' wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian' + + ' xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta' + + ' zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors' + + ' zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table' + + ' absboxchar activecontexts adapt_depth additive adim aform algebraic' + + ' algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic' + + ' animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar' + + ' asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top' + + ' azimuth background background_color backsubst berlefact bernstein_explicit' + + ' besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest' + + ' border boundaries_array box boxchar breakup %c capping cauchysum cbrange' + + ' cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics' + + ' colorbox columns commutative complex cone context contexts contour contour_levels' + + ' cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp' + + ' cube current_let_rule_package cylinder data_file_name debugmode decreasing' + + ' default_let_rule_package delay dependencies derivabbrev derivsubst detout' + + ' diagmetric diff dim dimensions dispflag display2d|10 display_format_internal' + + ' distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor' + + ' doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules' + + ' dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart' + + ' edge_color edge_coloring edge_partition edge_type edge_width %edispflag' + + ' elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer' + + ' epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type' + + ' %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand' + + ' expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine' + + ' factlim factorflag factorial_expand factors_only fb feature features' + + ' file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10' + + ' file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color' + + ' fill_density filled_func fixed_vertices flipflag float2bf font font_size' + + ' fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim' + + ' gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command' + + ' gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command' + + ' gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command' + + ' gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble' + + ' gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args' + + ' Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both' + + ' head_length head_type height hypergeometric_representation %iargs ibase' + + ' icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form' + + ' ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval' + + ' infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued' + + ' integrate_use_rootsof integration_constant integration_constant_counter interpolate_color' + + ' intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr' + + ' julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment' + + ' label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max' + + ' leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear' + + ' linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params' + + ' linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname' + + ' loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx' + + ' logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros' + + ' mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult' + + ' matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10' + + ' maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint' + + ' maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp' + + ' mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver' + + ' modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag' + + ' newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc' + + ' noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np' + + ' npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties' + + ' opsubst optimprefix optionset orientation origin orthopoly_returns_intervals' + + ' outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution' + + ' %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart' + + ' png_file pochhammer_max_index points pointsize point_size points_joined point_type' + + ' poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm' + + ' poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list' + + ' poly_secondary_elimination_order poly_top_reduction_only posfun position' + + ' powerdisp pred prederror primep_number_of_tests product_use_gamma program' + + ' programmode promote_float_to_bigfloat prompt proportional_axes props psexpand' + + ' ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof' + + ' ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann' + + ' ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw' + + ' refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs' + + ' rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy' + + ' same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck' + + ' setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width' + + ' show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type' + + ' show_vertices show_weight simp simplified_output simplify_products simpproduct' + + ' simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn' + + ' solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag' + + ' stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda' + + ' subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric' + + ' tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials' + + ' tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch' + + ' tr track transcompile transform transform_xy translate_fast_arrays transparent' + + ' transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex' + + ' tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign' + + ' trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars' + + ' tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode' + + ' tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes' + + ' ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble' + + ' usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition' + + ' vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface' + + ' wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel' + + ' xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate' + + ' xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel' + + ' xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width' + + ' ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis' + + ' ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis' + + ' yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob' + + ' zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest'; + var SYMBOLS = '_ __ %|0 %%|0'; + + return { + name: 'Maxima', + keywords: { + $pattern: '[A-Za-z_%][0-9A-Za-z_%]*', + keyword: KEYWORDS, + literal: LITERALS, + built_in: BUILTIN_FUNCTIONS, + symbol: SYMBOLS, + }, + contains: [ + { + className: 'comment', + begin: '/\\*', + end: '\\*/', + contains: ['self'] + }, + hljs.QUOTE_STRING_MODE, + { + className: 'number', + relevance: 0, + variants: [ + { + // float number w/ exponent + // hmm, I wonder if we ought to include other exponent markers? + begin: '\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b', + }, + { + // bigfloat number + begin: '\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b', + relevance: 10 + }, + { + // float number w/out exponent + // Doesn't seem to recognize floats which start with '.' + begin: '\\b(\\.\\d+|\\d+\\.\\d+)\\b', + }, + { + // integer in base up to 36 + // Doesn't seem to recognize integers which end with '.' + begin: '\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b', + } + ] + } + ], + illegal: /@/ + } +} + +module.exports = maxima; diff --git a/node_modules/highlight.js/lib/languages/mel.js b/node_modules/highlight.js/lib/languages/mel.js @@ -0,0 +1,235 @@ +/* +Language: MEL +Description: Maya Embedded Language +Author: Shuen-Huei Guan <drake.guan@gmail.com> +Website: http://www.autodesk.com/products/autodesk-maya/overview +Category: graphics +*/ + +function mel(hljs) { + return { + name: 'MEL', + keywords: + 'int float string vector matrix if else switch case default while do for in break ' + + 'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' + + 'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' + + 'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' + + 'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' + + 'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' + + 'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' + + 'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' + + 'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' + + 'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' + + 'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' + + 'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' + + 'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' + + 'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' + + 'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' + + 'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' + + 'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' + + 'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' + + 'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' + + 'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' + + 'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' + + 'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' + + 'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' + + 'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' + + 'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' + + 'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' + + 'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' + + 'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' + + 'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' + + 'constrainValue constructionHistory container containsMultibyte contextInfo control ' + + 'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' + + 'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' + + 'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' + + 'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' + + 'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' + + 'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' + + 'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' + + 'currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx ' + + 'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' + + 'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' + + 'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' + + 'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' + + 'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' + + 'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' + + 'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' + + 'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' + + 'displaySmoothness displayStats displayString displaySurface distanceDimContext ' + + 'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' + + 'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' + + 'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' + + 'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' + + 'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' + + 'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' + + 'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' + + 'equivalent equivalentTol erf error eval evalDeferred evalEcho event ' + + 'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' + + 'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' + + 'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' + + 'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' + + 'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' + + 'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' + + 'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' + + 'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' + + 'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' + + 'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' + + 'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' + + 'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' + + 'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' + + 'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' + + 'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' + + 'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' + + 'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' + + 'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' + + 'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' + + 'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' + + 'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' + + 'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' + + 'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' + + 'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' + + 'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' + + 'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' + + 'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' + + 'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' + + 'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' + + 'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' + + 'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' + + 'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' + + 'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' + + 'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' + + 'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' + + 'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' + + 'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' + + 'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' + + 'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' + + 'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' + + 'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' + + 'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' + + 'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' + + 'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' + + 'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' + + 'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' + + 'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' + + 'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' + + 'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' + + 'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' + + 'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' + + 'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' + + 'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' + + 'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' + + 'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' + + 'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' + + 'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' + + 'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' + + 'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' + + 'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' + + 'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' + + 'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' + + 'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' + + 'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' + + 'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' + + 'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' + + 'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' + + 'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' + + 'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' + + 'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' + + 'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' + + 'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' + + 'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' + + 'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' + + 'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' + + 'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' + + 'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' + + 'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' + + 'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' + + 'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' + + 'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' + + 'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' + + 'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' + + 'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' + + 'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' + + 'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' + + 'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' + + 'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' + + 'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' + + 'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' + + 'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' + + 'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' + + 'removePanelCategory rename renameAttr renameSelectionList renameUI render ' + + 'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' + + 'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' + + 'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' + + 'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' + + 'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' + + 'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' + + 'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' + + 'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' + + 'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' + + 'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' + + 'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' + + 'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' + + 'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' + + 'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' + + 'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' + + 'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' + + 'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' + + 'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' + + 'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' + + 'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' + + 'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' + + 'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' + + 'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' + + 'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' + + 'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' + + 'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' + + 'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' + + 'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' + + 'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' + + 'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' + + 'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' + + 'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' + + 'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' + + 'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' + + 'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' + + 'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' + + 'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' + + 'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' + + 'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' + + 'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' + + 'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' + + 'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' + + 'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' + + 'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' + + 'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' + + 'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' + + 'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' + + 'trace track trackCtx transferAttributes transformCompare transformLimits translator ' + + 'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' + + 'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' + + 'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' + + 'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' + + 'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' + + 'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' + + 'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform', + illegal: '</', + contains: [ + hljs.C_NUMBER_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '`', end: '`', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { // eats variables + begin: '[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)' + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }; +} + +module.exports = mel; diff --git a/node_modules/highlight.js/lib/languages/mercury.js b/node_modules/highlight.js/lib/languages/mercury.js @@ -0,0 +1,93 @@ +/* +Language: Mercury +Author: mucaho <mkucko@gmail.com> +Description: Mercury is a logic/functional programming language which combines the clarity and expressiveness of declarative programming with advanced static analysis and error detection features. +Website: https://www.mercurylang.org +*/ + +function mercury(hljs) { + var KEYWORDS = { + keyword: + 'module use_module import_module include_module end_module initialise ' + + 'mutable initialize finalize finalise interface implementation pred ' + + 'mode func type inst solver any_pred any_func is semidet det nondet ' + + 'multi erroneous failure cc_nondet cc_multi typeclass instance where ' + + 'pragma promise external trace atomic or_else require_complete_switch ' + + 'require_det require_semidet require_multi require_nondet ' + + 'require_cc_multi require_cc_nondet require_erroneous require_failure', + meta: + // pragma + 'inline no_inline type_spec source_file fact_table obsolete memo ' + + 'loop_check minimal_model terminates does_not_terminate ' + + 'check_termination promise_equivalent_clauses ' + + // preprocessor + 'foreign_proc foreign_decl foreign_code foreign_type ' + + 'foreign_import_module foreign_export_enum foreign_export ' + + 'foreign_enum may_call_mercury will_not_call_mercury thread_safe ' + + 'not_thread_safe maybe_thread_safe promise_pure promise_semipure ' + + 'tabled_for_io local untrailed trailed attach_to_io_state ' + + 'can_pass_as_mercury_type stable will_not_throw_exception ' + + 'may_modify_trail will_not_modify_trail may_duplicate ' + + 'may_not_duplicate affects_liveness does_not_affect_liveness ' + + 'doesnt_affect_liveness no_sharing unknown_sharing sharing', + built_in: + 'some all not if then else true fail false try catch catch_any ' + + 'semidet_true semidet_false semidet_fail impure_true impure semipure' + }; + + var COMMENT = hljs.COMMENT('%', '$'); + + var NUMCODE = { + className: 'number', + begin: "0'.\\|0[box][0-9a-fA-F]*" + }; + + var ATOM = hljs.inherit(hljs.APOS_STRING_MODE, {relevance: 0}); + var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {relevance: 0}); + var STRING_FMT = { + className: 'subst', + begin: '\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]', + relevance: 0 + }; + STRING.contains = STRING.contains.slice(); // we need our own copy of contains + STRING.contains.push(STRING_FMT); + + var IMPLICATION = { + className: 'built_in', + variants: [ + {begin: '<=>'}, + {begin: '<=', relevance: 0}, + {begin: '=>', relevance: 0}, + {begin: '/\\\\'}, + {begin: '\\\\/'} + ] + }; + + var HEAD_BODY_CONJUNCTION = { + className: 'built_in', + variants: [ + {begin: ':-\\|-->'}, + {begin: '=', relevance: 0} + ] + }; + + return { + name: 'Mercury', + aliases: ['m', 'moo'], + keywords: KEYWORDS, + contains: [ + IMPLICATION, + HEAD_BODY_CONJUNCTION, + COMMENT, + hljs.C_BLOCK_COMMENT_MODE, + NUMCODE, + hljs.NUMBER_MODE, + ATOM, + STRING, + {begin: /:-/}, // relevance booster + {begin: /\.$/} // relevance booster + ] + }; +} + +module.exports = mercury; diff --git a/node_modules/highlight.js/lib/languages/mipsasm.js b/node_modules/highlight.js/lib/languages/mipsasm.js @@ -0,0 +1,97 @@ +/* +Language: MIPS Assembly +Author: Nebuleon Fumika <nebuleon.fumika@gmail.com> +Description: MIPS Assembly (up to MIPS32R2) +Website: https://en.wikipedia.org/wiki/MIPS_architecture +Category: assembler +*/ + +function mipsasm(hljs) { + //local labels: %?[FB]?[AT]?\d{1,2}\w+ + return { + name: 'MIPS Assembly', + case_insensitive: true, + aliases: ['mips'], + keywords: { + $pattern: '\\.?' + hljs.IDENT_RE, + meta: + //GNU preprocs + '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ', + built_in: + '$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 ' + // integer registers + '$16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 ' + // integer registers + 'zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 ' + // integer register aliases + 't0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 ' + // integer register aliases + 'k0 k1 gp sp fp ra ' + // integer register aliases + '$f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 ' + // floating-point registers + '$f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 ' + // floating-point registers + 'Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi ' + // Coprocessor 0 registers + 'HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId ' + // Coprocessor 0 registers + 'EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ' + // Coprocessor 0 registers + 'ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt ' // Coprocessor 0 registers + }, + contains: [ + { + className: 'keyword', + begin: '\\b('+ //mnemonics + // 32-bit integer instructions + 'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' + + 'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' + + 'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' + + 'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' + + 'srlv?|subu?|sw[lr]?|xori?|wsbh|' + + // floating-point instructions + 'abs\.[sd]|add\.[sd]|alnv.ps|bc1[ft]l?|' + + 'c\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\.[sd]|' + + '(ceil|floor|round|trunc)\.[lw]\.[sd]|cfc1|cvt\.d\.[lsw]|' + + 'cvt\.l\.[dsw]|cvt\.ps\.s|cvt\.s\.[dlw]|cvt\.s\.p[lu]|cvt\.w\.[dls]|' + + 'div\.[ds]|ldx?c1|luxc1|lwx?c1|madd\.[sd]|mfc1|mov[fntz]?\.[ds]|' + + 'msub\.[sd]|mth?c1|mul\.[ds]|neg\.[ds]|nmadd\.[ds]|nmsub\.[ds]|' + + 'p[lu][lu]\.ps|recip\.fmt|r?sqrt\.[ds]|sdx?c1|sub\.[ds]|suxc1|' + + 'swx?c1|' + + // system control instructions + 'break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|' + + 'rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|' + + 'tlti?u?|tnei?|wait|wrpgpr'+ + ')', + end: '\\s' + }, + // lines ending with ; or # aren't really comments, probably auto-detect fail + hljs.COMMENT('[;#](?!\s*$)', '$'), + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '\'', + end: '[^\\\\]\'', + relevance: 0 + }, + { + className: 'title', + begin: '\\|', end: '\\|', + illegal: '\\n', + relevance: 0 + }, + { + className: 'number', + variants: [ + {begin: '0x[0-9a-f]+'}, //hex + {begin: '\\b-?\\d+'} //bare number + ], + relevance: 0 + }, + { + className: 'symbol', + variants: [ + {begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU MIPS syntax + {begin: '^\\s*[0-9]+:'}, // numbered local labels + {begin: '[0-9]+[bf]' } // number local label reference (backwards, forwards) + ], + relevance: 0 + } + ], + illegal: '\/' + }; +} + +module.exports = mipsasm; diff --git a/node_modules/highlight.js/lib/languages/mizar.js b/node_modules/highlight.js/lib/languages/mizar.js @@ -0,0 +1,29 @@ +/* +Language: Mizar +Description: The Mizar Language is a formal language derived from the mathematical vernacular. +Author: Kelley van Evert <kelleyvanevert@gmail.com> +Website: http://mizar.org/language/ +Category: scientific +*/ + +function mizar(hljs) { + return { + name: 'Mizar', + keywords: + 'environ vocabularies notations constructors definitions ' + + 'registrations theorems schemes requirements begin end definition ' + + 'registration cluster existence pred func defpred deffunc theorem ' + + 'proof let take assume then thus hence ex for st holds consider ' + + 'reconsider such that and in provided of as from be being by means ' + + 'equals implies iff redefine define now not or attr is mode ' + + 'suppose per cases set thesis contradiction scheme reserve struct ' + + 'correctness compatibility coherence symmetry assymetry ' + + 'reflexivity irreflexivity connectedness uniqueness commutativity ' + + 'idempotence involutiveness projectivity', + contains: [ + hljs.COMMENT('::', '$') + ] + }; +} + +module.exports = mizar; diff --git a/node_modules/highlight.js/lib/languages/mojolicious.js b/node_modules/highlight.js/lib/languages/mojolicious.js @@ -0,0 +1,35 @@ +/* +Language: Mojolicious +Requires: xml.js, perl.js +Author: Dotan Dimet <dotan@corky.net> +Description: Mojolicious .ep (Embedded Perl) templates +Website: https://mojolicious.org +Category: template +*/ +function mojolicious(hljs) { + return { + name: 'Mojolicious', + subLanguage: 'xml', + contains: [ + { + className: 'meta', + begin: '^__(END|DATA)__$' + }, + // mojolicious line + { + begin: "^\\s*%{1,2}={0,2}", end: '$', + subLanguage: 'perl' + }, + // mojolicious block + { + begin: "<%{1,2}={0,2}", + end: "={0,1}%>", + subLanguage: 'perl', + excludeBegin: true, + excludeEnd: true + } + ] + }; +} + +module.exports = mojolicious; diff --git a/node_modules/highlight.js/lib/languages/monkey.js b/node_modules/highlight.js/lib/languages/monkey.js @@ -0,0 +1,84 @@ +/* +Language: Monkey +Description: Monkey2 is an easy to use, cross platform, games oriented programming language from Blitz Research. +Author: Arthur Bikmullin <devolonter@gmail.com> +Website: https://blitzresearch.itch.io/monkey2 +*/ + +function monkey(hljs) { + var NUMBER = { + className: 'number', relevance: 0, + variants: [ + { + begin: '[$][a-fA-F0-9]+' + }, + hljs.NUMBER_MODE + ] + }; + + return { + name: 'Monkey', + case_insensitive: true, + keywords: { + keyword: 'public private property continue exit extern new try catch ' + + 'eachin not abstract final select case default const local global field ' + + 'end if then else elseif endif while wend repeat until forever for ' + + 'to step next return module inline throw import', + + built_in: 'DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil ' + + 'Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI', + + literal: 'true false null and or shl shr mod' + }, + illegal: /\/\*/, + contains: [ + hljs.COMMENT('#rem', '#end'), + hljs.COMMENT( + "'", + '$', + { + relevance: 0 + } + ), + { + className: 'function', + beginKeywords: 'function method', end: '[(=:]|$', + illegal: /\n/, + contains: [ + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + className: 'class', + beginKeywords: 'class interface', end: '$', + contains: [ + { + beginKeywords: 'extends implements' + }, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + className: 'built_in', + begin: '\\b(self|super)\\b' + }, + { + className: 'meta', + begin: '\\s*#', end: '$', + keywords: {'meta-keyword': 'if else elseif endif end then'} + }, + { + className: 'meta', + begin: '^\\s*strict\\b' + }, + { + beginKeywords: 'alias', end: '=', + contains: [hljs.UNDERSCORE_TITLE_MODE] + }, + hljs.QUOTE_STRING_MODE, + NUMBER + ] + } +} + +module.exports = monkey; diff --git a/node_modules/highlight.js/lib/languages/moonscript.js b/node_modules/highlight.js/lib/languages/moonscript.js @@ -0,0 +1,123 @@ +/* +Language: MoonScript +Author: Billy Quith <chinbillybilbo@gmail.com> +Description: MoonScript is a programming language that transcompiles to Lua. +Origin: coffeescript.js +Website: http://moonscript.org/ +Category: scripting +*/ + +function moonscript(hljs) { + var KEYWORDS = { + keyword: + // Moonscript keywords + 'if then not for in while do return else elseif break continue switch and or ' + + 'unless when class extends super local import export from using', + literal: + 'true false nil', + built_in: + '_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' + + 'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' + + 'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' + + 'io math os package string table' + }; + var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; + var SUBST = { + className: 'subst', + begin: /#\{/, end: /}/, + keywords: KEYWORDS + }; + var EXPRESSIONS = [ + hljs.inherit(hljs.C_NUMBER_MODE, + {starts: {end: '(\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp + { + className: 'string', + variants: [ + { + begin: /'/, end: /'/, + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: /"/, end: /"/, + contains: [hljs.BACKSLASH_ESCAPE, SUBST] + } + ] + }, + { + className: 'built_in', + begin: '@__' + hljs.IDENT_RE + }, + { + begin: '@' + hljs.IDENT_RE // relevance booster on par with CoffeeScript + }, + { + begin: hljs.IDENT_RE + '\\\\' + hljs.IDENT_RE // inst\method + } + ]; + SUBST.contains = EXPRESSIONS; + + var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE}); + var PARAMS_RE = '(\\(.*\\))?\\s*\\B[-=]>'; + var PARAMS = { + className: 'params', + begin: '\\([^\\(]', returnBegin: true, + /* We need another contained nameless mode to not have every nested + pair of parens to be called "params" */ + contains: [{ + begin: /\(/, end: /\)/, + keywords: KEYWORDS, + contains: ['self'].concat(EXPRESSIONS) + }] + }; + + return { + name: 'MoonScript', + aliases: ['moon'], + keywords: KEYWORDS, + illegal: /\/\*/, + contains: EXPRESSIONS.concat([ + hljs.COMMENT('--', '$'), + { + className: 'function', // function: -> => + begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + PARAMS_RE, end: '[-=]>', + returnBegin: true, + contains: [TITLE, PARAMS] + }, + { + begin: /[\(,:=]\s*/, // anonymous function start + relevance: 0, + contains: [ + { + className: 'function', + begin: PARAMS_RE, end: '[-=]>', + returnBegin: true, + contains: [PARAMS] + } + ] + }, + { + className: 'class', + beginKeywords: 'class', + end: '$', + illegal: /[:="\[\]]/, + contains: [ + { + beginKeywords: 'extends', + endsWithParent: true, + illegal: /[:="\[\]]/, + contains: [TITLE] + }, + TITLE + ] + }, + { + className: 'name', // table + begin: JS_IDENT_RE + ':', end: ':', + returnBegin: true, returnEnd: true, + relevance: 0 + } + ]) + }; +} + +module.exports = moonscript; diff --git a/node_modules/highlight.js/lib/languages/n1ql.js b/node_modules/highlight.js/lib/languages/n1ql.js @@ -0,0 +1,79 @@ +/* + Language: N1QL + Author: Andres Täht <andres.taht@gmail.com> + Contributors: Rene Saarsoo <nene@triin.net> + Description: Couchbase query language + Website: https://www.couchbase.com/products/n1ql + */ + +function n1ql(hljs) { + return { + name: 'N1QL', + case_insensitive: true, + contains: [ + { + beginKeywords: + 'build create index delete drop explain infer|10 insert merge prepare select update upsert|10', + end: /;/, endsWithParent: true, + keywords: { + // Taken from http://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/reservedwords.html + keyword: + 'all alter analyze and any array as asc begin between binary boolean break bucket build by call ' + + 'case cast cluster collate collection commit connect continue correlate cover create database ' + + 'dataset datastore declare decrement delete derived desc describe distinct do drop each element ' + + 'else end every except exclude execute exists explain fetch first flatten for force from ' + + 'function grant group gsi having if ignore ilike in include increment index infer inline inner ' + + 'insert intersect into is join key keys keyspace known last left let letting like limit lsm map ' + + 'mapping matched materialized merge minus namespace nest not number object offset on ' + + 'option or order outer over parse partition password path pool prepare primary private privilege ' + + 'procedure public raw realm reduce rename return returning revoke right role rollback satisfies ' + + 'schema select self semi set show some start statistics string system then to transaction trigger ' + + 'truncate under union unique unknown unnest unset update upsert use user using validate value ' + + 'valued values via view when where while with within work xor', + // Taken from http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/literals.html + literal: + 'true false null missing|5', + // Taken from http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/functions.html + built_in: + 'array_agg array_append array_concat array_contains array_count array_distinct array_ifnull array_length ' + + 'array_max array_min array_position array_prepend array_put array_range array_remove array_repeat array_replace ' + + 'array_reverse array_sort array_sum avg count max min sum greatest least ifmissing ifmissingornull ifnull ' + + 'missingif nullif ifinf ifnan ifnanorinf naninf neginfif posinfif clock_millis clock_str date_add_millis ' + + 'date_add_str date_diff_millis date_diff_str date_part_millis date_part_str date_trunc_millis date_trunc_str ' + + 'duration_to_str millis str_to_millis millis_to_str millis_to_utc millis_to_zone_name now_millis now_str ' + + 'str_to_duration str_to_utc str_to_zone_name decode_json encode_json encoded_size poly_length base64 base64_encode ' + + 'base64_decode meta uuid abs acos asin atan atan2 ceil cos degrees e exp ln log floor pi power radians random ' + + 'round sign sin sqrt tan trunc object_length object_names object_pairs object_inner_pairs object_values ' + + 'object_inner_values object_add object_put object_remove object_unwrap regexp_contains regexp_like regexp_position ' + + 'regexp_replace contains initcap length lower ltrim position repeat replace rtrim split substr title trim upper ' + + 'isarray isatom isboolean isnumber isobject isstring type toarray toatom toboolean tonumber toobject tostring' + }, + contains: [ + { + className: 'string', + begin: '\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }, + { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }, + { + className: 'symbol', + begin: '`', end: '`', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 2 + }, + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + hljs.C_BLOCK_COMMENT_MODE + ] + }; +} + +module.exports = n1ql; diff --git a/node_modules/highlight.js/lib/languages/nginx.js b/node_modules/highlight.js/lib/languages/nginx.js @@ -0,0 +1,103 @@ +/* +Language: Nginx config +Author: Peter Leonov <gojpeg@yandex.ru> +Contributors: Ivan Sagalaev <maniac@softwaremaniacs.org> +Category: common, config +Website: https://www.nginx.com +*/ + +function nginx(hljs) { + var VAR = { + className: 'variable', + variants: [ + {begin: /\$\d+/}, + {begin: /\$\{/, end: /}/}, + {begin: '[\\$\\@]' + hljs.UNDERSCORE_IDENT_RE} + ] + }; + var DEFAULT = { + endsWithParent: true, + keywords: { + $pattern: '[a-z/_]+', + literal: + 'on off yes no true false none blocked debug info notice warn error crit ' + + 'select break last permanent redirect kqueue rtsig epoll poll /dev/poll' + }, + relevance: 0, + illegal: '=>', + contains: [ + hljs.HASH_COMMENT_MODE, + { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, VAR], + variants: [ + {begin: /"/, end: /"/}, + {begin: /'/, end: /'/} + ] + }, + // this swallows entire URLs to avoid detecting numbers within + { + begin: '([a-z]+):/', end: '\\s', endsWithParent: true, excludeEnd: true, + contains: [VAR] + }, + { + className: 'regexp', + contains: [hljs.BACKSLASH_ESCAPE, VAR], + variants: [ + {begin: "\\s\\^", end: "\\s|{|;", returnEnd: true}, + // regexp locations (~, ~*) + {begin: "~\\*?\\s+", end: "\\s|{|;", returnEnd: true}, + // *.example.com + {begin: "\\*(\\.[a-z\\-]+)+"}, + // sub.example.* + {begin: "([a-z\\-]+\\.)+\\*"} + ] + }, + // IP + { + className: 'number', + begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b' + }, + // units + { + className: 'number', + begin: '\\b\\d+[kKmMgGdshdwy]*\\b', + relevance: 0 + }, + VAR + ] + }; + + return { + name: 'Nginx config', + aliases: ['nginxconf'], + contains: [ + hljs.HASH_COMMENT_MODE, + { + begin: hljs.UNDERSCORE_IDENT_RE + '\\s+{', returnBegin: true, + end: '{', + contains: [ + { + className: 'section', + begin: hljs.UNDERSCORE_IDENT_RE + } + ], + relevance: 0 + }, + { + begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|{', returnBegin: true, + contains: [ + { + className: 'attribute', + begin: hljs.UNDERSCORE_IDENT_RE, + starts: DEFAULT + } + ], + relevance: 0 + } + ], + illegal: '[^\\s\\}]' + }; +} + +module.exports = nginx; diff --git a/node_modules/highlight.js/lib/languages/nim.js b/node_modules/highlight.js/lib/languages/nim.js @@ -0,0 +1,64 @@ +/* +Language: Nim +Description: Nim is a statically typed compiled systems programming language. +Website: https://nim-lang.org +Category: system +*/ + +function nim(hljs) { + return { + name: 'Nim', + aliases: ['nim'], + keywords: { + keyword: + 'addr and as asm bind block break case cast const continue converter ' + + 'discard distinct div do elif else end enum except export finally ' + + 'for from func generic if import in include interface is isnot iterator ' + + 'let macro method mixin mod nil not notin object of or out proc ptr ' + + 'raise ref return shl shr static template try tuple type using var ' + + 'when while with without xor yield', + literal: + 'shared guarded stdin stdout stderr result true false', + built_in: + 'int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float ' + + 'float32 float64 bool char string cstring pointer expr stmt void ' + + 'auto any range array openarray varargs seq set clong culong cchar ' + + 'cschar cshort cint csize clonglong cfloat cdouble clongdouble ' + + 'cuchar cushort cuint culonglong cstringarray semistatic' + }, + contains: [ { + className: 'meta', // Actually pragma + begin: /{\./, + end: /\.}/, + relevance: 10 + }, { + className: 'string', + begin: /[a-zA-Z]\w*"/, + end: /"/, + contains: [{begin: /""/}] + }, { + className: 'string', + begin: /([a-zA-Z]\w*)?"""/, + end: /"""/ + }, + hljs.QUOTE_STRING_MODE, + { + className: 'type', + begin: /\b[A-Z]\w+\b/, + relevance: 0 + }, { + className: 'number', + relevance: 0, + variants: [ + {begin: /\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/}, + {begin: /\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/}, + {begin: /\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/}, + {begin: /\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/} + ] + }, + hljs.HASH_COMMENT_MODE + ] + } +} + +module.exports = nim; diff --git a/node_modules/highlight.js/lib/languages/nix.js b/node_modules/highlight.js/lib/languages/nix.js @@ -0,0 +1,59 @@ +/* +Language: Nix +Author: Domen Kožar <domen@dev.si> +Description: Nix functional language +Website: http://nixos.org/nix +*/ + + +function nix(hljs) { + var NIX_KEYWORDS = { + keyword: + 'rec with let in inherit assert if else then', + literal: + 'true false or and null', + built_in: + 'import abort baseNameOf dirOf isNull builtins map removeAttrs throw ' + + 'toString derivation' + }; + var ANTIQUOTE = { + className: 'subst', + begin: /\$\{/, + end: /}/, + keywords: NIX_KEYWORDS + }; + var ATTRS = { + begin: /[a-zA-Z0-9-_]+(\s*=)/, returnBegin: true, + relevance: 0, + contains: [ + { + className: 'attr', + begin: /\S+/ + } + ] + }; + var STRING = { + className: 'string', + contains: [ANTIQUOTE], + variants: [ + {begin: "''", end: "''"}, + {begin: '"', end: '"'} + ] + }; + var EXPRESSIONS = [ + hljs.NUMBER_MODE, + hljs.HASH_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + STRING, + ATTRS + ]; + ANTIQUOTE.contains = EXPRESSIONS; + return { + name: 'Nix', + aliases: ["nixos"], + keywords: NIX_KEYWORDS, + contains: EXPRESSIONS + }; +} + +module.exports = nix; diff --git a/node_modules/highlight.js/lib/languages/nsis.js b/node_modules/highlight.js/lib/languages/nsis.js @@ -0,0 +1,115 @@ +/* +Language: NSIS +Description: Nullsoft Scriptable Install System +Author: Jan T. Sott <jan.sott@gmail.com> +Website: https://nsis.sourceforge.io/Main_Page +*/ + +function nsis(hljs) { + var CONSTANTS = { + className: 'variable', + begin: /\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/ + }; + + var DEFINES = { + // ${defines} + className: 'variable', + begin: /\$+{[\w\.:-]+}/ + }; + + var VARIABLES = { + // $variables + className: 'variable', + begin: /\$+\w+/, + illegal: /\(\){}/ + }; + + var LANGUAGES = { + // $(language_strings) + className: 'variable', + begin: /\$+\([\w\^\.:-]+\)/ + }; + + var PARAMETERS = { + // command parameters + className: 'params', + begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|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|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)' + }; + + var COMPILER = { + // !compiler_flags + className: 'keyword', + begin: /\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/ + }; + + var METACHARS = { + // $\n, $\r, $\t, $$ + className: 'meta', + begin: /\$(\\[nrt]|\$)/ + }; + + var PLUGINS = { + // plug::ins + className: 'class', + begin: /\w+\:\:\w+/ + }; + + var STRING = { + className: 'string', + variants: [ + { + begin: '"', end: '"' + }, + { + begin: '\'', end: '\'' + }, + { + begin: '`', end: '`' + } + ], + illegal: /\n/, + contains: [ + METACHARS, + CONSTANTS, + DEFINES, + VARIABLES, + LANGUAGES + ] + }; + + return { + name: 'NSIS', + case_insensitive: false, + keywords: { + keyword: + '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 GetKnownFolderPath GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfRtlLanguage IfShellVarContextAll IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText Int64Cmp Int64CmpU Int64Fmt IntCmp IntCmpU IntFmt IntOp IntPtrCmp IntPtrCmpU IntPtrOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadAndSetImage LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestLongPathAware ManifestMaxVersionTested ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PEAddResource PEDllCharacteristics PERemoveResource PESubsysVer 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', + literal: + 'admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib' + }, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.COMMENT( + ';', + '$', + { + relevance: 0 + } + ), + { + className: 'function', + beginKeywords: 'Function PageEx Section SectionGroup', end: '$' + }, + STRING, + COMPILER, + DEFINES, + VARIABLES, + LANGUAGES, + PARAMETERS, + PLUGINS, + hljs.NUMBER_MODE + ] + }; +} + +module.exports = nsis; diff --git a/node_modules/highlight.js/lib/languages/objectivec.js b/node_modules/highlight.js/lib/languages/objectivec.js @@ -0,0 +1,109 @@ +/* +Language: Objective-C +Author: Valerii Hiora <valerii.hiora@gmail.com> +Contributors: Angel G. Olloqui <angelgarcia.mail@gmail.com>, Matt Diephouse <matt@diephouse.com>, Andrew Farmer <ahfarmer@gmail.com>, Minh Nguyễn <mxn@1ec5.org> +Website: https://developer.apple.com/documentation/objectivec +Category: common +*/ + +function objectivec(hljs) { + var API_CLASS = { + className: 'built_in', + begin: '\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+', + }; + var IDENTIFIER_RE = /[a-zA-Z@][a-zA-Z0-9_]*/; + var OBJC_KEYWORDS = { + $pattern: IDENTIFIER_RE, + keyword: + 'int float while char export sizeof typedef const struct for union ' + + 'unsigned long volatile static bool mutable if do return goto void ' + + 'enum else break extern asm case short default double register explicit ' + + 'signed typename this switch continue wchar_t inline readonly assign ' + + 'readwrite self @synchronized id typeof ' + + 'nonatomic super unichar IBOutlet IBAction strong weak copy ' + + 'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' + + '@private @protected @public @try @property @end @throw @catch @finally ' + + '@autoreleasepool @synthesize @dynamic @selector @optional @required ' + + '@encode @package @import @defs @compatibility_alias ' + + '__bridge __bridge_transfer __bridge_retained __bridge_retain ' + + '__covariant __contravariant __kindof ' + + '_Nonnull _Nullable _Null_unspecified ' + + '__FUNCTION__ __PRETTY_FUNCTION__ __attribute__ ' + + 'getter setter retain unsafe_unretained ' + + 'nonnull nullable null_unspecified null_resettable class instancetype ' + + 'NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER ' + + 'NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED ' + + 'NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE ' + + 'NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END ' + + 'NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW ' + + 'NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN', + literal: + 'false true FALSE TRUE nil YES NO NULL', + built_in: + 'BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once' + }; + var CLASS_KEYWORDS = { + $pattern: IDENTIFIER_RE, + keyword: '@interface @class @protocol @implementation' + }; + return { + name: 'Objective-C', + aliases: ['mm', 'objc', 'obj-c'], + keywords: OBJC_KEYWORDS, + illegal: '</', + contains: [ + API_CLASS, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + { + className: 'string', + variants: [ + { + begin: '@"', end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + } + ] + }, + { + className: 'meta', + begin: /#\s*[a-z]+\b/, end: /$/, + keywords: { + 'meta-keyword': + 'if else elif endif define undef warning error line ' + + 'pragma ifdef ifndef include' + }, + contains: [ + { + begin: /\\\n/, relevance: 0 + }, + hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}), + { + className: 'meta-string', + begin: /<.*?>/, end: /$/, + illegal: '\\n', + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }, + { + className: 'class', + begin: '(' + CLASS_KEYWORDS.keyword.split(' ').join('|') + ')\\b', end: '({|$)', excludeEnd: true, + keywords: CLASS_KEYWORDS, + contains: [ + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + begin: '\\.'+hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + } + ] + }; +} + +module.exports = objectivec; diff --git a/node_modules/highlight.js/lib/languages/ocaml.js b/node_modules/highlight.js/lib/languages/ocaml.js @@ -0,0 +1,82 @@ +/* +Language: OCaml +Author: Mehdi Dogguy <mehdi@dogguy.org> +Contributors: Nicolas Braud-Santoni <nicolas.braud-santoni@ens-cachan.fr>, Mickael Delahaye <mickael.delahaye@gmail.com> +Description: OCaml language definition. +Website: https://ocaml.org +Category: functional +*/ + +function ocaml(hljs) { + /* missing support for heredoc-like string (OCaml 4.0.2+) */ + return { + name: 'OCaml', + aliases: ['ml'], + keywords: { + $pattern: '[a-z_]\\w*!?', + keyword: + 'and as assert asr begin class constraint do done downto else end ' + + 'exception external for fun function functor if in include ' + + 'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' + + 'mod module mutable new object of open! open or private rec sig struct ' + + 'then to try type val! val virtual when while with ' + + /* camlp4 */ + 'parser value', + built_in: + /* built-in types */ + 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' + + /* (some) types in Pervasives */ + 'in_channel out_channel ref', + literal: + 'true false' + }, + illegal: /\/\/|>>/, + contains: [ + { + className: 'literal', + begin: '\\[(\\|\\|)?\\]|\\(\\)', + relevance: 0 + }, + hljs.COMMENT( + '\\(\\*', + '\\*\\)', + { + contains: ['self'] + } + ), + { /* type variable */ + className: 'symbol', + begin: '\'[A-Za-z_](?!\')[\\w\']*' + /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */ + }, + { /* polymorphic variant */ + className: 'type', + begin: '`[A-Z][\\w\']*' + }, + { /* module or constructor */ + className: 'type', + begin: '\\b[A-Z][\\w\']*', + relevance: 0 + }, + { /* don't color identifiers, but safely catch all identifiers with '*/ + begin: '[a-z_]\\w*\'[\\w\']*', relevance: 0 + }, + hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + { + className: 'number', + begin: + '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' + + '0[oO][0-7_]+[Lln]?|' + + '0[bB][01_]+[Lln]?|' + + '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)', + relevance: 0 + }, + { + begin: /[-=]>/ // relevance booster + } + ] + } +} + +module.exports = ocaml; diff --git a/node_modules/highlight.js/lib/languages/openscad.js b/node_modules/highlight.js/lib/languages/openscad.js @@ -0,0 +1,67 @@ +/* +Language: OpenSCAD +Author: Dan Panzarella <alsoelp@gmail.com> +Description: OpenSCAD is a language for the 3D CAD modeling software of the same name. +Website: https://www.openscad.org +Category: scientific +*/ + +function openscad(hljs) { + var SPECIAL_VARS = { + className: 'keyword', + begin: '\\$(f[asn]|t|vp[rtd]|children)' + }, + LITERALS = { + className: 'literal', + begin: 'false|true|PI|undef' + }, + NUMBERS = { + className: 'number', + begin: '\\b\\d+(\\.\\d+)?(e-?\\d+)?', //adds 1e5, 1e-10 + relevance: 0 + }, + STRING = hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal: null}), + PREPRO = { + className: 'meta', + keywords: {'meta-keyword': 'include use'}, + begin: 'include|use <', + end: '>' + }, + PARAMS = { + className: 'params', + begin: '\\(', end: '\\)', + contains: ['self', NUMBERS, STRING, SPECIAL_VARS, LITERALS] + }, + MODIFIERS = { + begin: '[*!#%]', + relevance: 0 + }, + FUNCTIONS = { + className: 'function', + beginKeywords: 'module function', + end: '\\=|\\{', + contains: [PARAMS, hljs.UNDERSCORE_TITLE_MODE] + }; + + return { + name: 'OpenSCAD', + aliases: ['scad'], + keywords: { + keyword: 'function module include use for intersection_for if else \\%', + literal: 'false true PI undef', + built_in: 'circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + NUMBERS, + PREPRO, + STRING, + SPECIAL_VARS, + MODIFIERS, + FUNCTIONS + ] + } +} + +module.exports = openscad; diff --git a/node_modules/highlight.js/lib/languages/oxygene.js b/node_modules/highlight.js/lib/languages/oxygene.js @@ -0,0 +1,81 @@ +/* +Language: Oxygene +Author: Carlo Kok <ck@remobjects.com> +Description: Oxygene is built on the foundation of Object Pascal, revamped and extended to be a modern language for the twenty-first century. +Website: https://www.elementscompiler.com/elements/default.aspx +*/ + +function oxygene(hljs) { + var OXYGENE_KEYWORDS = { + $pattern: /\.?\w+/, + keyword: 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '+ + 'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '+ + 'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '+ + 'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+ + 'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+ + 'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+ + 'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+ + 'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained' + }; + var CURLY_COMMENT = hljs.COMMENT( + '{', + '}', + { + relevance: 0 + } + ); + var PAREN_COMMENT = hljs.COMMENT( + '\\(\\*', + '\\*\\)', + { + relevance: 10 + } + ); + var STRING = { + className: 'string', + begin: '\'', end: '\'', + contains: [{begin: '\'\''}] + }; + var CHAR_STRING = { + className: 'string', begin: '(#\\d+)+' + }; + var FUNCTION = { + className: 'function', + beginKeywords: 'function constructor destructor procedure method', end: '[:;]', + keywords: 'function constructor|10 destructor|10 procedure|10 method|10', + contains: [ + hljs.TITLE_MODE, + { + className: 'params', + begin: '\\(', end: '\\)', + keywords: OXYGENE_KEYWORDS, + contains: [STRING, CHAR_STRING] + }, + CURLY_COMMENT, PAREN_COMMENT + ] + }; + return { + name: 'Oxygene', + case_insensitive: true, + keywords: OXYGENE_KEYWORDS, + illegal: '("|\\$[G-Zg-z]|\\/\\*|</|=>|->)', + contains: [ + CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, + STRING, CHAR_STRING, + hljs.NUMBER_MODE, + FUNCTION, + { + className: 'class', + begin: '=\\bclass\\b', end: 'end;', + keywords: OXYGENE_KEYWORDS, + contains: [ + STRING, CHAR_STRING, + CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, + FUNCTION + ] + } + ] + }; +} + +module.exports = oxygene; diff --git a/node_modules/highlight.js/lib/languages/parser3.js b/node_modules/highlight.js/lib/languages/parser3.js @@ -0,0 +1,58 @@ +/* +Language: Parser3 +Requires: xml.js +Author: Oleg Volchkov <oleg@volchkov.net> +Website: https://www.parser.ru/en/ +Category: template +*/ + +function parser3(hljs) { + var CURLY_SUBCOMMENT = hljs.COMMENT( + '{', + '}', + { + contains: ['self'] + } + ); + return { + name: 'Parser3', + subLanguage: 'xml', relevance: 0, + contains: [ + hljs.COMMENT('^#', '$'), + hljs.COMMENT( + '\\^rem{', + '}', + { + relevance: 10, + contains: [ + CURLY_SUBCOMMENT + ] + } + ), + { + className: 'meta', + begin: '^@(?:BASE|USE|CLASS|OPTIONS)$', + relevance: 10 + }, + { + className: 'title', + begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$' + }, + { + className: 'variable', + begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?' + }, + { + className: 'keyword', + begin: '\\^[\\w\\-\\.\\:]+' + }, + { + className: 'number', + begin: '\\^#[0-9a-fA-F]+' + }, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = parser3; diff --git a/node_modules/highlight.js/lib/languages/perl.js b/node_modules/highlight.js/lib/languages/perl.js @@ -0,0 +1,168 @@ +/* +Language: Perl +Author: Peter Leonov <gojpeg@yandex.ru> +Website: https://www.perl.org +Category: common +*/ + +function perl(hljs) { + var PERL_KEYWORDS = { + $pattern: /[\w.]+/, + keyword: 'getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ' + + 'ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime ' + + 'readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq ' + + 'fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent ' + + 'shutdown dump chomp connect getsockname die socketpair close flock exists index shmget ' + + 'sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr ' + + 'unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 ' + + 'getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline ' + + 'endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand ' + + 'mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink ' + + 'getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr ' + + 'untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link ' + + 'getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller ' + + 'lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and ' + + 'sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 ' + + 'chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach ' + + 'tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ' + + 'ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe ' + + 'atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when' + }; + var SUBST = { + className: 'subst', + begin: '[$@]\\{', end: '\\}', + keywords: PERL_KEYWORDS + }; + var METHOD = { + begin: '->{', end: '}' + // contains defined later + }; + var VAR = { + variants: [ + {begin: /\$\d/}, + {begin: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/}, + {begin: /[\$%@][^\s\w{]/, relevance: 0} + ] + }; + var STRING_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST, VAR]; + var PERL_DEFAULT_CONTAINS = [ + VAR, + hljs.HASH_COMMENT_MODE, + hljs.COMMENT( + '^\\=\\w', + '\\=cut', + { + endsWithParent: true + } + ), + METHOD, + { + className: 'string', + contains: STRING_CONTAINS, + variants: [ + { + begin: 'q[qwxr]?\\s*\\(', end: '\\)', + relevance: 5 + }, + { + begin: 'q[qwxr]?\\s*\\[', end: '\\]', + relevance: 5 + }, + { + begin: 'q[qwxr]?\\s*\\{', end: '\\}', + relevance: 5 + }, + { + begin: 'q[qwxr]?\\s*\\|', end: '\\|', + relevance: 5 + }, + { + begin: 'q[qwxr]?\\s*\\<', end: '\\>', + relevance: 5 + }, + { + begin: 'qw\\s+q', end: 'q', + relevance: 5 + }, + { + begin: '\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: '"', end: '"' + }, + { + begin: '`', end: '`', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: '{\\w+}', + contains: [], + relevance: 0 + }, + { + begin: '\-?\\w+\\s*\\=\\>', + contains: [], + relevance: 0 + } + ] + }, + { + className: 'number', + begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + relevance: 0 + }, + { // regexp container + begin: '(\\/\\/|' + hljs.RE_STARTERS_RE + '|\\b(split|return|print|reverse|grep)\\b)\\s*', + keywords: 'split return print reverse grep', + relevance: 0, + contains: [ + hljs.HASH_COMMENT_MODE, + { + className: 'regexp', + begin: '(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*', + relevance: 10 + }, + { + className: 'regexp', + begin: '(m|qr)?/', end: '/[a-z]*', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 // allows empty "//" which is a common comment delimiter in other languages + } + ] + }, + { + className: 'function', + beginKeywords: 'sub', end: '(\\s*\\(.*?\\))?[;{]', excludeEnd: true, + relevance: 5, + contains: [hljs.TITLE_MODE] + }, + { + begin: '-\\w\\b', + relevance: 0 + }, + { + begin: "^__DATA__$", + end: "^__END__$", + subLanguage: 'mojolicious', + contains: [ + { + begin: "^@@.*", + end: "$", + className: "comment" + } + ] + } + ]; + SUBST.contains = PERL_DEFAULT_CONTAINS; + METHOD.contains = PERL_DEFAULT_CONTAINS; + + return { + name: 'Perl', + aliases: ['pl', 'pm'], + keywords: PERL_KEYWORDS, + contains: PERL_DEFAULT_CONTAINS + }; +} + +module.exports = perl; diff --git a/node_modules/highlight.js/lib/languages/pf.js b/node_modules/highlight.js/lib/languages/pf.js @@ -0,0 +1,58 @@ +/* +Language: Packet Filter config +Description: pf.conf — packet filter configuration file (OpenBSD) +Author: Peter Piwowarski <oldlaptop654@aol.com> +Website: http://man.openbsd.org/pf.conf +Category: config +*/ + +function pf(hljs) { + var MACRO = { + className: 'variable', + begin: /\$[\w\d#@][\w\d_]*/ + }; + var TABLE = { + className: 'variable', + begin: /<(?!\/)/, end: />/ + }; + + return { + name: 'Packet Filter config', + aliases: ['pf.conf'], + keywords: { + $pattern: /[a-z0-9_<>-]+/, + built_in: /* block match pass are "actions" in pf.conf(5), the rest are + * lexically similar top-level commands. + */ + 'block match pass load anchor|5 antispoof|10 set table', + keyword: + 'in out log quick on rdomain inet inet6 proto from port os to route ' + + 'allow-opts divert-packet divert-reply divert-to flags group icmp-type ' + + 'icmp6-type label once probability recieved-on rtable prio queue ' + + 'tos tag tagged user keep fragment for os drop ' + + 'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin ' + + 'source-hash static-port ' + + 'dup-to reply-to route-to ' + + 'parent bandwidth default min max qlimit ' + + 'block-policy debug fingerprints hostid limit loginterface optimization ' + + 'reassemble ruleset-optimization basic none profile skip state-defaults ' + + 'state-policy timeout ' + + 'const counters persist ' + + 'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy ' + + 'source-track global rule max-src-nodes max-src-states max-src-conn ' + + 'max-src-conn-rate overload flush ' + + 'scrub|5 max-mss min-ttl no-df|10 random-id', + literal: + 'all any no-route self urpf-failed egress|5 unknown' + }, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + MACRO, + TABLE + ] + }; +} + +module.exports = pf; diff --git a/node_modules/highlight.js/lib/languages/pgsql.js b/node_modules/highlight.js/lib/languages/pgsql.js @@ -0,0 +1,506 @@ +/* +Language: PostgreSQL and PL/pgSQL +Author: Egor Rogov (e.rogov@postgrespro.ru) +Website: https://www.postgresql.org/docs/11/sql.html +Description: + This language incorporates both PostgreSQL SQL dialect and PL/pgSQL language. + It is based on PostgreSQL version 11. Some notes: + - Text in double-dollar-strings is _always_ interpreted as some programming code. Text + in ordinary quotes is _never_ interpreted that way and highlighted just as a string. + - There are quite a bit "special cases". That's because many keywords are not strictly + they are keywords in some contexts and ordinary identifiers in others. Only some + of such cases are handled; you still can get some of your identifiers highlighted + wrong way. + - Function names deliberately are not highlighted. There is no way to tell function + call from other constructs, hence we can't highlight _all_ function names. And + some names highlighted while others not looks ugly. +*/ + +function pgsql(hljs) { + var COMMENT_MODE = hljs.COMMENT('--', '$'); + var UNQUOTED_IDENT = '[a-zA-Z_][a-zA-Z_0-9$]*'; + var DOLLAR_STRING = '\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$'; + var LABEL = '<<\\s*' + UNQUOTED_IDENT + '\\s*>>'; + + var SQL_KW = + // https://www.postgresql.org/docs/11/static/sql-keywords-appendix.html + // https://www.postgresql.org/docs/11/static/sql-commands.html + // SQL commands (starting words) + 'ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE ' + + 'DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY ' + + 'PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW ' + + 'START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES ' + + // SQL commands (others) + 'AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN ' + + 'WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS ' + + 'FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM ' + + 'TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS ' + + 'METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION ' + + 'INDEX PROCEDURE ASSERTION ' + + // additional reserved key words + 'ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK ' + + 'COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS ' + + 'DEFERRABLE RANGE ' + + 'DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ' + + 'ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT ' + + 'NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY ' + + 'REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN ' + + 'TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH ' + + // some of non-reserved (which are used in clauses or as PL/pgSQL keyword) + 'BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN ' + + 'BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT ' + + 'TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN ' + + 'EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH ' + + 'REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ' + + 'ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED ' + + 'INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 ' + + 'INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ' + + 'ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES ' + + 'RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS ' + + 'UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF ' + + // some parameters of VACUUM/ANALYZE/EXPLAIN + 'FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING ' + + // + 'RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED ' + + 'OF NOTHING NONE EXCLUDE ATTRIBUTE ' + + // from GRANT (not keywords actually) + 'USAGE ROUTINES ' + + // actually literals, but look better this way (due to IS TRUE, IS FALSE, ISNULL etc) + 'TRUE FALSE NAN INFINITY '; + + var ROLE_ATTRS = // only those not in keywrods already + 'SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT ' + + 'LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS '; + + var PLPGSQL_KW = + 'ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS ' + + 'STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT ' + + 'OPEN '; + + var TYPES = + // https://www.postgresql.org/docs/11/static/datatype.html + 'BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR ' + + 'CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 ' + + 'MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 ' + + 'SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 ' + + 'TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR ' + + 'INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ' + + // pseudotypes + 'ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL ' + + 'RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR ' + + // spec. type + 'NAME ' + + // OID-types + 'OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 ' + + 'REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ';// + + + var TYPES_RE = + TYPES.trim() + .split(' ') + .map( function(val) { return val.split('|')[0]; } ) + .join('|'); + + var SQL_BI = + 'CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP ' + + 'CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC '; + + var PLPGSQL_BI = + 'FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 ' + + 'TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ' + + // get diagnostics + 'ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME ' + + 'PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 ' + + 'PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 '; + + var PLPGSQL_EXCEPTIONS = + // exceptions https://www.postgresql.org/docs/current/static/errcodes-appendix.html + 'SQLSTATE SQLERRM|10 ' + + 'SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING ' + + 'NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED ' + + 'STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED ' + + 'SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE ' + + 'SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION ' + + 'TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED ' + + 'INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR ' + + 'INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION ' + + 'STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION ' + + 'DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW ' + + 'DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW ' + + 'INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION ' + + 'INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION ' + + 'INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST ' + + 'INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE ' + + 'NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE ' + + 'INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE ' + + 'INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT ' + + 'INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH ' + + 'NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE ' + + 'SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION ' + + 'SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING ' + + 'FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION ' + + 'BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT ' + + 'INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION ' + + 'INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION ' + + 'UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE ' + + 'INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE ' + + 'HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION ' + + 'INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION ' + + 'NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION ' + + 'SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION ' + + 'IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME ' + + 'TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD ' + + 'DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST ' + + 'INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT ' + + 'MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED ' + + 'READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION ' + + 'CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED ' + + 'PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED ' + + 'EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED ' + + 'TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED ' + + 'SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME ' + + 'INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION ' + + 'SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED ' + + 'SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE ' + + 'GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME ' + + 'NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH ' + + 'INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN ' + + 'UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT ' + + 'DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION ' + + 'DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS ' + + 'DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS ' + + 'INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION ' + + 'INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION ' + + 'INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION ' + + 'INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL ' + + 'OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED ' + + 'STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE ' + + 'OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION ' + + 'QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED ' + + 'SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR ' + + 'LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED ' + + 'FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION ' + + 'FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER ' + + 'FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS ' + + 'FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX ' + + 'FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH ' + + 'FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES ' + + 'FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE ' + + 'FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION ' + + 'FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR ' + + 'RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED ' + + 'INDEX_CORRUPTED '; + + var FUNCTIONS = + // https://www.postgresql.org/docs/11/static/functions-aggregate.html + 'ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG ' + + 'JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG ' + + 'CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE ' + + 'REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP ' + + 'PERCENTILE_CONT PERCENTILE_DISC ' + + // https://www.postgresql.org/docs/11/static/functions-window.html + 'ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE ' + + // https://www.postgresql.org/docs/11/static/functions-comparison.html + 'NUM_NONNULLS NUM_NULLS ' + + // https://www.postgresql.org/docs/11/static/functions-math.html + 'ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT ' + + 'TRUNC WIDTH_BUCKET ' + + 'RANDOM SETSEED ' + + 'ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND ' + + // https://www.postgresql.org/docs/11/static/functions-string.html + 'BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ' + + 'ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP ' + + 'LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 ' + + 'QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY ' + + 'REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR ' + + 'TO_ASCII TO_HEX TRANSLATE ' + + // https://www.postgresql.org/docs/11/static/functions-binarystring.html + 'OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE ' + + // https://www.postgresql.org/docs/11/static/functions-formatting.html + 'TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP ' + + // https://www.postgresql.org/docs/11/static/functions-datetime.html + 'AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL ' + + 'MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 ' + + 'TIMEOFDAY TRANSACTION_TIMESTAMP|10 ' + + // https://www.postgresql.org/docs/11/static/functions-enum.html + 'ENUM_FIRST ENUM_LAST ENUM_RANGE ' + + // https://www.postgresql.org/docs/11/static/functions-geometry.html + 'AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH ' + + 'BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ' + + // https://www.postgresql.org/docs/11/static/functions-net.html + 'ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY ' + + 'INET_MERGE MACADDR8_SET7BIT ' + + // https://www.postgresql.org/docs/11/static/functions-textsearch.html + 'ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY ' + + 'QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE ' + + 'TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY ' + + 'TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN ' + + // https://www.postgresql.org/docs/11/static/functions-xml.html + 'XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT ' + + 'XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT ' + + 'XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES ' + + 'TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA ' + + 'QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA ' + + 'CURSOR_TO_XML CURSOR_TO_XMLSCHEMA ' + + 'SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA ' + + 'DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA ' + + 'XMLATTRIBUTES ' + + // https://www.postgresql.org/docs/11/static/functions-json.html + 'TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT ' + + 'JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH ' + + 'JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH ' + + 'JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET ' + + 'JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT ' + + 'JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET ' + + 'JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY ' + + // https://www.postgresql.org/docs/11/static/functions-sequence.html + 'CURRVAL LASTVAL NEXTVAL SETVAL ' + + // https://www.postgresql.org/docs/11/static/functions-conditional.html + 'COALESCE NULLIF GREATEST LEAST ' + + // https://www.postgresql.org/docs/11/static/functions-array.html + 'ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ' + + 'ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY ' + + 'STRING_TO_ARRAY UNNEST ' + + // https://www.postgresql.org/docs/11/static/functions-range.html + 'ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE ' + + // https://www.postgresql.org/docs/11/static/functions-srf.html + 'GENERATE_SERIES GENERATE_SUBSCRIPTS ' + + // https://www.postgresql.org/docs/11/static/functions-info.html + 'CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT ' + + 'INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE ' + + 'TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE ' + + 'COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION ' + + 'TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX ' + + 'TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS ' + + // https://www.postgresql.org/docs/11/static/functions-admin.html + 'CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE ' + + 'GIN_CLEAN_PENDING_LIST ' + + // https://www.postgresql.org/docs/11/static/functions-trigger.html + 'SUPPRESS_REDUNDANT_UPDATES_TRIGGER ' + + // ihttps://www.postgresql.org/docs/devel/static/lo-funcs.html + 'LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE ' + + // + 'GROUPING CAST '; + + var FUNCTIONS_RE = + FUNCTIONS.trim() + .split(' ') + .map( function(val) { return val.split('|')[0]; } ) + .join('|'); + + return { + name: 'PostgreSQL', + aliases: ['postgres','postgresql'], + case_insensitive: true, + keywords: { + keyword: + SQL_KW + PLPGSQL_KW + ROLE_ATTRS, + built_in: + SQL_BI + PLPGSQL_BI + PLPGSQL_EXCEPTIONS, + }, + // Forbid some cunstructs from other languages to improve autodetect. In fact + // "[a-z]:" is legal (as part of array slice), but improbabal. + illegal: /:==|\W\s*\(\*|(^|\s)\$[a-z]|{{|[a-z]:\s*$|\.\.\.|TO:|DO:/, + contains: [ + // special handling of some words, which are reserved only in some contexts + { + className: 'keyword', + variants: [ + { begin: /\bTEXT\s*SEARCH\b/ }, + { begin: /\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/ }, + { begin: /\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/ }, + { begin: /\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/ }, + { begin: /\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/ }, + { begin: /\bNULLS\s+(FIRST|LAST)\b/ }, + { begin: /\bEVENT\s+TRIGGER\b/ }, + { begin: /\b(MAPPING|OR)\s+REPLACE\b/ }, + { begin: /\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/ }, + { begin: /\b(SHARE|EXCLUSIVE)\s+MODE\b/ }, + { begin: /\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/ }, + { begin: /\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/ }, + { begin: /\bPRESERVE\s+ROWS\b/ }, + { begin: /\bDISCARD\s+PLANS\b/ }, + { begin: /\bREFERENCING\s+(OLD|NEW)\b/ }, + { begin: /\bSKIP\s+LOCKED\b/ }, + { begin: /\bGROUPING\s+SETS\b/ }, + { begin: /\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/ }, + { begin: /\b(WITH|WITHOUT)\s+HOLD\b/ }, + { begin: /\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/ }, + { begin: /\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/ }, + { begin: /\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/ }, + { begin: /\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/ }, + { begin: /\bIS\s+(NOT\s+)?UNKNOWN\b/ }, + { begin: /\bSECURITY\s+LABEL\b/ }, + { begin: /\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/ }, + { begin: /\bWITH\s+(NO\s+)?DATA\b/ }, + { begin: /\b(FOREIGN|SET)\s+DATA\b/ }, + { begin: /\bSET\s+(CATALOG|CONSTRAINTS)\b/ }, + { begin: /\b(WITH|FOR)\s+ORDINALITY\b/ }, + { begin: /\bIS\s+(NOT\s+)?DOCUMENT\b/ }, + { begin: /\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/ }, + { begin: /\b(STRIP|PRESERVE)\s+WHITESPACE\b/ }, + { begin: /\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/ }, + { begin: /\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/ }, + { begin: /\bAT\s+TIME\s+ZONE\b/ }, + { begin: /\bGRANTED\s+BY\b/ }, + { begin: /\bRETURN\s+(QUERY|NEXT)\b/ }, + { begin: /\b(ATTACH|DETACH)\s+PARTITION\b/ }, + { begin: /\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/ }, + { begin: /\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/ }, + { begin: /\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/ } + ] + }, + // functions named as keywords, followed by '(' + { + begin: /\b(FORMAT|FAMILY|VERSION)\s*\(/, + //keywords: { built_in: 'FORMAT FAMILY VERSION' } + }, + // INCLUDE ( ... ) in index_parameters in CREATE TABLE + { + begin: /\bINCLUDE\s*\(/, + keywords: 'INCLUDE' + }, + // not highlight RANGE if not in frame_clause (not 100% correct, but seems satisfactory) + { + begin: /\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/ + }, + // disable highlighting in commands CREATE AGGREGATE/COLLATION/DATABASE/OPERTOR/TEXT SEARCH .../TYPE + // and in PL/pgSQL RAISE ... USING + { + begin: /\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/ + }, + // PG_smth; HAS_some_PRIVILEGE + { + //className: 'built_in', + begin: /\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/, + relevance: 10 + }, + // extract + { + begin: /\bEXTRACT\s*\(/, + end: /\bFROM\b/, + returnEnd: true, + keywords: { + //built_in: 'EXTRACT', + type: 'CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS ' + + 'MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR ' + + 'TIMEZONE_MINUTE WEEK YEAR' + } + }, + // xmlelement, xmlpi - special NAME + { + begin: /\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/, + keywords: { + //built_in: 'XMLELEMENT XMLPI', + keyword: 'NAME' + } + }, + // xmlparse, xmlserialize + { + begin: /\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/, + keywords: { + //built_in: 'XMLPARSE XMLSERIALIZE', + keyword: 'DOCUMENT CONTENT' + } + }, + // Sequences. We actually skip everything between CACHE|INCREMENT|MAXVALUE|MINVALUE and + // nearest following numeric constant. Without with trick we find a lot of "keywords" + // in 'avrasm' autodetection test... + { + beginKeywords: 'CACHE INCREMENT MAXVALUE MINVALUE', + end: hljs.C_NUMBER_RE, + returnEnd: true, + keywords: 'BY CACHE INCREMENT MAXVALUE MINVALUE' + }, + // WITH|WITHOUT TIME ZONE as part of datatype + { + className: 'type', + begin: /\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/ + }, + // INTERVAL optional fields + { + className: 'type', + begin: /\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/ + }, + // Pseudo-types which allowed only as return type + { + begin: /\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/, + keywords: { + keyword: 'RETURNS', + type: 'LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER' + } + }, + // Known functions - only when followed by '(' + { + begin: '\\b(' + FUNCTIONS_RE + ')\\s*\\(' + //keywords: { built_in: FUNCTIONS } + }, + // Types + { + begin: '\\.(' + TYPES_RE + ')\\b' // prevent highlight as type, say, 'oid' in 'pgclass.oid' + }, + { + begin: '\\b(' + TYPES_RE + ')\\s+PATH\\b', // in XMLTABLE + keywords: { + keyword: 'PATH', // hopefully no one would use PATH type in XMLTABLE... + type: TYPES.replace('PATH ','') + } + }, + { + className: 'type', + begin: '\\b(' + TYPES_RE + ')\\b' + }, + // Strings, see https://www.postgresql.org/docs/11/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS + { + className: 'string', + begin: '\'', end: '\'', + contains: [{begin: '\'\''}] + }, + { + className: 'string', + begin: '(e|E|u&|U&)\'', end: '\'', + contains: [{begin: '\\\\.'}], + relevance: 10 + }, + hljs.END_SAME_AS_BEGIN({ + begin: DOLLAR_STRING, + end: DOLLAR_STRING, + contains: [ + { + // actually we want them all except SQL; listed are those with known implementations + // and XML + JSON just in case + subLanguage: ['pgsql','perl','python','tcl','r','lua','java','php','ruby','bash','scheme','xml','json'], + endsWithParent: true + } + ] + }), + // identifiers in quotes + { + begin: '"', end: '"', + contains: [{begin: '""'}] + }, + // numbers + hljs.C_NUMBER_MODE, + // comments + hljs.C_BLOCK_COMMENT_MODE, + COMMENT_MODE, + // PL/pgSQL staff + // %ROWTYPE, %TYPE, $n + { + className: 'meta', + variants: [ + {begin: '%(ROW)?TYPE', relevance: 10}, // %TYPE, %ROWTYPE + {begin: '\\$\\d+'}, // $n + {begin: '^#\\w', end: '$'} // #compiler option + ] + }, + // <<labeles>> + { + className: 'symbol', + begin: LABEL, + relevance: 10 + } + ] + }; +} + +module.exports = pgsql; diff --git a/node_modules/highlight.js/lib/languages/php-template.js b/node_modules/highlight.js/lib/languages/php-template.js @@ -0,0 +1,32 @@ +/* +Language: PHP Template +Requires: xml.js, php.js +Author: Josh Goebel <hello@joshgoebel.com> +Website: https://www.php.net +Category: common +*/ + +function phpTemplate(hljs) { + return { + name: "PHP template", + subLanguage: 'xml', + contains: [ + { + begin: /<\?(php|=)?/, + end: /\?>/, + subLanguage: 'php', + contains: [ + // We don't want the php closing tag ?> to close the PHP block when + // inside any of the following blocks: + {begin: '/\\*', end: '\\*/', skip: true}, + {begin: 'b"', end: '"', skip: true}, + {begin: 'b\'', end: '\'', skip: true}, + hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null, className: null, contains: null, skip: true}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null, className: null, contains: null, skip: true}) + ] + } + ] + }; +} + +module.exports = phpTemplate; diff --git a/node_modules/highlight.js/lib/languages/php.js b/node_modules/highlight.js/lib/languages/php.js @@ -0,0 +1,172 @@ +/* +Language: PHP +Author: Victor Karamzin <Victor.Karamzin@enterra-inc.com> +Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Ivan Sagalaev <maniac@softwaremaniacs.org> +Website: https://www.php.net +Category: common +*/ + +/** + * @param {HLJSApi} hljs + * @returns {LanguageDetail} + * */ +function php(hljs) { + var VARIABLE = { + begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' + }; + var PREPROCESSOR = { + className: 'meta', + variants: [ + { begin: /<\?php/, relevance: 10 }, // boost for obvious PHP + { begin: /<\?[=]?/ }, + { begin: /\?>/ } // end php tag + ] + }; + var SUBST = { + className: 'subst', + variants: [ + { begin: /\$\w+/ }, + { begin: /\{\$/, end: /\}/ } + ] + }; + var SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, { + illegal: null, + }); + var DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, { + illegal: null, + contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST), + }); + var HEREDOC = hljs.END_SAME_AS_BEGIN({ + begin: /<<<[ \t]*(\w+)\n/, + end: /[ \t]*(\w+)\b/, + contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST), + }); + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR], + variants: [ + hljs.inherit(SINGLE_QUOTED, { + begin: "b'", end: "'", + }), + hljs.inherit(DOUBLE_QUOTED, { + begin: 'b"', end: '"', + }), + DOUBLE_QUOTED, + SINGLE_QUOTED, + HEREDOC + ] + }; + var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]}; + var KEYWORDS = { + keyword: + // Magic constants: + // <https://www.php.net/manual/en/language.constants.predefined.php> + '__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ ' + + // Function that look like language construct or language construct that look like function: + // List of keywords that may not require parenthesis + 'die echo exit include include_once print require require_once ' + + // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table + // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' + + // Other keywords: + // <https://www.php.net/manual/en/reserved.php> + // <https://www.php.net/manual/en/language.types.type-juggling.php> + 'array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield', + literal: 'false null true', + built_in: + // Standard PHP library: + // <https://www.php.net/manual/en/book.spl.php> + 'Error|0 ' + // error is too common a name esp since PHP is case in-sensitive + 'AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ' + + // Reserved interfaces: + // <https://www.php.net/manual/en/reserved.interfaces.php> + 'ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference ' + + // Reserved classes: + // <https://www.php.net/manual/en/reserved.classes.php> + 'Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass' + }; + return { + aliases: ['php', 'php3', 'php4', 'php5', 'php6', 'php7'], + case_insensitive: true, + keywords: KEYWORDS, + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.COMMENT('//', '$', {contains: [PREPROCESSOR]}), + hljs.COMMENT( + '/\\*', + '\\*/', + { + contains: [ + { + className: 'doctag', + begin: '@[A-Za-z]+' + } + ] + } + ), + hljs.COMMENT( + '__halt_compiler.+?;', + false, + { + endsWithParent: true, + keywords: '__halt_compiler' + } + ), + PREPROCESSOR, + { + className: 'keyword', begin: /\$this\b/ + }, + VARIABLE, + { + // swallow composed identifiers to avoid parsing them as keywords + begin: /(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + }, + { + className: 'function', + beginKeywords: 'fn function', end: /[;{]/, excludeEnd: true, + illegal: '[$%\\[]', + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: 'params', + begin: '\\(', end: '\\)', + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS, + contains: [ + 'self', + VARIABLE, + hljs.C_BLOCK_COMMENT_MODE, + STRING, + NUMBER + ] + } + ] + }, + { + className: 'class', + beginKeywords: 'class interface', end: '{', excludeEnd: true, + illegal: /[:\(\$"]/, + contains: [ + {beginKeywords: 'extends implements'}, + hljs.UNDERSCORE_TITLE_MODE + ] + }, + { + beginKeywords: 'namespace', end: ';', + illegal: /[\.']/, + contains: [hljs.UNDERSCORE_TITLE_MODE] + }, + { + beginKeywords: 'use', end: ';', + contains: [hljs.UNDERSCORE_TITLE_MODE] + }, + { + begin: '=>' // No markup, just a relevance booster + }, + STRING, + NUMBER + ] + }; +} + +module.exports = php; diff --git a/node_modules/highlight.js/lib/languages/plaintext.js b/node_modules/highlight.js/lib/languages/plaintext.js @@ -0,0 +1,16 @@ +/* +Language: Plain text +Author: Egor Rogov (e.rogov@postgrespro.ru) +Description: Plain text without any highlighting. +Category: common +*/ + +function plaintext(hljs) { + return { + name: 'Plain text', + aliases: ['text', 'txt'], + disableAutodetect: true + }; +} + +module.exports = plaintext; diff --git a/node_modules/highlight.js/lib/languages/pony.js b/node_modules/highlight.js/lib/languages/pony.js @@ -0,0 +1,85 @@ +/* +Language: Pony +Author: Joe Eli McIlvain <joe.eli.mac@gmail.com> +Description: Pony is an open-source, object-oriented, actor-model, + capabilities-secure, high performance programming language. +Website: https://www.ponylang.io +*/ + +function pony(hljs) { + var KEYWORDS = { + keyword: + 'actor addressof and as be break class compile_error compile_intrinsic ' + + 'consume continue delegate digestof do else elseif embed end error ' + + 'for fun if ifdef in interface is isnt lambda let match new not object ' + + 'or primitive recover repeat return struct then trait try type until ' + + 'use var where while with xor', + meta: + 'iso val tag trn box ref', + literal: + 'this false true' + }; + + var TRIPLE_QUOTE_STRING_MODE = { + className: 'string', + begin: '"""', end: '"""', + relevance: 10 + }; + + var QUOTE_STRING_MODE = { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE] + }; + + var SINGLE_QUOTE_CHAR_MODE = { + className: 'string', + begin: '\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }; + + var TYPE_NAME = { + className: 'type', + begin: '\\b_?[A-Z][\\w]*', + relevance: 0 + }; + + var PRIMED_NAME = { + begin: hljs.IDENT_RE + '\'', relevance: 0 + }; + + var NUMBER_MODE = { + className: 'number', + begin: '(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)', + relevance: 0 + }; + + /** + * The `FUNCTION` and `CLASS` modes were intentionally removed to simplify + * highlighting and fix cases like + * ``` + * interface Iterator[A: A] + * fun has_next(): Bool + * fun next(): A? + * ``` + * where it is valid to have a function head without a body + */ + + return { + name: 'Pony', + keywords: KEYWORDS, + contains: [ + TYPE_NAME, + TRIPLE_QUOTE_STRING_MODE, + QUOTE_STRING_MODE, + SINGLE_QUOTE_CHAR_MODE, + PRIMED_NAME, + NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }; +} + +module.exports = pony; diff --git a/node_modules/highlight.js/lib/languages/powershell.js b/node_modules/highlight.js/lib/languages/powershell.js @@ -0,0 +1,243 @@ +/* +Language: PowerShell +Description: PowerShell is a task-based command-line shell and scripting language built on .NET. +Author: David Mohundro <david@mohundro.com> +Contributors: Nicholas Blumhardt <nblumhardt@nblumhardt.com>, Victor Zhou <OiCMudkips@users.noreply.github.com>, Nicolas Le Gall <contact@nlegall.fr> +Website: https://docs.microsoft.com/en-us/powershell/ +*/ + +function powershell(hljs) { + + var TYPES = + ["string", "char", "byte", "int", "long", "bool", "decimal", "single", + "double", "DateTime", "xml", "array", "hashtable", "void"]; + + // https://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).aspx + var VALID_VERBS = + 'Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|' + + 'Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|' + + 'Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|' + + 'Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|' + + 'ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|' + + 'Limit|Merge|New|Out|Publish|Restore|Save|Sync|Unpublish|Update|' + + 'Approve|Assert|Complete|Confirm|Deny|Disable|Enable|Install|Invoke|Register|' + + 'Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|' + + 'Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|' + + 'Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|' + + 'Unprotect|Use|ForEach|Sort|Tee|Where'; + + var COMPARISON_OPERATORS = + '-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|' + + '-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|' + + '-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|' + + '-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|' + + '-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|' + + '-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|' + + '-split|-wildcard|-xor'; + + var KEYWORDS = { + $pattern: /-?[A-z\.\-]+\b/, + keyword: 'if else foreach return do while until elseif begin for trap data dynamicparam ' + + 'end break throw param continue finally in switch exit filter try process catch ' + + 'hidden static parameter', + // "echo" relevance has been set to 0 to avoid auto-detect conflicts with shell transcripts + built_in: 'ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp ' + + 'cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx ' + + 'fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group ' + + 'gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi ' + + 'iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh ' + + 'popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp ' + + 'rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp ' + + 'spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write' + // TODO: 'validate[A-Z]+' can't work in keywords + }; + + var TITLE_NAME_RE = /\w[\w\d]*((-)[\w\d]+)*/; + + var BACKTICK_ESCAPE = { + begin: '`[\\s\\S]', + relevance: 0 + }; + + var VAR = { + className: 'variable', + variants: [ + { begin: /\$\B/ }, + { className: 'keyword', begin: /\$this/ }, + { begin: /\$[\w\d][\w\d_:]*/ } + ] + }; + + var LITERAL = { + className: 'literal', + begin: /\$(null|true|false)\b/ + }; + + var QUOTE_STRING = { + className: "string", + variants: [{ begin: /"/, end: /"/ }, { begin: /@"/, end: /^"@/ }], + contains: [ + BACKTICK_ESCAPE, + VAR, + { + className: 'variable', + begin: /\$[A-z]/, end: /[^A-z]/ + } + ] + }; + + var APOS_STRING = { + className: 'string', + variants: [ + { begin: /'/, end: /'/ }, + { begin: /@'/, end: /^'@/ } + ] + }; + + var PS_HELPTAGS = { + className: "doctag", + variants: [ + /* no paramater help tags */ + { + begin: /\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/ + }, + /* one parameter help tags */ + { begin: /\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/ } + ] + }; + + var PS_COMMENT = hljs.inherit( + hljs.COMMENT(null, null), + { + variants: [ + /* single-line comment */ + { begin: /#/, end: /$/ }, + /* multi-line comment */ + { begin: /<#/, end: /#>/ } + ], + contains: [PS_HELPTAGS] + } + ); + + var CMDLETS = { + className: 'built_in', + variants: [ + { begin: '('.concat(VALID_VERBS, ')+(-)[\\w\\d]+') } + ] + }; + + var PS_CLASS = { + className: 'class', + beginKeywords: 'class enum', end: /\s*[{]/, excludeEnd: true, + relevance: 0, + contains: [hljs.TITLE_MODE] + }; + + var PS_FUNCTION = { + className: 'function', + begin: /function\s+/, end: /\s*\{|$/, + excludeEnd: true, + returnBegin: true, + relevance: 0, + contains: [ + { begin: "function", relevance: 0, className: "keyword" }, + { className: "title", + begin: TITLE_NAME_RE, relevance:0 }, + { begin: /\(/, end: /\)/, className: "params", + relevance: 0, + contains: [VAR] } + // CMDLETS + ] + }; + + // Using statment, plus type, plus assembly name. + var PS_USING = { + begin: /using\s/, end: /$/, + returnBegin: true, + contains: [ + QUOTE_STRING, + APOS_STRING, + { className: 'keyword', begin: /(using|assembly|command|module|namespace|type)/ } + ] + }; + + // Comperison operators & function named parameters. + var PS_ARGUMENTS = { + variants: [ + // PS literals are pretty verbose so it's a good idea to accent them a bit. + { className: 'operator', begin: '('.concat(COMPARISON_OPERATORS, ')\\b') }, + { className: 'literal', begin: /(-)[\w\d]+/, relevance:0 } + ] + }; + + var HASH_SIGNS = { + className: 'selector-tag', + begin: /\@\B/, + relevance: 0 + }; + + // It's a very general rule so I'll narrow it a bit with some strict boundaries + // to avoid any possible false-positive collisions! + var PS_METHODS = { + className: 'function', + begin: /\[.*\]\s*[\w]+[ ]??\(/, end: /$/, + returnBegin: true, + relevance: 0, + contains: [ + { + className: 'keyword', begin: '('.concat( + KEYWORDS.keyword.toString().replace(/\s/g, '|' + ), ')\\b'), + endsParent: true, + relevance: 0 + }, + hljs.inherit(hljs.TITLE_MODE, { endsParent: true }) + ] + }; + + var GENTLEMANS_SET = [ + // STATIC_MEMBER, + PS_METHODS, + PS_COMMENT, + BACKTICK_ESCAPE, + hljs.NUMBER_MODE, + QUOTE_STRING, + APOS_STRING, + // PS_NEW_OBJECT_TYPE, + CMDLETS, + VAR, + LITERAL, + HASH_SIGNS + ]; + + var PS_TYPE = { + begin: /\[/, end: /\]/, + excludeBegin: true, + excludeEnd: true, + relevance: 0, + contains: [].concat( + 'self', + GENTLEMANS_SET, + { begin: "(" + TYPES.join("|") + ")", className: "built_in", relevance:0 }, + { className: 'type', begin: /[\.\w\d]+/, relevance: 0 } + ) + }; + + PS_METHODS.contains.unshift(PS_TYPE); + + return { + name: 'PowerShell', + aliases: ["ps", "ps1"], + case_insensitive: true, + keywords: KEYWORDS, + contains: GENTLEMANS_SET.concat( + PS_CLASS, + PS_FUNCTION, + PS_USING, + PS_ARGUMENTS, + PS_TYPE + ) + }; +} + +module.exports = powershell; diff --git a/node_modules/highlight.js/lib/languages/processing.js b/node_modules/highlight.js/lib/languages/processing.js @@ -0,0 +1,58 @@ +/* +Language: Processing +Description: Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. +Author: Erik Paluka <erik.paluka@gmail.com> +Website: https://processing.org +Category: graphics +*/ + +function processing(hljs) { + return { + name: 'Processing', + keywords: { + keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' + + 'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' + + 'Object StringDict StringList Table TableRow XML ' + + // Java keywords + 'false synchronized int abstract float private char boolean static null if const ' + + 'for true while long throw strictfp finally protected import native final return void ' + + 'enum else break transient new catch instanceof byte super volatile case assert short ' + + 'package default double public try this switch continue throws protected public private', + literal: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI', + title: 'setup draw', + built_in: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' + + 'keyCode pixels focused frameCount frameRate height width ' + + 'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' + + 'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' + + 'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' + + 'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' + + 'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' + + 'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' + + 'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' + + 'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' + + 'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' + + 'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' + + 'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' + + 'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' + + 'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' + + 'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' + + 'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' + + 'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' + + 'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' + + 'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' + + 'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' + + 'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' + + 'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' + + 'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = processing; diff --git a/node_modules/highlight.js/lib/languages/profile.js b/node_modules/highlight.js/lib/languages/profile.js @@ -0,0 +1,38 @@ +/* +Language: Python profiler +Description: Python profiler results +Author: Brian Beck <exogen@gmail.com> +*/ + +function profile(hljs) { + return { + name: 'Python profiler', + contains: [ + hljs.C_NUMBER_MODE, + { + begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}', end: ':', + excludeEnd: true + }, + { + begin: '(ncalls|tottime|cumtime)', end: '$', + keywords: 'ncalls tottime|10 cumtime|10 filename', + relevance: 10 + }, + { + begin: 'function calls', end: '$', + contains: [hljs.C_NUMBER_MODE], + relevance: 10 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '\\(', end: '\\)$', + excludeBegin: true, excludeEnd: true, + relevance: 0 + } + ] + }; +} + +module.exports = profile; diff --git a/node_modules/highlight.js/lib/languages/prolog.js b/node_modules/highlight.js/lib/languages/prolog.js @@ -0,0 +1,97 @@ +/* +Language: Prolog +Description: Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics. +Author: Raivo Laanemets <raivo@infdot.com> +Website: https://en.wikipedia.org/wiki/Prolog +*/ + +function prolog(hljs) { + + var ATOM = { + + begin: /[a-z][A-Za-z0-9_]*/, + relevance: 0 + }; + + var VAR = { + + className: 'symbol', + variants: [ + {begin: /[A-Z][a-zA-Z0-9_]*/}, + {begin: /_[A-Za-z0-9_]*/}, + ], + relevance: 0 + }; + + var PARENTED = { + + begin: /\(/, + end: /\)/, + relevance: 0 + }; + + var LIST = { + + begin: /\[/, + end: /\]/ + }; + + var LINE_COMMENT = { + + className: 'comment', + begin: /%/, end: /$/, + contains: [hljs.PHRASAL_WORDS_MODE] + }; + + var BACKTICK_STRING = { + + className: 'string', + begin: /`/, end: /`/, + contains: [hljs.BACKSLASH_ESCAPE] + }; + + var CHAR_CODE = { + + className: 'string', // 0'a etc. + begin: /0\'(\\\'|.)/ + }; + + var SPACE_CODE = { + + className: 'string', + begin: /0\'\\s/ // 0'\s + }; + + var PRED_OP = { // relevance booster + begin: /:-/ + }; + + var inner = [ + + ATOM, + VAR, + PARENTED, + PRED_OP, + LIST, + LINE_COMMENT, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + BACKTICK_STRING, + CHAR_CODE, + SPACE_CODE, + hljs.C_NUMBER_MODE + ]; + + PARENTED.contains = inner; + LIST.contains = inner; + + return { + name: 'Prolog', + contains: inner.concat([ + {begin: /\.$/} // relevance booster + ]) + }; +} + +module.exports = prolog; diff --git a/node_modules/highlight.js/lib/languages/properties.js b/node_modules/highlight.js/lib/languages/properties.js @@ -0,0 +1,79 @@ +/* +Language: .properties +Contributors: Valentin Aitken <valentin@nalisbg.com>, Egor Rogov <e.rogov@postgrespro.ru> +Website: https://en.wikipedia.org/wiki/.properties +Category: common, config +*/ + +function properties(hljs) { + + // whitespaces: space, tab, formfeed + var WS0 = '[ \\t\\f]*'; + var WS1 = '[ \\t\\f]+'; + // delimiter + var DELIM = '(' + WS0+'[:=]'+WS0+ '|' + WS1 + ')'; + var KEY_ALPHANUM = '([^\\\\\\W:= \\t\\f\\n]|\\\\.)+'; + var KEY_OTHER = '([^\\\\:= \\t\\f\\n]|\\\\.)+'; + + var DELIM_AND_VALUE = { + // skip DELIM + end: DELIM, + relevance: 0, + starts: { + // value: everything until end of line (again, taking into account backslashes) + className: 'string', + end: /$/, + relevance: 0, + contains: [ + { begin: '\\\\\\n' } + ] + } + }; + + return { + name: '.properties', + case_insensitive: true, + illegal: /\S/, + contains: [ + hljs.COMMENT('^\\s*[!#]', '$'), + // key: everything until whitespace or = or : (taking into account backslashes) + // case of a "normal" key + { + begin: KEY_ALPHANUM + DELIM, + returnBegin: true, + contains: [ + { + className: 'attr', + begin: KEY_ALPHANUM, + endsParent: true, + relevance: 0 + } + ], + starts: DELIM_AND_VALUE + }, + // case of key containing non-alphanumeric chars => relevance = 0 + { + begin: KEY_OTHER + DELIM, + returnBegin: true, + relevance: 0, + contains: [ + { + className: 'meta', + begin: KEY_OTHER, + endsParent: true, + relevance: 0 + } + ], + starts: DELIM_AND_VALUE + }, + // case of an empty key + { + className: 'attr', + relevance: 0, + begin: KEY_OTHER + WS0 + '$' + } + ] + }; +} + +module.exports = properties; diff --git a/node_modules/highlight.js/lib/languages/protobuf.js b/node_modules/highlight.js/lib/languages/protobuf.js @@ -0,0 +1,47 @@ +/* +Language: Protocol Buffers +Author: Dan Tao <daniel.tao@gmail.com> +Description: Protocol buffer message definition format +Website: https://developers.google.com/protocol-buffers/docs/proto3 +Category: protocols +*/ + +function protobuf(hljs) { + return { + name: 'Protocol Buffers', + keywords: { + keyword: 'package import option optional required repeated group oneof', + built_in: 'double float int32 int64 uint32 uint64 sint32 sint64 ' + + 'fixed32 fixed64 sfixed32 sfixed64 bool string bytes', + literal: 'true false' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'class', + beginKeywords: 'message enum service', end: /\{/, + illegal: /\n/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title + }) + ] + }, + { + className: 'function', + beginKeywords: 'rpc', + end: /[{;]/, excludeEnd: true, + keywords: 'rpc returns' + }, + { + begin: /^\s*[A-Z_]+/, + end: /\s*=/, excludeEnd: true + } + ] + }; +} + +module.exports = protobuf; diff --git a/node_modules/highlight.js/lib/languages/puppet.js b/node_modules/highlight.js/lib/languages/puppet.js @@ -0,0 +1,124 @@ +/* +Language: Puppet +Author: Jose Molina Colmenero <gaudy41@gmail.com> +Website: https://puppet.com/docs +Category: config +*/ + +function puppet(hljs) { + + var PUPPET_KEYWORDS = { + keyword: + /* language keywords */ + 'and case default else elsif false if in import enherits node or true undef unless main settings $string ', + literal: + /* metaparameters */ + 'alias audit before loglevel noop require subscribe tag ' + + /* normal attributes */ + 'owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check ' + + 'en_address ip_address realname command environment hour monute month monthday special target weekday '+ + 'creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore ' + + 'links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source ' + + 'souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid '+ + 'ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel ' + + 'native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options ' + + 'device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use ' + + 'message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform ' + + 'responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running ' + + 'start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age ' + + 'password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled ' + + 'enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist ' + + 'priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey ' + + 'sslverify mounted', + built_in: + /* core facts */ + 'architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers ' + + 'domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces '+ + 'ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion ' + + 'kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease ' + + 'lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major ' + + 'macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease '+ + 'operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion '+ + 'rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced '+ + 'selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime '+ + 'uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version' + }; + + var COMMENT = hljs.COMMENT('#', '$'); + + var IDENT_RE = '([A-Za-z_]|::)(\\w|::)*'; + + var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}); + + var VARIABLE = {className: 'variable', begin: '\\$' + IDENT_RE}; + + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, VARIABLE], + variants: [ + {begin: /'/, end: /'/}, + {begin: /"/, end: /"/} + ] + }; + + return { + name: 'Puppet', + aliases: ['pp'], + contains: [ + COMMENT, + VARIABLE, + STRING, + { + beginKeywords: 'class', end: '\\{|;', + illegal: /=/, + contains: [TITLE, COMMENT] + }, + { + beginKeywords: 'define', end: /\{/, + contains: [ + { + className: 'section', begin: hljs.IDENT_RE, endsParent: true + } + ] + }, + { + begin: hljs.IDENT_RE + '\\s+\\{', returnBegin: true, + end: /\S/, + contains: [ + { + className: 'keyword', + begin: hljs.IDENT_RE + }, + { + begin: /\{/, end: /\}/, + keywords: PUPPET_KEYWORDS, + relevance: 0, + contains: [ + STRING, + COMMENT, + { + begin:'[a-zA-Z_]+\\s*=>', + returnBegin: true, end: '=>', + contains: [ + { + className: 'attr', + begin: hljs.IDENT_RE, + } + ] + }, + { + className: 'number', + begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + relevance: 0 + }, + VARIABLE + ] + } + ], + relevance: 0 + } + ] + } +} + +module.exports = puppet; diff --git a/node_modules/highlight.js/lib/languages/purebasic.js b/node_modules/highlight.js/lib/languages/purebasic.js @@ -0,0 +1,95 @@ +/* +Language: PureBASIC +Author: Tristano Ajmone <tajmone@gmail.com> +Description: Syntax highlighting for PureBASIC (v.5.00-5.60). No inline ASM highlighting. (v.1.2, May 2017) +Credits: I've taken inspiration from the PureBasic language file for GeSHi, created by Gustavo Julio Fiorenza (GuShH). +Website: https://www.purebasic.com +*/ + +// Base deafult colors in PB IDE: background: #FFFFDF; foreground: #000000; + +function purebasic(hljs) { + var STRINGS = { // PB IDE color: #0080FF (Azure Radiance) + className: 'string', + begin: '(~)?"', end: '"', + illegal: '\\n' + }; + var CONSTANTS = { // PB IDE color: #924B72 (Cannon Pink) + // "#" + a letter or underscore + letters, digits or underscores + (optional) "$" + className: 'symbol', + begin: '#[a-zA-Z_]\\w*\\$?' + }; + + return { + name: 'PureBASIC', + aliases: ['pb', 'pbi'], + keywords: // PB IDE color: #006666 (Blue Stone) + Bold + // Keywords from all version of PureBASIC 5.00 upward ... + 'Align And Array As Break CallDebugger Case CompilerCase CompilerDefault ' + + 'CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError ' + + 'CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug ' + + 'DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default ' + + 'Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM ' + + 'EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration ' + + 'EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect ' + + 'EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends ' + + 'FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC ' + + 'IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount ' + + 'Map Module NewList NewMap Next Not Or Procedure ProcedureC ' + + 'ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim ' + + 'Read Repeat Restore Return Runtime Select Shared Static Step Structure ' + + 'StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule ' + + 'UseModule Wend While With XIncludeFile XOr', + contains: [ + // COMMENTS | PB IDE color: #00AAAA (Persian Green) + hljs.COMMENT(';', '$', {relevance: 0}), + + { // PROCEDURES DEFINITIONS + className: 'function', + begin: '\\b(Procedure|Declare)(C|CDLL|DLL)?\\b', + end: '\\(', + excludeEnd: true, + returnBegin: true, + contains: [ + { // PROCEDURE KEYWORDS | PB IDE color: #006666 (Blue Stone) + Bold + className: 'keyword', + begin: '(Procedure|Declare)(C|CDLL|DLL)?', + excludeEnd: true + }, + { // PROCEDURE RETURN TYPE SETTING | PB IDE color: #000000 (Black) + className: 'type', + begin: '\\.\\w*' + // end: ' ', + }, + hljs.UNDERSCORE_TITLE_MODE // PROCEDURE NAME | PB IDE color: #006666 (Blue Stone) + ] + }, + STRINGS, + CONSTANTS + ] + }; +} + +/* ============================================================================== + CHANGELOG + ============================================================================== + - v.1.2 (2017-05-12) + -- BUG-FIX: Some keywords were accidentally joyned together. Now fixed. + - v.1.1 (2017-04-30) + -- Updated to PureBASIC 5.60. + -- Keywords list now built by extracting them from the PureBASIC SDK's + "SyntaxHilighting.dll" (from each PureBASIC version). Tokens from each + version are added to the list, and renamed or removed tokens are kept + for the sake of covering all versions of the language from PureBASIC + v5.00 upward. (NOTE: currently, there are no renamed or deprecated + tokens in the keywords list). For more info, see: + -- http://www.purebasic.fr/english/viewtopic.php?&p=506269 + -- https://github.com/tajmone/purebasic-archives/tree/master/syntax-highlighting/guidelines + - v.1.0 (April 2016) + -- First release + -- Keywords list taken and adapted from GuShH's (Gustavo Julio Fiorenza) + PureBasic language file for GeSHi: + -- https://github.com/easybook/geshi/blob/master/geshi/purebasic.php +*/ + +module.exports = purebasic; diff --git a/node_modules/highlight.js/lib/languages/python-repl.js b/node_modules/highlight.js/lib/languages/python-repl.js @@ -0,0 +1,31 @@ +/* +Language: Python REPL +Requires: python.js +Author: Josh Goebel <hello@joshgoebel.com> +Category: common +*/ + +function pythonRepl(hljs) { + return { + aliases: ['pycon'], + contains: [ + { + className: 'meta', + starts: { + // a space separates the REPL prefix from the actual code + // this is purely for cleaner HTML output + end: / |$/, + starts: { + end: '$', subLanguage: 'python' + } + }, + variants: [ + { begin: /^>>>(?=[ ]|$)/ }, + { begin: /^\.\.\.(?=[ ]|$)/ } + ] + }, + ] + } +} + +module.exports = pythonRepl; diff --git a/node_modules/highlight.js/lib/languages/python.js b/node_modules/highlight.js/lib/languages/python.js @@ -0,0 +1,139 @@ +/* +Language: Python +Description: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. +Website: https://www.python.org +Category: common +*/ + +function python(hljs) { + var KEYWORDS = { + keyword: + 'and elif is global as in if from raise for except finally print import pass return ' + + 'exec else break not with class assert yield try while continue del or def lambda ' + + 'async await nonlocal|10', + built_in: + 'Ellipsis NotImplemented', + literal: 'False None True' + }; + var PROMPT = { + className: 'meta', begin: /^(>>>|\.\.\.) / + }; + var SUBST = { + className: 'subst', + begin: /\{/, end: /\}/, + keywords: KEYWORDS, + illegal: /#/ + }; + var LITERAL_BRACKET = { + begin: /\{\{/, + relevance: 0 + }; + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + { + begin: /(u|b)?r?'''/, end: /'''/, + contains: [hljs.BACKSLASH_ESCAPE, PROMPT], + relevance: 10 + }, + { + begin: /(u|b)?r?"""/, end: /"""/, + contains: [hljs.BACKSLASH_ESCAPE, PROMPT], + relevance: 10 + }, + { + begin: /(fr|rf|f)'''/, end: /'''/, + contains: [hljs.BACKSLASH_ESCAPE, PROMPT, LITERAL_BRACKET, SUBST] + }, + { + begin: /(fr|rf|f)"""/, end: /"""/, + contains: [hljs.BACKSLASH_ESCAPE, PROMPT, LITERAL_BRACKET, SUBST] + }, + { + begin: /(u|r|ur)'/, end: /'/, + relevance: 10 + }, + { + begin: /(u|r|ur)"/, end: /"/, + relevance: 10 + }, + { + begin: /(b|br)'/, end: /'/ + }, + { + begin: /(b|br)"/, end: /"/ + }, + { + begin: /(fr|rf|f)'/, end: /'/, + contains: [hljs.BACKSLASH_ESCAPE, LITERAL_BRACKET, SUBST] + }, + { + begin: /(fr|rf|f)"/, end: /"/, + contains: [hljs.BACKSLASH_ESCAPE, LITERAL_BRACKET, SUBST] + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }; + var NUMBER = { + className: 'number', relevance: 0, + variants: [ + {begin: hljs.BINARY_NUMBER_RE + '[lLjJ]?'}, + {begin: '\\b(0o[0-7]+)[lLjJ]?'}, + {begin: hljs.C_NUMBER_RE + '[lLjJ]?'} + ] + }; + var PARAMS = { + className: 'params', + variants: [ + // Exclude params at functions without params + {begin: /\(\s*\)/, skip: true, className: null }, + { + begin: /\(/, end: /\)/, excludeBegin: true, excludeEnd: true, + contains: ['self', PROMPT, NUMBER, STRING, hljs.HASH_COMMENT_MODE], + }, + ], + }; + SUBST.contains = [STRING, NUMBER, PROMPT]; + return { + name: 'Python', + aliases: ['py', 'gyp', 'ipython'], + keywords: KEYWORDS, + illegal: /(<\/|->|\?)|=>/, + contains: [ + PROMPT, + NUMBER, + // eat "if" prior to string so that it won't accidentally be + // labeled as an f-string as in: + { beginKeywords: "if", relevance: 0 }, + STRING, + hljs.HASH_COMMENT_MODE, + { + variants: [ + {className: 'function', beginKeywords: 'def'}, + {className: 'class', beginKeywords: 'class'} + ], + end: /:/, + illegal: /[${=;\n,]/, + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + PARAMS, + { + begin: /->/, endsWithParent: true, + keywords: 'None' + } + ] + }, + { + className: 'meta', + begin: /^[\t ]*@/, end: /$/ + }, + { + begin: /\b(print|exec)\(/ // don’t highlight keywords-turned-functions in Python 3 + } + ] + }; +} + +module.exports = python; diff --git a/node_modules/highlight.js/lib/languages/q.js b/node_modules/highlight.js/lib/languages/q.js @@ -0,0 +1,32 @@ +/* +Language: Q +Description: Q is a vector-based functional paradigm programming language built into the kdb+ database. + (K/Q/Kdb+ from Kx Systems) +Author: Sergey Vidyuk <svidyuk@gmail.com> +Website: https://kx.com/connect-with-us/developers/ +*/ +function q(hljs) { + var Q_KEYWORDS = { + $pattern: /(`?)[A-Za-z0-9_]+\b/, + keyword: + 'do while select delete by update from', + literal: + '0b 1b', + built_in: + 'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum', + type: + '`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid' + }; + return { + name: 'Q', + aliases:['k', 'kdb'], + keywords: Q_KEYWORDS, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = q; diff --git a/node_modules/highlight.js/lib/languages/qml.js b/node_modules/highlight.js/lib/languages/qml.js @@ -0,0 +1,181 @@ +/* +Language: QML +Requires: javascript.js, xml.js +Author: John Foster <jfoster@esri.com> +Description: Syntax highlighting for the Qt Quick QML scripting language, based mostly off + the JavaScript parser. +Website: https://doc.qt.io/qt-5/qmlapplications.html +Category: scripting +*/ + +function qml(hljs) { + var KEYWORDS = { + keyword: + 'in of on if for while finally var new function do return void else break catch ' + + 'instanceof with throw case default try this switch continue typeof delete ' + + 'let yield const export super debugger as async await import', + literal: + 'true false null undefined NaN Infinity', + built_in: + 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' + + 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' + + 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' + + 'TypeError URIError Number Math Date String RegExp Array Float32Array ' + + 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' + + 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' + + 'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' + + 'Behavior bool color coordinate date double enumeration font geocircle georectangle ' + + 'geoshape int list matrix4x4 parent point quaternion real rect ' + + 'size string url variant vector2d vector3d vector4d ' + + 'Promise' + }; + + var QML_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9\\._]*'; + + // Isolate property statements. Ends at a :, =, ;, ,, a comment or end of line. + // Use property class. + var PROPERTY = { + className: 'keyword', + begin: '\\bproperty\\b', + starts: { + className: 'string', + end: '(:|=|;|,|//|/\\*|$)', + returnEnd: true + } + }; + + // Isolate signal statements. Ends at a ) a comment or end of line. + // Use property class. + var SIGNAL = { + className: 'keyword', + begin: '\\bsignal\\b', + starts: { + className: 'string', + end: '(\\(|:|=|;|,|//|/\\*|$)', + returnEnd: true + } + }; + + // id: is special in QML. When we see id: we want to mark the id: as attribute and + // emphasize the token following. + var ID_ID = { + className: 'attribute', + begin: '\\bid\\s*:', + starts: { + className: 'string', + end: QML_IDENT_RE, + returnEnd: false + } + }; + + // Find QML object attribute. An attribute is a QML identifier followed by :. + // Unfortunately it's hard to know where it ends, as it may contain scalars, + // objects, object definitions, or javascript. The true end is either when the parent + // ends or the next attribute is detected. + var QML_ATTRIBUTE = { + begin: QML_IDENT_RE + '\\s*:', + returnBegin: true, + contains: [ + { + className: 'attribute', + begin: QML_IDENT_RE, + end: '\\s*:', + excludeEnd: true, + relevance: 0 + } + ], + relevance: 0 + }; + + // Find QML object. A QML object is a QML identifier followed by { and ends at the matching }. + // All we really care about is finding IDENT followed by { and just mark up the IDENT and ignore the {. + var QML_OBJECT = { + begin: QML_IDENT_RE + '\\s*{', end: '{', + returnBegin: true, + relevance: 0, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: QML_IDENT_RE}) + ] + }; + + return { + name: 'QML', + aliases: ['qt'], + case_insensitive: false, + keywords: KEYWORDS, + contains: [ + { + className: 'meta', + begin: /^\s*['"]use (strict|asm)['"]/ + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { // template string + className: 'string', + begin: '`', end: '`', + contains: [ + hljs.BACKSLASH_ESCAPE, + { + className: 'subst', + begin: '\\$\\{', end: '\\}' + } + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'number', + variants: [ + { begin: '\\b(0[bB][01]+)' }, + { begin: '\\b(0[oO][0-7]+)' }, + { begin: hljs.C_NUMBER_RE } + ], + relevance: 0 + }, + { // "value" container + begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*', + keywords: 'return throw case', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.REGEXP_MODE, + { // E4X / JSX + begin: /</, end: />\s*[);\]]/, + relevance: 0, + subLanguage: 'xml' + } + ], + relevance: 0 + }, + SIGNAL, + PROPERTY, + { + className: 'function', + beginKeywords: 'function', end: /\{/, excludeEnd: true, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}), + { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + } + ], + illegal: /\[|%/ + }, + { + begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots + }, + ID_ID, + QML_ATTRIBUTE, + QML_OBJECT + ], + illegal: /#/ + }; +} + +module.exports = qml; diff --git a/node_modules/highlight.js/lib/languages/r.js b/node_modules/highlight.js/lib/languages/r.js @@ -0,0 +1,80 @@ +/* +Language: R +Description: R is a free software environment for statistical computing and graphics. +Author: Joe Cheng <joe@rstudio.org> +Website: https://www.r-project.org +Category: scientific +*/ + +function r(hljs) { + var IDENT_RE = '([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*'; + + return { + name: 'R', + contains: [ + hljs.HASH_COMMENT_MODE, + { + begin: IDENT_RE, + keywords: { + $pattern: IDENT_RE, + keyword: + 'function if in break next repeat else for return switch while try tryCatch ' + + 'stop warning require library attach detach source setMethod setGeneric ' + + 'setGroupGeneric setClass ...', + literal: + 'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' + + 'NA_complex_|10' + }, + relevance: 0 + }, + { + // hex value + className: 'number', + begin: "0[xX][0-9a-fA-F]+[Li]?\\b", + relevance: 0 + }, + { + // explicit integer + className: 'number', + begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b", + relevance: 0 + }, + { + // number with trailing decimal + className: 'number', + begin: "\\d+\\.(?!\\d)(?:i\\b)?", + relevance: 0 + }, + { + // number + className: 'number', + begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b", + relevance: 0 + }, + { + // number with leading decimal + className: 'number', + begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b", + relevance: 0 + }, + + { + // escaped identifier + begin: '`', + end: '`', + relevance: 0 + }, + + { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + {begin: '"', end: '"'}, + {begin: "'", end: "'"} + ] + } + ] + }; +} + +module.exports = r; diff --git a/node_modules/highlight.js/lib/languages/reasonml.js b/node_modules/highlight.js/lib/languages/reasonml.js @@ -0,0 +1,309 @@ +/* +Language: ReasonML +Description: Reason lets you write simple, fast and quality type safe code while leveraging both the JavaScript & OCaml ecosystems. +Website: https://reasonml.github.io +Author: Gidi Meir Morris <oss@gidi.io> +Category: functional +*/ +function reasonml(hljs) { + function orReValues(ops){ + return ops + .map(function(op) { + return op + .split('') + .map(function(char) { + return '\\' + char; + }) + .join(''); + }) + .join('|'); + } + + var RE_IDENT = '~?[a-z$_][0-9a-zA-Z$_]*'; + var RE_MODULE_IDENT = '`?[A-Z$_][0-9a-zA-Z$_]*'; + + var RE_PARAM_TYPEPARAM = '\'?[a-z$_][0-9a-z$_]*'; + var RE_PARAM_TYPE = '\s*:\s*[a-z$_][0-9a-z$_]*(\(\s*(' + RE_PARAM_TYPEPARAM + '\s*(,' + RE_PARAM_TYPEPARAM + ')*)?\s*\))?'; + var RE_PARAM = RE_IDENT + '(' + RE_PARAM_TYPE + ')?(' + RE_PARAM_TYPE + ')?'; + var RE_OPERATOR = "(" + orReValues(['||', '&&', '++', '**', '+.', '*', '/', '*.', '/.', '...', '|>']) + "|==|===)"; + var RE_OPERATOR_SPACED = "\\s+" + RE_OPERATOR + "\\s+"; + + var KEYWORDS = { + keyword: + 'and as asr assert begin class constraint do done downto else end exception external ' + + 'for fun function functor if in include inherit initializer ' + + 'land lazy let lor lsl lsr lxor match method mod module mutable new nonrec ' + + 'object of open or private rec sig struct then to try type val virtual when while with', + built_in: + 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ', + literal: + 'true false' + }; + + var RE_NUMBER = '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' + + '0[oO][0-7_]+[Lln]?|' + + '0[bB][01_]+[Lln]?|' + + '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)'; + + var NUMBER_MODE = { + className: 'number', + relevance: 0, + variants: [ + { + begin: RE_NUMBER + }, + { + begin: '\\(\\-' + RE_NUMBER + '\\)' + } + ] + }; + + var OPERATOR_MODE = { + className: 'operator', + relevance: 0, + begin: RE_OPERATOR + }; + var LIST_CONTENTS_MODES = [ + { + className: 'identifier', + relevance: 0, + begin: RE_IDENT + }, + OPERATOR_MODE, + NUMBER_MODE + ]; + + var MODULE_ACCESS_CONTENTS = [ + hljs.QUOTE_STRING_MODE, + OPERATOR_MODE, + { + className: 'module', + begin: "\\b" + RE_MODULE_IDENT, returnBegin: true, + end: "\.", + contains: [ + { + className: 'identifier', + begin: RE_MODULE_IDENT, + relevance: 0 + } + ] + } + ]; + + var PARAMS_CONTENTS = [ + { + className: 'module', + begin: "\\b" + RE_MODULE_IDENT, returnBegin: true, + end: "\.", + relevance: 0, + contains: [ + { + className: 'identifier', + begin: RE_MODULE_IDENT, + relevance: 0 + } + ] + } + ]; + + var PARAMS_MODE = { + begin: RE_IDENT, + end: '(,|\\n|\\))', + relevance: 0, + contains: [ + OPERATOR_MODE, + { + className: 'typing', + begin: ':', + end: '(,|\\n)', + returnBegin: true, + relevance: 0, + contains: PARAMS_CONTENTS + } + ] + }; + + var FUNCTION_BLOCK_MODE = { + className: 'function', + relevance: 0, + keywords: KEYWORDS, + variants: [ + { + begin: '\\s(\\(\\.?.*?\\)|' + RE_IDENT + ')\\s*=>', + end: '\\s*=>', + returnBegin: true, + relevance: 0, + contains: [ + { + className: 'params', + variants: [ + { + begin: RE_IDENT + }, + { + begin: RE_PARAM + }, + { + begin: /\(\s*\)/, + } + ] + } + ] + }, + { + begin: '\\s\\(\\.?[^;\\|]*\\)\\s*=>', + end: '\\s=>', + returnBegin: true, + relevance: 0, + contains: [ + { + className: 'params', + relevance: 0, + variants: [ + PARAMS_MODE + ] + } + ] + }, + { + begin: '\\(\\.\\s' + RE_IDENT + '\\)\\s*=>' + } + ] + }; + MODULE_ACCESS_CONTENTS.push(FUNCTION_BLOCK_MODE); + + var CONSTRUCTOR_MODE = { + className: 'constructor', + begin: RE_MODULE_IDENT + '\\(', + end: '\\)', + illegal: '\\n', + keywords: KEYWORDS, + contains: [ + hljs.QUOTE_STRING_MODE, + OPERATOR_MODE, + { + className: 'params', + begin: '\\b' + RE_IDENT + } + ] + }; + + var PATTERN_MATCH_BLOCK_MODE = { + className: 'pattern-match', + begin: '\\|', + returnBegin: true, + keywords: KEYWORDS, + end: '=>', + relevance: 0, + contains: [ + CONSTRUCTOR_MODE, + OPERATOR_MODE, + { + relevance: 0, + className: 'constructor', + begin: RE_MODULE_IDENT + } + ] + }; + + var MODULE_ACCESS_MODE = { + className: 'module-access', + keywords: KEYWORDS, + returnBegin: true, + variants: [ + { + begin: "\\b(" + RE_MODULE_IDENT + "\\.)+" + RE_IDENT + }, + { + begin: "\\b(" + RE_MODULE_IDENT + "\\.)+\\(", + end: "\\)", + returnBegin: true, + contains: [ + FUNCTION_BLOCK_MODE, + { + begin: '\\(', + end: '\\)', + skip: true + } + ].concat(MODULE_ACCESS_CONTENTS) + }, + { + begin: "\\b(" + RE_MODULE_IDENT + "\\.)+{", + end: "}" + } + ], + contains: MODULE_ACCESS_CONTENTS + }; + + PARAMS_CONTENTS.push(MODULE_ACCESS_MODE); + + return { + name: 'ReasonML', + aliases: ['re'], + keywords: KEYWORDS, + illegal: '(:\\-|:=|\\${|\\+=)', + contains: [ + hljs.COMMENT('/\\*', '\\*/', { illegal: '^(\\#,\\/\\/)' }), + { + className: 'character', + begin: '\'(\\\\[^\']+|[^\'])\'', + illegal: '\\n', + relevance: 0 + }, + hljs.QUOTE_STRING_MODE, + { + className: 'literal', + begin: '\\(\\)', + relevance: 0 + }, + { + className: 'literal', + begin: '\\[\\|', + end: '\\|\\]', + relevance: 0, + contains: LIST_CONTENTS_MODES + }, + { + className: 'literal', + begin: '\\[', + end: '\\]', + relevance: 0, + contains: LIST_CONTENTS_MODES + }, + CONSTRUCTOR_MODE, + { + className: 'operator', + begin: RE_OPERATOR_SPACED, + illegal: '\\-\\->', + relevance: 0 + }, + NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + PATTERN_MATCH_BLOCK_MODE, + FUNCTION_BLOCK_MODE, + { + className: 'module-def', + begin: "\\bmodule\\s+" + RE_IDENT + "\\s+" + RE_MODULE_IDENT + "\\s+=\\s+{", + end: "}", + returnBegin: true, + keywords: KEYWORDS, + relevance: 0, + contains: [ + { + className: 'module', + relevance: 0, + begin: RE_MODULE_IDENT + }, + { + begin: '{', + end: '}', + skip: true + } + ].concat(MODULE_ACCESS_CONTENTS) + }, + MODULE_ACCESS_MODE + ] + }; +} + +module.exports = reasonml; diff --git a/node_modules/highlight.js/lib/languages/rib.js b/node_modules/highlight.js/lib/languages/rib.js @@ -0,0 +1,37 @@ +/* +Language: RenderMan RIB +Author: Konstantin Evdokimenko <qewerty@gmail.com> +Contributors: Shuen-Huei Guan <drake.guan@gmail.com> +Website: https://renderman.pixar.com/resources/RenderMan_20/ribBinding.html +Category: graphics +*/ + +function rib(hljs) { + return { + name: 'RenderMan RIB', + keywords: + 'ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis ' + + 'Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone ' + + 'CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail ' + + 'DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format ' + + 'FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry ' + + 'Hider Hyperboloid Identity Illuminate Imager Interior LightSource ' + + 'MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte ' + + 'MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option ' + + 'Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples ' + + 'PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection ' + + 'Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ' + + 'ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere ' + + 'SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd ' + + 'TransformPoints Translate TrimCurve WorldBegin WorldEnd', + illegal: '</', + contains: [ + hljs.HASH_COMMENT_MODE, + hljs.C_NUMBER_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }; +} + +module.exports = rib; diff --git a/node_modules/highlight.js/lib/languages/roboconf.js b/node_modules/highlight.js/lib/languages/roboconf.js @@ -0,0 +1,77 @@ +/* +Language: Roboconf +Author: Vincent Zurczak <vzurczak@linagora.com> +Description: Syntax highlighting for Roboconf's DSL +Website: http://roboconf.net +Category: config +*/ + +function roboconf(hljs) { + var IDENTIFIER = '[a-zA-Z-_][^\\n{]+\\{'; + + var PROPERTY = { + className: 'attribute', + begin: /[a-zA-Z-_]+/, end: /\s*:/, excludeEnd: true, + starts: { + end: ';', + relevance: 0, + contains: [ + { + className: 'variable', + begin: /\.[a-zA-Z-_]+/ + }, + { + className: 'keyword', + begin: /\(optional\)/ + } + ] + } + }; + + return { + name: 'Roboconf', + aliases: ['graph', 'instances'], + case_insensitive: true, + keywords: 'import', + contains: [ + // Facet sections + { + begin: '^facet ' + IDENTIFIER, + end: '}', + keywords: 'facet', + contains: [ + PROPERTY, + hljs.HASH_COMMENT_MODE + ] + }, + + // Instance sections + { + begin: '^\\s*instance of ' + IDENTIFIER, + end: '}', + keywords: 'name count channels instance-data instance-state instance of', + illegal: /\S/, + contains: [ + 'self', + PROPERTY, + hljs.HASH_COMMENT_MODE + ] + }, + + // Component sections + { + begin: '^' + IDENTIFIER, + end: '}', + contains: [ + PROPERTY, + hljs.HASH_COMMENT_MODE + ] + }, + + // Comments + hljs.HASH_COMMENT_MODE + ] + }; +} + +module.exports = roboconf; diff --git a/node_modules/highlight.js/lib/languages/routeros.js b/node_modules/highlight.js/lib/languages/routeros.js @@ -0,0 +1,156 @@ +/* +Language: Microtik RouterOS script +Author: Ivan Dementev <ivan_div@mail.ru> +Description: Scripting host provides a way to automate some router maintenance tasks by means of executing user-defined scripts bounded to some event occurrence +Website: https://wiki.mikrotik.com/wiki/Manual:Scripting +*/ + +// Colors from RouterOS terminal: +// green - #0E9A00 +// teal - #0C9A9A +// purple - #99069A +// light-brown - #9A9900 + +function routeros(hljs) { + + var STATEMENTS = 'foreach do while for if from to step else on-error and or not in'; + + // Global commands: Every global command should start with ":" token, otherwise it will be treated as variable. + var GLOBAL_COMMANDS = 'global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime'; + + // Common commands: Following commands available from most sub-menus: + var COMMON_COMMANDS = 'add remove enable disable set get print export edit find run debug error info warning'; + + var LITERALS = 'true false yes no nothing nil null'; + + var OBJECTS = 'traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw'; + + var VAR = { + className: 'variable', + variants: [ + {begin: /\$[\w\d#@][\w\d_]*/}, + {begin: /\$\{(.*?)}/} + ] + }; + + var QUOTE_STRING = { + className: 'string', + begin: /"/, end: /"/, + contains: [ + hljs.BACKSLASH_ESCAPE, + VAR, + { + className: 'variable', + begin: /\$\(/, end: /\)/, + contains: [hljs.BACKSLASH_ESCAPE] + } + ] + }; + + var APOS_STRING = { + className: 'string', + begin: /'/, end: /'/ + }; + ////////////////////////////////////////////////////////////////////// + return { + name: 'Microtik RouterOS script', + aliases: ['routeros', 'mikrotik'], + case_insensitive: true, + keywords: { + $pattern: /:?[\w-]+/, + literal: LITERALS, + keyword: STATEMENTS + ' :' + STATEMENTS.split(' ').join(' :') + ' :' + GLOBAL_COMMANDS.split(' ').join(' :'), + }, + contains: [ + { // недопустимые конструкции + variants: [ + { begin: /^@/, end: /$/, }, // dns + { begin: /\/\*/, end: /\*\//, }, // -- comment + { begin: /%%/, end: /$/, }, // -- comment + { begin: /^'/, end: /$/, }, // Monkey one line comment + { begin: /^\s*\/[\w-]+=/, end: /$/, }, // jboss-cli + { begin: /\/\//, end: /$/, }, // Stan comment + { begin: /^\[\</, end: /\>\]$/, }, // F# class declaration? + { begin: /<\//, end: />/, }, // HTML tags + { begin: /^facet /, end: /\}/, }, // roboconf - лютый костыль ))) + { begin: '^1\\.\\.(\\d+)$', end: /$/, }, // tap + ], + illegal: /./, + }, + hljs.COMMENT('^#', '$'), + QUOTE_STRING, + APOS_STRING, + VAR, + { // attribute=value + begin: /[\w-]+\=([^\s\{\}\[\]\(\)]+)/, + relevance: 0, + returnBegin: true, + contains: [ + { + className: 'attribute', + begin: /[^=]+/ + }, + { + begin: /=/, + endsWithParent: true, + relevance: 0, + contains: [ + QUOTE_STRING, + APOS_STRING, + VAR, + { + className: 'literal', + begin: '\\b(' + LITERALS.split(' ').join('|') + ')\\b', + }, + /*{ + // IPv4 addresses and subnets + className: 'number', + variants: [ + {begin: IPADDR_wBITMASK+'(,'+IPADDR_wBITMASK+')*'}, //192.168.0.0/24,1.2.3.0/24 + {begin: IPADDR+'-'+IPADDR}, // 192.168.0.1-192.168.0.3 + {begin: IPADDR+'(,'+IPADDR+')*'}, // 192.168.0.1,192.168.0.34,192.168.24.1,192.168.0.1 + ] + }, // */ + /*{ + // MAC addresses and DHCP Client IDs + className: 'number', + begin: /\b(1:)?([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]){1,2}\b/, + }, //*/ + { + // Не форматировать не классифицированные значения. Необходимо для исключения подсветки значений как built_in. + // className: 'number', + begin: /("[^"]*"|[^\s\{\}\[\]]+)/, + }, //*/ + ] + } //*/ + ] + },//*/ + { + // HEX values + className: 'number', + begin: /\*[0-9a-fA-F]+/, + }, //*/ + + { + begin: '\\b(' + COMMON_COMMANDS.split(' ').join('|') + ')([\\s\[\(]|\])', + returnBegin: true, + contains: [ + { + className: 'builtin-name', //'function', + begin: /\w+/, + }, + ], + }, + + { + className: 'built_in', + variants: [ + {begin: '(\\.\\./|/|\\s)((' + OBJECTS.split(' ').join('|') + ');?\\s)+',relevance: 10,}, + {begin: /\.\./,}, + ], + },//*/ + ] + }; +} + +module.exports = routeros; diff --git a/node_modules/highlight.js/lib/languages/rsl.js b/node_modules/highlight.js/lib/languages/rsl.js @@ -0,0 +1,46 @@ +/* +Language: RenderMan RSL +Author: Konstantin Evdokimenko <qewerty@gmail.com> +Contributors: Shuen-Huei Guan <drake.guan@gmail.com> +Website: https://renderman.pixar.com/resources/RenderMan_20/shadingLanguage.html +Category: graphics +*/ + +function rsl(hljs) { + return { + name: 'RenderMan RSL', + keywords: { + keyword: + 'float color point normal vector matrix while for if do return else break extern continue', + built_in: + 'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' + + 'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' + + 'faceforward filterstep floor format fresnel incident length lightsource log match ' + + 'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' + + 'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' + + 'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' + + 'texture textureinfo trace transform vtransform xcomp ycomp zcomp' + }, + illegal: '</', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'meta', + begin: '#', end: '$' + }, + { + className: 'class', + beginKeywords: 'surface displacement light volume imager', end: '\\(' + }, + { + beginKeywords: 'illuminate illuminance gather', end: '\\(' + } + ] + }; +} + +module.exports = rsl; diff --git a/node_modules/highlight.js/lib/languages/ruby.js b/node_modules/highlight.js/lib/languages/ruby.js @@ -0,0 +1,196 @@ +/* +Language: Ruby +Description: Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. +Website: https://www.ruby-lang.org/ +Author: Anton Kovalyov <anton@kovalyov.net> +Contributors: Peter Leonov <gojpeg@yandex.ru>, Vasily Polovnyov <vast@whiteants.net>, Loren Segal <lsegal@soen.ca>, Pascal Hurni <phi@ruby-reactive.org>, Cedric Sohrauer <sohrauer@googlemail.com> +Category: common +*/ + +function ruby(hljs) { + var RUBY_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?'; + var RUBY_KEYWORDS = { + keyword: + 'and then defined module in return redo if BEGIN retry end for self when ' + + 'next until do begin unless END rescue else break undef not super class case ' + + 'require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor', + literal: + 'true false nil' + }; + var YARDOCTAG = { + className: 'doctag', + begin: '@[A-Za-z]+' + }; + var IRB_OBJECT = { + begin: '#<', end: '>' + }; + var COMMENT_MODES = [ + hljs.COMMENT( + '#', + '$', + { + contains: [YARDOCTAG] + } + ), + hljs.COMMENT( + '^\\=begin', + '^\\=end', + { + contains: [YARDOCTAG], + relevance: 10 + } + ), + hljs.COMMENT('^__END__', '\\n$') + ]; + var SUBST = { + className: 'subst', + begin: '#\\{', end: '}', + keywords: RUBY_KEYWORDS + }; + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + {begin: /'/, end: /'/}, + {begin: /"/, end: /"/}, + {begin: /`/, end: /`/}, + {begin: '%[qQwWx]?\\(', end: '\\)'}, + {begin: '%[qQwWx]?\\[', end: '\\]'}, + {begin: '%[qQwWx]?{', end: '}'}, + {begin: '%[qQwWx]?<', end: '>'}, + {begin: '%[qQwWx]?/', end: '/'}, + {begin: '%[qQwWx]?%', end: '%'}, + {begin: '%[qQwWx]?-', end: '-'}, + {begin: '%[qQwWx]?\\|', end: '\\|'}, + { + // \B in the beginning suppresses recognition of ?-sequences where ? + // is the last character of a preceding identifier, as in: `func?4` + begin: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/ + }, + { // heredocs + begin: /<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/, + returnBegin: true, + contains: [ + { begin: /<<[-~]?'?/ }, + hljs.END_SAME_AS_BEGIN({ + begin: /(\w+)/, end: /(\w+)/, + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + }) + ] + } + ] + }; + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)', endsParent: true, + keywords: RUBY_KEYWORDS + }; + + var RUBY_DEFAULT_CONTAINS = [ + STRING, + IRB_OBJECT, + { + className: 'class', + beginKeywords: 'class module', end: '$|;', + illegal: /=/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?'}), + { + begin: '<\\s*', + contains: [{ + begin: '(' + hljs.IDENT_RE + '::)?' + hljs.IDENT_RE + }] + } + ].concat(COMMENT_MODES) + }, + { + className: 'function', + beginKeywords: 'def', end: '$|;', + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: RUBY_METHOD_RE}), + PARAMS + ].concat(COMMENT_MODES) + }, + { + // swallow namespace qualifiers before symbols + begin: hljs.IDENT_RE + '::' + }, + { + className: 'symbol', + begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:', + relevance: 0 + }, + { + className: 'symbol', + begin: ':(?!\\s)', + contains: [STRING, {begin: RUBY_METHOD_RE}], + relevance: 0 + }, + { + className: 'number', + begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + relevance: 0 + }, + { + begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))' // variables + }, + { + className: 'params', + begin: /\|/, end: /\|/, + keywords: RUBY_KEYWORDS + }, + { // regexp container + begin: '(' + hljs.RE_STARTERS_RE + '|unless)\\s*', + keywords: 'unless', + contains: [ + IRB_OBJECT, + { + className: 'regexp', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + illegal: /\n/, + variants: [ + {begin: '/', end: '/[a-z]*'}, + {begin: '%r{', end: '}[a-z]*'}, + {begin: '%r\\(', end: '\\)[a-z]*'}, + {begin: '%r!', end: '![a-z]*'}, + {begin: '%r\\[', end: '\\][a-z]*'} + ] + } + ].concat(COMMENT_MODES), + relevance: 0 + } + ].concat(COMMENT_MODES); + + SUBST.contains = RUBY_DEFAULT_CONTAINS; + PARAMS.contains = RUBY_DEFAULT_CONTAINS; + + var SIMPLE_PROMPT = "[>?]>"; + var DEFAULT_PROMPT = "[\\w#]+\\(\\w+\\):\\d+:\\d+>"; + var RVM_PROMPT = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>"; + + var IRB_DEFAULT = [ + { + begin: /^\s*=>/, + starts: { + end: '$', contains: RUBY_DEFAULT_CONTAINS + } + }, + { + className: 'meta', + begin: '^('+SIMPLE_PROMPT+"|"+DEFAULT_PROMPT+'|'+RVM_PROMPT+')', + starts: { + end: '$', contains: RUBY_DEFAULT_CONTAINS + } + } + ]; + + return { + name: 'Ruby', + aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'], + keywords: RUBY_KEYWORDS, + illegal: /\/\*/, + contains: COMMENT_MODES.concat(IRB_DEFAULT).concat(RUBY_DEFAULT_CONTAINS) + }; +} + +module.exports = ruby; diff --git a/node_modules/highlight.js/lib/languages/ruleslanguage.js b/node_modules/highlight.js/lib/languages/ruleslanguage.js @@ -0,0 +1,71 @@ +/* +Language: Oracle Rules Language +Author: Jason Jacobson <jason.a.jacobson@gmail.com> +Description: The Oracle Utilities Rules Language is used to program the Oracle Utilities Applications acquired from LODESTAR Corporation. The products include Billing Component, LPSS, Pricing Component etc. through version 1.6.1. +Website: https://docs.oracle.com/cd/E17904_01/dev.1111/e10227/rlref.htm +Category: enterprise +*/ + +function ruleslanguage(hljs) { + return { + name: 'Oracle Rules Language', + keywords: { + keyword: 'BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE ' + + 'INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 ' + + 'INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 ' + + 'INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 ' + + 'INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 ' + + 'INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 ' + + 'INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 ' + + 'INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 ' + + 'INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 ' + + 'INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 ' + + 'INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 ' + + 'INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 ' + + 'INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 ' + + 'INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 ' + + 'INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 ' + + 'MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER ' + + 'OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE ' + + 'NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH ' + + 'IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND ' + + 'UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ' + + 'ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE ' + + 'GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE ' + + 'SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING ' + + 'DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF ' + + 'MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY ' + + 'YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE ' + + 'COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR ' + + 'READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ' + + 'ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE ' + + 'EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE ' + + 'SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL ' + + 'COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN ' + + 'MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING ' + + 'FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM ' + + 'NUMDAYS READ_DATE STAGING', + built_in: 'IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML ' + + 'DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT ' + + 'DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE ' + + 'DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT ' + + 'DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'literal', + variants: [ + {begin: '#\\s+[a-zA-Z\\ \\.]*', relevance: 0}, // looks like #-comment + {begin: '#[a-zA-Z\\ \\.]+'} + ] + } + ] + }; +} + +module.exports = ruleslanguage; diff --git a/node_modules/highlight.js/lib/languages/rust.js b/node_modules/highlight.js/lib/languages/rust.js @@ -0,0 +1,118 @@ +/* +Language: Rust +Author: Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com> +Contributors: Roman Shmatov <romanshmatov@gmail.com>, Kasper Andersen <kma_untrusted@protonmail.com> +Website: https://www.rust-lang.org +Category: common, system +*/ + +function rust(hljs) { + var NUM_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\?'; + var KEYWORDS = + 'abstract as async await become box break const continue crate do dyn ' + + 'else enum extern false final fn for if impl in let loop macro match mod ' + + 'move mut override priv pub ref return self Self static struct super ' + + 'trait true try type typeof unsafe unsized use virtual where while yield'; + var BUILTINS = + // functions + 'drop ' + + // types + 'i8 i16 i32 i64 i128 isize ' + + 'u8 u16 u32 u64 u128 usize ' + + 'f32 f64 ' + + 'str char bool ' + + 'Box Option Result String Vec ' + + // traits + 'Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug ' + + 'PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator ' + + 'Extend IntoIterator DoubleEndedIterator ExactSizeIterator ' + + 'SliceConcatExt ToString ' + + // macros + 'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' + + 'debug_assert! debug_assert_eq! env! panic! file! format! format_args! ' + + 'include_bin! include_str! line! local_data_key! module_path! ' + + 'option_env! print! println! select! stringify! try! unimplemented! ' + + 'unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!'; + return { + name: 'Rust', + aliases: ['rs'], + keywords: { + $pattern: hljs.IDENT_RE + '!?', + keyword: + KEYWORDS, + literal: + 'true false Some None Ok Err', + built_in: + BUILTINS + }, + illegal: '</', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT('/\\*', '\\*/', {contains: ['self']}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {begin: /b?"/, illegal: null}), + { + className: 'string', + variants: [ + { begin: /r(#*)"(.|\n)*?"\1(?!#)/ }, + { begin: /b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/ } + ] + }, + { + className: 'symbol', + begin: /'[a-zA-Z_][a-zA-Z0-9_]*/ + }, + { + className: 'number', + variants: [ + { begin: '\\b0b([01_]+)' + NUM_SUFFIX }, + { begin: '\\b0o([0-7_]+)' + NUM_SUFFIX }, + { begin: '\\b0x([A-Fa-f0-9_]+)' + NUM_SUFFIX }, + { begin: '\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)' + + NUM_SUFFIX + } + ], + relevance: 0 + }, + { + className: 'function', + beginKeywords: 'fn', end: '(\\(|<)', excludeEnd: true, + contains: [hljs.UNDERSCORE_TITLE_MODE] + }, + { + className: 'meta', + begin: '#\\!?\\[', end: '\\]', + contains: [ + { + className: 'meta-string', + begin: /"/, end: /"/ + } + ] + }, + { + className: 'class', + beginKeywords: 'type', end: ';', + contains: [ + hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true}) + ], + illegal: '\\S' + }, + { + className: 'class', + beginKeywords: 'trait enum struct union', end: '{', + contains: [ + hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true}) + ], + illegal: '[\\w\\d]' + }, + { + begin: hljs.IDENT_RE + '::', + keywords: {built_in: BUILTINS} + }, + { + begin: '->' + } + ] + }; +} + +module.exports = rust; diff --git a/node_modules/highlight.js/lib/languages/sas.js b/node_modules/highlight.js/lib/languages/sas.js @@ -0,0 +1,134 @@ +/* +Language: SAS +Author: Mauricio Caceres <mauricio.caceres.bravo@gmail.com> +Description: Syntax Highlighting for SAS +*/ + +function sas(hljs) { + + // Data step and PROC SQL statements + var SAS_KEYWORDS = ''+ + 'do if then else end until while '+ + ''+ + 'abort array attrib by call cards cards4 catname continue '+ + 'datalines datalines4 delete delim delimiter display dm drop '+ + 'endsas error file filename footnote format goto in infile '+ + 'informat input keep label leave length libname link list '+ + 'lostcard merge missing modify options output out page put '+ + 'redirect remove rename replace retain return select set skip '+ + 'startsas stop title update waitsas where window x systask '+ + ''+ + 'add and alter as cascade check create delete describe '+ + 'distinct drop foreign from group having index insert into in '+ + 'key like message modify msgtype not null on or order primary '+ + 'references reset restrict select set table unique update '+ + 'validate view where'; + + // Built-in SAS functions + var SAS_FUN = ''+ + 'abs|addr|airy|arcos|arsin|atan|attrc|attrn|band|'+ + 'betainv|blshift|bnot|bor|brshift|bxor|byte|cdf|ceil|'+ + 'cexist|cinv|close|cnonct|collate|compbl|compound|'+ + 'compress|cos|cosh|css|curobs|cv|daccdb|daccdbsl|'+ + 'daccsl|daccsyd|dacctab|dairy|date|datejul|datepart|'+ + 'datetime|day|dclose|depdb|depdbsl|depdbsl|depsl|'+ + 'depsl|depsyd|depsyd|deptab|deptab|dequote|dhms|dif|'+ + 'digamma|dim|dinfo|dnum|dopen|doptname|doptnum|dread|'+ + 'dropnote|dsname|erf|erfc|exist|exp|fappend|fclose|'+ + 'fcol|fdelete|fetch|fetchobs|fexist|fget|fileexist|'+ + 'filename|fileref|finfo|finv|fipname|fipnamel|'+ + 'fipstate|floor|fnonct|fnote|fopen|foptname|foptnum|'+ + 'fpoint|fpos|fput|fread|frewind|frlen|fsep|fuzz|'+ + 'fwrite|gaminv|gamma|getoption|getvarc|getvarn|hbound|'+ + 'hms|hosthelp|hour|ibessel|index|indexc|indexw|input|'+ + 'inputc|inputn|int|intck|intnx|intrr|irr|jbessel|'+ + 'juldate|kurtosis|lag|lbound|left|length|lgamma|'+ + 'libname|libref|log|log10|log2|logpdf|logpmf|logsdf|'+ + 'lowcase|max|mdy|mean|min|minute|mod|month|mopen|'+ + 'mort|n|netpv|nmiss|normal|note|npv|open|ordinal|'+ + 'pathname|pdf|peek|peekc|pmf|point|poisson|poke|'+ + 'probbeta|probbnml|probchi|probf|probgam|probhypr|'+ + 'probit|probnegb|probnorm|probt|put|putc|putn|qtr|'+ + 'quote|ranbin|rancau|ranexp|rangam|range|rank|rannor|'+ + 'ranpoi|rantbl|rantri|ranuni|repeat|resolve|reverse|'+ + 'rewind|right|round|saving|scan|sdf|second|sign|'+ + 'sin|sinh|skewness|soundex|spedis|sqrt|std|stderr|'+ + 'stfips|stname|stnamel|substr|sum|symget|sysget|'+ + 'sysmsg|sysprod|sysrc|system|tan|tanh|time|timepart|'+ + 'tinv|tnonct|today|translate|tranwrd|trigamma|'+ + 'trim|trimn|trunc|uniform|upcase|uss|var|varfmt|'+ + 'varinfmt|varlabel|varlen|varname|varnum|varray|'+ + 'varrayx|vartype|verify|vformat|vformatd|vformatdx|'+ + 'vformatn|vformatnx|vformatw|vformatwx|vformatx|'+ + 'vinarray|vinarrayx|vinformat|vinformatd|vinformatdx|'+ + 'vinformatn|vinformatnx|vinformatw|vinformatwx|'+ + 'vinformatx|vlabel|vlabelx|vlength|vlengthx|vname|'+ + 'vnamex|vtype|vtypex|weekday|year|yyq|zipfips|zipname|'+ + 'zipnamel|zipstate'; + + // Built-in macro functions + var SAS_MACRO_FUN = 'bquote|nrbquote|cmpres|qcmpres|compstor|'+ + 'datatyp|display|do|else|end|eval|global|goto|'+ + 'if|index|input|keydef|label|left|length|let|'+ + 'local|lowcase|macro|mend|nrbquote|nrquote|'+ + 'nrstr|put|qcmpres|qleft|qlowcase|qscan|'+ + 'qsubstr|qsysfunc|qtrim|quote|qupcase|scan|str|'+ + 'substr|superq|syscall|sysevalf|sysexec|sysfunc|'+ + 'sysget|syslput|sysprod|sysrc|sysrput|then|to|'+ + 'trim|unquote|until|upcase|verify|while|window'; + + return { + name: 'SAS', + aliases: ['sas', 'SAS'], + case_insensitive: true, // SAS is case-insensitive + keywords: { + literal: + 'null missing _all_ _automatic_ _character_ _infile_ '+ + '_n_ _name_ _null_ _numeric_ _user_ _webout_', + meta: + SAS_KEYWORDS + }, + contains: [ + { + // Distinct highlight for proc <proc>, data, run, quit + className: 'keyword', + begin: /^\s*(proc [\w\d_]+|data|run|quit)[\s\;]/ + }, + { + // Macro variables + className: 'variable', + begin: /\&[a-zA-Z_\&][a-zA-Z0-9_]*\.?/ + }, + { + // Special emphasis for datalines|cards + className: 'emphasis', + begin: /^\s*datalines|cards.*;/, + end: /^\s*;\s*$/ + }, + { // Built-in macro variables take precedence + className: 'built_in', + begin: '%(' + SAS_MACRO_FUN + ')' + }, + { + // User-defined macro functions highlighted after + className: 'name', + begin: /%[a-zA-Z_][a-zA-Z_0-9]*/ + }, + { + className: 'meta', + begin: '[^%](' + SAS_FUN + ')[\(]' + }, + { + className: 'string', + variants: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }, + hljs.COMMENT('\\*', ';'), + hljs.C_BLOCK_COMMENT_MODE + ] + }; +} + +module.exports = sas; diff --git a/node_modules/highlight.js/lib/languages/scala.js b/node_modules/highlight.js/lib/languages/scala.js @@ -0,0 +1,125 @@ +/* +Language: Scala +Category: functional +Author: Jan Berkel <jan.berkel@gmail.com> +Contributors: Erik Osheim <d_m@plastic-idolatry.com> +Website: https://www.scala-lang.org +*/ + +function scala(hljs) { + + var ANNOTATION = { className: 'meta', begin: '@[A-Za-z]+' }; + + // used in strings for escaping/interpolation/substitution + var SUBST = { + className: 'subst', + variants: [ + {begin: '\\$[A-Za-z0-9_]+'}, + {begin: '\\${', end: '}'} + ] + }; + + var STRING = { + className: 'string', + variants: [ + { + begin: '"', end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + begin: '"""', end: '"""', + relevance: 10 + }, + { + begin: '[a-z]+"', end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE, SUBST] + }, + { + className: 'string', + begin: '[a-z]+"""', end: '"""', + contains: [SUBST], + relevance: 10 + } + ] + + }; + + var SYMBOL = { + className: 'symbol', + begin: '\'\\w[\\w\\d_]*(?!\')' + }; + + var TYPE = { + className: 'type', + begin: '\\b[A-Z][A-Za-z0-9_]*', + relevance: 0 + }; + + var NAME = { + className: 'title', + begin: /[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/, + relevance: 0 + }; + + var CLASS = { + className: 'class', + beginKeywords: 'class object trait type', + end: /[:={\[\n;]/, + excludeEnd: true, + contains: [ + { + beginKeywords: 'extends with', + relevance: 10 + }, + { + begin: /\[/, + end: /\]/, + excludeBegin: true, + excludeEnd: true, + relevance: 0, + contains: [TYPE] + }, + { + className: 'params', + begin: /\(/, + end: /\)/, + excludeBegin: true, + excludeEnd: true, + relevance: 0, + contains: [TYPE] + }, + NAME + ] + }; + + var METHOD = { + className: 'function', + beginKeywords: 'def', + end: /[:={\[(\n;]/, + excludeEnd: true, + contains: [NAME] + }; + + return { + name: 'Scala', + keywords: { + literal: 'true false null', + keyword: 'type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit' + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + STRING, + SYMBOL, + TYPE, + METHOD, + CLASS, + hljs.C_NUMBER_MODE, + ANNOTATION + ] + }; +} + +module.exports = scala; diff --git a/node_modules/highlight.js/lib/languages/scheme.js b/node_modules/highlight.js/lib/languages/scheme.js @@ -0,0 +1,145 @@ +/* +Language: Scheme +Description: Scheme is a programming language in the Lisp family. + (keywords based on http://community.schemewiki.org/?scheme-keywords) +Author: JP Verkamp <me@jverkamp.com> +Contributors: Ivan Sagalaev <maniac@softwaremaniacs.org> +Origin: clojure.js +Website: http://community.schemewiki.org/?what-is-scheme +Category: lisp +*/ + +function scheme(hljs) { + var SCHEME_IDENT_RE = '[^\\(\\)\\[\\]\\{\\}",\'`;#|\\\\\\s]+'; + var SCHEME_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+([./]\\d+)?'; + var SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i'; + var KEYWORDS = { + $pattern: SCHEME_IDENT_RE, + 'builtin-name': + 'case-lambda call/cc class define-class exit-handler field import ' + + 'inherit init-field interface let*-values let-values let/ec mixin ' + + 'opt-lambda override protect provide public rename require ' + + 'require-for-syntax syntax syntax-case syntax-error unit/sig unless ' + + 'when with-syntax and begin call-with-current-continuation ' + + 'call-with-input-file call-with-output-file case cond define ' + + 'define-syntax delay do dynamic-wind else for-each if lambda let let* ' + + 'let-syntax letrec letrec-syntax map or syntax-rules \' * + , ,@ - ... / ' + + '; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan ' + + 'boolean? caar cadr call-with-input-file call-with-output-file ' + + 'call-with-values car cdddar cddddr cdr ceiling char->integer ' + + 'char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? ' + + 'char-downcase char-lower-case? char-numeric? char-ready? char-upcase ' + + 'char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? ' + + 'char? close-input-port close-output-port complex? cons cos ' + + 'current-input-port current-output-port denominator display eof-object? ' + + 'eq? equal? eqv? eval even? exact->inexact exact? exp expt floor ' + + 'force gcd imag-part inexact->exact inexact? input-port? integer->char ' + + 'integer? interaction-environment lcm length list list->string ' + + 'list->vector list-ref list-tail list? load log magnitude make-polar ' + + 'make-rectangular make-string make-vector max member memq memv min ' + + 'modulo negative? newline not null-environment null? number->string ' + + 'number? numerator odd? open-input-file open-output-file output-port? ' + + 'pair? peek-char port? positive? procedure? quasiquote quote quotient ' + + 'rational? rationalize read read-char real-part real? remainder reverse ' + + 'round scheme-report-environment set! set-car! set-cdr! sin sqrt string ' + + 'string->list string->number string->symbol string-append string-ci<=? ' + + 'string-ci<? string-ci=? string-ci>=? string-ci>? string-copy ' + + 'string-fill! string-length string-ref string-set! string<=? string<? ' + + 'string=? string>=? string>? string? substring symbol->string symbol? ' + + 'tan transcript-off transcript-on truncate values vector ' + + 'vector->list vector-fill! vector-length vector-ref vector-set! ' + + 'with-input-from-file with-output-to-file write write-char zero?' + }; + + var LITERAL = { + className: 'literal', + begin: '(#t|#f|#\\\\' + SCHEME_IDENT_RE + '|#\\\\.)' + }; + + var NUMBER = { + className: 'number', + variants: [ + { begin: SCHEME_SIMPLE_NUMBER_RE, relevance: 0 }, + { begin: SCHEME_COMPLEX_NUMBER_RE, relevance: 0 }, + { begin: '#b[0-1]+(/[0-1]+)?' }, + { begin: '#o[0-7]+(/[0-7]+)?' }, + { begin: '#x[0-9a-f]+(/[0-9a-f]+)?' } + ] + }; + + var STRING = hljs.QUOTE_STRING_MODE; + + var COMMENT_MODES = [ + hljs.COMMENT( + ';', + '$', + { + relevance: 0 + } + ), + hljs.COMMENT('#\\|', '\\|#') + ]; + + var IDENT = { + begin: SCHEME_IDENT_RE, + relevance: 0 + }; + + var QUOTED_IDENT = { + className: 'symbol', + begin: '\'' + SCHEME_IDENT_RE + }; + + var BODY = { + endsWithParent: true, + relevance: 0 + }; + + var QUOTED_LIST = { + variants: [ + { begin: /'/ }, + { begin: '`' } + ], + contains: [ + { + begin: '\\(', end: '\\)', + contains: ['self', LITERAL, STRING, NUMBER, IDENT, QUOTED_IDENT] + } + ] + }; + + var NAME = { + className: 'name', + begin: SCHEME_IDENT_RE, + keywords: KEYWORDS + }; + + var LAMBDA = { + begin: /lambda/, endsWithParent: true, returnBegin: true, + contains: [ + NAME, + { + begin: /\(/, end: /\)/, endsParent: true, + contains: [IDENT], + } + ] + }; + + var LIST = { + variants: [ + { begin: '\\(', end: '\\)' }, + { begin: '\\[', end: '\\]' } + ], + contains: [LAMBDA, NAME, BODY] + }; + + BODY.contains = [LITERAL, NUMBER, STRING, IDENT, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES); + + return { + name: 'Scheme', + illegal: /\S/, + contains: [hljs.SHEBANG(), NUMBER, STRING, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES) + }; +} + +module.exports = scheme; diff --git a/node_modules/highlight.js/lib/languages/scilab.js b/node_modules/highlight.js/lib/languages/scilab.js @@ -0,0 +1,65 @@ +/* +Language: Scilab +Author: Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> +Origin: matlab.js +Description: Scilab is a port from Matlab +Website: https://www.scilab.org +Category: scientific +*/ + +function scilab(hljs) { + + var COMMON_CONTAINS = [ + hljs.C_NUMBER_MODE, + { + className: 'string', + begin: '\'|\"', end: '\'|\"', + contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}] + } + ]; + + return { + name: 'Scilab', + aliases: ['sci'], + keywords: { + $pattern: /%?\w+/, + keyword: 'abort break case clear catch continue do elseif else endfunction end for function '+ + 'global if pause return resume select try then while', + literal: + '%f %F %t %T %pi %eps %inf %nan %e %i %z %s', + built_in: // Scilab has more than 2000 functions. Just list the most commons + 'abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error '+ + 'exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty '+ + 'isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log '+ + 'max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real '+ + 'round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan '+ + 'type typename warning zeros matrix' + }, + illegal: '("|#|/\\*|\\s+/\\w+)', + contains: [ + { + className: 'function', + beginKeywords: 'function', end: '$', + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: 'params', + begin: '\\(', end: '\\)' + } + ] + }, + { + begin: '[a-zA-Z_][a-zA-Z_0-9]*(\'+[\\.\']*|[\\.\']+)', end: '', + relevance: 0 + }, + { + begin: '\\[', end: '\\]\'*[\\.\']*', + relevance: 0, + contains: COMMON_CONTAINS + }, + hljs.COMMENT('//', '$') + ].concat(COMMON_CONTAINS) + }; +} + +module.exports = scilab; diff --git a/node_modules/highlight.js/lib/languages/scss.js b/node_modules/highlight.js/lib/languages/scss.js @@ -0,0 +1,124 @@ +/* +Language: SCSS +Description: Scss is an extension of the syntax of CSS. +Author: Kurt Emch <kurt@kurtemch.com> +Website: https://sass-lang.com +Category: common, css +*/ +function scss(hljs) { + var AT_IDENTIFIER = '@[a-z-]+'; // @font-face + var AT_MODIFIERS = "and or not only"; + var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*'; + var VARIABLE = { + className: 'variable', + begin: '(\\$' + IDENT_RE + ')\\b' + }; + var HEXCOLOR = { + className: 'number', begin: '#[0-9A-Fa-f]+' + }; + var DEF_INTERNALS = { + className: 'attribute', + begin: '[A-Z\\_\\.\\-]+', end: ':', + excludeEnd: true, + illegal: '[^\\s]', + starts: { + endsWithParent: true, excludeEnd: true, + contains: [ + HEXCOLOR, + hljs.CSS_NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'meta', begin: '!important' + } + ] + } + }; + return { + name: 'SCSS', + case_insensitive: true, + illegal: '[=/|\']', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'selector-id', begin: '\\#[A-Za-z0-9_-]+', + relevance: 0 + }, + { + className: 'selector-class', begin: '\\.[A-Za-z0-9_-]+', + relevance: 0 + }, + { + className: 'selector-attr', begin: '\\[', end: '\\]', + illegal: '$' + }, + { + className: 'selector-tag', // begin: IDENT_RE, end: '[,|\\s]' + begin: '\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b', + relevance: 0 + }, + { + className: 'selector-pseudo', + begin: ':(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)' + }, + { + className: 'selector-pseudo', + begin: '::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)' + }, + VARIABLE, + { + className: 'attribute', + begin: '\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b', + illegal: '[^\\s]' + }, + { + begin: '\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b' + }, + { + begin: ':', end: ';', + contains: [ + VARIABLE, + HEXCOLOR, + hljs.CSS_NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + { + className: 'meta', begin: '!important' + } + ] + }, + // matching these here allows us to treat them more like regular CSS + // rules so everything between the {} gets regular rule highlighting, + // which is what we want for page and font-face + { + begin: '@(page|font-face)', + lexemes: AT_IDENTIFIER, + keywords: '@page @font-face' + }, + { + begin: '@', end: '[{;]', + returnBegin: true, + keywords: AT_MODIFIERS, + contains: [ + { + begin: AT_IDENTIFIER, + className: "keyword" + }, + VARIABLE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + HEXCOLOR, + hljs.CSS_NUMBER_MODE, + // { + // begin: '\\s[A-Za-z0-9_.-]+', + // relevance: 0 + // } + ] + } + ] + }; +} + +module.exports = scss; diff --git a/node_modules/highlight.js/lib/languages/shell.js b/node_modules/highlight.js/lib/languages/shell.js @@ -0,0 +1,24 @@ +/* +Language: Shell Session +Requires: bash.js +Author: TSUYUSATO Kitsune <make.just.on@gmail.com> +Category: common +*/ + +function shell(hljs) { + return { + name: 'Shell Session', + aliases: ['console'], + contains: [ + { + className: 'meta', + begin: '^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]', + starts: { + end: '$', subLanguage: 'bash' + } + } + ] + } +} + +module.exports = shell; diff --git a/node_modules/highlight.js/lib/languages/smali.js b/node_modules/highlight.js/lib/languages/smali.js @@ -0,0 +1,65 @@ +/* +Language: Smali +Author: Dennis Titze <dennis.titze@gmail.com> +Description: Basic Smali highlighting +Website: https://github.com/JesusFreke/smali +*/ + +function smali(hljs) { + var smali_instr_low_prio = ['add', 'and', 'cmp', 'cmpg', 'cmpl', 'const', 'div', 'double', 'float', 'goto', 'if', 'int', 'long', 'move', 'mul', 'neg', 'new', 'nop', 'not', 'or', 'rem', 'return', 'shl', 'shr', 'sput', 'sub', 'throw', 'ushr', 'xor']; + var smali_instr_high_prio = ['aget', 'aput', 'array', 'check', 'execute', 'fill', 'filled', 'goto/16', 'goto/32', 'iget', 'instance', 'invoke', 'iput', 'monitor', 'packed', 'sget', 'sparse']; + var smali_keywords = ['transient', 'constructor', 'abstract', 'final', 'synthetic', 'public', 'private', 'protected', 'static', 'bridge', 'system']; + return { + name: 'Smali', + aliases: ['smali'], + contains: [ + { + className: 'string', + begin: '"', end: '"', + relevance: 0 + }, + hljs.COMMENT( + '#', + '$', + { + relevance: 0 + } + ), + { + className: 'keyword', + variants: [ + {begin: '\\s*\\.end\\s[a-zA-Z0-9]*'}, + {begin: '^[ ]*\\.[a-zA-Z]*', relevance: 0}, + {begin: '\\s:[a-zA-Z_0-9]*', relevance: 0}, + {begin: '\\s(' + smali_keywords.join('|') + ')'} + ] + }, + { + className: 'built_in', + variants : [ + { + begin: '\\s('+smali_instr_low_prio.join('|')+')\\s' + }, + { + begin: '\\s('+smali_instr_low_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)+\\s', + relevance: 10 + }, + { + begin: '\\s('+smali_instr_high_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)*\\s', + relevance: 10 + }, + ] + }, + { + className: 'class', + begin: 'L[^\(;:\n]*;', + relevance: 0 + }, + { + begin: '[vp][0-9]+', + } + ] + }; +} + +module.exports = smali; diff --git a/node_modules/highlight.js/lib/languages/smalltalk.js b/node_modules/highlight.js/lib/languages/smalltalk.js @@ -0,0 +1,59 @@ +/* +Language: Smalltalk +Description: Smalltalk is an object-oriented, dynamically typed reflective programming language. +Author: Vladimir Gubarkov <xonixx@gmail.com> +Website: https://en.wikipedia.org/wiki/Smalltalk +*/ + +function smalltalk(hljs) { + var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*'; + var CHAR = { + className: 'string', + begin: '\\$.{1}' + }; + var SYMBOL = { + className: 'symbol', + begin: '#' + hljs.UNDERSCORE_IDENT_RE + }; + return { + name: 'Smalltalk', + aliases: ['st'], + keywords: 'self super nil true false thisContext', // only 6 + contains: [ + hljs.COMMENT('"', '"'), + hljs.APOS_STRING_MODE, + { + className: 'type', + begin: '\\b[A-Z][A-Za-z0-9_]*', + relevance: 0 + }, + { + begin: VAR_IDENT_RE + ':', + relevance: 0 + }, + hljs.C_NUMBER_MODE, + SYMBOL, + CHAR, + { + // This looks more complicated than needed to avoid combinatorial + // explosion under V8. It effectively means `| var1 var2 ... |` with + // whitespace adjacent to `|` being optional. + begin: '\\|[ ]*' + VAR_IDENT_RE + '([ ]+' + VAR_IDENT_RE + ')*[ ]*\\|', + returnBegin: true, end: /\|/, + illegal: /\S/, + contains: [{begin: '(\\|[ ]*)?' + VAR_IDENT_RE}] + }, + { + begin: '\\#\\(', end: '\\)', + contains: [ + hljs.APOS_STRING_MODE, + CHAR, + hljs.C_NUMBER_MODE, + SYMBOL + ] + } + ] + }; +} + +module.exports = smalltalk; diff --git a/node_modules/highlight.js/lib/languages/sml.js b/node_modules/highlight.js/lib/languages/sml.js @@ -0,0 +1,76 @@ +/* +Language: SML (Standard ML) +Author: Edwin Dalorzo <edwin@dalorzo.org> +Description: SML language definition. +Website: https://www.smlnj.org +Origin: ocaml.js +Category: functional +*/ +function sml(hljs) { + return { + name: 'SML (Standard ML)', + aliases: ['ml'], + keywords: { + $pattern: '[a-z_]\\w*!?', + keyword: + /* according to Definition of Standard ML 97 */ + 'abstype and andalso as case datatype do else end eqtype ' + + 'exception fn fun functor handle if in include infix infixr ' + + 'let local nonfix of op open orelse raise rec sharing sig ' + + 'signature struct structure then type val with withtype where while', + built_in: + /* built-in types according to basis library */ + 'array bool char exn int list option order real ref string substring vector unit word', + literal: + 'true false NONE SOME LESS EQUAL GREATER nil' + }, + illegal: /\/\/|>>/, + contains: [ + { + className: 'literal', + begin: /\[(\|\|)?\]|\(\)/, + relevance: 0 + }, + hljs.COMMENT( + '\\(\\*', + '\\*\\)', + { + contains: ['self'] + } + ), + { /* type variable */ + className: 'symbol', + begin: '\'[A-Za-z_](?!\')[\\w\']*' + /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */ + }, + { /* polymorphic variant */ + className: 'type', + begin: '`[A-Z][\\w\']*' + }, + { /* module or constructor */ + className: 'type', + begin: '\\b[A-Z][\\w\']*', + relevance: 0 + }, + { /* don't color identifiers, but safely catch all identifiers with '*/ + begin: '[a-z_]\\w*\'[\\w\']*' + }, + hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + { + className: 'number', + begin: + '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' + + '0[oO][0-7_]+[Lln]?|' + + '0[bB][01_]+[Lln]?|' + + '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)', + relevance: 0 + }, + { + begin: /[-=]>/ // relevance booster + } + ] + }; +} + +module.exports = sml; diff --git a/node_modules/highlight.js/lib/languages/sqf.js b/node_modules/highlight.js/lib/languages/sqf.js @@ -0,0 +1,438 @@ +/* +Language: SQF +Author: Søren Enevoldsen <senevoldsen90@gmail.com> +Contributors: Marvin Saignat <contact@zgmrvn.com>, Dedmen Miller <dedmen@dedmen.de> +Description: Scripting language for the Arma game series +Website: https://community.bistudio.com/wiki/SQF_syntax +Category: scripting +*/ + +function sqf(hljs) { + // In SQF, a variable start with _ + var VARIABLE = { + className: 'variable', + begin: /\b_+[a-zA-Z_]\w*/ + }; + + // In SQF, a function should fit myTag_fnc_myFunction pattern + // https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function + var FUNCTION = { + className: 'title', + begin: /[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/ + }; + + // In SQF strings, quotes matching the start are escaped by adding a consecutive. + // Example of single escaped quotes: " "" " and ' '' '. + var STRINGS = { + className: 'string', + variants: [ + { + begin: '"', + end: '"', + contains: [{begin: '""', relevance: 0}] + }, + { + begin: '\'', + end: '\'', + contains: [{begin: '\'\'', relevance: 0}] + } + ] + }; + + // list of keywords from: + // https://community.bistudio.com/wiki/PreProcessor_Commands + var PREPROCESSOR = { + className: 'meta', + begin: /#\s*[a-z]+\b/, end: /$/, + keywords: { + 'meta-keyword': + 'define undef ifdef ifndef else endif include' + }, + contains: [ + { + begin: /\\\n/, relevance: 0 + }, + hljs.inherit(STRINGS, {className: 'meta-string'}), + { + className: 'meta-string', + begin: /<[^\n>]*>/, end: /$/, + illegal: '\\n', + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }; + + return { + name: 'SQF', + aliases: ['sqf'], + case_insensitive: true, + keywords: { + keyword: + 'case catch default do else exit exitWith for forEach from if ' + + 'private switch then throw to try waitUntil while with', + built_in: + 'abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames ' + + 'actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey ' + + 'add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo ' + + 'addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea ' + + 'addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler ' + + 'addForce addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo ' + + 'addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats ' + + 'addMagazine addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal ' + + 'addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler ' + + 'addMPEventHandler addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem ' + + 'addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem ' + + 'addSwitchableUnit addTeamMember addToRemainsCollector addTorque addUniform addVehicle addVest ' + + 'addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem ' + + 'addWeaponPool addWeaponTurret admin agent agents AGLToASL aimedAtTarget aimPos airDensityRTD ' + + 'airplaneThrottle airportSide AISFinishHeal alive all3DENEntities allAirports allControls ' + + 'allCurators allCutLayers allDead allDeadMen allDisplays allGroups allMapMarkers allMines ' + + 'allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage ' + + 'allowDammage allowFileOperations allowFleeing allowGetIn allowSprint allPlayers allSimpleObjects ' + + 'allSites allTurrets allUnits allUnitsUAV allVariables ammo ammoOnPylon and animate animateBay ' + + 'animateDoor animatePylon animateSource animationNames animationPhase animationSourcePhase ' + + 'animationState append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert ' + + 'assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret ' + + 'assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems ' + + 'assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam ' + + 'assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject ' + + 'attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines ' + + 'backpackSpaceFor behaviour benchmark binocular boundingBox boundingBoxReal boundingCenter ' + + 'breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode ' + + 'call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams ' + + 'camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView ' + + 'campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive ' + + 'camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget ' + + 'camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos ' + + 'camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest ' + + 'cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend ' + + 'canTriggerDynamicSimulation canUnloadInCombat canVehicleCargo captive captiveNum cbChecked ' + + 'cbSetChecked ceil channelEnabled cheatsEnabled checkAIFeature checkVisibility className ' + + 'clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons ' + + 'clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal ' + + 'clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool ' + + 'clientOwner closeDialog closeDisplay closeOverlay collapseObjectTree collect3DENHistory ' + + 'collectiveRTD combatMode commandArtilleryFire commandChat commander commandFire commandFollow ' + + 'commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop ' + + 'commandSuppressiveFire commandTarget commandWatch comment commitOverlay compile compileFinal ' + + 'completedFSM composeText configClasses configFile configHierarchy configName configProperties ' + + 'configSourceAddonList configSourceMod configSourceModList confirmSensorTarget ' + + 'connectTerminalToUAV controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count ' + + 'countEnemy countFriendly countSide countType countUnknown create3DENComposition create3DENEntity ' + + 'createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject ' + + 'createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker ' + + 'createMarkerLocal createMenu createMine createMissionDisplay createMPCampaignDisplay ' + + 'createSimpleObject createSimpleTask createSite createSoundSource createTask createTeam ' + + 'createTrigger createUnit createVehicle createVehicleCrew createVehicleLocal crew ctAddHeader ' + + 'ctAddRow ctClear ctCurSel ctData ctFindHeaderRows ctFindRowHeader ctHeaderControls ctHeaderCount ' + + 'ctRemoveHeaders ctRemoveRows ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ' + + 'ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ' + + 'ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ' + + 'ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ' + + 'ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ' + + 'ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ' + + 'ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ' + + 'ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ' + + 'ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ' + + 'ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ' + + 'ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ' + + 'ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ' + + 'ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ' + + 'ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPixelPrecision ctrlSetPosition ctrlSetScale ' + + 'ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ' + + 'ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ' + + 'ctrlTextWidth ctrlType ctrlVisible ctRowControls ctRowCount ctSetCurSel ctSetData ' + + 'ctSetHeaderTemplate ctSetRowTemplate ctSetValue ctValue curatorAddons curatorCamera ' + + 'curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea ' + + 'curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected ' + + 'curatorWaypointCost current3DENOperation currentChannel currentCommand currentMagazine ' + + 'currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle ' + + 'currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint ' + + 'currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorObject cursorTarget ' + + 'customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime ' + + 'deActivateKey debriefingText debugFSM debugLog deg delete3DENEntities deleteAt deleteCenter ' + + 'deleteCollection deleteEditorObject deleteGroup deleteGroupWhenEmpty deleteIdentity ' + + 'deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus ' + + 'deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines ' + + 'diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts diag_activeSQSScripts ' + + 'diag_captureFrame diag_captureFrameToFile diag_captureSlowFrame diag_codePerformance ' + + 'diag_drawMode diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_lightNewLoad ' + + 'diag_list diag_log diag_logSlowFrame diag_mergeConfigFile diag_recordTurretLimits ' + + 'diag_setLightNew diag_tickTime diag_toggle dialog diarySubjectExists didJIP didJIPOwner ' + + 'difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction directSay disableAI ' + + 'disableCollisionWith disableConversation disableDebriefingStats disableMapIndicators ' + + 'disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment ' + + 'disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayParent ' + + 'displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam ' + + 'distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire doFire doFollow ' + + 'doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch drawArrow drawEllipse ' + + 'drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon drawRectangle ' + + 'drawTriangle driver drop dynamicSimulationDistance dynamicSimulationDistanceCoef ' + + 'dynamicSimulationEnabled dynamicSimulationSystemEnabled echo edit3DENMissionAttributes editObject ' + + 'editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature ' + + 'enableAimPrecision enableAttack enableAudioFeature enableAutoStartUpRTD enableAutoTrimRTD ' + + 'enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot ' + + 'enableDebriefingStats enableDiagLegend enableDynamicSimulation enableDynamicSimulationSystem ' + + 'enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights ' + + 'enableInfoPanelComponent enableIRLasers enableMimics enablePersonTurret enableRadio enableReload ' + + 'enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation ' + + 'enableSimulationGlobal enableStamina enableTeamSwitch enableTraffic enableUAVConnectability ' + + 'enableUAVWaypoints enableVehicleCargo enableVehicleSensor enableWeaponDisassembly ' + + 'endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities ' + + 'environmentEnabled estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack ' + + 'everyContainer exec execEditorScript execFSM execVM exp expectedDestination exportJIPMessages ' + + 'eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission ' + + 'fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition ' + + 'findEmptyPositionReady findIf findNearestEnemy finishMissionInit finite fire fireAtTarget ' + + 'firstBackpack flag flagAnimationPhase flagOwner flagSide flagTexture fleeing floor flyInHeight ' + + 'flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceFlagTexture ' + + 'forceFollowRoad forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange ' + + 'forEachMember forEachMemberAgent forEachMemberTeam forgetTarget format formation ' + + 'formationDirection formationLeader formationMembers formationPosition formationTask formatText ' + + 'formLeader freeLook fromEditor fuel fullCrew gearIDCAmmoCount gearSlotAmmoCount gearSlotData ' + + 'get3DENActionState get3DENAttribute get3DENCamera get3DENConnections get3DENEntity ' + + 'get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLayerEntities get3DENLinesVisible ' + + 'get3DENMissionAttribute get3DENMouseOver get3DENSelected getAimingCoef getAllEnvSoundControllers ' + + 'getAllHitPointsDamage getAllOwnedMines getAllSoundControllers getAmmoCargo getAnimAimPrecision ' + + 'getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA ' + + 'getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining ' + + 'getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState ' + + 'getClientStateNumber getCompatiblePylonMagazines getConnectedUAV getContainerMaxLoad ' + + 'getCursorObjectParams getCustomAimCoef getDammage getDescription getDir getDirVisual ' + + 'getDLCAssetsUsage getDLCAssetsUsageByName getDLCs getEditorCamera getEditorMode ' + + 'getEditorObjectScope getElevationOffset getEnvSoundController getFatigue getForcedFlagTexture ' + + 'getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom ' + + 'getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos ' + + 'getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue getMissionDLCs ' + + 'getMissionLayerEntities getModelInfo getMousePosition getMusicPlayedTime getNumber ' + + 'getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy ' + + 'getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs ' + + 'getPilotCameraDirection getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget ' + + 'getPlateNumber getPlayerChannel getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual ' + + 'getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getPylonMagazines getRelDir ' + + 'getRelPos getRemoteSensorsDisabled getRepairCargo getResolution getShadowDistance getShotParents ' + + 'getSlingLoad getSoundController getSoundControllerResult getSpeed getStamina getStatValue ' + + 'getSuppression getTerrainGrid getTerrainHeightASL getText getTotalDLCUsageTime getUnitLoadout ' + + 'getUnitTrait getUserMFDText getUserMFDvalue getVariable getVehicleCargo getWeaponCargo ' + + 'getWeaponSway getWingsOrientationRTD getWingsPositionRTD getWPPos glanceAt globalChat globalRadio ' + + 'goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId ' + + 'groupOwner groupRadio groupSelectedUnits groupSelectUnit gunner gusts halt handgunItems ' + + 'handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups ' + + 'hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup ' + + 'hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC ' + + 'hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups ' + + 'importance in inArea inAreaArray incapacitatedState inflame inflamed infoPanel ' + + 'infoPanelComponentEnabled infoPanelComponents infoPanels inGameUISetEventHandler inheritsFrom ' + + 'initAmbientLife inPolygon inputAction inRangeOfArtillery insertEditorObject intersect is3DEN ' + + 'is3DENMultiplayer isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest ' + + 'isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDamageAllowed isDedicated ' + + 'isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll isEqualTypeAny isEqualTypeArray ' + + 'isEqualTypeParams isFilePatchingEnabled isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader ' + + 'isGroupDeletedWhenEmpty isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn ' + + 'isKeyActive isKindOf isLaserOn isLightOn isLocalized isManualFire isMarkedForCollection ' + + 'isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad ' + + 'isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP isServer isShowing3DIcons ' + + 'isSimpleObject isSprintAllowed isStaminaEnabled isSteamMission isStreamFriendlyUIEnabled isText ' + + 'isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUIContext ' + + 'isUniformAllowed isVehicleCargo isVehicleRadarOn isVehicleSensorEnabled isWalking ' + + 'isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent ' + + 'joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact ' + + 'kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language ' + + 'laserTarget lbAdd lbClear lbColor lbColorRight lbCurSel lbData lbDelete lbIsSelected lbPicture ' + + 'lbPictureRight lbSelection lbSetColor lbSetColorRight lbSetCurSel lbSetData lbSetPicture ' + + 'lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetPictureRight ' + + 'lbSetPictureRightColor lbSetPictureRightColorDisabled lbSetPictureRightColorSelected ' + + 'lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetText lbSetTextRight lbSetTooltip ' + + 'lbSetValue lbSize lbSort lbSortByValue lbText lbTextRight lbValue leader leaderboardDeInit ' + + 'leaderboardGetRows leaderboardInit leaderboardRequestRowsFriends leaderboardsRequestUploadScore ' + + 'leaderboardsRequestUploadScoreKeepBest leaderboardState leaveVehicle libraryCredits ' + + 'libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed ' + + 'linearConversion lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith ' + + 'linkItem list listObjects listRemoteTargets listVehicleSensors ln lnbAddArray lnbAddColumn ' + + 'lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow ' + + 'lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData ' + + 'lnbSetPicture lnbSetText lnbSetValue lnbSize lnbSort lnbSortByValue lnbText lnbValue load loadAbs ' + + 'loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform ' + + 'loadVest local localize locationPosition lock lockCameraTo lockCargo lockDriver locked ' + + 'lockedCargo lockedDriver lockedTurret lockIdentity lockTurret lockWP log logEntities logNetwork ' + + 'logNetworkTerminate lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo ' + + 'magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack ' + + 'magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd ' + + 'mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam ' + + 'markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText ' + + 'markerType max members menuAction menuAdd menuChecked menuClear menuCollapse menuData menuDelete ' + + 'menuEnable menuEnabled menuExpand menuHover menuPicture menuSetAction menuSetCheck menuSetData ' + + 'menuSetPicture menuSetValue menuShortcut menuShortcutText menuSize menuSort menuText menuURL ' + + 'menuValue min mineActive mineDetectedBy missionConfigFile missionDifficulty missionName ' + + 'missionNamespace missionStart missionVersion mod modelToWorld modelToWorldVisual ' + + 'modelToWorldVisualWorld modelToWorldWorld modParams moonIntensity moonPhase morale move ' + + 'move3DENCamera moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret ' + + 'moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound ' + + 'nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing ' + + 'nearestObject nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads ' + + 'nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex ' + + 'nextWeatherChange nMenuItems not numberOfEnginesRTD numberToDate objectCurators objectFromNetId ' + + 'objectParent objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch ' + + 'onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter ' + + 'onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected ' + + 'onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch ' + + 'openCuratorInterface openDLCPage openMap openSteamApp openYoutubeVideo or orderGetIn overcast ' + + 'overcastForecast owner param params parseNumber parseSimpleArray parseText parsingNamespace ' + + 'particlesQuality pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW ' + + 'playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide ' + + 'playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission ' + + 'playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ' + + 'ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ' + + 'ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound ' + + 'preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon ' + + 'primaryWeaponItems primaryWeaponMagazine priority processDiaryLink productVersion profileName ' + + 'profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition ' + + 'publicVariable publicVariableClient publicVariableServer pushBack pushBackUnique putWeaponPool ' + + 'queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate ' + + 'radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random ' + + 'rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl ' + + 'remoteExec remoteExecCall remoteExecutedOwner remove3DENConnection remove3DENEventHandler ' + + 'remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems ' + + 'removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas ' + + 'removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems ' + + 'removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers ' + + 'removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons ' + + 'removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea ' + + 'removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks ' + + 'removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem ' + + 'removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest ' + + 'removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret ' + + 'removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler ' + + 'removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem ' + + 'removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon ' + + 'removeWeaponAttachmentCargo removeWeaponCargo removeWeaponGlobal removeWeaponTurret ' + + 'reportRemoteTarget requiredVersion resetCamShake resetSubgroupDirection resize resources ' + + 'respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadAt ' + + 'roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ' + + 'ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ropeLength ropes ' + + 'ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW ' + + 'safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame saveIdentity ' + + 'saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D ' + + 'scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scudState ' + + 'secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces ' + + 'selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition ' + + 'selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectRandomWeighted ' + + 'selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult ' + + 'sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime ' + + 'set set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer ' + + 'set3DENLinesVisible set3DENLogicType set3DENMissionAttribute set3DENMissionAttributes ' + + 'set3DENModelsVisible set3DENObjectType set3DENSelected setAccTime setActualCollectiveRTD ' + + 'setAirplaneThrottle setAirportSide setAmmo setAmmoCargo setAmmoOnPylon setAnimSpeedCoef ' + + 'setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour ' + + 'setBleedingRemaining setBrakesRTD setCameraInterest setCamShakeDefParams setCamShakeParams ' + + 'setCamUseTI setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation ' + + 'setConvoySeparation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType ' + + 'setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setCustomAimCoef ' + + 'setCustomWeightRTD setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination ' + + 'setDetailMapBlendPars setDir setDirection setDrawIcon setDriveOnPath setDropInterval ' + + 'setDynamicSimulationDistance setDynamicSimulationDistanceCoef setEditorMode setEditorObjectScope ' + + 'setEffectCondition setEngineRPMRTD setFace setFaceAnimation setFatigue setFeatureType ' + + 'setFlagAnimationPhase setFlagOwner setFlagSide setFlagTexture setFog setFormation ' + + 'setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo ' + + 'setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId ' + + 'setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage ' + + 'setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setInfoPanel setLeader ' + + 'setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight ' + + 'setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare ' + + 'setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush ' + + 'setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal ' + + 'setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize ' + + 'setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass ' + + 'setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound ' + + 'setObjectArguments setObjectMaterial setObjectMaterialGlobal setObjectProxy setObjectTexture ' + + 'setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining ' + + 'setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom ' + + 'setPilotCameraDirection setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect ' + + 'setPitch setPlateNumber setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW ' + + 'setPosATL setPosition setPosWorld setPylonLoadOut setPylonsPriority setRadioMsg setRain ' + + 'setRainbow setRandomLip setRank setRectangular setRepairCargo setRotorBrakeRTD setShadowDistance ' + + 'setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData ' + + 'setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType ' + + 'setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech ' + + 'setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits ' + + 'setTargetAge setTaskMarkerOffset setTaskResult setTaskState setTerrainGrid setText ' + + 'setTimeMultiplier setTitleEffect setTrafficDensity setTrafficDistance setTrafficGap ' + + 'setTrafficSpeed setTriggerActivation setTriggerArea setTriggerStatements setTriggerText ' + + 'setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos ' + + 'setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat ' + + 'setUserActionText setUserMFDText setUserMFDvalue setVariable setVectorDir setVectorDirAndUp ' + + 'setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleCargo setVehicleId ' + + 'setVehicleLock setVehiclePosition setVehicleRadar setVehicleReceiveRemoteTargets ' + + 'setVehicleReportOwnPosition setVehicleReportRemoteTargets setVehicleTIPars setVehicleVarName ' + + 'setVelocity setVelocityModelSpace setVelocityTransformation setViewDistance ' + + 'setVisibleIfTreeCollapsed setWantedRPMRTD setWaves setWaypointBehaviour setWaypointCombatMode ' + + 'setWaypointCompletionRadius setWaypointDescription setWaypointForceBehaviour setWaypointFormation ' + + 'setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName ' + + 'setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout ' + + 'setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce ' + + 'setWindStr setWingForceScaleRTD setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu ' + + 'showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer ' + + 'shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap ' + + 'shownPad shownRadio shownScoretable shownUAVFeed shownWarrant shownWatch showPad showRadio ' + + 'showScoretable showSubtitles showUAVFeed showWarrant showWatch showWaypoint showWaypoints side ' + + 'sideChat sideEnemy sideFriendly sideRadio simpleTasks simulationEnabled simulCloudDensity ' + + 'simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime ' + + 'sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed ' + + 'slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode ' + + 'splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str ' + + 'sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth ' + + 'switchableUnits switchAction switchCamera switchGesture switchLight switchMove ' + + 'synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd ' + + 'synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan ' + + 'targetKnowledge targets targetsAggregate targetsQuery taskAlwaysVisible taskChildren ' + + 'taskCompleted taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskParent ' + + 'taskResult taskState taskType teamMember teamName teams teamSwitch teamSwitchEnabled teamType ' + + 'terminate terrainIntersect terrainIntersectASL terrainIntersectAtASL text textLog textLogFormat ' + + 'tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toFixed toLower ' + + 'toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle ' + + 'triggerAttachObject triggerAttachVehicle triggerDynamicSimulation triggerStatements triggerText ' + + 'triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear ' + + 'tvCollapse tvCollapseAll tvCount tvCurSel tvData tvDelete tvExpand tvExpandAll tvPicture ' + + 'tvSetColor tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetPictureColorDisabled ' + + 'tvSetPictureColorSelected tvSetPictureRight tvSetPictureRightColor tvSetPictureRightColorDisabled ' + + 'tvSetPictureRightColorSelected tvSetText tvSetTooltip tvSetValue tvSort tvSortByValue tvText ' + + 'tvTooltip tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator ' + + 'unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems ' + + 'uniformMagazines unitAddons unitAimPosition unitAimPositionVisual unitBackpack unitIsUAV unitPos ' + + 'unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement ' + + 'unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAISteeringComponent ' + + 'useAudioTimeForMoves userInputDisabled vectorAdd vectorCos vectorCrossProduct vectorDiff ' + + 'vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo ' + + 'vectorMagnitude vectorMagnitudeSqr vectorModelToWorld vectorModelToWorldVisual vectorMultiply ' + + 'vectorNormalized vectorUp vectorUpVisual vectorWorldToModel vectorWorldToModelVisual vehicle ' + + 'vehicleCargoEnabled vehicleChat vehicleRadio vehicleReceiveRemoteTargets vehicleReportOwnPosition ' + + 'vehicleReportRemoteTargets vehicles vehicleVarName velocity velocityModelSpace verifySignature ' + + 'vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap ' + + 'visiblePosition visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject ' + + 'waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour ' + + 'waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour ' + + 'waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName ' + + 'waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed ' + + 'waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible ' + + 'weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered ' + + 'weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD WFSideText wind ', + literal: + 'blufor civilian configNull controlNull displayNull east endl false grpNull independent lineBreak ' + + 'locationNull nil objNull opfor pi resistance scriptNull sideAmbientLife sideEmpty sideLogic ' + + 'sideUnknown taskNull teamMemberNull true west', + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.NUMBER_MODE, + VARIABLE, + FUNCTION, + STRINGS, + PREPROCESSOR + ], + illegal: /#|^\$ / + }; +} + +module.exports = sqf; diff --git a/node_modules/highlight.js/lib/languages/sql.js b/node_modules/highlight.js/lib/languages/sql.js @@ -0,0 +1,170 @@ +/* + Language: SQL + Contributors: Nikolay Lisienko <info@neor.ru>, Heiko August <post@auge8472.de>, Travis Odom <travis.a.odom@gmail.com>, Vadimtro <vadimtro@yahoo.com>, Benjamin Auder <benjamin.auder@gmail.com> + Website: https://en.wikipedia.org/wiki/SQL + Category: common + */ + +function sql(hljs) { + var COMMENT_MODE = hljs.COMMENT('--', '$'); + return { + name: 'SQL', + case_insensitive: true, + illegal: /[<>{}*]/, + contains: [ + { + beginKeywords: + 'begin end start commit rollback savepoint lock alter create drop rename call ' + + 'delete do handler insert load replace select truncate update set show pragma grant ' + + 'merge describe use explain help declare prepare execute deallocate release ' + + 'unlock purge reset change stop analyze cache flush optimize repair kill ' + + 'install uninstall checksum restore check backup revoke comment values with', + end: /;/, endsWithParent: true, + keywords: { + $pattern: /[\w\.]+/, + keyword: + 'as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add ' + + 'addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias ' + + 'all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply ' + + 'archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan ' + + 'atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid ' + + 'authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile ' + + 'before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float ' + + 'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' + + 'bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' + + 'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' + + 'char_length character_length characters characterset charindex charset charsetform charsetid check ' + + 'checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close ' + + 'cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation ' + + 'collect colu colum column column_value columns columns_updated comment commit compact compatibility ' + + 'compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn ' + + 'connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection ' + + 'consider consistent constant constraint constraints constructor container content contents context ' + + 'contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost ' + + 'count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation ' + + 'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' + + 'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' + + 'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' + + 'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' + + 'declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults ' + + 'deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank ' + + 'depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor ' + + 'deterministic diagnostics difference dimension direct_load directory disable disable_all ' + + 'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' + + 'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' + + 'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' + + 'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' + + 'escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding ' + + 'execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external ' + + 'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' + + 'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' + + 'finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign ' + + 'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' + + 'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' + + 'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' + + 'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' + + 'hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified ' + + 'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' + + 'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' + + 'initial initialized initially initrans inmemory inner innodb input insert install instance instantiable ' + + 'instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat ' + + 'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' + + 'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase ' + + 'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' + + 'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' + + 'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' + + 'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' + + 'managed management manual map mapping mask master master_pos_wait match matched materialized max ' + + 'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' + + 'md5 measures median medium member memcompress memory merge microsecond mid migration min minextents ' + + 'minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month ' + + 'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' + + 'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' + + 'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' + + 'nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder ' + + 'nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck ' + + 'noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe ' + + 'nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ' + + 'ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old ' + + 'on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date ' + + 'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' + + 'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' + + 'parameters parent parse partial partition partitions pascal passing password password_grace_time ' + + 'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' + + 'pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc ' + + 'performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin ' + + 'policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction ' + + 'prediction_cost prediction_details prediction_probability prediction_set prepare present preserve ' + + 'prior priority private private_sga privileges procedural procedure procedure_analyze processlist ' + + 'profiles project prompt protection public publishingservername purge quarter query quick quiesce quota ' + + 'quotename radians raise rand range rank raw read reads readsize rebuild record records ' + + 'recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh ' + + 'regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy ' + + 'reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename ' + + 'repair repeat replace replicate replication required reset resetlogs resize resource respect restore ' + + 'restricted result result_cache resumable resume retention return returning returns reuse reverse revoke ' + + 'right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows ' + + 'rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll ' + + 'sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select ' + + 'self semi sequence sequential serializable server servererror session session_user sessions_per_user set ' + + 'sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor ' + + 'si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin ' + + 'size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex ' + + 'source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows ' + + 'sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone ' + + 'standby start starting startup statement static statistics stats_binomial_test stats_crosstab ' + + 'stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep ' + + 'stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev ' + + 'stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate ' + + 'subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum ' + + 'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' + + 'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo ' + + 'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' + + 'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' + + 'timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking ' + + 'transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate ' + + 'try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress ' + + 'under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot ' + + 'unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert ' + + 'url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date ' + + 'utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var ' + + 'var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray ' + + 'verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear ' + + 'wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped ' + + 'xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces ' + + 'xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek', + literal: + 'true false null unknown', + built_in: + 'array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number ' + + 'numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void' + }, + contains: [ + { + className: 'string', + begin: '\'', end: '\'', + contains: [{begin: '\'\''}] + }, + { + className: 'string', + begin: '"', end: '"', + contains: [{begin: '""'}] + }, + { + className: 'string', + begin: '`', end: '`' + }, + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE, + COMMENT_MODE, + hljs.HASH_COMMENT_MODE + ] + }, + hljs.C_BLOCK_COMMENT_MODE, + COMMENT_MODE, + hljs.HASH_COMMENT_MODE + ] + }; +} + +module.exports = sql; diff --git a/node_modules/highlight.js/lib/languages/stan.js b/node_modules/highlight.js/lib/languages/stan.js @@ -0,0 +1,230 @@ +/* +Language: Stan +Description: The Stan probabilistic programming language +Author: Jeffrey B. Arnold <jeffrey.arnold@gmail.com> +Website: http://mc-stan.org/ +Category: scientific +*/ + +function stan(hljs) { + // variable names cannot conflict with block identifiers + var BLOCKS = [ + 'functions', + 'model', + 'data', + 'parameters', + 'quantities', + 'transformed', + 'generated' + ]; + var STATEMENTS = [ + 'for', + 'in', + 'if', + 'else', + 'while', + 'break', + 'continue', + 'return' + ]; + var SPECIAL_FUNCTIONS = [ + 'print', + 'reject', + 'increment_log_prob|10', + 'integrate_ode|10', + 'integrate_ode_rk45|10', + 'integrate_ode_bdf|10', + 'algebra_solver' + ]; + var VAR_TYPES = [ + 'int', + 'real', + 'vector', + 'ordered', + 'positive_ordered', + 'simplex', + 'unit_vector', + 'row_vector', + 'matrix', + 'cholesky_factor_corr|10', + 'cholesky_factor_cov|10', + 'corr_matrix|10', + 'cov_matrix|10', + 'void' + ]; + var FUNCTIONS = [ + 'Phi', 'Phi_approx', 'abs', 'acos', 'acosh', 'algebra_solver', 'append_array', + 'append_col', 'append_row', 'asin', 'asinh', 'atan', 'atan2', 'atanh', + 'bernoulli_cdf', 'bernoulli_lccdf', 'bernoulli_lcdf', 'bernoulli_logit_lpmf', + 'bernoulli_logit_rng', 'bernoulli_lpmf', 'bernoulli_rng', 'bessel_first_kind', + 'bessel_second_kind', 'beta_binomial_cdf', 'beta_binomial_lccdf', + 'beta_binomial_lcdf', 'beta_binomial_lpmf', 'beta_binomial_rng', 'beta_cdf', + 'beta_lccdf', 'beta_lcdf', 'beta_lpdf', 'beta_rng', 'binary_log_loss', + 'binomial_cdf', 'binomial_coefficient_log', 'binomial_lccdf', 'binomial_lcdf', + 'binomial_logit_lpmf', 'binomial_lpmf', 'binomial_rng', 'block', + 'categorical_logit_lpmf', 'categorical_logit_rng', 'categorical_lpmf', + 'categorical_rng', 'cauchy_cdf', 'cauchy_lccdf', 'cauchy_lcdf', 'cauchy_lpdf', + 'cauchy_rng', 'cbrt', 'ceil', 'chi_square_cdf', 'chi_square_lccdf', + 'chi_square_lcdf', 'chi_square_lpdf', 'chi_square_rng', 'cholesky_decompose', + 'choose', 'col', 'cols', 'columns_dot_product', 'columns_dot_self', 'cos', + 'cosh', 'cov_exp_quad', 'crossprod', 'csr_extract_u', 'csr_extract_v', + 'csr_extract_w', 'csr_matrix_times_vector', 'csr_to_dense_matrix', + 'cumulative_sum', 'determinant', 'diag_matrix', 'diag_post_multiply', + 'diag_pre_multiply', 'diagonal', 'digamma', 'dims', 'dirichlet_lpdf', + 'dirichlet_rng', 'distance', 'dot_product', 'dot_self', + 'double_exponential_cdf', 'double_exponential_lccdf', 'double_exponential_lcdf', + 'double_exponential_lpdf', 'double_exponential_rng', 'e', 'eigenvalues_sym', + 'eigenvectors_sym', 'erf', 'erfc', 'exp', 'exp2', 'exp_mod_normal_cdf', + 'exp_mod_normal_lccdf', 'exp_mod_normal_lcdf', 'exp_mod_normal_lpdf', + 'exp_mod_normal_rng', 'expm1', 'exponential_cdf', 'exponential_lccdf', + 'exponential_lcdf', 'exponential_lpdf', 'exponential_rng', 'fabs', + 'falling_factorial', 'fdim', 'floor', 'fma', 'fmax', 'fmin', 'fmod', + 'frechet_cdf', 'frechet_lccdf', 'frechet_lcdf', 'frechet_lpdf', 'frechet_rng', + 'gamma_cdf', 'gamma_lccdf', 'gamma_lcdf', 'gamma_lpdf', 'gamma_p', 'gamma_q', + 'gamma_rng', 'gaussian_dlm_obs_lpdf', 'get_lp', 'gumbel_cdf', 'gumbel_lccdf', + 'gumbel_lcdf', 'gumbel_lpdf', 'gumbel_rng', 'head', 'hypergeometric_lpmf', + 'hypergeometric_rng', 'hypot', 'inc_beta', 'int_step', 'integrate_ode', + 'integrate_ode_bdf', 'integrate_ode_rk45', 'inv', 'inv_Phi', + 'inv_chi_square_cdf', 'inv_chi_square_lccdf', 'inv_chi_square_lcdf', + 'inv_chi_square_lpdf', 'inv_chi_square_rng', 'inv_cloglog', 'inv_gamma_cdf', + 'inv_gamma_lccdf', 'inv_gamma_lcdf', 'inv_gamma_lpdf', 'inv_gamma_rng', + 'inv_logit', 'inv_sqrt', 'inv_square', 'inv_wishart_lpdf', 'inv_wishart_rng', + 'inverse', 'inverse_spd', 'is_inf', 'is_nan', 'lbeta', 'lchoose', 'lgamma', + 'lkj_corr_cholesky_lpdf', 'lkj_corr_cholesky_rng', 'lkj_corr_lpdf', + 'lkj_corr_rng', 'lmgamma', 'lmultiply', 'log', 'log10', 'log1m', 'log1m_exp', + 'log1m_inv_logit', 'log1p', 'log1p_exp', 'log2', 'log_determinant', + 'log_diff_exp', 'log_falling_factorial', 'log_inv_logit', 'log_mix', + 'log_rising_factorial', 'log_softmax', 'log_sum_exp', 'logistic_cdf', + 'logistic_lccdf', 'logistic_lcdf', 'logistic_lpdf', 'logistic_rng', 'logit', + 'lognormal_cdf', 'lognormal_lccdf', 'lognormal_lcdf', 'lognormal_lpdf', + 'lognormal_rng', 'machine_precision', 'matrix_exp', 'max', 'mdivide_left_spd', + 'mdivide_left_tri_low', 'mdivide_right_spd', 'mdivide_right_tri_low', 'mean', + 'min', 'modified_bessel_first_kind', 'modified_bessel_second_kind', + 'multi_gp_cholesky_lpdf', 'multi_gp_lpdf', 'multi_normal_cholesky_lpdf', + 'multi_normal_cholesky_rng', 'multi_normal_lpdf', 'multi_normal_prec_lpdf', + 'multi_normal_rng', 'multi_student_t_lpdf', 'multi_student_t_rng', + 'multinomial_lpmf', 'multinomial_rng', 'multiply_log', + 'multiply_lower_tri_self_transpose', 'neg_binomial_2_cdf', + 'neg_binomial_2_lccdf', 'neg_binomial_2_lcdf', 'neg_binomial_2_log_lpmf', + 'neg_binomial_2_log_rng', 'neg_binomial_2_lpmf', 'neg_binomial_2_rng', + 'neg_binomial_cdf', 'neg_binomial_lccdf', 'neg_binomial_lcdf', + 'neg_binomial_lpmf', 'neg_binomial_rng', 'negative_infinity', 'normal_cdf', + 'normal_lccdf', 'normal_lcdf', 'normal_lpdf', 'normal_rng', 'not_a_number', + 'num_elements', 'ordered_logistic_lpmf', 'ordered_logistic_rng', 'owens_t', + 'pareto_cdf', 'pareto_lccdf', 'pareto_lcdf', 'pareto_lpdf', 'pareto_rng', + 'pareto_type_2_cdf', 'pareto_type_2_lccdf', 'pareto_type_2_lcdf', + 'pareto_type_2_lpdf', 'pareto_type_2_rng', 'pi', 'poisson_cdf', 'poisson_lccdf', + 'poisson_lcdf', 'poisson_log_lpmf', 'poisson_log_rng', 'poisson_lpmf', + 'poisson_rng', 'positive_infinity', 'pow', 'print', 'prod', 'qr_Q', 'qr_R', + 'quad_form', 'quad_form_diag', 'quad_form_sym', 'rank', 'rayleigh_cdf', + 'rayleigh_lccdf', 'rayleigh_lcdf', 'rayleigh_lpdf', 'rayleigh_rng', 'reject', + 'rep_array', 'rep_matrix', 'rep_row_vector', 'rep_vector', 'rising_factorial', + 'round', 'row', 'rows', 'rows_dot_product', 'rows_dot_self', + 'scaled_inv_chi_square_cdf', 'scaled_inv_chi_square_lccdf', + 'scaled_inv_chi_square_lcdf', 'scaled_inv_chi_square_lpdf', + 'scaled_inv_chi_square_rng', 'sd', 'segment', 'sin', 'singular_values', 'sinh', + 'size', 'skew_normal_cdf', 'skew_normal_lccdf', 'skew_normal_lcdf', + 'skew_normal_lpdf', 'skew_normal_rng', 'softmax', 'sort_asc', 'sort_desc', + 'sort_indices_asc', 'sort_indices_desc', 'sqrt', 'sqrt2', 'square', + 'squared_distance', 'step', 'student_t_cdf', 'student_t_lccdf', + 'student_t_lcdf', 'student_t_lpdf', 'student_t_rng', 'sub_col', 'sub_row', + 'sum', 'tail', 'tan', 'tanh', 'target', 'tcrossprod', 'tgamma', 'to_array_1d', + 'to_array_2d', 'to_matrix', 'to_row_vector', 'to_vector', 'trace', + 'trace_gen_quad_form', 'trace_quad_form', 'trigamma', 'trunc', 'uniform_cdf', + 'uniform_lccdf', 'uniform_lcdf', 'uniform_lpdf', 'uniform_rng', 'variance', + 'von_mises_lpdf', 'von_mises_rng', 'weibull_cdf', 'weibull_lccdf', + 'weibull_lcdf', 'weibull_lpdf', 'weibull_rng', 'wiener_lpdf', 'wishart_lpdf', + 'wishart_rng' + ]; + var DISTRIBUTIONS = [ + 'bernoulli', 'bernoulli_logit', 'beta', 'beta_binomial', 'binomial', + 'binomial_logit', 'categorical', 'categorical_logit', 'cauchy', 'chi_square', + 'dirichlet', 'double_exponential', 'exp_mod_normal', 'exponential', 'frechet', + 'gamma', 'gaussian_dlm_obs', 'gumbel', 'hypergeometric', 'inv_chi_square', + 'inv_gamma', 'inv_wishart', 'lkj_corr', 'lkj_corr_cholesky', 'logistic', + 'lognormal', 'multi_gp', 'multi_gp_cholesky', 'multi_normal', + 'multi_normal_cholesky', 'multi_normal_prec', 'multi_student_t', 'multinomial', + 'neg_binomial', 'neg_binomial_2', 'neg_binomial_2_log', 'normal', + 'ordered_logistic', 'pareto', 'pareto_type_2', 'poisson', 'poisson_log', + 'rayleigh', 'scaled_inv_chi_square', 'skew_normal', 'student_t', 'uniform', + 'von_mises', 'weibull', 'wiener', 'wishart' + ]; + + return { + name: 'Stan', + aliases: ['stanfuncs'], + keywords: { + $pattern: hljs.IDENT_RE, + title: BLOCKS.join(' '), + keyword: STATEMENTS.concat(VAR_TYPES).concat(SPECIAL_FUNCTIONS).join(' '), + built_in: FUNCTIONS.join(' ') + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT( + /#/, + /$/, + { + relevance: 0, + keywords: { + 'meta-keyword': 'include' + } + } + ), + hljs.COMMENT( + /\/\*/, + /\*\//, + { + relevance: 0, + // highlight doc strings mentioned in Stan reference + contains: [ + { + className: 'doctag', + begin: /@(return|param)/ + } + ] + } + ), + { + // hack: in range constraints, lower must follow "<" + begin: /<\s*lower\s*=/, + keywords: 'lower' + }, + { + // hack: in range constraints, upper must follow either , or < + // <lower = ..., upper = ...> or <upper = ...> + begin: /[<,]\s*upper\s*=/, + keywords: 'upper' + }, + { + className: 'keyword', + begin: /\btarget\s*\+=/, + relevance: 10 + }, + { + begin: '~\\s*(' + hljs.IDENT_RE + ')\\s*\\(', + keywords: DISTRIBUTIONS.join(' ') + }, + { + className: 'number', + variants: [ + { + begin: /\b\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/ + }, + { + begin: /\.\d+(?:[eE][+-]?\d+)?\b/ + } + ], + relevance: 0 + }, + { + className: 'string', + begin: '"', + end: '"', + relevance: 0 + } + ] + } +} + +module.exports = stan; diff --git a/node_modules/highlight.js/lib/languages/stata.js b/node_modules/highlight.js/lib/languages/stata.js @@ -0,0 +1,53 @@ +/* +Language: Stata +Author: Brian Quistorff <bquistorff@gmail.com> +Contributors: Drew McDonald <drewmcdo@gmail.com> +Description: Stata is a general-purpose statistical software package created in 1985 by StataCorp. +Website: https://en.wikipedia.org/wiki/Stata +Category: scientific +*/ + +/* + This is a fork and modification of Drew McDonald's file (https://github.com/drewmcdonald/stata-highlighting). I have also included a list of builtin commands from https://bugs.kde.org/show_bug.cgi?id=135646. +*/ + +function stata(hljs) { + return { + name: 'Stata', + aliases: ['do', 'ado'], + case_insensitive: true, + keywords: 'if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 bubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5', + contains: [ + { + className: 'symbol', + begin: /`[a-zA-Z0-9_]+'/ + }, + { + className: 'variable', + begin: /\$\{?[a-zA-Z0-9_]+\}?/ + }, + { + className: 'string', + variants: [ + {begin: '`"[^\r\n]*?"\''}, + {begin: '"[^\r\n"]*"'} + ] + }, + + { + className: 'built_in', + variants: [ + { + begin: '\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()' + } + ] + }, + + hljs.COMMENT('^[ \t]*\\*.*$', false), + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + }; +} + +module.exports = stata; diff --git a/node_modules/highlight.js/lib/languages/step21.js b/node_modules/highlight.js/lib/languages/step21.js @@ -0,0 +1,56 @@ +/* +Language: STEP Part 21 +Contributors: Adam Joseph Cook <adam.joseph.cook@gmail.com> +Description: Syntax highlighter for STEP Part 21 files (ISO 10303-21). +Website: https://en.wikipedia.org/wiki/ISO_10303-21 +*/ + +function step21(hljs) { + var STEP21_IDENT_RE = '[A-Z_][A-Z0-9_.]*'; + var STEP21_KEYWORDS = { + $pattern: STEP21_IDENT_RE, + keyword: 'HEADER ENDSEC DATA' + }; + var STEP21_START = { + className: 'meta', + begin: 'ISO-10303-21;', + relevance: 10 + }; + var STEP21_CLOSE = { + className: 'meta', + begin: 'END-ISO-10303-21;', + relevance: 10 + }; + + return { + name: 'STEP Part 21', + aliases: ['p21', 'step', 'stp'], + case_insensitive: true, // STEP 21 is case insensitive in theory, in practice all non-comments are capitalized. + keywords: STEP21_KEYWORDS, + contains: [ + STEP21_START, + STEP21_CLOSE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.COMMENT('/\\*\\*!', '\\*/'), + hljs.C_NUMBER_MODE, + hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + { + className: 'string', + begin: "'", end: "'" + }, + { + className: 'symbol', + variants: [ + { + begin: '#', end: '\\d+', + illegal: '\\W' + } + ] + } + ] + }; +} + +module.exports = step21; diff --git a/node_modules/highlight.js/lib/languages/stylus.js b/node_modules/highlight.js/lib/languages/stylus.js @@ -0,0 +1,455 @@ +/* +Language: Stylus +Author: Bryant Williams <b.n.williams@gmail.com> +Description: Stylus is an expressive, robust, feature-rich CSS language built for nodejs. +Website: https://github.com/stylus/stylus +Category: css +*/ + +function stylus(hljs) { + + var VARIABLE = { + className: 'variable', + begin: '\\$' + hljs.IDENT_RE + }; + + var HEX_COLOR = { + className: 'number', + begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})' + }; + + var AT_KEYWORDS = [ + 'charset', + 'css', + 'debug', + 'extend', + 'font-face', + 'for', + 'import', + 'include', + 'media', + 'mixin', + 'page', + 'warn', + 'while' + ]; + + var PSEUDO_SELECTORS = [ + 'after', + 'before', + 'first-letter', + 'first-line', + 'active', + 'first-child', + 'focus', + 'hover', + 'lang', + 'link', + 'visited' + ]; + + var TAGS = [ + 'a', + 'abbr', + 'address', + 'article', + 'aside', + 'audio', + 'b', + 'blockquote', + 'body', + 'button', + 'canvas', + 'caption', + 'cite', + 'code', + 'dd', + 'del', + 'details', + 'dfn', + 'div', + 'dl', + 'dt', + 'em', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'header', + 'hgroup', + 'html', + 'i', + 'iframe', + 'img', + 'input', + 'ins', + 'kbd', + 'label', + 'legend', + 'li', + 'mark', + 'menu', + 'nav', + 'object', + 'ol', + 'p', + 'q', + 'quote', + 'samp', + 'section', + 'span', + 'strong', + 'summary', + 'sup', + 'table', + 'tbody', + 'td', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'time', + 'tr', + 'ul', + 'var', + 'video' + ]; + + var LOOKAHEAD_TAG_END = '(?=[\\.\\s\\n\\[\\:,])'; + + var ATTRIBUTES = [ + 'align-content', + 'align-items', + 'align-self', + 'animation', + 'animation-delay', + 'animation-direction', + 'animation-duration', + 'animation-fill-mode', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'auto', + 'backface-visibility', + 'background', + 'background-attachment', + '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-decoration-break', + 'box-shadow', + 'box-sizing', + 'break-after', + 'break-before', + 'break-inside', + 'caption-side', + 'clear', + 'clip', + 'clip-path', + '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-feature-settings', + 'font-kerning', + 'font-language-override', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-variant-ligatures', + 'font-weight', + 'height', + 'hyphens', + 'icon', + 'image-orientation', + 'image-rendering', + 'image-resolution', + 'ime-mode', + 'inherit', + 'initial', + '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', + 'marks', + 'mask', + 'max-height', + 'max-width', + 'min-height', + 'min-width', + 'nav-down', + 'nav-index', + 'nav-left', + 'nav-right', + 'nav-up', + 'none', + 'normal', + 'object-fit', + 'object-position', + 'opacity', + 'order', + 'orphans', + 'outline', + 'outline-color', + 'outline-offset', + 'outline-style', + 'outline-width', + 'overflow', + 'overflow-wrap', + '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', + 'pointer-events', + '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-overflow', + 'text-rendering', + 'text-shadow', + 'text-transform', + 'text-underline-position', + 'top', + 'transform', + 'transform-origin', + 'transform-style', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'unicode-bidi', + 'vertical-align', + 'visibility', + 'white-space', + 'widows', + 'width', + 'word-break', + 'word-spacing', + 'word-wrap', + 'z-index' + ]; + + // illegals + var ILLEGAL = [ + '\\?', + '(\\bReturn\\b)', // monkey + '(\\bEnd\\b)', // monkey + '(\\bend\\b)', // vbscript + '(\\bdef\\b)', // gradle + ';', // a whole lot of languages + '#\\s', // markdown + '\\*\\s', // markdown + '===\\s', // markdown + '\\|', + '%', // prolog + ]; + + return { + name: 'Stylus', + aliases: ['styl'], + case_insensitive: false, + keywords: 'if else for in', + illegal: '(' + ILLEGAL.join('|') + ')', + contains: [ + + // strings + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + + // comments + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + + // hex colors + HEX_COLOR, + + // class tag + { + begin: '\\.[a-zA-Z][a-zA-Z0-9_-]*' + LOOKAHEAD_TAG_END, + className: 'selector-class' + }, + + // id tag + { + begin: '\\#[a-zA-Z][a-zA-Z0-9_-]*' + LOOKAHEAD_TAG_END, + className: 'selector-id' + }, + + // tags + { + begin: '\\b(' + TAGS.join('|') + ')' + LOOKAHEAD_TAG_END, + className: 'selector-tag' + }, + + // psuedo selectors + { + begin: '&?:?:\\b(' + PSEUDO_SELECTORS.join('|') + ')' + LOOKAHEAD_TAG_END + }, + + // @ keywords + { + begin: '\@(' + AT_KEYWORDS.join('|') + ')\\b' + }, + + // variables + VARIABLE, + + // dimension + hljs.CSS_NUMBER_MODE, + + // number + hljs.NUMBER_MODE, + + // functions + // - only from beginning of line + whitespace + { + className: 'function', + begin: '^[a-zA-Z][a-zA-Z0-9_\-]*\\(.*\\)', + illegal: '[\\n]', + returnBegin: true, + contains: [ + {className: 'title', begin: '\\b[a-zA-Z][a-zA-Z0-9_\-]*'}, + { + className: 'params', + begin: /\(/, + end: /\)/, + contains: [ + HEX_COLOR, + VARIABLE, + hljs.APOS_STRING_MODE, + hljs.CSS_NUMBER_MODE, + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE + ] + } + ] + }, + + // attributes + // - only from beginning of line + whitespace + // - must have whitespace after it + { + className: 'attribute', + begin: '\\b(' + ATTRIBUTES.reverse().join('|') + ')\\b', + starts: { + // value container + end: /;|$/, + contains: [ + HEX_COLOR, + VARIABLE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.CSS_NUMBER_MODE, + hljs.NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE + ], + illegal: /\./, + relevance: 0 + } + } + ] + }; +} + +module.exports = stylus; diff --git a/node_modules/highlight.js/lib/languages/subunit.js b/node_modules/highlight.js/lib/languages/subunit.js @@ -0,0 +1,42 @@ +/* +Language: SubUnit +Author: Sergey Bronnikov <sergeyb@bronevichok.ru> +Website: https://pypi.org/project/python-subunit/ +*/ + +function subunit(hljs) { + var DETAILS = { + className: 'string', + begin: '\\[\n(multipart)?', end: '\\]\n' + }; + var TIME = { + className: 'string', + begin: '\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}\.\\d+Z' + }; + var PROGRESSVALUE = { + className: 'string', + begin: '(\\+|-)\\d+' + }; + var KEYWORDS = { + className: 'keyword', + relevance: 10, + variants: [ + { begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?' }, + { begin: '^progress(:?)(\\s+)?(pop|push)?' }, + { begin: '^tags:' }, + { begin: '^time:' } + ], + }; + return { + name: 'SubUnit', + case_insensitive: true, + contains: [ + DETAILS, + TIME, + PROGRESSVALUE, + KEYWORDS + ] + }; +} + +module.exports = subunit; diff --git a/node_modules/highlight.js/lib/languages/swift.js b/node_modules/highlight.js/lib/languages/swift.js @@ -0,0 +1,143 @@ +/* +Language: Swift +Description: Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns. +Author: Chris Eidhof <chris@eidhof.nl> +Contributors: Nate Cook <natecook@gmail.com>, Alexander Lichter <manniL@gmx.net> +Website: https://swift.org +Category: common, system +*/ + + +function swift(hljs) { + var SWIFT_KEYWORDS = { + keyword: '#available #colorLiteral #column #else #elseif #endif #file ' + + '#fileLiteral #function #if #imageLiteral #line #selector #sourceLocation ' + + '_ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype ' + + 'associativity break case catch class continue convenience default defer deinit didSet do ' + + 'dynamic dynamicType else enum extension fallthrough false fileprivate final for func ' + + 'get guard if import in indirect infix init inout internal is lazy left let ' + + 'mutating nil none nonmutating open operator optional override postfix precedence ' + + 'prefix private protocol Protocol public repeat required rethrows return ' + + 'right self Self set static struct subscript super switch throw throws true ' + + 'try try! try? Type typealias unowned var weak where while willSet', + literal: 'true false nil', + built_in: 'abs advance alignof alignofValue anyGenerator assert assertionFailure ' + + 'bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' + + 'bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros ' + + 'debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords ' + + 'enumerate equal fatalError filter find getBridgedObjectiveCType getVaList ' + + 'indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC ' + + 'isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare ' + + 'map max maxElement min minElement numericCast overlaps partition posix ' + + 'precondition preconditionFailure print println quickSort readLine reduce reflect ' + + 'reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split ' + + 'startsWith stride strideof strideofValue swap toString transcode ' + + 'underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap ' + + 'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' + + 'withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers ' + + 'withUnsafePointer withUnsafePointers withVaList zip' + }; + + var TYPE = { + className: 'type', + begin: '\\b[A-Z][\\w\u00C0-\u02B8\']*', + relevance: 0 + }; + // slightly more special to swift + var OPTIONAL_USING_TYPE = { + className: 'type', + begin: '\\b[A-Z][\\w\u00C0-\u02B8\']*[!?]' + }; + var BLOCK_COMMENT = hljs.COMMENT( + '/\\*', + '\\*/', + { + contains: ['self'] + } + ); + var SUBST = { + className: 'subst', + begin: /\\\(/, end: '\\)', + keywords: SWIFT_KEYWORDS, + contains: [] // assigned later + }; + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE, SUBST], + variants: [ + {begin: /"""/, end: /"""/}, + {begin: /"/, end: /"/}, + ] + }; + var NUMBERS = { + className: 'number', + begin: '\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b', + relevance: 0 + }; + SUBST.contains = [NUMBERS]; + + return { + name: 'Swift', + keywords: SWIFT_KEYWORDS, + contains: [ + STRING, + hljs.C_LINE_COMMENT_MODE, + BLOCK_COMMENT, + OPTIONAL_USING_TYPE, + TYPE, + NUMBERS, + { + className: 'function', + beginKeywords: 'func', end: '{', excludeEnd: true, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + begin: /[A-Za-z$_][0-9A-Za-z$_]*/ + }), + { + begin: /</, end: />/ + }, + { + className: 'params', + begin: /\(/, end: /\)/, endsParent: true, + keywords: SWIFT_KEYWORDS, + contains: [ + 'self', + NUMBERS, + STRING, + hljs.C_BLOCK_COMMENT_MODE, + {begin: ':'} // relevance booster + ], + illegal: /["']/ + } + ], + illegal: /\[|%/ + }, + { + className: 'class', + beginKeywords: 'struct protocol class extension enum', + keywords: SWIFT_KEYWORDS, + end: '\\{', + excludeEnd: true, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}) + ] + }, + { + className: 'meta', // @attributes + begin: '(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|' + + '@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|' + + '@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' + + '@infix|@prefix|@postfix|@autoclosure|@testable|@available|' + + '@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|' + + '@propertyWrapper)\\b' + + }, + { + beginKeywords: 'import', end: /$/, + contains: [hljs.C_LINE_COMMENT_MODE, BLOCK_COMMENT] + } + ] + }; +} + +module.exports = swift; diff --git a/node_modules/highlight.js/lib/languages/taggerscript.js b/node_modules/highlight.js/lib/languages/taggerscript.js @@ -0,0 +1,52 @@ +/* +Language: Tagger Script +Author: Philipp Wolfer <ph.wolfer@gmail.com> +Description: Syntax Highlighting for the Tagger Script as used by MusicBrainz Picard. +Website: https://picard.musicbrainz.org + */ +function taggerscript(hljs) { + + var COMMENT = { + className: 'comment', + begin: /\$noop\(/, + end: /\)/, + contains: [{ + begin: /\(/, + end: /\)/, + contains: ['self', { + begin: /\\./ + }] + }], + relevance: 10 + }; + + var FUNCTION = { + className: 'keyword', + begin: /\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/, + end: /\(/, + excludeEnd: true + }; + + var VARIABLE = { + className: 'variable', + begin: /%[_a-zA-Z0-9:]*/, + end: '%' + }; + + var ESCAPE_SEQUENCE = { + className: 'symbol', + begin: /\\./ + }; + + return { + name: 'Tagger Script', + contains: [ + COMMENT, + FUNCTION, + VARIABLE, + ESCAPE_SEQUENCE + ] + }; +} + +module.exports = taggerscript; diff --git a/node_modules/highlight.js/lib/languages/tap.js b/node_modules/highlight.js/lib/languages/tap.js @@ -0,0 +1,46 @@ +/* +Language: Test Anything Protocol +Description: TAP, the Test Anything Protocol, is a simple text-based interface between testing modules in a test harness. +Requires: yaml.js +Author: Sergey Bronnikov <sergeyb@bronevichok.ru> +Website: https://testanything.org +*/ + +function tap(hljs) { + return { + name: 'Test Anything Protocol', + case_insensitive: true, + contains: [ + hljs.HASH_COMMENT_MODE, + // version of format and total amount of testcases + { + className: 'meta', + variants: [ + { begin: '^TAP version (\\d+)$' }, + { begin: '^1\\.\\.(\\d+)$' } + ], + }, + // YAML block + { + begin: '(\s+)?---$', end: '\\.\\.\\.$', + subLanguage: 'yaml', + relevance: 0 + }, + // testcase number + { + className: 'number', + begin: ' (\\d+) ' + }, + // testcase status and description + { + className: 'symbol', + variants: [ + { begin: '^ok' }, + { begin: '^not ok' } + ], + }, + ] + }; +} + +module.exports = tap; diff --git a/node_modules/highlight.js/lib/languages/tcl.js b/node_modules/highlight.js/lib/languages/tcl.js @@ -0,0 +1,69 @@ +/* +Language: Tcl +Description: Tcl is a very simple programming language. +Author: Radek Liska <radekliska@gmail.com> +Website: https://www.tcl.tk/about/language.html +*/ + +function tcl(hljs) { + return { + name: 'Tcl', + aliases: ['tk'], + keywords: 'after append apply array auto_execok auto_import auto_load auto_mkindex ' + + 'auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock ' + + 'close concat continue dde dict encoding eof error eval exec exit expr fblocked ' + + 'fconfigure fcopy file fileevent filename flush for foreach format gets glob global ' + + 'history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list ' + + 'llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 '+ + 'mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex '+ + 'platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename '+ + 'return safe scan seek set socket source split string subst switch tcl_endOfWord '+ + 'tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter '+ + 'tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update '+ + 'uplevel upvar variable vwait while', + contains: [ + hljs.COMMENT(';[ \\t]*#', '$'), + hljs.COMMENT('^[ \\t]*#', '$'), + { + beginKeywords: 'proc', + end: '[\\{]', + excludeEnd: true, + contains: [ + { + className: 'title', + begin: '[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*', + end: '[ \\t\\n\\r]', + endsWithParent: true, + excludeEnd: true + } + ] + }, + { + excludeEnd: true, + variants: [ + { + begin: '\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)', + end: '[^a-zA-Z0-9_\\}\\$]' + }, + { + begin: '\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*', + end: '(\\))?[^a-zA-Z0-9_\\}\\$]' + } + ] + }, + { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}) + ] + }, + { + className: 'number', + variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE] + } + ] + } +} + +module.exports = tcl; diff --git a/node_modules/highlight.js/lib/languages/thrift.js b/node_modules/highlight.js/lib/languages/thrift.js @@ -0,0 +1,45 @@ +/* +Language: Thrift +Author: Oleg Efimov <efimovov@gmail.com> +Description: Thrift message definition format +Website: https://thrift.apache.org +Category: protocols +*/ + +function thrift(hljs) { + var BUILT_IN_TYPES = 'bool byte i16 i32 i64 double string binary'; + return { + name: 'Thrift', + keywords: { + keyword: + 'namespace const typedef struct enum service exception void oneway set list map required optional', + built_in: + BUILT_IN_TYPES, + literal: + 'true false' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'class', + beginKeywords: 'struct enum service exception', end: /\{/, + illegal: /\n/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title + }) + ] + }, + { + begin: '\\b(set|list|map)\\s*<', end: '>', + keywords: BUILT_IN_TYPES, + contains: ['self'] + } + ] + }; +} + +module.exports = thrift; diff --git a/node_modules/highlight.js/lib/languages/tp.js b/node_modules/highlight.js/lib/languages/tp.js @@ -0,0 +1,93 @@ +/* +Language: TP +Author: Jay Strybis <jay.strybis@gmail.com> +Description: FANUC TP programming language (TPP). +*/ + + +function tp(hljs) { + var TPID = { + className: 'number', + begin: '[1-9][0-9]*', /* no leading zeros */ + relevance: 0 + }; + var TPLABEL = { + className: 'symbol', + begin: ':[^\\]]+' + }; + var TPDATA = { + className: 'built_in', + begin: '(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|' + + 'TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[', end: '\\]', + contains: [ + 'self', + TPID, + TPLABEL + ] + }; + var TPIO = { + className: 'built_in', + begin: '(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[', end: '\\]', + contains: [ + 'self', + TPID, + hljs.QUOTE_STRING_MODE, /* for pos section at bottom */ + TPLABEL + ] + }; + + return { + name: 'TP', + keywords: { + keyword: + 'ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB ' + + 'DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC ' + + 'IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE ' + + 'PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET ' + + 'Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN ' + + 'SUBSTR FINDSTR VOFFSET PROG ATTR MN POS', + literal: + 'ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET' + }, + contains: [ + TPDATA, + TPIO, + { + className: 'keyword', + begin: '/(PROG|ATTR|MN|POS|END)\\b' + }, + { + /* this is for cases like ,CALL */ + className: 'keyword', + begin: '(CALL|RUN|POINT_LOGIC|LBL)\\b' + }, + { + /* this is for cases like CNT100 where the default lexemes do not + * separate the keyword and the number */ + className: 'keyword', + begin: '\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)' + }, + { + /* to catch numbers that do not have a word boundary on the left */ + className: 'number', + begin: '\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b', + relevance: 0 + }, + hljs.COMMENT('//', '[;$]'), + hljs.COMMENT('!', '[;$]'), + hljs.COMMENT('--eg:', '$'), + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '\'', end: '\'' + }, + hljs.C_NUMBER_MODE, + { + className: 'variable', + begin: '\\$[A-Za-z0-9_]+' + } + ] + }; +} + +module.exports = tp; diff --git a/node_modules/highlight.js/lib/languages/twig.js b/node_modules/highlight.js/lib/languages/twig.js @@ -0,0 +1,77 @@ +/* +Language: Twig +Requires: xml.js +Author: Luke Holder <lukemh@gmail.com> +Description: Twig is a templating language for PHP +Website: https://twig.symfony.com +Category: template +*/ + +function twig(hljs) { + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)' + }; + + var FUNCTION_NAMES = 'attribute block constant cycle date dump include ' + + 'max min parent random range source template_from_string'; + + var FUNCTIONS = { + beginKeywords: FUNCTION_NAMES, + keywords: {name: FUNCTION_NAMES}, + relevance: 0, + contains: [ + PARAMS + ] + }; + + var FILTER = { + begin: /\|[A-Za-z_]+:?/, + keywords: + 'abs batch capitalize column convert_encoding date date_modify default ' + + 'escape filter first format inky_to_html inline_css join json_encode keys last ' + + 'length lower map markdown merge nl2br number_format raw reduce replace ' + + 'reverse round slice sort spaceless split striptags title trim upper url_encode', + contains: [ + FUNCTIONS + ] + }; + + var TAGS = 'apply autoescape block deprecated do embed extends filter flush for from ' + + 'if import include macro sandbox set use verbatim with'; + + TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' '); + + return { + name: 'Twig', + aliases: ['craftcms'], + case_insensitive: true, + subLanguage: 'xml', + contains: [ + hljs.COMMENT(/\{#/, /#}/), + { + className: 'template-tag', + begin: /\{%/, end: /%}/, + contains: [ + { + className: 'name', + begin: /\w+/, + keywords: TAGS, + starts: { + endsWithParent: true, + contains: [FILTER, FUNCTIONS], + relevance: 0 + } + } + ] + }, + { + className: 'template-variable', + begin: /\{\{/, end: /}}/, + contains: ['self', FILTER, FUNCTIONS] + } + ] + }; +} + +module.exports = twig; diff --git a/node_modules/highlight.js/lib/languages/typescript.js b/node_modules/highlight.js/lib/languages/typescript.js @@ -0,0 +1,368 @@ +const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; +const KEYWORDS = [ + "as", // for exports + "in", + "of", + "if", + "for", + "while", + "finally", + "var", + "new", + "function", + "do", + "return", + "void", + "else", + "break", + "catch", + "instanceof", + "with", + "throw", + "case", + "default", + "try", + "switch", + "continue", + "typeof", + "delete", + "let", + "yield", + "const", + "class", + // JS handles these with a special rule + // "get", + // "set", + "debugger", + "async", + "await", + "static", + "import", + "from", + "export", + "extends" +]; +const LITERALS = [ + "true", + "false", + "null", + "undefined", + "NaN", + "Infinity" +]; + +const TYPES = [ + "Intl", + "DataView", + "Number", + "Math", + "Date", + "String", + "RegExp", + "Object", + "Function", + "Boolean", + "Error", + "Symbol", + "Set", + "Map", + "WeakSet", + "WeakMap", + "Proxy", + "Reflect", + "JSON", + "Promise", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Float32Array", + "Array", + "Uint8Array", + "Uint8ClampedArray", + "ArrayBuffer" +]; + +const ERROR_TYPES = [ + "EvalError", + "InternalError", + "RangeError", + "ReferenceError", + "SyntaxError", + "TypeError", + "URIError" +]; + +const BUILT_IN_GLOBALS = [ + "setInterval", + "setTimeout", + "clearInterval", + "clearTimeout", + + "require", + "exports", + + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "unescape" +]; + +const BUILT_IN_VARIABLES = [ + "arguments", + "this", + "super", + "console", + "window", + "document", + "localStorage", + "module", + "global" // Node.js +]; + +const BUILT_INS = [].concat( + BUILT_IN_GLOBALS, + BUILT_IN_VARIABLES, + TYPES, + ERROR_TYPES +); + +/* +Language: TypeScript +Author: Panu Horsmalahti <panu.horsmalahti@iki.fi> +Contributors: Ike Ku <dempfi@yahoo.com> +Description: TypeScript is a strict superset of JavaScript +Website: https://www.typescriptlang.org +Category: common, scripting +*/ + +function typescript(hljs) { + var IDENT_RE$1 = IDENT_RE; + var TYPES = [ + "any", + "void", + "number", + "boolean", + "string", + "object", + "never", + "enum" + ]; + var TS_SPECIFIC_KEYWORDS = [ + "type", + "namespace", + "typedef", + "interface", + "public", + "private", + "protected", + "implements", + "declare", + "abstract", + "readonly" + ]; + var KEYWORDS$1 = { + $pattern: IDENT_RE, + keyword: KEYWORDS.concat(TS_SPECIFIC_KEYWORDS).join(" "), + literal: LITERALS.join(" "), + built_in: BUILT_INS.concat(TYPES).join(" ") + }; + var DECORATOR = { + className: 'meta', + begin: '@' + IDENT_RE$1, + }; + var NUMBER = { + className: 'number', + variants: [ + { begin: '\\b(0[bB][01]+)n?' }, + { begin: '\\b(0[oO][0-7]+)n?' }, + { begin: hljs.C_NUMBER_RE + 'n?' } + ], + relevance: 0 + }; + var SUBST = { + className: 'subst', + begin: '\\$\\{', end: '\\}', + keywords: KEYWORDS$1, + contains: [] // defined later + }; + var HTML_TEMPLATE = { + begin: 'html`', end: '', + starts: { + end: '`', returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: 'xml', + } + }; + var CSS_TEMPLATE = { + begin: 'css`', end: '', + starts: { + end: '`', returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: 'css', + } + }; + var TEMPLATE_STRING = { + className: 'string', + begin: '`', end: '`', + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ] + }; + SUBST.contains = [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + TEMPLATE_STRING, + NUMBER, + hljs.REGEXP_MODE + ]; + var ARGUMENTS = + { + begin: '\\(', + end: /\)/, + keywords: KEYWORDS$1, + contains: [ + 'self', + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.NUMBER_MODE + ] + }; + var PARAMS = { + className: 'params', + begin: /\(/, end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS$1, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + DECORATOR, + ARGUMENTS + ] + }; + + return { + name: 'TypeScript', + aliases: ['ts'], + keywords: KEYWORDS$1, + contains: [ + hljs.SHEBANG(), + { + className: 'meta', + begin: /^\s*['"]use strict['"]/ + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + TEMPLATE_STRING, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + NUMBER, + { // "value" container + begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*', + keywords: 'return throw case', + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.REGEXP_MODE, + { + className: 'function', + // we have to count the parens to make sure we actually have the + // correct bounding ( ) before the =>. There could be any number of + // sub-expressions inside also surrounded by parens. + begin: '(\\([^(]*' + + '(\\([^(]*' + + '(\\([^(]*' + + '\\))?' + + '\\))?' + + '\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>', returnBegin: true, + end: '\\s*=>', + contains: [ + { + className: 'params', + variants: [ + { + begin: hljs.UNDERSCORE_IDENT_RE + }, + { + className: null, + begin: /\(\s*\)/, + skip: true + }, + { + begin: /\(/, end: /\)/, + excludeBegin: true, excludeEnd: true, + keywords: KEYWORDS$1, + contains: ARGUMENTS.contains + } + ] + } + ] + } + ], + relevance: 0 + }, + { + className: 'function', + beginKeywords: 'function', end: /[\{;]/, excludeEnd: true, + keywords: KEYWORDS$1, + contains: [ + 'self', + hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }), + PARAMS + ], + illegal: /%/, + relevance: 0 // () => {} is more typical in TypeScript + }, + { + beginKeywords: 'constructor', end: /[\{;]/, excludeEnd: true, + contains: [ + 'self', + PARAMS + ] + }, + { // prevent references like module.id from being highlighted as module definitions + begin: /module\./, + keywords: { built_in: 'module' }, + relevance: 0 + }, + { + beginKeywords: 'module', end: /\{/, excludeEnd: true + }, + { + beginKeywords: 'interface', end: /\{/, excludeEnd: true, + keywords: 'interface extends' + }, + { + begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` + }, + { + begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots + }, + DECORATOR, + ARGUMENTS + ] + }; +} + +module.exports = typescript; diff --git a/node_modules/highlight.js/lib/languages/vala.js b/node_modules/highlight.js/lib/languages/vala.js @@ -0,0 +1,59 @@ +/* +Language: Vala +Author: Antono Vasiljev <antono.vasiljev@gmail.com> +Description: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C. +Website: https://wiki.gnome.org/Projects/Vala +*/ + +function vala(hljs) { + return { + name: 'Vala', + keywords: { + keyword: + // Value types + 'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 ' + + 'uint16 uint32 uint64 float double bool struct enum string void ' + + // Reference types + 'weak unowned owned ' + + // Modifiers + 'async signal static abstract interface override virtual delegate ' + + // Control Structures + 'if while do for foreach else switch case break default return try catch ' + + // Visibility + 'public private protected internal ' + + // Other + 'using new this get set const stdout stdin stderr var', + built_in: + 'DBus GLib CCode Gee Object Gtk Posix', + literal: + 'false true null' + }, + contains: [ + { + className: 'class', + beginKeywords: 'class interface namespace', end: '{', excludeEnd: true, + illegal: '[^,:\\n\\s\\.]', + contains: [ + hljs.UNDERSCORE_TITLE_MODE + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'string', + begin: '"""', end: '"""', + relevance: 5 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'meta', + begin: '^#', end: '$', + relevance: 2 + } + ] + }; +} + +module.exports = vala; diff --git a/node_modules/highlight.js/lib/languages/vbnet.js b/node_modules/highlight.js/lib/languages/vbnet.js @@ -0,0 +1,65 @@ +/* +Language: Visual Basic .NET +Description: Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework. +Author: Poren Chiang <ren.chiang@gmail.com> +Website: https://docs.microsoft.com/en-us/dotnet/visual-basic/getting-started/ +*/ + +function vbnet(hljs) { + return { + name: 'Visual Basic .NET', + aliases: ['vb'], + case_insensitive: true, + keywords: { + keyword: + 'addhandler addressof alias and andalso aggregate ansi as async assembly auto await binary by byref byval ' + /* a-b */ + 'call case catch class compare const continue custom declare default delegate dim distinct do ' + /* c-d */ + 'each equals else elseif end enum erase error event exit explicit finally for friend from function ' + /* e-f */ + 'get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue iterator ' + /* g-i */ + 'join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass ' + /* j-m */ + 'nameof namespace narrowing new next not notinheritable notoverridable ' + /* n */ + 'of off on operator option optional or order orelse overloads overridable overrides ' + /* o */ + 'paramarray partial preserve private property protected public ' + /* p */ + 'raiseevent readonly redim rem removehandler resume return ' + /* r */ + 'select set shadows shared skip static step stop structure strict sub synclock ' + /* s */ + 'take text then throw to try unicode until using when where while widening with withevents writeonly xor yield', /* t-y */ + built_in: + 'boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype ' + /* b-c */ + 'date decimal directcast double gettype getxmlnamespace iif integer long object ' + /* d-o */ + 'sbyte short single string trycast typeof uinteger ulong ushort', /* s-u */ + literal: + 'true false nothing' + }, + illegal: '//|{|}|endif|gosub|variant|wend|^\\$ ', /* reserved deprecated keywords */ + contains: [ + hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}), + hljs.COMMENT( + '\'', + '$', + { + returnBegin: true, + contains: [ + { + className: 'doctag', + begin: '\'\'\'|<!--|-->', + contains: [hljs.PHRASAL_WORDS_MODE] + }, + { + className: 'doctag', + begin: '</?', end: '>', + contains: [hljs.PHRASAL_WORDS_MODE] + } + ] + } + ), + hljs.C_NUMBER_MODE, + { + className: 'meta', + begin: '#', end: '$', + keywords: {'meta-keyword': 'if else elseif end region externalsource'} + } + ] + }; +} + +module.exports = vbnet; diff --git a/node_modules/highlight.js/lib/languages/vbscript-html.js b/node_modules/highlight.js/lib/languages/vbscript-html.js @@ -0,0 +1,23 @@ +/* +Language: VBScript in HTML +Requires: xml.js, vbscript.js +Author: Ivan Sagalaev <maniac@softwaremaniacs.org> +Description: "Bridge" language defining fragments of VBScript in HTML within <% .. %> +Website: https://en.wikipedia.org/wiki/VBScript +Category: scripting +*/ + +function vbscriptHtml(hljs) { + return { + name: 'VBScript in HTML', + subLanguage: 'xml', + contains: [ + { + begin: '<%', end: '%>', + subLanguage: 'vbscript' + } + ] + }; +} + +module.exports = vbscriptHtml; diff --git a/node_modules/highlight.js/lib/languages/vbscript.js b/node_modules/highlight.js/lib/languages/vbscript.js @@ -0,0 +1,50 @@ +/* +Language: VBScript +Description: VBScript ("Microsoft Visual Basic Scripting Edition") is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. +Author: Nikita Ledyaev <lenikita@yandex.ru> +Contributors: Michal Gabrukiewicz <mgabru@gmail.com> +Website: https://en.wikipedia.org/wiki/VBScript +Category: scripting +*/ + +function vbscript(hljs) { + return { + name: 'VBScript', + aliases: ['vbs'], + case_insensitive: true, + keywords: { + keyword: + 'call class const dim do loop erase execute executeglobal exit for each next function ' + + 'if then else on error option explicit new private property let get public randomize ' + + 'redim rem select case set stop sub while wend with end to elseif is or xor and not ' + + 'class_initialize class_terminate default preserve in me byval byref step resume goto', + built_in: + 'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' + + 'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' + + 'conversions csng timevalue second year space abs clng timeserial fixs len asc ' + + 'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' + + 'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' + + 'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' + + 'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' + + 'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' + + 'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' + + 'chrw regexp server response request cstr err', + literal: + 'true false null nothing empty' + }, + illegal: '//', + contains: [ + hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}), + hljs.COMMENT( + /'/, + /$/, + { + relevance: 0 + } + ), + hljs.C_NUMBER_MODE + ] + }; +} + +module.exports = vbscript; diff --git a/node_modules/highlight.js/lib/languages/verilog.js b/node_modules/highlight.js/lib/languages/verilog.js @@ -0,0 +1,110 @@ +/* +Language: Verilog +Author: Jon Evans <jon@craftyjon.com> +Contributors: Boone Severson <boone.severson@gmail.com> +Description: Verilog is a hardware description language used in electronic design automation to describe digital and mixed-signal systems. This highlighter supports Verilog and SystemVerilog through IEEE 1800-2012. +Website: http://www.verilog.com +*/ + +function verilog(hljs) { + var SV_KEYWORDS = { + $pattern: /[\w\$]+/, + keyword: + 'accept_on alias always always_comb always_ff always_latch and assert assign ' + + 'assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 ' + + 'byte case casex casez cell chandle checker class clocking cmos config const ' + + 'constraint context continue cover covergroup coverpoint cross deassign default ' + + 'defparam design disable dist do edge else end endcase endchecker endclass ' + + 'endclocking endconfig endfunction endgenerate endgroup endinterface endmodule ' + + 'endpackage endprimitive endprogram endproperty endspecify endsequence endtable ' + + 'endtask enum event eventually expect export extends extern final first_match for ' + + 'force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 ' + + 'if iff ifnone ignore_bins illegal_bins implements implies import incdir include ' + + 'initial inout input inside instance int integer interconnect interface intersect ' + + 'join join_any join_none large let liblist library local localparam logic longint ' + + 'macromodule matches medium modport module nand negedge nettype new nexttime nmos ' + + 'nor noshowcancelled not notif0 notif1 or output package packed parameter pmos ' + + 'posedge primitive priority program property protected pull0 pull1 pulldown pullup ' + + 'pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos ' + + 'real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran ' + + 'rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared ' + + 'sequence shortint shortreal showcancelled signed small soft solve specify specparam ' + + 'static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on ' + + 'sync_reject_on table tagged task this throughout time timeprecision timeunit tran ' + + 'tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 ' + + 'unsigned until until_with untyped use uwire var vectored virtual void wait wait_order ' + + 'wand weak weak0 weak1 while wildcard wire with within wor xnor xor', + literal: + 'null', + built_in: + '$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale ' + + '$bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat ' + + '$realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson ' + + '$assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff ' + + '$assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk ' + + '$fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control ' + + '$coverage_get $coverage_save $set_coverage_db_name $rose $stable $past ' + + '$rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display ' + + '$coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename ' + + '$unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow ' + + '$floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning ' + + '$dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh ' + + '$tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random ' + + '$dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson ' + + '$dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array ' + + '$async$nand$array $async$or$array $async$nor$array $sync$and$array ' + + '$sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf ' + + '$async$and$plane $async$nand$plane $async$or$plane $async$nor$plane ' + + '$sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system ' + + '$display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo ' + + '$write $readmemb $readmemh $writememh $value$plusargs ' + + '$dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit ' + + '$writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb ' + + '$dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall ' + + '$dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo ' + + '$fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh ' + + '$swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb ' + + '$fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat ' + + '$sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror' + }; + return { + name: 'Verilog', + aliases: ['v', 'sv', 'svh'], + case_insensitive: false, + keywords: SV_KEYWORDS, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'number', + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + {begin: '\\b((\\d+\'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)'}, + {begin: '\\B((\'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)'}, + {begin: '\\b([0-9_])+', relevance: 0} + ] + }, + /* parameters to instances */ + { + className: 'variable', + variants: [ + {begin: '#\\((?!parameter).+\\)'}, + {begin: '\\.\\w+', relevance: 0}, + ] + }, + { + className: 'meta', + begin: '`', end: '$', + keywords: {'meta-keyword': 'define __FILE__ ' + + '__LINE__ begin_keywords celldefine default_nettype define ' + + 'else elsif end_keywords endcelldefine endif ifdef ifndef ' + + 'include line nounconnected_drive pragma resetall timescale ' + + 'unconnected_drive undef undefineall'}, + relevance: 0 + } + ] + }; // return +} + +module.exports = verilog; diff --git a/node_modules/highlight.js/lib/languages/vhdl.js b/node_modules/highlight.js/lib/languages/vhdl.js @@ -0,0 +1,71 @@ +/* +Language: VHDL +Author: Igor Kalnitsky <igor@kalnitsky.org> +Contributors: Daniel C.K. Kho <daniel.kho@tauhop.com>, Guillaume Savaton <guillaume.savaton@eseo.fr> +Description: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems. +Website: https://en.wikipedia.org/wiki/VHDL +*/ + +function vhdl(hljs) { + // Regular expression for VHDL numeric literals. + + // Decimal literal: + var INTEGER_RE = '\\d(_|\\d)*'; + var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE; + var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?'; + // Based literal: + var BASED_INTEGER_RE = '\\w+'; + var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?'; + + var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')'; + + return { + name: 'VHDL', + case_insensitive: true, + keywords: { + keyword: + 'abs access after alias all and architecture array assert assume assume_guarantee attribute ' + + 'begin block body buffer bus case component configuration constant context cover disconnect ' + + 'downto default else elsif end entity exit fairness file for force function generate ' + + 'generic group guarded if impure in inertial inout is label library linkage literal ' + + 'loop map mod nand new next nor not null of on open or others out package parameter port ' + + 'postponed procedure process property protected pure range record register reject ' + + 'release rem report restrict restrict_guarantee return rol ror select sequence ' + + 'severity shared signal sla sll sra srl strong subtype then to transport type ' + + 'unaffected units until use variable view vmode vprop vunit wait when while with xnor xor', + built_in: + 'boolean bit character ' + + 'integer time delay_length natural positive ' + + 'string bit_vector file_open_kind file_open_status ' + + 'std_logic std_logic_vector unsigned signed boolean_vector integer_vector ' + + 'std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signed ' + + 'real_vector time_vector', + literal: + 'false true note warning error failure ' + // severity_level + 'line text side width' // textio + }, + illegal: '{', + contains: [ + hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting. + hljs.COMMENT('--', '$'), + hljs.QUOTE_STRING_MODE, + { + className: 'number', + begin: NUMBER_RE, + relevance: 0 + }, + { + className: 'string', + begin: '\'(U|X|0|1|Z|W|L|H|-)\'', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + className: 'symbol', + begin: '\'[A-Za-z](_?[A-Za-z0-9])*', + contains: [hljs.BACKSLASH_ESCAPE] + } + ] + }; +} + +module.exports = vhdl; diff --git a/node_modules/highlight.js/lib/languages/vim.js b/node_modules/highlight.js/lib/languages/vim.js @@ -0,0 +1,120 @@ +/* +Language: Vim Script +Author: Jun Yang <yangjvn@126.com> +Description: full keyword and built-in from http://vimdoc.sourceforge.net/htmldoc/ +Website: https://www.vim.org +Category: scripting +*/ + +function vim(hljs) { + return { + name: 'Vim Script', + keywords: { + $pattern: /[!#@\w]+/, + keyword: + // express version except: ! & * < = > !! # @ @@ + 'N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope '+ + 'cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc '+ + 'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 '+ + 'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+ + 'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+ + 'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+ + // full version + 'Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload '+ + 'bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap '+ + 'cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor '+ + 'endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap '+ + 'imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview '+ + 'lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap '+ + 'nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext '+ + 'ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding '+ + 'scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace '+ + 'startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious '+'trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew '+ + 'vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank', + built_in: //built in func + 'synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv ' + + 'complete_check add getwinposx getqflist getwinposy screencol ' + + 'clearmatches empty extend getcmdpos mzeval garbagecollect setreg ' + + 'ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable ' + + 'shiftwidth max sinh isdirectory synID system inputrestore winline ' + + 'atan visualmode inputlist tabpagewinnr round getregtype mapcheck ' + + 'hasmapto histdel argidx findfile sha256 exists toupper getcmdline ' + + 'taglist string getmatches bufnr strftime winwidth bufexists ' + + 'strtrans tabpagebuflist setcmdpos remote_read printf setloclist ' + + 'getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval ' + + 'resolve libcallnr foldclosedend reverse filter has_key bufname ' + + 'str2float strlen setline getcharmod setbufvar index searchpos ' + + 'shellescape undofile foldclosed setqflist buflisted strchars str2nr ' + + 'virtcol floor remove undotree remote_expr winheight gettabwinvar ' + + 'reltime cursor tabpagenr finddir localtime acos getloclist search ' + + 'tanh matchend rename gettabvar strdisplaywidth type abs py3eval ' + + 'setwinvar tolower wildmenumode log10 spellsuggest bufloaded ' + + 'synconcealed nextnonblank server2client complete settabwinvar ' + + 'executable input wincol setmatches getftype hlID inputsave ' + + 'searchpair or screenrow line settabvar histadd deepcopy strpart ' + + 'remote_peek and eval getftime submatch screenchar winsaveview ' + + 'matchadd mkdir screenattr getfontname libcall reltimestr getfsize ' + + 'winnr invert pow getbufline byte2line soundfold repeat fnameescape ' + + 'tagfiles sin strwidth spellbadword trunc maparg log lispindent ' + + 'hostname setpos globpath remote_foreground getchar synIDattr ' + + 'fnamemodify cscope_connection stridx winbufnr indent min ' + + 'complete_add nr2char searchpairpos inputdialog values matchlist ' + + 'items hlexists strridx browsedir expand fmod pathshorten line2byte ' + + 'argc count getwinvar glob foldtextresult getreg foreground cosh ' + + 'matchdelete has char2nr simplify histget searchdecl iconv ' + + 'winrestcmd pumvisible writefile foldlevel haslocaldir keys cos ' + + 'matchstr foldtext histnr tan tempname getcwd byteidx getbufvar ' + + 'islocked escape eventhandler remote_send serverlist winrestview ' + + 'synstack pyeval prevnonblank readfile cindent filereadable changenr ' + + 'exp' + }, + illegal: /;/, + contains: [ + hljs.NUMBER_MODE, + { + className: 'string', + begin: '\'', end: '\'', + illegal: '\\n' + }, + + /* + A double quote can start either a string or a line comment. Strings are + ended before the end of a line by another double quote and can contain + escaped double-quotes and post-escaped line breaks. + + Also, any double quote at the beginning of a line is a comment but we + don't handle that properly at the moment: any double quote inside will + turn them into a string. Handling it properly will require a smarter + parser. + */ + { + className: 'string', + begin: /"(\\"|\n\\|[^"\n])*"/ + }, + hljs.COMMENT('"', '$'), + + { + className: 'variable', + begin: /[bwtglsav]:[\w\d_]*/ + }, + { + className: 'function', + beginKeywords: 'function function!', end: '$', + relevance: 0, + contains: [ + hljs.TITLE_MODE, + { + className: 'params', + begin: '\\(', end: '\\)' + } + ] + }, + { + className: 'symbol', + begin: /<[\w-]+>/ + } + ] + }; +} + +module.exports = vim; diff --git a/node_modules/highlight.js/lib/languages/x86asm.js b/node_modules/highlight.js/lib/languages/x86asm.js @@ -0,0 +1,146 @@ +/* +Language: Intel x86 Assembly +Author: innocenat <innocenat@gmail.com> +Description: x86 assembly language using Intel's mnemonic and NASM syntax +Website: https://en.wikipedia.org/wiki/X86_assembly_language +Category: assembler +*/ + +function x86asm(hljs) { + return { + name: 'Intel x86 Assembly', + case_insensitive: true, + keywords: { + $pattern: '[.%]?' + hljs.IDENT_RE, + keyword: + 'lock rep repe repz repne repnz xaquire xrelease bnd nobnd ' + + 'aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63', + built_in: + // Instruction pointer + 'ip eip rip ' + + // 8-bit registers + 'al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ' + + // 16-bit registers + 'ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w ' + + // 32-bit registers + 'eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d ' + + // 64-bit registers + 'rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 ' + + // Segment registers + 'cs ds es fs gs ss ' + + // Floating point stack registers + 'st st0 st1 st2 st3 st4 st5 st6 st7 ' + + // MMX Registers + 'mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 ' + + // SSE registers + 'xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 ' + + 'xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ' + + // AVX registers + 'ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ' + + 'ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 ' + + // AVX-512F registers + 'zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 ' + + 'zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 ' + + // AVX-512F mask registers + 'k0 k1 k2 k3 k4 k5 k6 k7 ' + + // Bound (MPX) register + 'bnd0 bnd1 bnd2 bnd3 ' + + // Special register + 'cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 ' + + // NASM altreg package + 'r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b ' + + 'r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d ' + + 'r0h r1h r2h r3h ' + + 'r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l ' + + + 'db dw dd dq dt ddq do dy dz ' + + 'resb resw resd resq rest resdq reso resy resz ' + + 'incbin equ times ' + + 'byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr', + + meta: + '%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif ' + + '%if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep ' + + '%endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment ' + + '.nolist ' + + '__FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ ' + + '__UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend ' + + 'align alignb sectalign daz nodaz up down zero default option assume public ' + + + 'bits use16 use32 use64 default section segment absolute extern global common cpu float ' + + '__utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ ' + + '__float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ ' + + '__Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e ' + + 'float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__' + }, + contains: [ + hljs.COMMENT( + ';', + '$', + { + relevance: 0 + } + ), + { + className: 'number', + variants: [ + // Float number and x87 BCD + { + begin: '\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|' + + '(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b', + relevance: 0 + }, + + // Hex number in $ + { begin: '\\$[0-9][0-9A-Fa-f]*', relevance: 0 }, + + // Number in H,D,T,Q,O,B,Y suffix + { begin: '\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b' }, + + // Number in X,D,T,Q,O,B,Y prefix + { begin: '\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b'} + ] + }, + // Double quote string + hljs.QUOTE_STRING_MODE, + { + className: 'string', + variants: [ + // Single-quoted string + { begin: '\'', end: '[^\\\\]\'' }, + // Backquoted string + { begin: '`', end: '[^\\\\]`' } + ], + relevance: 0 + }, + { + className: 'symbol', + variants: [ + // Global label and local label + { begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)' }, + // Macro-local label + { begin: '^\\s*%%[A-Za-z0-9_$#@~.?]*:' } + ], + relevance: 0 + }, + // Macro parameter + { + className: 'subst', + begin: '%[0-9]+', + relevance: 0 + }, + // Macro parameter + { + className: 'subst', + begin: '%!\S+', + relevance: 0 + }, + { + className: 'meta', + begin: /^\s*\.[\w_-]+/ + } + ] + }; +} + +module.exports = x86asm; diff --git a/node_modules/highlight.js/lib/languages/xl.js b/node_modules/highlight.js/lib/languages/xl.js @@ -0,0 +1,82 @@ +/* +Language: XL +Author: Christophe de Dinechin <christophe@taodyne.com> +Description: An extensible programming language, based on parse tree rewriting +Website: http://xlr.sf.net +*/ + +function xl(hljs) { + var BUILTIN_MODULES = + 'ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo ' + + 'StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts'; + + var XL_KEYWORDS = { + $pattern: /[a-zA-Z][a-zA-Z0-9_?]*/, + keyword: + 'if then else do while until for loop import with is as where when by data constant ' + + 'integer real text name boolean symbol infix prefix postfix block tree', + literal: + 'true false nil', + built_in: + 'in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin ' + + 'acos atan exp expm1 log log2 log10 log1p pi at text_length text_range ' + + 'text_find text_replace contains page slide basic_slide title_slide ' + + 'title subtitle fade_in fade_out fade_at clear_color color line_color ' + + 'line_width texture_wrap texture_transform texture scale_?x scale_?y ' + + 'scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y ' + + 'rotate_?z? rectangle circle ellipse sphere path line_to move_to ' + + 'quad_to curve_to theme background contents locally time mouse_?x ' + + 'mouse_?y mouse_buttons ' + + BUILTIN_MODULES + }; + + var DOUBLE_QUOTE_TEXT = { + className: 'string', + begin: '"', end: '"', illegal: '\\n' + }; + var SINGLE_QUOTE_TEXT = { + className: 'string', + begin: '\'', end: '\'', illegal: '\\n' + }; + var LONG_TEXT = { + className: 'string', + begin: '<<', end: '>>' + }; + var BASED_NUMBER = { + className: 'number', + begin: '[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?' + }; + var IMPORT = { + beginKeywords: 'import', end: '$', + keywords: XL_KEYWORDS, + contains: [DOUBLE_QUOTE_TEXT] + }; + var FUNCTION_DEFINITION = { + className: 'function', + begin: /[a-z][^\n]*->/, returnBegin: true, end: /->/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, {starts: { + endsWithParent: true, + keywords: XL_KEYWORDS + }}) + ] + }; + return { + name: 'XL', + aliases: ['tao'], + keywords: XL_KEYWORDS, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + DOUBLE_QUOTE_TEXT, + SINGLE_QUOTE_TEXT, + LONG_TEXT, + FUNCTION_DEFINITION, + IMPORT, + BASED_NUMBER, + hljs.NUMBER_MODE + ] + }; +} + +module.exports = xl; diff --git a/node_modules/highlight.js/lib/languages/xml.js b/node_modules/highlight.js/lib/languages/xml.js @@ -0,0 +1,141 @@ +/* +Language: HTML, XML +Website: https://www.w3.org/XML/ +Category: common +*/ + +function xml(hljs) { + var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+'; + var XML_ENTITIES = { + className: 'symbol', + begin: '&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;' + }; + var XML_META_KEYWORDS = { + begin: '\\s', + contains:[ + { + className: 'meta-keyword', + begin: '#?[a-z_][a-z1-9_-]+', + illegal: '\\n', + } + ] + }; + var XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {begin: '\\(', end: '\\)'}); + var APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {className: 'meta-string'}); + var QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}); + var TAG_INTERNALS = { + endsWithParent: true, + illegal: /</, + relevance: 0, + contains: [ + { + className: 'attr', + begin: XML_IDENT_RE, + relevance: 0 + }, + { + begin: /=\s*/, + relevance: 0, + contains: [ + { + className: 'string', + endsParent: true, + variants: [ + {begin: /"/, end: /"/, contains: [XML_ENTITIES]}, + {begin: /'/, end: /'/, contains: [XML_ENTITIES]}, + {begin: /[^\s"'=<>`]+/} + ] + } + ] + } + ] + }; + return { + name: 'HTML, XML', + aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'wsf', 'svg'], + case_insensitive: true, + contains: [ + { + className: 'meta', + begin: '<![a-z]', end: '>', + relevance: 10, + contains: [ + XML_META_KEYWORDS, + QUOTE_META_STRING_MODE, + APOS_META_STRING_MODE, + XML_META_PAR_KEYWORDS, + { + begin: '\\[', end: '\\]', + contains:[ + { + className: 'meta', + begin: '<![a-z]', end: '>', + contains: [ + XML_META_KEYWORDS, + XML_META_PAR_KEYWORDS, + QUOTE_META_STRING_MODE, + APOS_META_STRING_MODE + ] + } + ] + } + ] + }, + hljs.COMMENT( + '<!--', + '-->', + { + relevance: 10 + } + ), + { + begin: '<\\!\\[CDATA\\[', end: '\\]\\]>', + relevance: 10 + }, + XML_ENTITIES, + { + className: 'meta', + begin: /<\?xml/, end: /\?>/, relevance: 10 + }, + { + className: 'tag', + /* + The lookahead pattern (?=...) ensures that 'begin' only matches + '<style' as a single word, followed by a whitespace or an + ending braket. The '$' is needed for the lexeme to be recognized + by hljs.subMode() that tests lexemes outside the stream. + */ + begin: '<style(?=\\s|>)', end: '>', + keywords: {name: 'style'}, + contains: [TAG_INTERNALS], + starts: { + end: '</style>', returnEnd: true, + subLanguage: ['css', 'xml'] + } + }, + { + className: 'tag', + // See the comment in the <style tag about the lookahead pattern + begin: '<script(?=\\s|>)', end: '>', + keywords: {name: 'script'}, + contains: [TAG_INTERNALS], + starts: { + end: '\<\/script\>', returnEnd: true, + subLanguage: ['javascript', 'handlebars', 'xml'] + } + }, + { + className: 'tag', + begin: '</?', end: '/?>', + contains: [ + { + className: 'name', begin: /[^\/><\s]+/, relevance: 0 + }, + TAG_INTERNALS + ] + } + ] + }; +} + +module.exports = xml; diff --git a/node_modules/highlight.js/lib/languages/xquery.js b/node_modules/highlight.js/lib/languages/xquery.js @@ -0,0 +1,174 @@ +/* +Language: XQuery +Author: Dirk Kirsten <dk@basex.org> +Contributor: Duncan Paterson +Description: Supports XQuery 3.1 including XQuery Update 3, so also XPath (as it is a superset) +Refactored to process xml constructor syntax and function-bodies. Added missing data-types, xpath operands, inbuilt functions, and query prologs +Website: https://www.w3.org/XML/Query/ +Category: functional +*/ + +function xquery(hljs) { + // see https://www.w3.org/TR/xquery/#id-terminal-delimitation + var KEYWORDS = 'module schema namespace boundary-space preserve no-preserve strip default collation base-uri ordering context decimal-format decimal-separator copy-namespaces empty-sequence except exponent-separator external grouping-separator inherit no-inherit lax minus-sign per-mille percent schema-attribute schema-element strict unordered zero-digit ' + + 'declare import option function validate variable ' + + 'for at in let where order group by return if then else ' + + 'tumbling sliding window start when only end previous next stable ' + + 'ascending descending allowing empty greatest least some every satisfies switch case typeswitch try catch ' + + 'and or to union intersect instance of treat as castable cast map array ' + + 'delete insert into replace value rename copy modify update'; + + // Node Types (sorted by inheritance) + // atomic types (sorted by inheritance) + var TYPE = 'item document-node node attribute document element comment namespace namespace-node processing-instruction text construction ' + + 'xs:anyAtomicType xs:untypedAtomic xs:duration xs:time xs:decimal xs:float xs:double xs:gYearMonth xs:gYear xs:gMonthDay xs:gMonth xs:gDay xs:boolean xs:base64Binary xs:hexBinary xs:anyURI xs:QName xs:NOTATION xs:dateTime xs:dateTimeStamp xs:date xs:string xs:normalizedString xs:token xs:language xs:NMTOKEN xs:Name xs:NCName xs:ID xs:IDREF xs:ENTITY xs:integer xs:nonPositiveInteger xs:negativeInteger xs:long xs:int xs:short xs:byte xs:nonNegativeInteger xs:unisignedLong xs:unsignedInt xs:unsignedShort xs:unsignedByte xs:positiveInteger xs:yearMonthDuration xs:dayTimeDuration'; + + var LITERAL = 'eq ne lt le gt ge is ' + + 'self:: child:: descendant:: descendant-or-self:: attribute:: following:: following-sibling:: parent:: ancestor:: ancestor-or-self:: preceding:: preceding-sibling:: ' + + 'NaN'; + + // functions (TODO: find regex for op: without breaking build) + var BUILT_IN = { + className: 'built_in', + variants: [{ + begin: /\barray\:/, + end: /(?:append|filter|flatten|fold\-(?:left|right)|for-each(?:\-pair)?|get|head|insert\-before|join|put|remove|reverse|size|sort|subarray|tail)\b/ + }, { + begin: /\bmap\:/, + end: /(?:contains|entry|find|for\-each|get|keys|merge|put|remove|size)\b/ + }, { + begin: /\bmath\:/, + end: /(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/ + }, { + begin: /\bop\:/, + end: /\(/, + excludeEnd: true + }, { + begin: /\bfn\:/, + end: /\(/, + excludeEnd: true + }, +// do not highlight inbuilt strings as variable or xml element names + { + begin: /[^<\/\$\:'"-]\b(?:abs|accumulator\-(?:after|before)|adjust\-(?:date(?:Time)?|time)\-to\-timezone|analyze\-string|apply|available\-(?:environment\-variables|system\-properties)|avg|base\-uri|boolean|ceiling|codepoints?\-(?:equal|to\-string)|collation\-key|collection|compare|concat|contains(?:\-token)?|copy\-of|count|current(?:\-)?(?:date(?:Time)?|time|group(?:ing\-key)?|output\-uri|merge\-(?:group|key))?data|dateTime|days?\-from\-(?:date(?:Time)?|duration)|deep\-equal|default\-(?:collation|language)|distinct\-values|document(?:\-uri)?|doc(?:\-available)?|element\-(?:available|with\-id)|empty|encode\-for\-uri|ends\-with|environment\-variable|error|escape\-html\-uri|exactly\-one|exists|false|filter|floor|fold\-(?:left|right)|for\-each(?:\-pair)?|format\-(?:date(?:Time)?|time|integer|number)|function\-(?:arity|available|lookup|name)|generate\-id|has\-children|head|hours\-from\-(?:dateTime|duration|time)|id(?:ref)?|implicit\-timezone|in\-scope\-prefixes|index\-of|innermost|insert\-before|iri\-to\-uri|json\-(?:doc|to\-xml)|key|lang|last|load\-xquery\-module|local\-name(?:\-from\-QName)?|(?:lower|upper)\-case|matches|max|minutes\-from\-(?:dateTime|duration|time)|min|months?\-from\-(?:date(?:Time)?|duration)|name(?:space\-uri\-?(?:for\-prefix|from\-QName)?)?|nilled|node\-name|normalize\-(?:space|unicode)|not|number|one\-or\-more|outermost|parse\-(?:ietf\-date|json)|path|position|(?:prefix\-from\-)?QName|random\-number\-generator|regex\-group|remove|replace|resolve\-(?:QName|uri)|reverse|root|round(?:\-half\-to\-even)?|seconds\-from\-(?:dateTime|duration|time)|snapshot|sort|starts\-with|static\-base\-uri|stream\-available|string\-?(?:join|length|to\-codepoints)?|subsequence|substring\-?(?:after|before)?|sum|system\-property|tail|timezone\-from\-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type\-available|unordered|unparsed\-(?:entity|text)?\-?(?:public\-id|uri|available|lines)?|uri\-collection|xml\-to\-json|years?\-from\-(?:date(?:Time)?|duration)|zero\-or\-one)\b/, + }, { + begin: /\blocal\:/, + end: /\(/, + excludeEnd: true + }, { + begin: /\bzip\:/, + end: /(?:zip\-file|(?:xml|html|text|binary)\-entry| (?:update\-)?entries)\b/ + }, { + begin: /\b(?:util|db|functx|app|xdmp|xmldb)\:/, + end: /\(/, + excludeEnd: true + } + ] + }; + + var TITLE = { + className: 'title', + begin: /\bxquery version "[13]\.[01]"\s?(?:encoding ".+")?/, + end: /;/ + }; + + var VAR = { + className: 'variable', + begin: /[\$][\w-:]+/ + }; + + var NUMBER = { + className: 'number', + begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + relevance: 0 + }; + + var STRING = { + className: 'string', + variants: [{ + begin: /"/, + end: /"/, + contains: [{ + begin: /""/, + relevance: 0 + }] + }, + { + begin: /'/, + end: /'/, + contains: [{ + begin: /''/, + relevance: 0 + }] + } + ] + }; + + var ANNOTATION = { + className: 'meta', + begin: /%[\w-:]+/ + }; + + var COMMENT = { + className: 'comment', + begin: '\\(:', + end: ':\\)', + relevance: 10, + contains: [{ + className: 'doctag', + begin: '@\\w+' + }] + }; + + // see https://www.w3.org/TR/xquery/#id-computedConstructors + // mocha: computed_inbuilt + // see https://www.regexpal.com/?fam=99749 + var COMPUTED = { + beginKeywords: 'element attribute comment document processing-instruction', + end: '{', + excludeEnd: true + }; + + // mocha: direct_method + var DIRECT = { + begin: /<([\w\._:\-]+)((\s*.*)=('|").*('|"))?>/, + end: /(\/[\w\._:\-]+>)/, + subLanguage: 'xml', + contains: [{ + begin: '{', + end: '}', + subLanguage: 'xquery' + }, 'self'] + }; + + + var CONTAINS = [ + VAR, + BUILT_IN, + STRING, + NUMBER, + COMMENT, + ANNOTATION, + TITLE, + COMPUTED, + DIRECT + ]; + + + + return { + name: 'XQuery', + aliases: ['xpath', 'xq'], + case_insensitive: false, + illegal: /(proc)|(abstract)|(extends)|(until)|(#)/, + keywords: { + $pattern: /[a-zA-Z\$][a-zA-Z0-9_:\-]*/, + keyword: KEYWORDS, + type: TYPE, + literal: LITERAL + }, + contains: CONTAINS + }; +} + +module.exports = xquery; diff --git a/node_modules/highlight.js/lib/languages/yaml.js b/node_modules/highlight.js/lib/languages/yaml.js @@ -0,0 +1,176 @@ +/* +Language: YAML +Description: Yet Another Markdown Language +Author: Stefan Wienert <stwienert@gmail.com> +Contributors: Carl Baxter <carl@cbax.tech> +Requires: ruby.js +Website: https://yaml.org +Category: common, config +*/ +function yaml(hljs) { + var LITERALS = 'true false yes no null'; + + // YAML spec allows non-reserved URI characters in tags. + var URI_CHARACTERS = '[\\w#;/?:@&=+$,.~*\\\'()[\\]]+'; + + // Define keys as starting with a word character + // ...containing word chars, spaces, colons, forward-slashes, hyphens and periods + // ...and ending with a colon followed immediately by a space, tab or newline. + // The YAML spec allows for much more than this, but this covers most use-cases. + var KEY = { + className: 'attr', + variants: [ + { begin: '\\w[\\w :\\/.-]*:(?=[ \t]|$)' }, + { begin: '"\\w[\\w :\\/.-]*":(?=[ \t]|$)' }, // double quoted keys + { begin: '\'\\w[\\w :\\/.-]*\':(?=[ \t]|$)' } // single quoted keys + ] + }; + + var TEMPLATE_VARIABLES = { + className: 'template-variable', + variants: [ + { begin: '{{', end: '}}' }, // jinja templates Ansible + { begin: '%{', end: '}' } // Ruby i18n + ] + }; + var STRING = { + className: 'string', + relevance: 0, + variants: [ + { begin: /'/, end: /'/ }, + { begin: /"/, end: /"/ }, + { begin: /\S+/ } + ], + contains: [ + hljs.BACKSLASH_ESCAPE, + TEMPLATE_VARIABLES + ] + }; + + // Strings inside of value containers (objects) can't contain braces, + // brackets, or commas + var CONTAINER_STRING = hljs.inherit(STRING, { + variants: [ + { begin: /'/, end: /'/ }, + { begin: /"/, end: /"/ }, + { begin: /[^\s,{}[\]]+/ } + ] + }); + + var DATE_RE = '[0-9]{4}(-[0-9][0-9]){0,2}'; + var TIME_RE = '([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?'; + var FRACTION_RE = '(\\.[0-9]*)?'; + var ZONE_RE = '([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?'; + var TIMESTAMP = { + className: 'number', + begin: '\\b' + DATE_RE + TIME_RE + FRACTION_RE + ZONE_RE + '\\b' + }; + + var VALUE_CONTAINER = { + end: ',', + endsWithParent: true, + excludeEnd: true, + contains: [], + keywords: LITERALS, + relevance: 0 + }; + var OBJECT = { + begin: '{', + end: '}', + contains: [VALUE_CONTAINER], + illegal: '\\n', + relevance: 0 + }; + var ARRAY = { + begin: '\\[', + end: '\\]', + contains: [VALUE_CONTAINER], + illegal: '\\n', + relevance: 0 + }; + + var MODES = [ + KEY, + { + className: 'meta', + begin: '^---\s*$', + relevance: 10 + }, + { // multi line string + // Blocks start with a | or > followed by a newline + // + // Indentation of subsequent lines must be the same to + // be considered part of the block + className: 'string', + begin: '[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*' + }, + { // Ruby/Rails erb + begin: '<%[%=-]?', + end: '[%-]?%>', + subLanguage: 'ruby', + excludeBegin: true, + excludeEnd: true, + relevance: 0 + }, + { // named tags + className: 'type', + begin: '!\\w+!' + URI_CHARACTERS + }, + // https://yaml.org/spec/1.2/spec.html#id2784064 + { // verbatim tags + className: 'type', + begin: '!<' + URI_CHARACTERS + ">" + }, + { // primary tags + className: 'type', + begin: '!' + URI_CHARACTERS + }, + { // secondary tags + className: 'type', + begin: '!!' + URI_CHARACTERS + }, + { // fragment id &ref + className: 'meta', + begin: '&' + hljs.UNDERSCORE_IDENT_RE + '$' + }, + { // fragment reference *ref + className: 'meta', + begin: '\\*' + hljs.UNDERSCORE_IDENT_RE + '$' + }, + { // array listing + className: 'bullet', + // TODO: remove |$ hack when we have proper look-ahead support + begin: '\\-(?=[ ]|$)', + relevance: 0 + }, + hljs.HASH_COMMENT_MODE, + { + beginKeywords: LITERALS, + keywords: { literal: LITERALS } + }, + TIMESTAMP, + // numbers are any valid C-style number that + // sit isolated from other words + { + className: 'number', + begin: hljs.C_NUMBER_RE + '\\b' + }, + OBJECT, + ARRAY, + STRING + ]; + + var VALUE_MODES = [...MODES]; + VALUE_MODES.pop(); + VALUE_MODES.push(CONTAINER_STRING); + VALUE_CONTAINER.contains = VALUE_MODES; + + return { + name: 'YAML', + case_insensitive: true, + aliases: ['yml', 'YAML'], + contains: MODES + }; +} + +module.exports = yaml; diff --git a/node_modules/highlight.js/lib/languages/zephir.js b/node_modules/highlight.js/lib/languages/zephir.js @@ -0,0 +1,119 @@ +/* + Language: Zephir + Description: Zephir, an open source, high-level language designed to ease the creation and maintainability of extensions for PHP with a focus on type and memory safety. + Author: Oleg Efimov <efimovov@gmail.com> + Website: https://zephir-lang.com/en + */ + +function zephir(hljs) { + var STRING = { + className: 'string', + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}) + ] + }; + var TITLE_MODE = hljs.UNDERSCORE_TITLE_MODE; + var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]}; + var KEYWORDS = + // classes and objects + 'namespace class interface use extends ' + + 'function return ' + + 'abstract final public protected private static deprecated ' + + // error handling + 'throw try catch Exception ' + + // keyword-ish things their website does NOT seem to highlight (in their own snippets) + // 'typeof fetch in ' + + // operators/helpers + 'echo empty isset instanceof unset ' + + // assignment/variables + 'let var new const self ' + + // control + 'require ' + + 'if else elseif switch case default ' + + 'do while loop for continue break ' + + 'likely unlikely ' + + // magic constants + // https://github.com/phalcon/zephir/blob/master/Library/Expression/Constants.php + '__LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ ' + + // types - https://docs.zephir-lang.com/0.12/en/types + 'array boolean float double integer object resource string ' + + 'char long unsigned bool int uint ulong uchar ' + + // built-ins + 'true false null undefined'; + + return { + name: 'Zephir', + aliases: ['zep'], + keywords: KEYWORDS, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.COMMENT( + '/\\*', + '\\*/', + { + contains: [ + { + className: 'doctag', + begin: '@[A-Za-z]+' + } + ] + } + ), + { + className: 'string', + begin: '<<<[\'"]?\\w+[\'"]?$', end: '^\\w+;', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + // swallow composed identifiers to avoid parsing them as keywords + begin: /(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + }, + { + className: 'function', + beginKeywords: 'function fn', end: /[;{]/, excludeEnd: true, + illegal: '\\$|\\[|%', + contains: [ + TITLE_MODE, + { + className: 'params', + begin: '\\(', end: '\\)', + keywords: KEYWORDS, + contains: [ + 'self', + hljs.C_BLOCK_COMMENT_MODE, + STRING, + NUMBER + ] + } + ] + }, + { + className: 'class', + beginKeywords: 'class interface', end: '{', excludeEnd: true, + illegal: /[:\(\$"]/, + contains: [ + {beginKeywords: 'extends implements'}, + TITLE_MODE + ] + }, + { + beginKeywords: 'namespace', end: ';', + illegal: /[\.']/, + contains: [TITLE_MODE] + }, + { + beginKeywords: 'use', end: ';', + contains: [TITLE_MODE] + }, + { + begin: '=>' // No markup, just a relevance booster + }, + STRING, + NUMBER + ] + }; +} + +module.exports = zephir; diff --git a/node_modules/highlight.js/package.json b/node_modules/highlight.js/package.json @@ -0,0 +1,1213 @@ +{ + "_from": "highlight.js", + "_id": "highlight.js@10.2.1", + "_inBundle": false, + "_integrity": "sha512-A+sckVPIb9zQTUydC9lpRX1qRFO/N0OKEh0NwIr65ckvWA/oMY8v9P3+kGRK3w2ULSh9E8v5MszXafodQ6039g==", + "_location": "/highlight.js", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "highlight.js", + "name": "highlight.js", + "escapedName": "highlight.js", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.2.1.tgz", + "_shasum": "09784fe2e95612abbefd510948945d4fe6fa9668", + "_spec": "highlight.js", + "_where": "/home/l0bster/Documents/l0bsterSSG", + "author": { + "name": "Ivan Sagalaev", + "email": "maniac@softwaremaniacs.org" + }, + "bugs": { + "url": "https://github.com/highlightjs/highlight.js/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Gidi Meir Morris", + "email": "gidi@gidi.io" + }, + { + "name": "Jan T. Sott", + "email": "git@idleberg.com" + }, + { + "name": "Li Xuanji", + "email": "xuanji@gmail.com" + }, + { + "name": "Marcos Cáceres", + "email": "marcos@marcosc.com" + }, + { + "name": "Sang Dang", + "email": "sang.dang@polku.io" + }, + { + "name": "Josh Goebel", + "email": "hello@joshgoebel.com" + }, + { + "name": "Ivan Sagalaev", + "email": "maniac@softwaremaniacs.org", + "url": "original author" + }, + { + "name": "Jeremy Hull", + "email": "sourdrums@gmail.com" + }, + { + "name": "Oleg Efimov", + "email": "efimovov@gmail.com" + }, + { + "name": "Peter Leonov", + "email": "gojpeg@gmail.com" + }, + { + "name": "Vanessa Sochat", + "email": "@vsoch" + }, + { + "name": "Victor Karamzin", + "email": "Victor.Karamzin@enterra-inc.com" + }, + { + "name": "Vsevolod Solovyov", + "email": "vsevolod.solovyov@gmail.com" + }, + { + "name": "Anton Kovalyov", + "email": "anton@kovalyov.net" + }, + { + "name": "Nikita Ledyaev", + "email": "lenikita@yandex.ru" + }, + { + "name": "Konstantin Evdokimenko", + "email": "qewerty@gmail.com" + }, + { + "name": "Dmitri Roudakov", + "email": "dmitri@roudakov.ru" + }, + { + "name": "Yuri Ivanov", + "email": "ivanov@supersoft.ru" + }, + { + "name": "Vladimir Ermakov", + "email": "vooon341@mail.ru" + }, + { + "name": "Vladimir Gubarkov", + "email": "xonixx@gmail.com" + }, + { + "name": "Brian Beck", + "email": "exogen@gmail.com" + }, + { + "name": "MajestiC", + "email": "majestic2k@gmail.com" + }, + { + "name": "Vasily Polovnyov", + "email": "vast@whiteants.net" + }, + { + "name": "Vladimir Epifanov", + "email": "voldmar@voldmar.ru" + }, + { + "name": "Alexander Makarov", + "email": "sam@rmcreative.ru" + }, + { + "name": "Vah", + "email": "vahtenberg@gmail.com" + }, + { + "name": "Shuen-Huei Guan", + "email": "drake.guan@gmail.com" + }, + { + "name": "Jason Diamond", + "email": "jason@diamond.name" + }, + { + "name": "Michal Gabrukiewicz", + "email": "mgabru@gmail.com" + }, + { + "name": "Ruslan Keba", + "email": "rukeba@gmail.com" + }, + { + "name": "Sergey Baranov", + "email": "segyrn@yandex.ru" + }, + { + "name": "Zaripov Yura", + "email": "yur4ik7@ukr.net" + }, + { + "name": "Oleg Volchkov", + "email": "oleg@volchkov.net" + }, + { + "name": "Vasily Mikhailitchenko", + "email": "vaskas@programica.ru" + }, + { + "name": "Jan Berkel", + "email": "jan.berkel@gmail.com" + }, + { + "name": "Vladimir Moskva", + "email": "vladmos@gmail.com" + }, + { + "name": "Loren Segal", + "email": "lsegal@soen.ca" + }, + { + "name": "Andrew Fedorov", + "email": "dmmdrs@mail.ru" + }, + { + "name": "Igor Kalnitsky", + "email": "igor@kalnitsky.org" + }, + { + "name": "Valerii Hiora", + "email": "valerii.hiora@gmail.com" + }, + { + "name": "Nikolay Zakharov", + "email": "nikolay.desh@gmail.com" + }, + { + "name": "Dmitry Kovega", + "email": "arhibot@gmail.com" + }, + { + "name": "Sergey Ignatov", + "email": "sergey@ignatov.spb.su" + }, + { + "name": "Antono Vasiljev", + "email": "self@antono.info" + }, + { + "name": "Stephan Kountso", + "email": "steplg@gmail.com" + }, + { + "name": "pumbur", + "email": "pumbur@pumbur.net" + }, + { + "name": "John Crepezzi", + "email": "john.crepezzi@gmail.com" + }, + { + "name": "Andrey Vlasovskikh", + "email": "andrey.vlasovskikh@gmail.com" + }, + { + "name": "Alexander Myadzel", + "email": "myadzel@gmail.com" + }, + { + "name": "Evgeny Stepanischev", + "email": "imbolk@gmail.com" + }, + { + "name": "Dmytrii Nagirniak", + "email": "dnagir@gmail.com" + }, + { + "name": "Luigi Maselli", + "email": "grigio.org@gmail.com" + }, + { + "name": "Denis Bardadym", + "email": "bardadymchik@gmail.com" + }, + { + "name": "Aahan Krish", + "email": "geekpanth3r@gmail.com" + }, + { + "name": "Ilya Baryshev", + "email": "baryshev@gmail.com" + }, + { + "name": "Aleksandar Ruzicic", + "email": "aleksandar@ruzicic.info" + }, + { + "name": "Joe Cheng", + "email": "joe@rstudio.org" + }, + { + "name": "Angel G. Olloqui", + "email": "angelgarcia.mail@gmail.com" + }, + { + "name": "Jason Tate", + "email": "adminz@web-cms-designs.com" + }, + { + "name": "Sergey Tikhomirov", + "email": "sergey@tikhomirov.io" + }, + { + "name": "Marc Fornos", + "email": "marc.fornos@gmail.com" + }, + { + "name": "Yoshihide Jimbo", + "email": "yjimbo@gmail.com" + }, + { + "name": "Casey Duncan", + "email": "casey.duncan@gmail.com" + }, + { + "name": "Eugene Nizhibitsky", + "email": "nizhibitsky@gmail.com" + }, + { + "name": "Alberto Gimeno", + "email": "gimenete@gmail.com" + }, + { + "name": "Kirk Kimmel", + "email": "kimmel.k.programmer@gmail.com" + }, + { + "name": "Nathan Grigg", + "email": "nathan@nathanamy.org" + }, + { + "name": "Dr. Drang", + "email": "drdrang@gmail.com" + }, + { + "name": "Robin Ward", + "email": "robin.ward@gmail.com" + }, + { + "name": "Dmitry Medvinsky", + "email": "me@dmedvinsky.name" + }, + { + "name": "Jason Jacobson", + "email": "jason.a.jacobson@gmail.com" + }, + { + "name": "Jonas Follesø", + "email": "jonas@follesoe.no" + }, + { + "name": "Dan Allen", + "email": "dan.j.allen@gmail.com" + }, + { + "name": "noformnocontent", + "email": "i@noformnocontent.com" + }, + { + "name": "Damien White", + "email": "damien.white@visoftinc.com" + }, + { + "name": "Alexander Marenin", + "email": "great_muchacho@mail.ru" + }, + { + "name": "Cédric Néhémie", + "email": "cedric.nehemie@gmail.com" + }, + { + "name": "Simon Madine", + "email": "simon@angryrobotzombie.com" + }, + { + "name": "Benjamin Pannell", + "email": "contact@sierrasoftworks.com" + }, + { + "name": "Eric Knibbe", + "email": "eric@lassosoft.com" + }, + { + "name": "Poren Chiang", + "email": "ren.chiang@gmail.com" + }, + { + "name": "Kelley van Evert", + "email": "kelleyvanevert@gmail.com" + }, + { + "name": "Kurt Emch", + "email": "kurt@kurtemch.com" + }, + { + "name": "Mehdi Dogguy", + "email": "mehdi@dogguy.org" + }, + { + "name": "Nicolas Braud-Santoni", + "email": "nicolas.braud-santoni@ens-cachan.fr" + }, + { + "name": "Ralf Bitter", + "email": "rabit@revigniter.com" + }, + { + "name": "Sylvestre Ledru", + "email": "sylvestre.ledru@scilab-enterprises.com" + }, + { + "name": "Troy Kershaw", + "email": "hello@troykershaw.com" + }, + { + "name": "Zena Treep", + "email": "zena.treep@gmail.com" + }, + { + "name": "Daniel Kvasnicka", + "email": "dkvasnicka@vendavo.com" + }, + { + "name": "Carlo Kok", + "email": "ck@remobjects.com" + }, + { + "name": "Bram de Haan", + "email": "info@atelierbramdehaan.nl" + }, + { + "name": "Seongwon Lee", + "email": "dlimpid@gmail.com" + }, + { + "name": "Zaven Muradyan", + "email": "megalivoithos@gmail.com" + }, + { + "name": "Brent Bradbury", + "email": "brent@brentium.com" + }, + { + "name": "Martin Dilling-Hansen", + "email": "martindlling@gmail.com" + }, + { + "name": "Ilya Vassilevsky", + "email": "vassilevsky@gmail.com" + }, + { + "name": "Josh Adams", + "email": "josh@isotope11.com" + }, + { + "name": "Dan Tao", + "email": "daniel.tao@gmail.com" + }, + { + "name": "Jeff Escalante", + "email": "hello@jenius.me" + }, + { + "name": "Jun Yang", + "email": "yangjvn@126.com" + }, + { + "name": "Nikolay Lisienko", + "email": "info@neor.ru" + }, + { + "name": "Heiko August", + "email": "post@auge8472.de" + }, + { + "name": "Domen Kožar", + "email": "domen@dev.si" + }, + { + "name": "Travis Odom", + "email": "travis.a.odom@gmail.com" + }, + { + "name": "innocenat", + "email": "innocenat@gmail.com" + }, + { + "name": "Arthur Bikmullin", + "email": "devolonter@gmail.com" + }, + { + "name": "Pascal Hurni", + "email": "phi@ruby-reactive.org" + }, + { + "name": "Roman Shmatov", + "email": "romanshmatov@gmail.com" + }, + { + "name": "Nic West", + "email": "nic@letolab.com" + }, + { + "name": "Panu Horsmalahti", + "email": "panu.horsmalahti@iki.fi" + }, + { + "name": "Flaviu Tamas", + "email": "tamas.flaviu@gmail.com" + }, + { + "name": "Damian Mee", + "email": "mee.damian@gmail.com" + }, + { + "name": "Christopher Kaster", + "email": "ikasoki@gmail.com" + }, + { + "name": "Chris Eidhof", + "email": "chris@eidhof.nl" + }, + { + "name": "Nate Cook", + "email": "natecook@gmail.com" + }, + { + "name": "Matt Diephouse", + "email": "matt@diephouse.com" + }, + { + "name": "Erik Osheim", + "email": "d_m@plastic-idolatry.com" + }, + { + "name": "Guillaume Laforge", + "email": "glaforge@gmail.com" + }, + { + "name": "Lucas Mazza", + "email": "lucastmazza@gmail.com" + }, + { + "name": "Maxim Dikun", + "email": "dikmax@gmail.com" + }, + { + "name": "Henrik Feldt", + "email": "henrik@haf.se" + }, + { + "name": "Anton Kochkov", + "email": "anton.kochkov@gmail.com" + }, + { + "name": "Michael Allen", + "email": "Michael.Allen@benefitfocus.com" + }, + { + "name": "JP Verkamp", + "email": "me@jverkamp.com" + }, + { + "name": "Adam Joseph Cook", + "email": "adam.joseph.cook@gmail.com" + }, + { + "name": "Sergey Vidyuk", + "email": "svidyuk@gmail.com" + }, + { + "name": "Radek Liska", + "email": "radekliska@gmail.com" + }, + { + "name": "Jose Molina Colmenero", + "email": "gaudy41@gmail.com" + }, + { + "name": "Max Mikhailov", + "email": "seven.phases.max@gmail.com" + }, + { + "name": "Bryant Williams", + "email": "b.n.williams@gmail.com" + }, + { + "name": "Erik Paluka", + "email": "erik.paluka@gmail.com" + }, + { + "name": "Luke Holder", + "email": "lukemh@gmail.com" + }, + { + "name": "David Mohundro", + "email": "david@mohundro.com" + }, + { + "name": "Nicholas Blumhardt", + "email": "nblumhardt@nblumhardt.com" + }, + { + "name": "Christophe de Dinechin", + "email": "christophe@taodyne.com" + }, + { + "name": "Taneli Vatanen", + "email": "taneli.vatanen@gmail.com" + }, + { + "name": "Jen Evers-Corvina", + "email": "jen@sevvie.net" + }, + { + "name": "Kassio Borges", + "email": "kassioborgesm@gmail.com" + }, + { + "name": "Cedric Sohrauer", + "email": "sohrauer@googlemail.com" + }, + { + "name": "Mickaël Delahaye", + "email": "mickael.delahaye@gmail.com" + }, + { + "name": "Hakan Özler", + "email": "ozler.hakan@gmail.com" + }, + { + "name": "Trey Shugart", + "email": "treshugart@gmail.com" + }, + { + "name": "Vincent Zurczak", + "email": "vzurczak@linagora.com" + }, + { + "name": "Adam Joseph Cook", + "email": "adam.joseph.cook@gmail.com" + }, + { + "name": "Edwin Dalorzo", + "email": "edwin@dalorzo.org" + }, + { + "name": "mucaho", + "email": "mkucko@gmail.com" + }, + { + "name": "Dennis Titze", + "email": "dennis.titze@gmail.com" + }, + { + "name": "Jon Evans", + "email": "jon@craftyjon.com" + }, + { + "name": "Brian Quistorff", + "email": "bquistorff@gmail.com" + }, + { + "name": "Jonathan Suever", + "email": "suever@gmail.com" + }, + { + "name": "Alexis Hénaut", + "email": "alexis@henaut.net" + }, + { + "name": "Chris Kiehl", + "email": "audionautic@gmail.com" + }, + { + "name": "Peter Piwowarski", + "email": "oldlaptop654@aol.com" + }, + { + "name": "Kenta Sato", + "email": "bicycle1885@gmail.com" + }, + { + "name": "Anthony Scemama", + "email": "scemama@irsamc.ups-tlse.fr" + }, + { + "name": "Taufik Nurrohman", + "email": "latitudu.latitudu@gmail.com" + }, + { + "name": "Pedro Oliveira", + "email": "kanytu@gmail.com" + }, + { + "name": "Gu Yiling", + "email": "justice360@gmail.com" + }, + { + "name": "Thomas Applencourt", + "email": "thomas.applencourt@irsamc.ups-tlse.fr" + }, + { + "name": "Andrew Farmer", + "email": "ahfarmer@gmail.com" + }, + { + "name": "Sergey Mashkov", + "email": "cy6erGn0m@gmail.com" + }, + { + "name": "Raivo Laanemets", + "email": "raivo@infdot.com" + }, + { + "name": "Kenneth Fuglsang", + "email": "kfuglsang@gmail.com" + }, + { + "name": "David Anson", + "email": "david@dlaa.me" + }, + { + "name": "Louis Barranqueiro", + "email": "louis.barranqueiro@gmail.com" + }, + { + "name": "Tim Schumacher", + "email": "tim@datenknoten.me" + }, + { + "name": "Lucas Werkmeister", + "email": "mail@lucaswerkmeister.de" + }, + { + "name": "Dan Panzarella", + "email": "alsoelp@gmail.com" + }, + { + "name": "Bruno Dias", + "email": "bruno.r.dias@gmail.com" + }, + { + "name": "Jay Strybis", + "email": "jay.strybis@gmail.com" + }, + { + "name": "Guillaume Gomez", + "email": "guillaume1.gomez@gmail.com" + }, + { + "name": "Janis Voigtländer", + "email": "janis.voigtlaender@gmail.com" + }, + { + "name": "Dirk Kirsten", + "email": "dk@basex.org" + }, + { + "name": "MY Sun", + "email": "simonmysun@gmail.com" + }, + { + "name": "Vadimtro", + "email": "vadimtro@yahoo.com" + }, + { + "name": "Benjamin Auder", + "email": "benjamin.auder@gmail.com" + }, + { + "name": "Dotan Dimet", + "email": "dotan@corky.net" + }, + { + "name": "Manh Tuan", + "email": "junookyo@gmail.com" + }, + { + "name": "Philippe Charrière", + "email": "ph.charriere@gmail.com" + }, + { + "name": "Stefan Bechert", + "email": "stefan.bechert@gmx.net" + }, + { + "name": "Samuel Reed", + "email": "sam@bitmex.com" + }, + { + "name": "Yury Selivanov", + "email": "yselivanov@gmail.com" + }, + { + "name": "Tsuyusato Kitsune", + "email": "make.just.on@gmail.com" + }, + { + "name": "Mick MacCallum", + "email": "micksmaccallum@gmail.com" + }, + { + "name": "Kristoffer Gronlund", + "email": "kgronlund@suse.com" + }, + { + "name": "Søren Enevoldsen", + "email": "senevoldsen90@gmail.com" + }, + { + "name": "Daniel Rosenwasser", + "email": "DanielRosenwasser@users.noreply.github.com" + }, + { + "name": "Ladislav Prskavec", + "email": "ladislav@prskavec.net" + }, + { + "name": "Jan Kühle", + "email": "jkuehle90@gmail.com" + }, + { + "name": "Stefan Wienert", + "email": "stwienert@gmail.com" + }, + { + "name": "Nikita Savchenko", + "email": "zitros.lab@gmail.com" + }, + { + "name": "Stefania Mellai", + "email": "s.mellai@arduino.cc" + }, + { + "name": "Nebuleon Fumika", + "email": "nebuleon.fumika@gmail.com" + }, + { + "name": "prince", + "email": "MC.prince.0203@gmail.com" + }, + { + "name": "Brendan Rocks", + "email": "rocks.brendan@gmail.com" + }, + { + "name": "Raphaël Assénat", + "email": "raph@raphnet.net" + }, + { + "name": "Matt Evans", + "email": "matt@aptech.com" + }, + { + "name": "Martin Braun", + "email": "martin.braun@ettus.com" + }, + { + "name": "Boris Cherny", + "email": "boris@performancejs.com" + }, + { + "name": "John Foster", + "email": "jfoster@esri.com" + }, + { + "name": "Robert Dodier", + "email": "robert.dodier@gmail.com" + }, + { + "name": "Anthony Dugois", + "email": "dev.anthonydugois@gmail.com" + }, + { + "name": "Qeole", + "email": "qeole@outlook.com" + }, + { + "name": "Denis Ciccale", + "email": "dciccale@gmail.com" + }, + { + "name": "Michael Johnston", + "email": "lastobelus@gmail.com" + }, + { + "name": "Taras", + "email": "oxdef@oxdef.info" + }, + { + "name": "Philipp Wolfer", + "email": "ph.wolfer@gmail.com" + }, + { + "name": "Mikko Kouhia", + "email": "mikko.kouhia@iki.fi" + }, + { + "name": "Billy Quith", + "email": "chinbillybilbo@gmail.com" + }, + { + "name": "Herbert Shin", + "email": "initbar@protonmail.ch" + }, + { + "name": "Tristano Ajmone", + "email": "tajmone@gmail.com" + }, + { + "name": "Taisuke Fujimoto", + "email": "temp-impl@users.noreply.github.com" + }, + { + "name": "Boone Severson", + "email": "boone.severson@gmail.com" + }, + { + "name": "Victor Zhou", + "email": "OiCMudkips@users.noreply.github.com" + }, + { + "name": "Lars Schulna", + "email": "kartoffelbrei.mit.muskatnuss@gmail.org" + }, + { + "name": "Jacob Childress", + "email": "jacobc@gmail.com" + }, + { + "name": "Gavin Siu", + "email": "gavsiu@gmail.com" + }, + { + "name": "Builder's Brewery", + "email": "buildersbrewery@gmail.com" + }, + { + "name": "Sergey Bronnikov", + "email": "sergeyb@bronevichok.ru" + }, + { + "name": "Joe Eli McIlvain", + "email": "joe.eli.mac@gmail.org" + }, + { + "name": "Stephan Boyer", + "email": "stephan@stephanboyer.com" + }, + { + "name": "Alex McKibben", + "email": "alex@nullscope.net" + }, + { + "name": "Daniel Gamage", + "email": "hellodanielgamage@gmail.com" + }, + { + "name": "Matthew Daly", + "email": "matthewbdaly@gmail.com" + }, + { + "name": "Magnus Madsen", + "email": "mmadsen@uwaterloo.ca" + }, + { + "name": "Camil Staps", + "email": "info@camilstaps.nl" + }, + { + "name": "Alexander Lichter", + "email": "manniL@gmx.net" + }, + { + "name": "Nicolas Le Gall", + "email": "contact@nlegall.fr" + }, + { + "name": "Kenton Hamaluik", + "email": "kentonh@gmail.com" + }, + { + "name": "Marvin Saignat", + "email": "contact@zgmrvn.com" + }, + { + "name": "Michael Rodler", + "email": "contact@f0rki.at" + }, + { + "name": "Sergey Sobko", + "email": "s.sobko@profitware.ru" + }, + { + "name": "Hale Chan", + "email": "halechan@qq.com" + }, + { + "name": "Kasper Andersen", + "email": "kma_untrusted@protonmail.com" + }, + { + "name": "Philipp A.", + "email": "flying-sheep@web.de" + }, + { + "name": "Guannan Wei", + "email": "guannanwei@outlook.com" + }, + { + "name": "Sam Wu", + "email": "samsam2310@gmail.com" + }, + { + "name": "Ike Ku", + "email": "dempfi@yahoo.com" + }, + { + "name": "Andres Täht", + "email": "andres.taht@gmail.com" + }, + { + "name": "Rene Saarsoo", + "email": "nene@triin.net" + }, + { + "name": "Jordi Petit", + "email": "jordi.petit@gmail.com" + }, + { + "name": "Raphaël Parrëe", + "email": "rparree@edc4it.com" + }, + { + "name": "Joël Porquet", + "email": "joel@porquet.org" + }, + { + "name": "Alex Arslan", + "email": "ararslan@comcast.net" + }, + { + "name": "Stanislav Belov", + "email": "stbelov@gmail.com" + }, + { + "name": "Ivan Dementev", + "email": "ivan_div@mail.ru" + }, + { + "name": "Nicolas LLOBERA", + "email": "nllobera@gmail.com" + }, + { + "name": "Morten Piibeleht", + "email": "morten.piibeleht@gmail.com" + }, + { + "name": "Martin Clausen", + "email": "martin.clausene@gmail.com" + }, + { + "name": "Arctic Ice Studio", + "email": "development@arcticicestudio.com" + }, + { + "name": "Google Inc.", + "email": "davidben@google.com", + "url": "David Benjamin" + }, + { + "name": "Ahmad Awais", + "email": "me@AhmadAwais.com" + }, + { + "name": "Duncan Paterson", + "email": "duncan@exist-db.org" + }, + { + "name": "Tristian Kelly", + "email": "tristian.kelly560@gmail.com" + }, + { + "name": "Melissa Geels", + "email": "melissa@nimble.tools" + }, + { + "name": "Dmitriy Tarasov", + "email": "dimatar@gmail.com" + }, + { + "name": "Egor Rogov", + "email": "e.rogov@postgrespro.ru" + }, + { + "name": "Meseta", + "email": "meseta@gmail.com" + }, + { + "name": "Harmon", + "email": "Harmon.Public@gmail.com" + }, + { + "name": "Eric Bailey", + "email": "eric.w.bailey@gmail.com" + }, + { + "name": "Gustavo Costa", + "email": "gusbemacbe@gmail.com" + }, + { + "name": "Jeffrey Arnold", + "email": "jeffrey.arnold@gmail.com" + }, + { + "name": "Antoine Boisier-Michaud", + "email": "aboisiermichaud@gmail.com" + }, + { + "name": "Alejandro Isaza", + "email": "al@isaza.ca" + }, + { + "name": "Laurent Voullemier", + "email": "laurent.voullemier@gmail.com" + }, + { + "name": "Sean T. Allen", + "email": "sean@monkeysnatchbanana.com" + }, + { + "name": "Greg Cline", + "email": "gregrcline@gmail.com" + }, + { + "name": "Sejin Jeon", + "email": "jinaidy93@gmail.com" + }, + { + "name": "Taif Alimov", + "email": "inzeppelin@gmail.com" + }, + { + "name": "Yuri Mazursky", + "email": "mail@colomolome.com" + }, + { + "name": "Carl Baxter", + "email": "carl@cbax.tech" + }, + { + "name": "Thomas Reichel", + "email": "tom.p.reichel@gmail.com" + }, + { + "name": "G8t Guy", + "email": "g8tguy@g8tguy.com" + }, + { + "name": "Samia Ali", + "email": "samiaab1990@gmail.com" + }, + { + "name": "Alexandre Grison", + "email": "a.grison@gmail.com" + }, + { + "name": "Jim Mason", + "email": "jmason@ibinx.com" + }, + { + "name": "lioshi", + "email": "lioshi@lioshi.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Syntax highlighting with language autodetection.", + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^3.2.0", + "@typescript-eslint/parser": "^3.2.0", + "clean-css": "^4.2.3", + "cli-table": "^0.3.1", + "colors": "^1.1.2", + "commander": "^5.1.0", + "del": "^5.1.0", + "dependency-resolver": "^2.0.1", + "eslint": "^7.2.0", + "eslint-config-standard": "^14.1.1", + "eslint-plugin-import": "^2.21.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", + "glob": "^7.1.6", + "glob-promise": "^3.4.0", + "handlebars": "^4.7.6", + "js-beautify": "^1.11.0", + "jsdom": "^16.2.2", + "lodash": "^4.17.19", + "mocha": "^8.1.3", + "rollup": "^2.0.0", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-json": "^4.0.0", + "should": "^13.2.3", + "terser": "^4.3.9", + "tiny-worker": "^2.3.0", + "typescript": "^4.0.0-dev.20200512" + }, + "engines": { + "node": "*" + }, + "homepage": "https://highlightjs.org/", + "keywords": [ + "highlight", + "syntax" + ], + "license": "BSD-3-Clause", + "main": "./lib/index.js", + "name": "highlight.js", + "repository": { + "type": "git", + "url": "git://github.com/highlightjs/highlight.js.git" + }, + "scripts": { + "build": "node ./tools/build.js -t node", + "build-browser": "node ./tools/build.js -t browser :common", + "build-cdn": "node ./tools/build.js -t cdn", + "build_and_test": "npm run build && npm run test", + "lint": "eslint -c .eslintrc.js src/*.js src/lib/*.js", + "mocha": "mocha", + "test": "mocha test", + "test-browser": "mocha test/browser", + "test-detect": "mocha test/detect", + "test-markup": "mocha test/markup", + "test-parser": "mocha test/parser" + }, + "types": "./types/index.d.ts", + "version": "10.2.1" +} diff --git a/node_modules/highlight.js/scss/a11y-dark.scss b/node_modules/highlight.js/scss/a11y-dark.scss @@ -0,0 +1,99 @@ +/* a11y-dark theme */ +/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */ +/* @author: ericwbailey */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #d4d0ab; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #ffa07a; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5ab35; +} + +/* Yellow */ +.hljs-attribute { + color: #ffd700; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #abe338; +} + +/* Blue */ +.hljs-title, +.hljs-section { + color: #00e0e0; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #dcc6e0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b2b2b; + color: #f8f8f2; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +@media screen and (-ms-high-contrast: active) { + .hljs-addition, + .hljs-attribute, + .hljs-built_in, + .hljs-builtin-name, + .hljs-bullet, + .hljs-comment, + .hljs-link, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-params, + .hljs-string, + .hljs-symbol, + .hljs-type, + .hljs-quote { + color: highlight; + } + + .hljs-keyword, + .hljs-selector-tag { + font-weight: bold; + } +} diff --git a/node_modules/highlight.js/scss/a11y-light.scss b/node_modules/highlight.js/scss/a11y-light.scss @@ -0,0 +1,99 @@ +/* a11y-light theme */ +/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */ +/* @author: ericwbailey */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #696969; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #d91e18; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #aa5d00; +} + +/* Yellow */ +.hljs-attribute { + color: #aa5d00; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #008000; +} + +/* Blue */ +.hljs-title, +.hljs-section { + color: #007faa; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7928a1; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fefefe; + color: #545454; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +@media screen and (-ms-high-contrast: active) { + .hljs-addition, + .hljs-attribute, + .hljs-built_in, + .hljs-builtin-name, + .hljs-bullet, + .hljs-comment, + .hljs-link, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-params, + .hljs-string, + .hljs-symbol, + .hljs-type, + .hljs-quote { + color: highlight; + } + + .hljs-keyword, + .hljs-selector-tag { + font-weight: bold; + } +} diff --git a/node_modules/highlight.js/scss/agate.scss b/node_modules/highlight.js/scss/agate.scss @@ -0,0 +1,108 @@ +/*! + * Agate by Taufik Nurrohman <https://github.com/taufik-nurrohman> + * --------------------------------------------------------------- + * + * #ade5fc + * #a2fca2 + * #c6b4f0 + * #d36363 + * #fcc28c + * #fc9b9b + * #ffa + * #fff + * #333 + * #62c8f3 + * #888 + * + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: white; +} + +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-code, +.hljs-emphasis { + font-style: italic; +} + +.hljs-tag { + color: #62c8f3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-selector-class { + color: #ade5fc; +} + +.hljs-string, +.hljs-bullet { + color: #a2fca2; +} + +.hljs-type, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-quote, +.hljs-built_in, +.hljs-builtin-name { + color: #ffa; +} + +.hljs-number, +.hljs-symbol, +.hljs-bullet { + color: #d36363; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #fcc28c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-code { + color: #888; +} + +.hljs-regexp, +.hljs-link { + color: #c6b4f0; +} + +.hljs-meta { + color: #fc9b9b; +} + +.hljs-deletion { + background-color: #fc9b9b; + color: #333; +} + +.hljs-addition { + background-color: #a2fca2; + color: #333; +} + +.hljs a { + color: inherit; +} + +.hljs a:focus, +.hljs a:hover { + color: inherit; + text-decoration: underline; +} diff --git a/node_modules/highlight.js/scss/an-old-hope.scss b/node_modules/highlight.js/scss/an-old-hope.scss @@ -0,0 +1,89 @@ +/* + +An Old Hope – Star Wars Syntax (c) Gustavo Costa <gusbemacbe@gmail.com> +Original theme - Ocean Dark Theme – by https://github.com/gavsiu +Based on Jesse Leite's Atom syntax theme 'An Old Hope' – https://github.com/JesseLeite/an-old-hope-syntax-atom + +*/ + +/* Death Star Comment */ +.hljs-comment, +.hljs-quote +{ + color: #B6B18B; +} + +/* Darth Vader */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion +{ + color: #EB3C54; +} + +/* Threepio */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link +{ + color: #E7CE56; +} + +/* Luke Skywalker */ +.hljs-attribute +{ + color: #EE7C2B; +} + +/* Obi Wan Kenobi */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition +{ + color: #4FB4D7; +} + +/* Yoda */ +.hljs-title, +.hljs-section +{ + color: #78BB65; +} + +/* Mace Windu */ +.hljs-keyword, +.hljs-selector-tag +{ + color: #B45EA4; +} + +/* Millenium Falcon */ +.hljs +{ + display: block; + overflow-x: auto; + background: #1C1D21; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis +{ + font-style: italic; +} + +.hljs-strong +{ + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/androidstudio.scss b/node_modules/highlight.js/scss/androidstudio.scss @@ -0,0 +1,66 @@ +/* +Date: 24 Fev 2015 +Author: Pedro Oliveira <kanytu@gmail . com> +*/ + +.hljs { + color: #a9b7c6; + background: #282b2e; + display: block; + overflow-x: auto; + padding: 0.5em; +} + +.hljs-number, +.hljs-literal, +.hljs-symbol, +.hljs-bullet { + color: #6897BB; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-deletion { + color: #cc7832; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-link { + color: #629755; +} + +.hljs-comment, +.hljs-quote { + color: #808080; +} + +.hljs-meta { + color: #bbb529; +} + +.hljs-string, +.hljs-attribute, +.hljs-addition { + color: #6A8759; +} + +.hljs-section, +.hljs-title, +.hljs-type { + color: #ffc66d; +} + +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e8bf6a; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/arduino-light.scss b/node_modules/highlight.js/scss/arduino-light.scss @@ -0,0 +1,87 @@ +/* + +Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFFF; +} + +.hljs, +.hljs-subst { + color: #434f54; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-doctag, +.hljs-name { + color: #00979D; +} + +.hljs-built_in, +.hljs-literal, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #D35400; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #00979D; +} + +.hljs-type, +.hljs-string, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #005C5F; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-comment { + color: rgba(149,165,166,.8); +} + +.hljs-meta-keyword { + color: #728E00; +} + +.hljs-meta { + color: #434f54; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-function { + color: #728E00; +} + +.hljs-number { + color: #8A7B52; +} diff --git a/node_modules/highlight.js/scss/arta.scss b/node_modules/highlight.js/scss/arta.scss @@ -0,0 +1,73 @@ +/* +Date: 17.V.2011 +Author: pumbur <pumbur@pumbur.net> +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; +} + +.hljs, +.hljs-subst { + color: #aaa; +} + +.hljs-section { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #444; +} + +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-regexp { + color: #ffcc33; +} + +.hljs-number, +.hljs-addition { + color: #00cc66; +} + +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-template-variable, +.hljs-attribute, +.hljs-link { + color: #32aaee; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #6644aa; +} + +.hljs-title, +.hljs-variable, +.hljs-deletion, +.hljs-template-tag { + color: #bb1166; +} + +.hljs-section, +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/ascetic.scss b/node_modules/highlight.js/scss/ascetic.scss @@ -0,0 +1,45 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-symbol, +.hljs-bullet, +.hljs-section, +.hljs-addition, +.hljs-attribute, +.hljs-link { + color: #888; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #ccc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-name, +.hljs-type, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/atelier-cave-dark.scss b/node_modules/highlight.js/scss/atelier-cave-dark.scss @@ -0,0 +1,83 @@ +/* Base16 Atelier Cave Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7887; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-regexp, +.hljs-link, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #19171c; + color: #8b8792; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-cave-light.scss b/node_modules/highlight.js/scss/atelier-cave-light.scss @@ -0,0 +1,85 @@ +/* Base16 Atelier Cave Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #655f6d; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #efecf4; + color: #585260; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-dune-dark.scss b/node_modules/highlight.js/scss/atelier-dune-dark.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #999580; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #20201d; + color: #a6a28c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-dune-light.scss b/node_modules/highlight.js/scss/atelier-dune-light.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #7d7a68; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fefbec; + color: #6e6b5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-estuary-dark.scss b/node_modules/highlight.js/scss/atelier-estuary-dark.scss @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #878573; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #22221b; + color: #929181; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-estuary-light.scss b/node_modules/highlight.js/scss/atelier-estuary-light.scss @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #6c6b5a; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4f3ec; + color: #5f5e4e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-forest-dark.scss b/node_modules/highlight.js/scss/atelier-forest-dark.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #9c9491; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1918; + color: #a8a19f; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-forest-light.scss b/node_modules/highlight.js/scss/atelier-forest-light.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #766e6b; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f1efee; + color: #68615e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-heath-dark.scss b/node_modules/highlight.js/scss/atelier-heath-dark.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #9e8f9e; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b181b; + color: #ab9bab; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-heath-light.scss b/node_modules/highlight.js/scss/atelier-heath-light.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #776977; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f7f3f7; + color: #695d69; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-lakeside-dark.scss b/node_modules/highlight.js/scss/atelier-lakeside-dark.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #7195a8; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #161b1d; + color: #7ea2b4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-lakeside-light.scss b/node_modules/highlight.js/scss/atelier-lakeside-light.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #5a7b8c; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ebf8ff; + color: #516d7b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-plateau-dark.scss b/node_modules/highlight.js/scss/atelier-plateau-dark.scss @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7777; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1818; + color: #8a8585; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-plateau-light.scss b/node_modules/highlight.js/scss/atelier-plateau-light.scss @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #655d5d; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4ecec; + color: #585050; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-savanna-dark.scss b/node_modules/highlight.js/scss/atelier-savanna-dark.scss @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #78877d; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #171c19; + color: #87928a; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-savanna-light.scss b/node_modules/highlight.js/scss/atelier-savanna-light.scss @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #5f6d64; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ecf4ee; + color: #526057; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-seaside-dark.scss b/node_modules/highlight.js/scss/atelier-seaside-dark.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #809980; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #131513; + color: #8ca68c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-seaside-light.scss b/node_modules/highlight.js/scss/atelier-seaside-light.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #687d68; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4fbf4; + color: #5e6e5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-sulphurpool-dark.scss b/node_modules/highlight.js/scss/atelier-sulphurpool-dark.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #898ea4; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #202746; + color: #979db4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atelier-sulphurpool-light.scss b/node_modules/highlight.js/scss/atelier-sulphurpool-light.scss @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #6b7394; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f5f7ff; + color: #5e6687; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/atom-one-dark-reasonable.scss b/node_modules/highlight.js/scss/atom-one-dark-reasonable.scss @@ -0,0 +1,75 @@ +/* + +Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage + +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #abb2bf; + background: #282c34; +} +.hljs-keyword, .hljs-operator { + color: #F92672; +} +.hljs-pattern-match { + color: #F92672; +} +.hljs-pattern-match .hljs-constructor { + color: #61aeee; +} +.hljs-function { + color: #61aeee; +} +.hljs-function .hljs-params { + color: #A6E22E; +} +.hljs-function .hljs-params .hljs-typing { + color: #FD971F; +} +.hljs-module-access .hljs-module { + color: #7e57c2; +} +.hljs-constructor { + color: #e2b93d; +} +.hljs-constructor .hljs-string { + color: #9CCC65; +} +.hljs-comment, .hljs-quote { + color: #b18eb1; + font-style: italic; +} +.hljs-doctag, .hljs-formula { + color: #c678dd; +} +.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { + color: #e06c75; +} +.hljs-literal { + color: #56b6c2; +} +.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { + color: #98c379; +} +.hljs-built_in, .hljs-class .hljs-title { + color: #e6c07b; +} +.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { + color: #d19a66; +} +.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { + color: #61aeee; +} +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: bold; +} +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/scss/atom-one-dark.scss b/node_modules/highlight.js/scss/atom-one-dark.scss @@ -0,0 +1,96 @@ +/* + +Atom One Dark by Daniel Gamage +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +base: #282c34 +mono-1: #abb2bf +mono-2: #818896 +mono-3: #5c6370 +hue-1: #56b6c2 +hue-2: #61aeee +hue-3: #c678dd +hue-4: #98c379 +hue-5: #e06c75 +hue-5-2: #be5046 +hue-6: #d19a66 +hue-6-2: #e6c07b + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #abb2bf; + background: #282c34; +} + +.hljs-comment, +.hljs-quote { + color: #5c6370; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #c678dd; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e06c75; +} + +.hljs-literal { + color: #56b6c2; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #98c379; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #e6c07b; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #d19a66; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #61aeee; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/scss/atom-one-light.scss b/node_modules/highlight.js/scss/atom-one-light.scss @@ -0,0 +1,96 @@ +/* + +Atom One Light by Daniel Gamage +Original One Light Syntax theme from https://github.com/atom/one-light-syntax + +base: #fafafa +mono-1: #383a42 +mono-2: #686b77 +mono-3: #a0a1a7 +hue-1: #0184bb +hue-2: #4078f2 +hue-3: #a626a4 +hue-4: #50a14f +hue-5: #e45649 +hue-5-2: #c91243 +hue-6: #986801 +hue-6-2: #c18401 + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #383a42; + background: #fafafa; +} + +.hljs-comment, +.hljs-quote { + color: #a0a1a7; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #a626a4; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e45649; +} + +.hljs-literal { + color: #0184bb; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #50a14f; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #c18401; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #986801; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #4078f2; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/scss/brown-paper.scss b/node_modules/highlight.js/scss/brown-paper.scss @@ -0,0 +1,64 @@ +/* + +Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background:#b7a68e url(./brown-papersq.png); +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #363c69; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link, +.hljs-name { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #802022; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/brown-papersq.png b/node_modules/highlight.js/scss/brown-papersq.png Binary files differ. diff --git a/node_modules/highlight.js/scss/codepen-embed.scss b/node_modules/highlight.js/scss/codepen-embed.scss @@ -0,0 +1,60 @@ +/* + codepen.io Embed Theme + Author: Justin Perry <http://github.com/ourmaninamsterdam> + Original theme - https://github.com/chriskempson/tomorrow-theme +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; + color: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-regexp, +.hljs-meta, +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-params, +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-deletion { + color: #ab875d; +} + +.hljs-section, +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-type, +.hljs-attribute { + color: #9b869b; +} + +.hljs-string, +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #8f9c6c; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/color-brewer.scss b/node_modules/highlight.js/scss/color-brewer.scss @@ -0,0 +1,71 @@ +/* + +Colorbrewer theme +Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org> +Ported by Fabrício Tavares de Oliveira + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; +} + +.hljs, +.hljs-subst { + color: #000; +} + +.hljs-string, +.hljs-meta, +.hljs-symbol, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #756bb1; +} + +.hljs-comment, +.hljs-quote { + color: #636363; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-bullet, +.hljs-link { + color: #31a354; +} + +.hljs-deletion, +.hljs-variable { + color: #88f; +} + + + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-doctag, +.hljs-type, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-strong { + color: #3182bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-attribute { + color: #e6550d; +} diff --git a/node_modules/highlight.js/scss/darcula.scss b/node_modules/highlight.js/scss/darcula.scss @@ -0,0 +1,74 @@ +/* + +Darcula color scheme from the JetBrains family of IDEs + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #2b2b2b; + color: #bababa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-link, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #6896ba; +} + +.hljs-code, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-attribute, +.hljs-name, +.hljs-variable { + color: #cb7832; +} + +.hljs-params { + color: #b9b9b9; +} + +.hljs-string { + color: #6a8759; +} + +.hljs-subst, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-symbol, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #e0c46c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #7f7f7f; +} diff --git a/node_modules/highlight.js/scss/dark.scss b/node_modules/highlight.js/scss/dark.scss @@ -0,0 +1,63 @@ +/* + +Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #444; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: white; +} + +.hljs, +.hljs-subst { + color: #ddd; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #d88; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #777; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/default.scss b/node_modules/highlight.js/scss/default.scss @@ -0,0 +1,99 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/docco.scss b/node_modules/highlight.js/scss/docco.scss @@ -0,0 +1,97 @@ +/* +Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #f8f8ff; +} + +.hljs-comment, +.hljs-quote { + color: #408080; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-subst { + color: #954121; +} + +.hljs-number { + color: #40a070; +} + +.hljs-string, +.hljs-doctag { + color: #219161; +} + +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #19469d; +} + +.hljs-params { + color: #00f; +} + +.hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #008080; +} + +.hljs-regexp, +.hljs-link { + color: #b68; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/dracula.scss b/node_modules/highlight.js/scss/dracula.scss @@ -0,0 +1,76 @@ +/* + +Dracula Theme v1.2.0 + +https://github.com/zenorocha/dracula-theme + +Copyright 2015, All rights reserved + +Code licensed under the MIT license +http://zenorocha.mit-license.org + +@author Éverton Ribeiro <nuxlli@gmail.com> +@author Zeno Rocha <hi@zenorocha.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282a36; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: #8be9fd; +} + +.hljs-function .hljs-keyword { + color: #ff79c6; +} + +.hljs, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #f1fa8c; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #6272a4; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/far.scss b/node_modules/highlight.js/scss/far.scss @@ -0,0 +1,71 @@ +/* + +FAR Style (c) MajestiC <majestic2k@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000080; +} + +.hljs, +.hljs-subst { + color: #0ff; +} + +.hljs-string, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #ff0; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-variable { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-doctag, +.hljs-deletion { + color: #888; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #0f0; +} + +.hljs-meta { + color: #008080; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/foundation.scss b/node_modules/highlight.js/scss/foundation.scss @@ -0,0 +1,89 @@ +/* +Description: Foundation 4 docs style for highlight.js +Author: Dan Allen <dan.j.allen@gmail.com> +Website: http://foundation.zurb.com/docs/ +Version: 1.0 +Date: 2013-04-02 +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eee; + color: black; +} + +.hljs-link, +.hljs-emphasis, +.hljs-attribute, +.hljs-addition { + color: #070; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong, +.hljs-string, +.hljs-deletion { + color: #d14; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-quote, +.hljs-comment { + color: #998; + font-style: italic; +} + +.hljs-section, +.hljs-title { + color: #900; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #458; +} + +.hljs-variable, +.hljs-template-variable { + color: #336699; +} + +.hljs-bullet { + color: #997700; +} + +.hljs-meta { + color: #3344bb; +} + +.hljs-code, +.hljs-number, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag { + color: #099; +} + +.hljs-regexp { + background-color: #fff0ff; + color: #880088; +} + +.hljs-symbol { + color: #990073; +} + +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #007700; +} diff --git a/node_modules/highlight.js/scss/github-gist.scss b/node_modules/highlight.js/scss/github-gist.scss @@ -0,0 +1,79 @@ +/** + * GitHub Gist Theme + * Author : Anthony Attard - https://github.com/AnthonyAttard + * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro + */ + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #d73a49; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #6f42c1; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +.hljs-number { + color: #005cc5; +} + +.hljs-string { + color: #032f62; +} diff --git a/node_modules/highlight.js/scss/github.scss b/node_modules/highlight.js/scss/github.scss @@ -0,0 +1,99 @@ +/* + +github.com style (c) Vasily Polovnyov <vast@whiteants.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/gml.scss b/node_modules/highlight.js/scss/gml.scss @@ -0,0 +1,78 @@ +/* + +GML Theme - Meseta <meseta@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222222; + color: #C0C0C0; +} + +.hljs-keyword { + color: #FFB871; + font-weight: bold; +} + +.hljs-built_in { + color: #FFB871; +} + +.hljs-literal { + color: #FF8080; +} + +.hljs-symbol { + color: #58E55A; +} + +.hljs-comment { + color: #5B995B; +} + +.hljs-string { + color: #FFFF00; +} + +.hljs-number { + color: #FF8080; +} + +.hljs-attribute, +.hljs-selector-tag, +.hljs-doctag, +.hljs-name, +.hljs-bullet, +.hljs-code, +.hljs-addition, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion, +.hljs-title, +.hljs-section, +.hljs-function, +.hljs-meta-keyword, +.hljs-meta, +.hljs-subst { + color: #C0C0C0; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/googlecode.scss b/node_modules/highlight.js/scss/googlecode.scss @@ -0,0 +1,89 @@ +/* + +Google Code style (c) Aahan Krish <geekpanth3r@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote { + color: #800; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-title, +.hljs-name { + color: #008; +} + +.hljs-variable, +.hljs-template-variable { + color: #660; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-regexp { + color: #080; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-meta, +.hljs-number, +.hljs-link { + color: #066; +} + +.hljs-title, +.hljs-doctag, +.hljs-type, +.hljs-attr, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #606; +} + +.hljs-attribute, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9B703F +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/gradient-dark.scss b/node_modules/highlight.js/scss/gradient-dark.scss @@ -0,0 +1,122 @@ +/* + +Gradient Dark (c) Samia Ali <samiaab1990@gmail.com> + +*/ + +.hljs +{ +display: block; +overflow-x: auto; +padding: 0.5em; +background: rgb(80,31,122); +background: linear-gradient(166deg, rgba(80,31,122,1) 0%, rgba(40,32,179,1) 80%); +color:#e7e4eb; +} + +.hljs-subtr{ + color:#e7e4eb; +} + +.hljs-doctag, +.hljs-meta, +.hljs-comment, +.hljs-quote +{ + color:#af8dd9; +} + +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-regexp, +.hljs-attr, +.hljs-tag +{ + color:#AEFBFF; +} + +.hljs-params, +.hljs-selector-class, +.hljs-bullet + +{ + color:#F19FFF; + +} + +.hljs-keyword, +.hljs-section, +.hljs-meta-keyword, +.hljs-symbol, +.hljs-type + +{ + + color:#17fc95; +} + +.hljs-addition, +.hljs-number, +.hljs-link +{ + color:#C5FE00; +} + + +.hljs-string +{ + color: #38c0ff; +} + + +.hljs-attribute, +.hljs-addition +{ + color:#E7FF9F; +} + +.hljs-variable, +.hljs-template-variable + +{ + color:#E447FF; +} + +.hljs-builtin-name, +.hljs-built_in, +.hljs-formula, +.hljs-name, +.hljs-title, +.hljs-class, +.hljs-function +{ + color: #FFC800; + +} + +.hljs-selector-pseudo, +.hljs-deletion, +.hljs-literal +{ + color:#FF9E44; + +} + +.hljs-emphasis, +.hljs-quote +{ + font-style:italic; +} + +.hljs-params, +.hljs-selector-class, +.hljs-strong, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-section, +.hljs-keyword +{ + font-weight:bold; +} diff --git a/node_modules/highlight.js/scss/gradient-light.scss b/node_modules/highlight.js/scss/gradient-light.scss @@ -0,0 +1,130 @@ +/* + +Gradient Light (c) Samia Ali <samiaab1990@gmail.com> + +*/ + +.hljs +{ +display: block; +overflow-x: auto; +padding: 0.5em; +background: rgb(255,253,141); +background: linear-gradient(142deg, rgba(255,253,141,1) 0%, rgba(252,183,255,1) 35%, rgba(144,236,255,1) 100%); +color:#250482; +} + +.hljs-subtr{ +color:#01958B; +} + +.hljs-doctag, +.hljs-meta, +.hljs-comment, +.hljs-quote +{ + color:#CB7200; +} + +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-regexp, +.hljs-attr, +.hljs-tag +{ + color:#07BD5F; +} + +.hljs-params, +.hljs-selector-class, +.hljs-bullet + +{ + color:#43449F; + +} + +.hljs-keyword, +.hljs-section, +.hljs-meta-keyword, +.hljs-symbol, +.hljs-type + +{ + + color:#7D2801; +} + +.hljs-addition, +.hljs-number, +.hljs-link +{ + color:#7F0096; +} + + +.hljs-string +{ + color: #38c0ff; +} + + +.hljs-attribute, +.hljs-addition +{ + color:#296562; +} + +.hljs-variable, +.hljs-template-variable + +{ + color:#025C8F; +} + +.hljs-builtin-name, +.hljs-built_in, +.hljs-formula, +.hljs-name, +.hljs-title, +.hljs-class, +.hljs-function +{ + color: #529117; + +} + +.hljs-selector-pseudo, +.hljs-deletion, +.hljs-literal +{ + color:#AD13FF; + +} + +.hljs-emphasis, +.hljs-quote +{ + font-style:italic; +} + +.hljs-params, +.hljs-selector-class, +.hljs-strong, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-section, +.hljs-keyword +{ + font-weight:bold; +} + + + + + + + + diff --git a/node_modules/highlight.js/scss/grayscale.scss b/node_modules/highlight.js/scss/grayscale.scss @@ -0,0 +1,101 @@ +/* + +grayscale style (c) MY Sun <simonmysun@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal { + color: #777; +} + +.hljs-string, +.hljs-doctag, +.hljs-formula { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #000; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-class .hljs-title, +.hljs-type, +.hljs-name { + color: #333; + font-weight: bold; +} + +.hljs-tag { + color: #333; +} + +.hljs-regexp { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #000; + text-decoration: underline; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + color: #fff; + background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat; +} + +.hljs-addition { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/gruvbox-dark.scss b/node_modules/highlight.js/scss/gruvbox-dark.scss @@ -0,0 +1,108 @@ +/* + +Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282828; +} + +.hljs, +.hljs-subst { + color: #ebdbb2; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #fb4934; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #83a598; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #fabd2f; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #fe8019; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #b8bb26; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #8ec07c; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #d3869b; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/gruvbox-light.scss b/node_modules/highlight.js/scss/gruvbox-light.scss @@ -0,0 +1,108 @@ +/* + +Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fbf1c7; +} + +.hljs, +.hljs-subst { + color: #3c3836; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #9d0006; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #076678; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #b57614; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #af3a03; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #79740e; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #427b58; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/hopscotch.scss b/node_modules/highlight.js/scss/hopscotch.scss @@ -0,0 +1,84 @@ +/* + * Hopscotch + * by Jan T. Sott + * https://github.com/idleberg/Hopscotch + * + * This work is licensed under the Creative Commons CC0 1.0 Universal License + */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #989498; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-deletion { + color: #dd464c; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #fd8b19; +} + +/* Yellow */ +.hljs-class .hljs-title { + color: #fdcc59; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #8fc13e; +} + +/* Aqua */ +.hljs-meta { + color: #149b93; +} + +/* Blue */ +.hljs-function, +.hljs-section, +.hljs-title { + color: #1290bf; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c85e7c; +} + +.hljs { + display: block; + overflow-x: auto; + background: #322931; + color: #b9b5b8; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/hybrid.scss b/node_modules/highlight.js/scss/hybrid.scss @@ -0,0 +1,102 @@ +/* + +vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) + +*/ + +/*background color*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1d1f21; +} + +/*selection color*/ +.hljs::selection, +.hljs span::selection { + background: #373b41; +} + +.hljs::-moz-selection, +.hljs span::-moz-selection { + background: #373b41; +} + +/*foreground color*/ +.hljs { + color: #c5c8c6; +} + +/*color: fg_yellow*/ +.hljs-title, +.hljs-name { + color: #f0c674; +} + +/*color: fg_comment*/ +.hljs-comment, +.hljs-meta, +.hljs-meta .hljs-keyword { + color: #707880; +} + +/*color: fg_red*/ +.hljs-number, +.hljs-symbol, +.hljs-literal, +.hljs-deletion, +.hljs-link { + color: #cc6666 +} + +/*color: fg_green*/ +.hljs-string, +.hljs-doctag, +.hljs-addition, +.hljs-regexp, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #b5bd68; +} + +/*color: fg_purple*/ +.hljs-attribute, +.hljs-code, +.hljs-selector-id { + color: #b294bb; +} + +/*color: fg_blue*/ +.hljs-keyword, +.hljs-selector-tag, +.hljs-bullet, +.hljs-tag { + color: #81a2be; +} + +/*color: fg_aqua*/ +.hljs-subst, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8abeb7; +} + +/*color: fg_orange*/ +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-quote, +.hljs-section, +.hljs-selector-class { + color: #de935f; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/idea.scss b/node_modules/highlight.js/scss/idea.scss @@ -0,0 +1,97 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #fff; +} + +.hljs-subst, +.hljs-title { + font-weight: normal; + color: #000; +} + +.hljs-comment, +.hljs-quote { + color: #808080; + font-style: italic; +} + +.hljs-meta { + color: #808000; +} + +.hljs-tag { + background: #efefef; +} + +.hljs-section, +.hljs-name, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class { + font-weight: bold; + color: #000080; +} + +.hljs-attribute, +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: bold; + color: #0000ff; +} + +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: normal; +} + +.hljs-string { + color: #008000; + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +.hljs-doctag { + text-decoration: underline; +} + +.hljs-variable, +.hljs-template-variable { + color: #660e7a; +} + +.hljs-addition { + background: #baeeba; +} + +.hljs-deletion { + background: #ffc8bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/ir-black.scss b/node_modules/highlight.js/scss/ir-black.scss @@ -0,0 +1,73 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru> +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7c7c7c; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag, +.hljs-name { + color: #96cbfe; +} + +.hljs-attribute, +.hljs-selector-id { + color: #ffffb6; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition { + color: #a8ff60; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-doctag { + color: #ffffb6; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-variable, +.hljs-template-variable, +.hljs-literal { + color: #c6c5fe; +} + +.hljs-number, +.hljs-deletion { + color:#ff73fd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/isbl-editor-dark.scss b/node_modules/highlight.js/scss/isbl-editor-dark.scss @@ -0,0 +1,112 @@ +/* + +ISBL Editor style dark color scheme (c) Dmitriy Tarasov <dimatar@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #404040; + color: #f0f0f0; +} + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #f0f0f0; +} + +.hljs-comment { + color: #b5b5b5; + font-style: italic; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + color: #f0f0f0; + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-string { + color: #97bf0d; +} + +.hljs-type, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #f0f0f0; +} + +.hljs-title, +.hljs-section { + color: #df471e; +} + +.hljs-title>.hljs-built_in { + color: #81bce9; + font-weight: normal; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #e2c696; +} + +/* Language color: hue: 90; */ + +.hljs-built_in, +.hljs-literal { + color: #97bf0d; + font-weight: bold; +} + +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + +.hljs-class { + color: #ce9d4d; + font-weight: bold; +} + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/isbl-editor-light.scss b/node_modules/highlight.js/scss/isbl-editor-light.scss @@ -0,0 +1,111 @@ +/* + +ISBL Editor style light color schemec (c) Dmitriy Tarasov <dimatar@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +/* Base color: saturation 0; */ + +.hljs-subst { + color: black; +} + +.hljs-comment { + color: #555555; + font-style: italic; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + color: #000000; + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-string { + color: #000080; +} + +.hljs-type, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #000000; +} + +.hljs-title, +.hljs-section { + color: #fb2c00; +} + +.hljs-title>.hljs-built_in { + color: #008080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #5e1700; +} + +/* Language color: hue: 90; */ + +.hljs-built_in, +.hljs-literal { + color: #000080; + font-weight: bold; +} + +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + +.hljs-class { + color: #6f1C00; + font-weight: bold; +} + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/kimbie.dark.scss b/node_modules/highlight.js/scss/kimbie.dark.scss @@ -0,0 +1,74 @@ +/* + Name: Kimbie (dark) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #d6baad; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #221a0f; + color: #d3af86; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/kimbie.light.scss b/node_modules/highlight.js/scss/kimbie.light.scss @@ -0,0 +1,74 @@ +/* + Name: Kimbie (light) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #a57a4c; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fbebd4; + color: #84613d; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/lightfair.scss b/node_modules/highlight.js/scss/lightfair.scss @@ -0,0 +1,88 @@ +/* + +Lightfair style (c) Tristian Kelly <tristian.kelly560@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + /* TODO: background? */ +} + +.hljs-name { + color:#01a3a3; +} + +.hljs-tag,.hljs-meta { + color:#778899; +} + +.hljs, +.hljs-subst { + color: #444 +} + +.hljs-comment { + color: #888888 +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold +} + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #4286f4 +} + +.hljs-title, +.hljs-section { + color: #4286f4; + font-weight: bold +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060 +} + +.hljs-literal { + color: #62bcbc +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #25c6c6 +} + +.hljs-meta-string { + color: #4d99bf +} + +.hljs-emphasis { + font-style: italic +} + +.hljs-strong { + font-weight: bold +} diff --git a/node_modules/highlight.js/scss/lioshi.scss b/node_modules/highlight.js/scss/lioshi.scss @@ -0,0 +1,88 @@ +/* lioshi Theme */ +/* Original theme - https://github.com/lioshi/vscode-lioshi-theme */ + +/* Comment */ +.hljs-comment { + color: #8d8d8d; +} + +/* quote */ +.hljs-quote { + color: #b3c7d8; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #cc6666; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-subst +.hljs-link { + color: #de935f; +} + +/* Yellow */ +.hljs-attribute { + color: #f0c674; +} + +/* Green */ +.hljs-string, +.hljs-bullet, +.hljs-params, +.hljs-addition { + color: #b5bd68; +} + +/* Blue */ +.hljs-title, +.hljs-meta, +.hljs-section { + color: #81a2be; +} + +/* Purple */ +.hljs-selector-tag, +.hljs-keyword, +.hljs-function, +.hljs-class { + color: #be94bb; +} + +/* Purple light */ +.hljs-symbol { + color: #dbc4d9; +} + +.hljs { + display: block; + overflow-x: auto; + background: #303030; + color: #c5c8c6; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + + + + diff --git a/node_modules/highlight.js/scss/magula.scss b/node_modules/highlight.js/scss/magula.scss @@ -0,0 +1,70 @@ +/* +Description: Magula style for highligh.js +Author: Ruslan Keba <rukeba@gmail.com> +Website: http://rukeba.com/ +Version: 1.0 +Date: 2009-01-03 +Music: Aphex Twin / Xtal +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background-color: #f4f4f4; + color: black; +} + +.hljs-subst { + color: black; +} + +.hljs-string, +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #050; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-type, +.hljs-link { + color: #800; +} + +.hljs-deletion, +.hljs-meta { + color: #00e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-tag, +.hljs-name { + font-weight: bold; + color: navy; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/mono-blue.scss b/node_modules/highlight.js/scss/mono-blue.scss @@ -0,0 +1,56 @@ +/* + Five-color theme from a single blue hue. +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eaeef3; + color: #00193a; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-comment { + color: #738191; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-literal, +.hljs-type, +.hljs-addition, +.hljs-tag, +.hljs-quote, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #0048ab; +} + +.hljs-meta, +.hljs-subst, +.hljs-symbol, +.hljs-regexp, +.hljs-attribute, +.hljs-deletion, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-bullet { + color: #4c81c9; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/monokai-sublime.scss b/node_modules/highlight.js/scss/monokai-sublime.scss @@ -0,0 +1,83 @@ +/* + +Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #23241f; +} + +.hljs, +.hljs-tag, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #ae81ff; +} + +.hljs-code, +.hljs-title, +.hljs-section, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-attr { + color: #f92672; +} + +.hljs-symbol, +.hljs-attribute { + color: #66d9ef; +} + +.hljs-params, +.hljs-class .hljs-title { + color: #f8f8f2; +} + +.hljs-string, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-variable { + color: #e6db74; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} diff --git a/node_modules/highlight.js/scss/monokai.scss b/node_modules/highlight.js/scss/monokai.scss @@ -0,0 +1,71 @@ +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #272822; + color: #ddd; +} + +.hljs-tag, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-strong, +.hljs-name { + color: #f92672; +} + +.hljs-code { + color: #66d9ef; +} + +.hljs-class .hljs-title { + color: white; +} + +.hljs-attribute, +.hljs-symbol, +.hljs-regexp, +.hljs-link { + color: #bf79db; +} + +.hljs-string, +.hljs-bullet, +.hljs-subst, +.hljs-title, +.hljs-section, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #a6e22e; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-selector-id { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/night-owl.scss b/node_modules/highlight.js/scss/night-owl.scss @@ -0,0 +1,182 @@ +/* + +Night Owl for highlight.js (c) Carl Baxter <carl@cbax.tech> + +An adaptation of Sarah Drasner's Night Owl VS Code Theme +https://github.com/sdras/night-owl-vscode-theme + +Copyright (c) 2018 Sarah Drasner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #011627; + color: #d6deeb; +} + +/* General Purpose */ +.hljs-keyword { + color: #c792ea; + font-style: italic; +} +.hljs-built_in { + color: #addb67; + font-style: italic; +} +.hljs-type { + color: #82aaff; +} +.hljs-literal { + color: #ff5874; +} +.hljs-number { + color: #F78C6C; +} +.hljs-regexp { + color: #5ca7e4; +} +.hljs-string { + color: #ecc48d; +} +.hljs-subst { + color: #d3423e; +} +.hljs-symbol { + color: #82aaff; +} +.hljs-class { + color: #ffcb8b; +} +.hljs-function { + color: #82AAFF; +} +.hljs-title { + color: #DCDCAA; + font-style: italic; +} +.hljs-params { + color: #7fdbca; +} + +/* Meta */ +.hljs-comment { + color: #637777; + font-style: italic; +} +.hljs-doctag { + color: #7fdbca; +} +.hljs-meta { + color: #82aaff; +} +.hljs-meta-keyword { + color: #82aaff; +} +.hljs-meta-string { + color: #ecc48d; +} + +/* Tags, attributes, config */ +.hljs-section { + color: #82b1ff; +} +.hljs-tag, +.hljs-name, +.hljs-builtin-name { + color: #7fdbca; +} +.hljs-attr { + color: #7fdbca; +} +.hljs-attribute { + color: #80cbc4; +} +.hljs-variable { + color: #addb67; +} + +/* Markup */ +.hljs-bullet { + color: #d9f5dd; +} +.hljs-code { + color: #80CBC4; +} +.hljs-emphasis { + color: #c792ea; + font-style: italic; +} +.hljs-strong { + color: #addb67; + font-weight: bold; +} +.hljs-formula { + color: #c792ea; +} +.hljs-link { + color: #ff869a; +} +.hljs-quote { + color: #697098; + font-style: italic; +} + +/* CSS */ +.hljs-selector-tag { + color: #ff6363; +} + +.hljs-selector-id { + color: #fad430; +} + +.hljs-selector-class { + color: #addb67; + font-style: italic; +} + +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #c792ea; + font-style: italic; +} + +/* Templates */ +.hljs-template-tag { + color: #c792ea; +} +.hljs-template-variable { + color: #addb67; +} + +/* diff */ +.hljs-addition { + color: #addb67ff; + font-style: italic; +} + +.hljs-deletion { + color: #EF535090; + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/nnfx-dark.scss b/node_modules/highlight.js/scss/nnfx-dark.scss @@ -0,0 +1,106 @@ +/** + * nnfx dark - a theme inspired by Netscape Navigator/Firefox + * + * @version 1.0.0 + * @author (c) 2020 Jim Mason <jmason@ibinx.com> + * @license https://creativecommons.org/licenses/by-sa/4.0 CC BY-SA 4.0 + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: #fff; +} + +.xml .hljs-meta { + font-weight: bold; + font-style: italic; + color: #69f; +} + +.hljs-comment, +.hljs-quote { + font-style: italic; + color: #9c6; +} + +.hljs-name, +.hljs-keyword { + color: #a7a; +} + +.hljs-name, +.hljs-attr { + font-weight: bold; +} + +.hljs-string { + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #588; +} + +.hljs-code, +.hljs-string, +.hljs-meta-string, +.hljs-number, +.hljs-regexp, +.hljs-link { + color: #bce; +} + +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name { + color: #d40; +} + +.hljs-section, +.hljs-meta { + color: #a85; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #96c; +} + +.hljs-function .hljs-title, +.hljs-attr, +.hljs-subst { + color: #fff; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #797; +} + +.hljs-deletion { + background-color: #c99; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #964; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/nnfx.scss b/node_modules/highlight.js/scss/nnfx.scss @@ -0,0 +1,106 @@ +/** + * nnfx - a theme inspired by Netscape Navigator/Firefox + * + * @version 1.0.0 + * @author (c) 2020 Jim Mason <jmason@ibinx.com> + * @license https://creativecommons.org/licenses/by-sa/4.0 CC BY-SA 4.0 + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; + color: #000; +} + +.xml .hljs-meta { + font-weight: bold; + font-style: italic; + color: #48b; +} + +.hljs-comment, +.hljs-quote { + font-style: italic; + color: #070; +} + +.hljs-name, +.hljs-keyword { + color: #808; +} + +.hljs-name, +.hljs-attr { + font-weight: bold; +} + +.hljs-string { + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #477; +} + +.hljs-code, +.hljs-string, +.hljs-meta-string, +.hljs-number, +.hljs-regexp, +.hljs-link { + color: #00f; +} + +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name { + color: #f40; +} + +.hljs-section, +.hljs-meta { + color: #642; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #639; +} + +.hljs-function .hljs-title, +.hljs-attr, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #beb; +} + +.hljs-deletion { + background-color: #fbb; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #964; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/nord.scss b/node_modules/highlight.js/scss/nord.scss @@ -0,0 +1,309 @@ +/* + * Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com> + * Copyright (c) 2017-present Sven Greb <development@svengreb.de> + * + * Project: Nord highlight.js + * Version: 0.1.0 + * Repository: https://github.com/arcticicestudio/nord-highlightjs + * License: MIT + * References: + * https://github.com/arcticicestudio/nord + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #2E3440; +} + +.hljs, +.hljs-subst { + color: #D8DEE9; +} + +.hljs-selector-tag { + color: #81A1C1; +} + +.hljs-selector-id { + color: #8FBCBB; + font-weight: bold; +} + +.hljs-selector-class { + color: #8FBCBB; +} + +.hljs-selector-attr { + color: #8FBCBB; +} + +.hljs-selector-pseudo { + color: #88C0D0; +} + +.hljs-addition { + background-color: rgba(163, 190, 140, 0.5); +} + +.hljs-deletion { + background-color: rgba(191, 97, 106, 0.5); +} + +.hljs-built_in, +.hljs-type { + color: #8FBCBB; +} + +.hljs-class { + color: #8FBCBB; +} + +.hljs-function { + color: #88C0D0; +} + +.hljs-function > .hljs-title { + color: #88C0D0; +} + +.hljs-keyword, +.hljs-literal, +.hljs-symbol { + color: #81A1C1; +} + +.hljs-number { + color: #B48EAD; +} + +.hljs-regexp { + color: #EBCB8B; +} + +.hljs-string { + color: #A3BE8C; +} + +.hljs-title { + color: #8FBCBB; +} + +.hljs-params { + color: #D8DEE9; +} + +.hljs-bullet { + color: #81A1C1; +} + +.hljs-code { + color: #8FBCBB; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-formula { + color: #8FBCBB; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link:hover { + text-decoration: underline; +} + +.hljs-quote { + color: #4C566A; +} + +.hljs-comment { + color: #4C566A; +} + +.hljs-doctag { + color: #8FBCBB; +} + +.hljs-meta, +.hljs-meta-keyword { + color: #5E81AC; +} + +.hljs-meta-string { + color: #A3BE8C; +} + +.hljs-attr { + color: #8FBCBB; +} + +.hljs-attribute { + color: #D8DEE9; +} + +.hljs-builtin-name { + color: #81A1C1; +} + +.hljs-name { + color: #81A1C1; +} + +.hljs-section { + color: #88C0D0; +} + +.hljs-tag { + color: #81A1C1; +} + +.hljs-variable { + color: #D8DEE9; +} + +.hljs-template-variable { + color: #D8DEE9; +} + +.hljs-template-tag { + color: #5E81AC; +} + +.abnf .hljs-attribute { + color: #88C0D0; +} + +.abnf .hljs-symbol { + color: #EBCB8B; +} + +.apache .hljs-attribute { + color: #88C0D0; +} + +.apache .hljs-section { + color: #81A1C1; +} + +.arduino .hljs-built_in { + color: #88C0D0; +} + +.aspectj .hljs-meta { + color: #D08770; +} + +.aspectj > .hljs-title { + color: #88C0D0; +} + +.bnf .hljs-attribute { + color: #8FBCBB; +} + +.clojure .hljs-name { + color: #88C0D0; +} + +.clojure .hljs-symbol { + color: #EBCB8B; +} + +.coq .hljs-built_in { + color: #88C0D0; +} + +.cpp .hljs-meta-string { + color: #8FBCBB; +} + +.css .hljs-built_in { + color: #88C0D0; +} + +.css .hljs-keyword { + color: #D08770; +} + +.diff .hljs-meta { + color: #8FBCBB; +} + +.ebnf .hljs-attribute { + color: #8FBCBB; +} + +.glsl .hljs-built_in { + color: #88C0D0; +} + +.groovy .hljs-meta:not(:first-child) { + color: #D08770; +} + +.haxe .hljs-meta { + color: #D08770; +} + +.java .hljs-meta { + color: #D08770; +} + +.ldif .hljs-attribute { + color: #8FBCBB; +} + +.lisp .hljs-name { + color: #88C0D0; +} + +.lua .hljs-built_in { + color: #88C0D0; +} + +.moonscript .hljs-built_in { + color: #88C0D0; +} + +.nginx .hljs-attribute { + color: #88C0D0; +} + +.nginx .hljs-section { + color: #5E81AC; +} + +.pf .hljs-built_in { + color: #88C0D0; +} + +.processing .hljs-built_in { + color: #88C0D0; +} + +.scss .hljs-keyword { + color: #81A1C1; +} + +.stylus .hljs-keyword { + color: #81A1C1; +} + +.swift .hljs-meta { + color: #D08770; +} + +.vim .hljs-built_in { + color: #88C0D0; + font-style: italic; +} + +.yaml .hljs-meta { + color: #D08770; +} diff --git a/node_modules/highlight.js/scss/obsidian.scss b/node_modules/highlight.js/scss/obsidian.scss @@ -0,0 +1,88 @@ +/** + * Obsidian style + * ported by Alexander Marenin (http://github.com/ioncreature) + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282b2e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-selector-id { + color: #93c763; +} + +.hljs-number { + color: #ffcd22; +} + +.hljs { + color: #e0e2e4; +} + +.hljs-attribute { + color: #668bb0; +} + +.hljs-code, +.hljs-class .hljs-title, +.hljs-section { + color: white; +} + +.hljs-regexp, +.hljs-link { + color: #d39745; +} + +.hljs-meta { + color: #557182; +} + +.hljs-tag, +.hljs-name, +.hljs-bullet, +.hljs-subst, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8cbbad; +} + +.hljs-string, +.hljs-symbol { + color: #ec7600; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion { + color: #818e96; +} + +.hljs-selector-class { + color: #A082BD +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/ocean.scss b/node_modules/highlight.js/scss/ocean.scss @@ -0,0 +1,74 @@ +/* Ocean Dark Theme */ +/* https://github.com/gavsiu */ +/* Original theme - https://github.com/chriskempson/base16 */ + +/* Ocean Comment */ +.hljs-comment, +.hljs-quote { + color: #65737e; +} + +/* Ocean Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #bf616a; +} + +/* Ocean Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #d08770; +} + +/* Ocean Yellow */ +.hljs-attribute { + color: #ebcb8b; +} + +/* Ocean Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #a3be8c; +} + +/* Ocean Blue */ +.hljs-title, +.hljs-section { + color: #8fa1b3; +} + +/* Ocean Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b48ead; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b303b; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/paraiso-dark.scss b/node_modules/highlight.js/scss/paraiso-dark.scss @@ -0,0 +1,72 @@ +/* + Paraíso (dark) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #8d8687; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2f1e2e; + color: #a39e9b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/paraiso-light.scss b/node_modules/highlight.js/scss/paraiso-light.scss @@ -0,0 +1,72 @@ +/* + Paraíso (light) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #776e71; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #e7e9db; + color: #4f424c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/pojoaque.jpg b/node_modules/highlight.js/scss/pojoaque.jpg Binary files differ. diff --git a/node_modules/highlight.js/scss/pojoaque.scss b/node_modules/highlight.js/scss/pojoaque.scss @@ -0,0 +1,83 @@ +/* + +Pojoaque Style by Jason Tate +http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +Based on Solarized Style from http://ethanschoonover.com/solarized + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #dccf8f; + background: url(./pojoaque.jpg) repeat scroll left top #181914; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-addition { + color: #b64926; +} + +.hljs-number, +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #468966; +} + +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-name { + color: #ffb03b; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type, +.hljs-tag { + color: #b58900; +} + +.hljs-attribute { + color: #b89859; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-subst, +.hljs-meta { + color: #cb4b16; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #d3a60c; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/purebasic.scss b/node_modules/highlight.js/scss/purebasic.scss @@ -0,0 +1,96 @@ +/* + +PureBASIC native IDE style ( version 1.0 - April 2016 ) + +by Tristano Ajmone <tajmone@gmail.com> + +Public Domain + +NOTE_1: PureBASIC code syntax highlighting only applies the following classes: + .hljs-comment + .hljs-function + .hljs-keywords + .hljs-string + .hljs-symbol + + Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style. + If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by + a "--- used for PureBASIC ... ---" comment on same line. + +NOTE_2: Color names provided in comments were derived using "Name that Color" online tool: + http://chir.ag/projects/name-that-color +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFDF; /* Half and Half (approx.) */ +/* --- Uncomment to add PureBASIC native IDE styled font! + font-family: Consolas; +*/ +} + +.hljs, /* --- used for PureBASIC base color --- */ +.hljs-type, /* --- used for PureBASIC Procedures return type --- */ +.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */ +.hljs-name, +.hljs-number, +.hljs-attr, +.hljs-params, +.hljs-subst { + color: #000000; /* Black */ +} + +.hljs-comment, /* --- used for PureBASIC Comments --- */ +.hljs-regexp, +.hljs-section, +.hljs-selector-pseudo, +.hljs-addition { + color: #00AAAA; /* Persian Green (approx.) */ +} + +.hljs-title, /* --- used for PureBASIC Procedures Names --- */ +.hljs-tag, +.hljs-variable, +.hljs-code { + color: #006666; /* Blue Stone (approx.) */ +} + +.hljs-keyword, /* --- used for PureBASIC Keywords --- */ +.hljs-class, +.hljs-meta-keyword, +.hljs-selector-class, +.hljs-built_in, +.hljs-builtin-name { + color: #006666; /* Blue Stone (approx.) */ + font-weight: bold; +} + +.hljs-string, /* --- used for PureBASIC Strings --- */ +.hljs-selector-attr { + color: #0080FF; /* Azure Radiance (approx.) */ +} + +.hljs-symbol, /* --- used for PureBASIC Constants --- */ +.hljs-link, +.hljs-deletion, +.hljs-attribute { + color: #924B72; /* Cannon Pink (approx.) */ +} + +.hljs-meta, +.hljs-literal, +.hljs-selector-id { + color: #924B72; /* Cannon Pink (approx.) */ + font-weight: bold; +} + +.hljs-strong, +.hljs-name { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/qtcreator_dark.scss b/node_modules/highlight.js/scss/qtcreator_dark.scss @@ -0,0 +1,83 @@ +/* + +Qt Creator dark color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000000; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #aaaaaa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #ff55ff; +} + +.hljs-code +.hljs-selector-class { + color: #aaaaff; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #ffff55; +} + +.hljs-attribute { + color: #ff5555; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #8888ff; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #ff55ff; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #55ffff; +} diff --git a/node_modules/highlight.js/scss/qtcreator_light.scss b/node_modules/highlight.js/scss/qtcreator_light.scss @@ -0,0 +1,83 @@ +/* + +Qt Creator light color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #ffffff; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #000000; +} + +.hljs-strong, +.hljs-emphasis { + color: #000000; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #000080; +} + +.hljs-code +.hljs-selector-class { + color: #800080; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #808000; +} + +.hljs-attribute { + color: #800000; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #0055AF; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #008000; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #008000; +} diff --git a/node_modules/highlight.js/scss/railscasts.scss b/node_modules/highlight.js/scss/railscasts.scss @@ -0,0 +1,106 @@ +/* + +Railscasts-like style (c) Visoft, Inc. (Damien White) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #232323; + color: #e6e1dc; +} + +.hljs-comment, +.hljs-quote { + color: #bc9458; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #c26230; +} + +.hljs-string, +.hljs-number, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable { + color: #a5c261; +} + +.hljs-subst { + color: #519f50; +} + +.hljs-tag, +.hljs-name { + color: #e8bf6a; +} + +.hljs-type { + color: #da4939; +} + + +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-attr, +.hljs-link { + color: #6d9cbe; +} + +.hljs-params { + color: #d0d0ff; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #9b859d; +} + +.hljs-title, +.hljs-section { + color: #ffc66d; +} + +.hljs-addition { + background-color: #144212; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/scss/rainbow.scss b/node_modules/highlight.js/scss/rainbow.scss @@ -0,0 +1,85 @@ +/* + +Style with support for rainbow parens + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #474949; + color: #d1d9e1; +} + + +.hljs-comment, +.hljs-quote { + color: #969896; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-type, +.hljs-addition { + color: #cc99cc; +} + +.hljs-number, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #f99157; +} + +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #8abeb7; +} + +.hljs-title, +.hljs-name, +.hljs-section, +.hljs-built_in { + color: #b5bd68; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-class .hljs-title { + color: #ffcc66; +} + +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-attr, +.hljs-attribute { + color: #81a2be; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/routeros.scss b/node_modules/highlight.js/scss/routeros.scss @@ -0,0 +1,108 @@ +/* + + highlight.js style for Microtik RouterOS script + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + +.hljs-attribute { + color: #0E9A00; +} + +.hljs-function { + color: #99069A; +} + +.hljs-builtin-name { + color: #99069A; +} + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #0C9A9A; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/school-book.png b/node_modules/highlight.js/scss/school-book.png Binary files differ. diff --git a/node_modules/highlight.js/scss/school-book.scss b/node_modules/highlight.js/scss/school-book.scss @@ -0,0 +1,69 @@ +/* + +School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 15px 0.5em 0.5em 30px; + font-size: 11px; + line-height:16px; + background:#f6f6ae url(./school-book.png); + border-top: solid 2px #d2e8b9; + border-bottom: solid 1px #d2e8b9; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #3e5915; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-built_in, +.hljs-builtin-name, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #e60415; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/shades-of-purple.scss b/node_modules/highlight.js/scss/shades-of-purple.scss @@ -0,0 +1,96 @@ +/** + * Shades of Purple Theme — for Highlightjs. + * + * @author (c) Ahmad Awais <https://twitter.com/mrahmadawais/> + * @link GitHub Repo → https://github.com/ahmadawais/Shades-of-Purple-HighlightJS + * @version 1.5.0 + */ + +.hljs { + display: block; + overflow-x: auto; + /* Custom font is optional */ + /* font-family: 'Operator Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', 'monospace'; */ + padding: 0.5em; + background: #2d2b57; + font-weight: normal; +} + +.hljs-title { + color: #fad000; + font-weight: normal; +} + +.hljs-name { + color: #a1feff; +} + +.hljs-tag { + color: #ffffff; +} + +.hljs-attr { + color: #f8d000; + font-style: italic; +} + +.hljs-built_in, +.hljs-selector-tag, +.hljs-section { + color: #fb9e00; +} + +.hljs-keyword { + color: #fb9e00; +} + +.hljs, +.hljs-subst { + color: #e3dfff; +} + +.hljs-string, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-code, +.hljs-regexp, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-quote, +.hljs-deletion { + color: #4cd213; +} + +.hljs-meta, +.hljs-meta-string { + color: #fb9e00; +} + +.hljs-comment { + color: #ac65ff; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-name, +.hljs-strong { + font-weight: normal; +} + +.hljs-literal, +.hljs-number { + color: #fa658d; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/solarized-dark.scss b/node_modules/highlight.js/scss/solarized-dark.scss @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #002b36; + color: #839496; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/solarized-light.scss b/node_modules/highlight.js/scss/solarized-light.scss @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fdf6e3; + color: #657b83; +} + +.hljs-comment, +.hljs-quote { + color: #93a1a1; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/srcery.scss b/node_modules/highlight.js/scss/srcery.scss @@ -0,0 +1,78 @@ +/* +Description: Srcery dark color scheme for highlight.js +Author: Chen Bin <chen.bin@gmail.com> +Website: https://srcery-colors.github.io/ +Date: 2020-04-06 +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1C1B19; + color: #FCE8C3; +} + +.hljs-strong, +.hljs-emphasis { + color: #918175; +} + +.hljs-bullet, +.hljs-quote, +.hljs-link, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #FF5C8F; +} + +.hljs-code, +.hljs-selector-class { + color: #68A8E4 +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-attribute, +.hljs-variable { + color: #EF2F27; +} + +.hljs-name, +.hljs-title { + color: #FBB829; +} + +.hljs-type, +.hljs-params { + color: #0AAEB3; +} + +.hljs-string { + color: #98BC37; +} + +.hljs-subst, +.hljs-built_in, +.hljs-builtin-name, +.hljs-symbol, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #C07ABE; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #918175; +} diff --git a/node_modules/highlight.js/scss/sunburst.scss b/node_modules/highlight.js/scss/sunburst.scss @@ -0,0 +1,102 @@ +/* + +Sunburst-like style (c) Vasily Polovnyov <vast@whiteants.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #aeaeae; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #e28964; +} + +.hljs-string { + color: #65b042; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-tag, +.hljs-name { + color: #89bdff; +} + +.hljs-class .hljs-title, +.hljs-doctag { + text-decoration: underline; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-number { + color: #3387cc; +} + +.hljs-params, +.hljs-variable, +.hljs-template-variable { + color: #3e87e3; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #8996a8; +} + +.hljs-formula { + background-color: #0e2231; + color: #f8f8f8; + font-style: italic; +} + +.hljs-addition { + background-color: #253b22; + color: #f8f8f8; +} + +.hljs-deletion { + background-color: #420e09; + color: #f8f8f8; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/tomorrow-night-blue.scss b/node_modules/highlight.js/scss/tomorrow-night-blue.scss @@ -0,0 +1,75 @@ +/* Tomorrow Night Blue Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #7285b7; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #ff9da4; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #ffc58f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffeead; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #d1f1a9; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #bbdaff; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ebbbff; +} + +.hljs { + display: block; + overflow-x: auto; + background: #002451; + color: white; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/tomorrow-night-bright.scss b/node_modules/highlight.js/scss/tomorrow-night-bright.scss @@ -0,0 +1,74 @@ +/* Tomorrow Night Bright Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #d54e53; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #e78c45; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #e7c547; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b9ca4a; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #7aa6da; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c397d8; +} + +.hljs { + display: block; + overflow-x: auto; + background: black; + color: #eaeaea; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/tomorrow-night-eighties.scss b/node_modules/highlight.js/scss/tomorrow-night-eighties.scss @@ -0,0 +1,74 @@ +/* Tomorrow Night Eighties Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #999999; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #f2777a; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffcc66; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #99cc99; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #6699cc; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #cc99cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2d2d2d; + color: #cccccc; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/tomorrow-night.scss b/node_modules/highlight.js/scss/tomorrow-night.scss @@ -0,0 +1,75 @@ +/* Tomorrow Night Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #cc6666; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #de935f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #f0c674; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b5bd68; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #81a2be; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b294bb; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1d1f21; + color: #c5c8c6; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/tomorrow.scss b/node_modules/highlight.js/scss/tomorrow.scss @@ -0,0 +1,72 @@ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #8e908c; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #c82829; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5871f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #eab700; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #718c00; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #4271ae; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8959a8; +} + +.hljs { + display: block; + overflow-x: auto; + background: white; + color: #4d4d4c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/vs.scss b/node_modules/highlight.js/scss/vs.scss @@ -0,0 +1,68 @@ +/* + +Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name> + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote, +.hljs-variable { + color: #008000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-built_in, +.hljs-name, +.hljs-tag { + color: #00f; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-literal, +.hljs-template-tag, +.hljs-template-variable, +.hljs-type, +.hljs-addition { + color: #a31515; +} + +.hljs-deletion, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-meta { + color: #2b91af; +} + +.hljs-doctag { + color: #808080; +} + +.hljs-attr { + color: #f00; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #00b0e8; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/scss/vs2015.scss b/node_modules/highlight.js/scss/vs2015.scss @@ -0,0 +1,115 @@ +/* + * Visual Studio 2015 dark style + * Author: Nicolas LLOBERA <nllobera@gmail.com> + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1E1E1E; + color: #DCDCDC; +} + +.hljs-keyword, +.hljs-literal, +.hljs-symbol, +.hljs-name { + color: #569CD6; +} +.hljs-link { + color: #569CD6; + text-decoration: underline; +} + +.hljs-built_in, +.hljs-type { + color: #4EC9B0; +} + +.hljs-number, +.hljs-class { + color: #B8D7A3; +} + +.hljs-string, +.hljs-meta-string { + color: #D69D85; +} + +.hljs-regexp, +.hljs-template-tag { + color: #9A5334; +} + +.hljs-subst, +.hljs-function, +.hljs-title, +.hljs-params, +.hljs-formula { + color: #DCDCDC; +} + +.hljs-comment, +.hljs-quote { + color: #57A64A; + font-style: italic; +} + +.hljs-doctag { + color: #608B4E; +} + +.hljs-meta, +.hljs-meta-keyword, +.hljs-tag { + color: #9B9B9B; +} + +.hljs-variable, +.hljs-template-variable { + color: #BD63C5; +} + +.hljs-attr, +.hljs-attribute, +.hljs-builtin-name { + color: #9CDCFE; +} + +.hljs-section { + color: gold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +/*.hljs-code { + font-family:'Monospace'; +}*/ + +.hljs-bullet, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #D7BA7D; +} + +.hljs-addition { + background-color: #144212; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + display: inline-block; + width: 100%; +} diff --git a/node_modules/highlight.js/scss/xcode.scss b/node_modules/highlight.js/scss/xcode.scss @@ -0,0 +1,104 @@ +/* + +XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; + color: black; +} + +/* Gray DOCTYPE selectors like WebKit */ +.xml .hljs-meta { + color: #c0c0c0; +} + +.hljs-comment, +.hljs-quote { + color: #007400; +} + +.hljs-tag, +.hljs-attribute, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-name { + color: #aa0d91; +} + +.hljs-variable, +.hljs-template-variable { + color: #3F6E74; +} + +.hljs-code, +.hljs-string, +.hljs-meta-string { + color: #c41a16; +} + +.hljs-regexp, +.hljs-link { + color: #0E0EFF; +} + +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-number { + color: #1c00cf; +} + +.hljs-section, +.hljs-meta { + color: #643820; +} + + +.hljs-class .hljs-title, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #5c2699; +} + +.hljs-attr { + color: #836C28; +} + +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9b703f; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/scss/xt256.scss b/node_modules/highlight.js/scss/xt256.scss @@ -0,0 +1,92 @@ + +/* + xt256.css + + Contact: initbar [at] protonmail [dot] ch + : github.com/initbar +*/ + +.hljs { + display: block; + overflow-x: auto; + color: #eaeaea; + background: #000; + padding: 0.5em; +} + +.hljs-subst { + color: #eaeaea; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-builtin-name, +.hljs-type { + color: #eaeaea; +} + +.hljs-params { + color: #da0000; +} + +.hljs-literal, +.hljs-number, +.hljs-name { + color: #ff0000; + font-weight: bolder; +} + +.hljs-comment { + color: #969896; +} + +.hljs-selector-id, +.hljs-quote { + color: #00ffff; +} + +.hljs-template-variable, +.hljs-variable, +.hljs-title { + color: #00ffff; + font-weight: bold; +} + +.hljs-selector-class, +.hljs-keyword, +.hljs-symbol { + color: #fff000; +} + +.hljs-string, +.hljs-bullet { + color: #00ff00; +} + +.hljs-tag, +.hljs-section { + color: #000fff; +} + +.hljs-selector-tag { + color: #000fff; + font-weight: bold; +} + +.hljs-attribute, +.hljs-built_in, +.hljs-regexp, +.hljs-link { + color: #ff00ff; +} + +.hljs-meta { + color: #fff; + font-weight: bolder; +} diff --git a/node_modules/highlight.js/scss/zenburn.scss b/node_modules/highlight.js/scss/zenburn.scss @@ -0,0 +1,80 @@ +/* + +Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru> +based on dark.css by Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #3f3f3f; + color: #dcdcdc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag { + color: #e3ceab; +} + +.hljs-template-tag { + color: #dcdcdc; +} + +.hljs-number { + color: #8cd0d3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-attribute { + color: #efdcbc; +} + +.hljs-literal { + color: #efefaf; +} + +.hljs-subst { + color: #8f8f8f; +} + +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #efef8f; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #dca3a3; +} + +.hljs-deletion, +.hljs-string, +.hljs-built_in, +.hljs-builtin-name { + color: #cc9393; +} + +.hljs-addition, +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7f9f7f; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/a11y-dark.css b/node_modules/highlight.js/styles/a11y-dark.css @@ -0,0 +1,99 @@ +/* a11y-dark theme */ +/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */ +/* @author: ericwbailey */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #d4d0ab; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #ffa07a; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5ab35; +} + +/* Yellow */ +.hljs-attribute { + color: #ffd700; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #abe338; +} + +/* Blue */ +.hljs-title, +.hljs-section { + color: #00e0e0; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #dcc6e0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b2b2b; + color: #f8f8f2; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +@media screen and (-ms-high-contrast: active) { + .hljs-addition, + .hljs-attribute, + .hljs-built_in, + .hljs-builtin-name, + .hljs-bullet, + .hljs-comment, + .hljs-link, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-params, + .hljs-string, + .hljs-symbol, + .hljs-type, + .hljs-quote { + color: highlight; + } + + .hljs-keyword, + .hljs-selector-tag { + font-weight: bold; + } +} diff --git a/node_modules/highlight.js/styles/a11y-light.css b/node_modules/highlight.js/styles/a11y-light.css @@ -0,0 +1,99 @@ +/* a11y-light theme */ +/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */ +/* @author: ericwbailey */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #696969; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #d91e18; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #aa5d00; +} + +/* Yellow */ +.hljs-attribute { + color: #aa5d00; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #008000; +} + +/* Blue */ +.hljs-title, +.hljs-section { + color: #007faa; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7928a1; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fefefe; + color: #545454; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +@media screen and (-ms-high-contrast: active) { + .hljs-addition, + .hljs-attribute, + .hljs-built_in, + .hljs-builtin-name, + .hljs-bullet, + .hljs-comment, + .hljs-link, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-params, + .hljs-string, + .hljs-symbol, + .hljs-type, + .hljs-quote { + color: highlight; + } + + .hljs-keyword, + .hljs-selector-tag { + font-weight: bold; + } +} diff --git a/node_modules/highlight.js/styles/agate.css b/node_modules/highlight.js/styles/agate.css @@ -0,0 +1,108 @@ +/*! + * Agate by Taufik Nurrohman <https://github.com/taufik-nurrohman> + * --------------------------------------------------------------- + * + * #ade5fc + * #a2fca2 + * #c6b4f0 + * #d36363 + * #fcc28c + * #fc9b9b + * #ffa + * #fff + * #333 + * #62c8f3 + * #888 + * + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: white; +} + +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-code, +.hljs-emphasis { + font-style: italic; +} + +.hljs-tag { + color: #62c8f3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-selector-class { + color: #ade5fc; +} + +.hljs-string, +.hljs-bullet { + color: #a2fca2; +} + +.hljs-type, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-quote, +.hljs-built_in, +.hljs-builtin-name { + color: #ffa; +} + +.hljs-number, +.hljs-symbol, +.hljs-bullet { + color: #d36363; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #fcc28c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-code { + color: #888; +} + +.hljs-regexp, +.hljs-link { + color: #c6b4f0; +} + +.hljs-meta { + color: #fc9b9b; +} + +.hljs-deletion { + background-color: #fc9b9b; + color: #333; +} + +.hljs-addition { + background-color: #a2fca2; + color: #333; +} + +.hljs a { + color: inherit; +} + +.hljs a:focus, +.hljs a:hover { + color: inherit; + text-decoration: underline; +} diff --git a/node_modules/highlight.js/styles/an-old-hope.css b/node_modules/highlight.js/styles/an-old-hope.css @@ -0,0 +1,89 @@ +/* + +An Old Hope – Star Wars Syntax (c) Gustavo Costa <gusbemacbe@gmail.com> +Original theme - Ocean Dark Theme – by https://github.com/gavsiu +Based on Jesse Leite's Atom syntax theme 'An Old Hope' – https://github.com/JesseLeite/an-old-hope-syntax-atom + +*/ + +/* Death Star Comment */ +.hljs-comment, +.hljs-quote +{ + color: #B6B18B; +} + +/* Darth Vader */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion +{ + color: #EB3C54; +} + +/* Threepio */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link +{ + color: #E7CE56; +} + +/* Luke Skywalker */ +.hljs-attribute +{ + color: #EE7C2B; +} + +/* Obi Wan Kenobi */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition +{ + color: #4FB4D7; +} + +/* Yoda */ +.hljs-title, +.hljs-section +{ + color: #78BB65; +} + +/* Mace Windu */ +.hljs-keyword, +.hljs-selector-tag +{ + color: #B45EA4; +} + +/* Millenium Falcon */ +.hljs +{ + display: block; + overflow-x: auto; + background: #1C1D21; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis +{ + font-style: italic; +} + +.hljs-strong +{ + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/androidstudio.css b/node_modules/highlight.js/styles/androidstudio.css @@ -0,0 +1,66 @@ +/* +Date: 24 Fev 2015 +Author: Pedro Oliveira <kanytu@gmail . com> +*/ + +.hljs { + color: #a9b7c6; + background: #282b2e; + display: block; + overflow-x: auto; + padding: 0.5em; +} + +.hljs-number, +.hljs-literal, +.hljs-symbol, +.hljs-bullet { + color: #6897BB; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-deletion { + color: #cc7832; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-link { + color: #629755; +} + +.hljs-comment, +.hljs-quote { + color: #808080; +} + +.hljs-meta { + color: #bbb529; +} + +.hljs-string, +.hljs-attribute, +.hljs-addition { + color: #6A8759; +} + +.hljs-section, +.hljs-title, +.hljs-type { + color: #ffc66d; +} + +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e8bf6a; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/arduino-light.css b/node_modules/highlight.js/styles/arduino-light.css @@ -0,0 +1,87 @@ +/* + +Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFFF; +} + +.hljs, +.hljs-subst { + color: #434f54; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-doctag, +.hljs-name { + color: #00979D; +} + +.hljs-built_in, +.hljs-literal, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #D35400; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #00979D; +} + +.hljs-type, +.hljs-string, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #005C5F; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-comment { + color: rgba(149,165,166,.8); +} + +.hljs-meta-keyword { + color: #728E00; +} + +.hljs-meta { + color: #434f54; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-function { + color: #728E00; +} + +.hljs-number { + color: #8A7B52; +} diff --git a/node_modules/highlight.js/styles/arta.css b/node_modules/highlight.js/styles/arta.css @@ -0,0 +1,73 @@ +/* +Date: 17.V.2011 +Author: pumbur <pumbur@pumbur.net> +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; +} + +.hljs, +.hljs-subst { + color: #aaa; +} + +.hljs-section { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #444; +} + +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-regexp { + color: #ffcc33; +} + +.hljs-number, +.hljs-addition { + color: #00cc66; +} + +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-template-variable, +.hljs-attribute, +.hljs-link { + color: #32aaee; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #6644aa; +} + +.hljs-title, +.hljs-variable, +.hljs-deletion, +.hljs-template-tag { + color: #bb1166; +} + +.hljs-section, +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/ascetic.css b/node_modules/highlight.js/styles/ascetic.css @@ -0,0 +1,45 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-symbol, +.hljs-bullet, +.hljs-section, +.hljs-addition, +.hljs-attribute, +.hljs-link { + color: #888; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #ccc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-name, +.hljs-type, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/atelier-cave-dark.css b/node_modules/highlight.js/styles/atelier-cave-dark.css @@ -0,0 +1,83 @@ +/* Base16 Atelier Cave Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7887; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-regexp, +.hljs-link, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #19171c; + color: #8b8792; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-cave-light.css b/node_modules/highlight.js/styles/atelier-cave-light.css @@ -0,0 +1,85 @@ +/* Base16 Atelier Cave Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #655f6d; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #efecf4; + color: #585260; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-dune-dark.css b/node_modules/highlight.js/styles/atelier-dune-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #999580; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #20201d; + color: #a6a28c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-dune-light.css b/node_modules/highlight.js/styles/atelier-dune-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #7d7a68; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fefbec; + color: #6e6b5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-estuary-dark.css b/node_modules/highlight.js/styles/atelier-estuary-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #878573; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #22221b; + color: #929181; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-estuary-light.css b/node_modules/highlight.js/styles/atelier-estuary-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #6c6b5a; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4f3ec; + color: #5f5e4e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-forest-dark.css b/node_modules/highlight.js/styles/atelier-forest-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #9c9491; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1918; + color: #a8a19f; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-forest-light.css b/node_modules/highlight.js/styles/atelier-forest-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #766e6b; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f1efee; + color: #68615e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-heath-dark.css b/node_modules/highlight.js/styles/atelier-heath-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #9e8f9e; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b181b; + color: #ab9bab; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-heath-light.css b/node_modules/highlight.js/styles/atelier-heath-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #776977; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f7f3f7; + color: #695d69; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-lakeside-dark.css b/node_modules/highlight.js/styles/atelier-lakeside-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #7195a8; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #161b1d; + color: #7ea2b4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-lakeside-light.css b/node_modules/highlight.js/styles/atelier-lakeside-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #5a7b8c; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ebf8ff; + color: #516d7b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-plateau-dark.css b/node_modules/highlight.js/styles/atelier-plateau-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7777; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1818; + color: #8a8585; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-plateau-light.css b/node_modules/highlight.js/styles/atelier-plateau-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #655d5d; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4ecec; + color: #585050; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-savanna-dark.css b/node_modules/highlight.js/styles/atelier-savanna-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #78877d; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #171c19; + color: #87928a; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-savanna-light.css b/node_modules/highlight.js/styles/atelier-savanna-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #5f6d64; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ecf4ee; + color: #526057; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-seaside-dark.css b/node_modules/highlight.js/styles/atelier-seaside-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #809980; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #131513; + color: #8ca68c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-seaside-light.css b/node_modules/highlight.js/styles/atelier-seaside-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #687d68; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4fbf4; + color: #5e6e5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-sulphurpool-dark.css b/node_modules/highlight.js/styles/atelier-sulphurpool-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #898ea4; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #202746; + color: #979db4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atelier-sulphurpool-light.css b/node_modules/highlight.js/styles/atelier-sulphurpool-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #6b7394; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f5f7ff; + color: #5e6687; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/atom-one-dark-reasonable.css b/node_modules/highlight.js/styles/atom-one-dark-reasonable.css @@ -0,0 +1,75 @@ +/* + +Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage + +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #abb2bf; + background: #282c34; +} +.hljs-keyword, .hljs-operator { + color: #F92672; +} +.hljs-pattern-match { + color: #F92672; +} +.hljs-pattern-match .hljs-constructor { + color: #61aeee; +} +.hljs-function { + color: #61aeee; +} +.hljs-function .hljs-params { + color: #A6E22E; +} +.hljs-function .hljs-params .hljs-typing { + color: #FD971F; +} +.hljs-module-access .hljs-module { + color: #7e57c2; +} +.hljs-constructor { + color: #e2b93d; +} +.hljs-constructor .hljs-string { + color: #9CCC65; +} +.hljs-comment, .hljs-quote { + color: #b18eb1; + font-style: italic; +} +.hljs-doctag, .hljs-formula { + color: #c678dd; +} +.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { + color: #e06c75; +} +.hljs-literal { + color: #56b6c2; +} +.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { + color: #98c379; +} +.hljs-built_in, .hljs-class .hljs-title { + color: #e6c07b; +} +.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { + color: #d19a66; +} +.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { + color: #61aeee; +} +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: bold; +} +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/styles/atom-one-dark.css b/node_modules/highlight.js/styles/atom-one-dark.css @@ -0,0 +1,96 @@ +/* + +Atom One Dark by Daniel Gamage +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +base: #282c34 +mono-1: #abb2bf +mono-2: #818896 +mono-3: #5c6370 +hue-1: #56b6c2 +hue-2: #61aeee +hue-3: #c678dd +hue-4: #98c379 +hue-5: #e06c75 +hue-5-2: #be5046 +hue-6: #d19a66 +hue-6-2: #e6c07b + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #abb2bf; + background: #282c34; +} + +.hljs-comment, +.hljs-quote { + color: #5c6370; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #c678dd; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e06c75; +} + +.hljs-literal { + color: #56b6c2; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #98c379; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #e6c07b; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #d19a66; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #61aeee; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/styles/atom-one-light.css b/node_modules/highlight.js/styles/atom-one-light.css @@ -0,0 +1,96 @@ +/* + +Atom One Light by Daniel Gamage +Original One Light Syntax theme from https://github.com/atom/one-light-syntax + +base: #fafafa +mono-1: #383a42 +mono-2: #686b77 +mono-3: #a0a1a7 +hue-1: #0184bb +hue-2: #4078f2 +hue-3: #a626a4 +hue-4: #50a14f +hue-5: #e45649 +hue-5-2: #c91243 +hue-6: #986801 +hue-6-2: #c18401 + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #383a42; + background: #fafafa; +} + +.hljs-comment, +.hljs-quote { + color: #a0a1a7; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #a626a4; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e45649; +} + +.hljs-literal { + color: #0184bb; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #50a14f; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #c18401; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #986801; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #4078f2; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/styles/brown-paper.css b/node_modules/highlight.js/styles/brown-paper.css @@ -0,0 +1,64 @@ +/* + +Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background:#b7a68e url(./brown-papersq.png); +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #363c69; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link, +.hljs-name { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #802022; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/brown-papersq.png b/node_modules/highlight.js/styles/brown-papersq.png Binary files differ. diff --git a/node_modules/highlight.js/styles/codepen-embed.css b/node_modules/highlight.js/styles/codepen-embed.css @@ -0,0 +1,60 @@ +/* + codepen.io Embed Theme + Author: Justin Perry <http://github.com/ourmaninamsterdam> + Original theme - https://github.com/chriskempson/tomorrow-theme +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; + color: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-regexp, +.hljs-meta, +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-params, +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-deletion { + color: #ab875d; +} + +.hljs-section, +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-type, +.hljs-attribute { + color: #9b869b; +} + +.hljs-string, +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #8f9c6c; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/color-brewer.css b/node_modules/highlight.js/styles/color-brewer.css @@ -0,0 +1,71 @@ +/* + +Colorbrewer theme +Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org> +Ported by Fabrício Tavares de Oliveira + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; +} + +.hljs, +.hljs-subst { + color: #000; +} + +.hljs-string, +.hljs-meta, +.hljs-symbol, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #756bb1; +} + +.hljs-comment, +.hljs-quote { + color: #636363; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-bullet, +.hljs-link { + color: #31a354; +} + +.hljs-deletion, +.hljs-variable { + color: #88f; +} + + + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-doctag, +.hljs-type, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-strong { + color: #3182bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-attribute { + color: #e6550d; +} diff --git a/node_modules/highlight.js/styles/darcula.css b/node_modules/highlight.js/styles/darcula.css @@ -0,0 +1,74 @@ +/* + +Darcula color scheme from the JetBrains family of IDEs + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #2b2b2b; + color: #bababa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-link, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #6896ba; +} + +.hljs-code, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-attribute, +.hljs-name, +.hljs-variable { + color: #cb7832; +} + +.hljs-params { + color: #b9b9b9; +} + +.hljs-string { + color: #6a8759; +} + +.hljs-subst, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-symbol, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #e0c46c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #7f7f7f; +} diff --git a/node_modules/highlight.js/styles/dark.css b/node_modules/highlight.js/styles/dark.css @@ -0,0 +1,63 @@ +/* + +Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #444; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: white; +} + +.hljs, +.hljs-subst { + color: #ddd; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #d88; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #777; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/default.css b/node_modules/highlight.js/styles/default.css @@ -0,0 +1,99 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/docco.css b/node_modules/highlight.js/styles/docco.css @@ -0,0 +1,97 @@ +/* +Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #f8f8ff; +} + +.hljs-comment, +.hljs-quote { + color: #408080; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-subst { + color: #954121; +} + +.hljs-number { + color: #40a070; +} + +.hljs-string, +.hljs-doctag { + color: #219161; +} + +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #19469d; +} + +.hljs-params { + color: #00f; +} + +.hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #008080; +} + +.hljs-regexp, +.hljs-link { + color: #b68; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/dracula.css b/node_modules/highlight.js/styles/dracula.css @@ -0,0 +1,76 @@ +/* + +Dracula Theme v1.2.0 + +https://github.com/zenorocha/dracula-theme + +Copyright 2015, All rights reserved + +Code licensed under the MIT license +http://zenorocha.mit-license.org + +@author Éverton Ribeiro <nuxlli@gmail.com> +@author Zeno Rocha <hi@zenorocha.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282a36; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: #8be9fd; +} + +.hljs-function .hljs-keyword { + color: #ff79c6; +} + +.hljs, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #f1fa8c; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #6272a4; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/far.css b/node_modules/highlight.js/styles/far.css @@ -0,0 +1,71 @@ +/* + +FAR Style (c) MajestiC <majestic2k@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000080; +} + +.hljs, +.hljs-subst { + color: #0ff; +} + +.hljs-string, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #ff0; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-variable { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-doctag, +.hljs-deletion { + color: #888; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #0f0; +} + +.hljs-meta { + color: #008080; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/foundation.css b/node_modules/highlight.js/styles/foundation.css @@ -0,0 +1,89 @@ +/* +Description: Foundation 4 docs style for highlight.js +Author: Dan Allen <dan.j.allen@gmail.com> +Website: http://foundation.zurb.com/docs/ +Version: 1.0 +Date: 2013-04-02 +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eee; + color: black; +} + +.hljs-link, +.hljs-emphasis, +.hljs-attribute, +.hljs-addition { + color: #070; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong, +.hljs-string, +.hljs-deletion { + color: #d14; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-quote, +.hljs-comment { + color: #998; + font-style: italic; +} + +.hljs-section, +.hljs-title { + color: #900; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #458; +} + +.hljs-variable, +.hljs-template-variable { + color: #336699; +} + +.hljs-bullet { + color: #997700; +} + +.hljs-meta { + color: #3344bb; +} + +.hljs-code, +.hljs-number, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag { + color: #099; +} + +.hljs-regexp { + background-color: #fff0ff; + color: #880088; +} + +.hljs-symbol { + color: #990073; +} + +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #007700; +} diff --git a/node_modules/highlight.js/styles/github-gist.css b/node_modules/highlight.js/styles/github-gist.css @@ -0,0 +1,79 @@ +/** + * GitHub Gist Theme + * Author : Anthony Attard - https://github.com/AnthonyAttard + * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro + */ + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #d73a49; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #6f42c1; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +.hljs-number { + color: #005cc5; +} + +.hljs-string { + color: #032f62; +} diff --git a/node_modules/highlight.js/styles/github.css b/node_modules/highlight.js/styles/github.css @@ -0,0 +1,99 @@ +/* + +github.com style (c) Vasily Polovnyov <vast@whiteants.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/gml.css b/node_modules/highlight.js/styles/gml.css @@ -0,0 +1,78 @@ +/* + +GML Theme - Meseta <meseta@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222222; + color: #C0C0C0; +} + +.hljs-keyword { + color: #FFB871; + font-weight: bold; +} + +.hljs-built_in { + color: #FFB871; +} + +.hljs-literal { + color: #FF8080; +} + +.hljs-symbol { + color: #58E55A; +} + +.hljs-comment { + color: #5B995B; +} + +.hljs-string { + color: #FFFF00; +} + +.hljs-number { + color: #FF8080; +} + +.hljs-attribute, +.hljs-selector-tag, +.hljs-doctag, +.hljs-name, +.hljs-bullet, +.hljs-code, +.hljs-addition, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion, +.hljs-title, +.hljs-section, +.hljs-function, +.hljs-meta-keyword, +.hljs-meta, +.hljs-subst { + color: #C0C0C0; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/googlecode.css b/node_modules/highlight.js/styles/googlecode.css @@ -0,0 +1,89 @@ +/* + +Google Code style (c) Aahan Krish <geekpanth3r@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote { + color: #800; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-title, +.hljs-name { + color: #008; +} + +.hljs-variable, +.hljs-template-variable { + color: #660; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-regexp { + color: #080; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-meta, +.hljs-number, +.hljs-link { + color: #066; +} + +.hljs-title, +.hljs-doctag, +.hljs-type, +.hljs-attr, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #606; +} + +.hljs-attribute, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9B703F +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/gradient-dark.css b/node_modules/highlight.js/styles/gradient-dark.css @@ -0,0 +1,122 @@ +/* + +Gradient Dark (c) Samia Ali <samiaab1990@gmail.com> + +*/ + +.hljs +{ +display: block; +overflow-x: auto; +padding: 0.5em; +background: rgb(80,31,122); +background: linear-gradient(166deg, rgba(80,31,122,1) 0%, rgba(40,32,179,1) 80%); +color:#e7e4eb; +} + +.hljs-subtr{ + color:#e7e4eb; +} + +.hljs-doctag, +.hljs-meta, +.hljs-comment, +.hljs-quote +{ + color:#af8dd9; +} + +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-regexp, +.hljs-attr, +.hljs-tag +{ + color:#AEFBFF; +} + +.hljs-params, +.hljs-selector-class, +.hljs-bullet + +{ + color:#F19FFF; + +} + +.hljs-keyword, +.hljs-section, +.hljs-meta-keyword, +.hljs-symbol, +.hljs-type + +{ + + color:#17fc95; +} + +.hljs-addition, +.hljs-number, +.hljs-link +{ + color:#C5FE00; +} + + +.hljs-string +{ + color: #38c0ff; +} + + +.hljs-attribute, +.hljs-addition +{ + color:#E7FF9F; +} + +.hljs-variable, +.hljs-template-variable + +{ + color:#E447FF; +} + +.hljs-builtin-name, +.hljs-built_in, +.hljs-formula, +.hljs-name, +.hljs-title, +.hljs-class, +.hljs-function +{ + color: #FFC800; + +} + +.hljs-selector-pseudo, +.hljs-deletion, +.hljs-literal +{ + color:#FF9E44; + +} + +.hljs-emphasis, +.hljs-quote +{ + font-style:italic; +} + +.hljs-params, +.hljs-selector-class, +.hljs-strong, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-section, +.hljs-keyword +{ + font-weight:bold; +} diff --git a/node_modules/highlight.js/styles/gradient-light.css b/node_modules/highlight.js/styles/gradient-light.css @@ -0,0 +1,130 @@ +/* + +Gradient Light (c) Samia Ali <samiaab1990@gmail.com> + +*/ + +.hljs +{ +display: block; +overflow-x: auto; +padding: 0.5em; +background: rgb(255,253,141); +background: linear-gradient(142deg, rgba(255,253,141,1) 0%, rgba(252,183,255,1) 35%, rgba(144,236,255,1) 100%); +color:#250482; +} + +.hljs-subtr{ +color:#01958B; +} + +.hljs-doctag, +.hljs-meta, +.hljs-comment, +.hljs-quote +{ + color:#CB7200; +} + +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-regexp, +.hljs-attr, +.hljs-tag +{ + color:#07BD5F; +} + +.hljs-params, +.hljs-selector-class, +.hljs-bullet + +{ + color:#43449F; + +} + +.hljs-keyword, +.hljs-section, +.hljs-meta-keyword, +.hljs-symbol, +.hljs-type + +{ + + color:#7D2801; +} + +.hljs-addition, +.hljs-number, +.hljs-link +{ + color:#7F0096; +} + + +.hljs-string +{ + color: #38c0ff; +} + + +.hljs-attribute, +.hljs-addition +{ + color:#296562; +} + +.hljs-variable, +.hljs-template-variable + +{ + color:#025C8F; +} + +.hljs-builtin-name, +.hljs-built_in, +.hljs-formula, +.hljs-name, +.hljs-title, +.hljs-class, +.hljs-function +{ + color: #529117; + +} + +.hljs-selector-pseudo, +.hljs-deletion, +.hljs-literal +{ + color:#AD13FF; + +} + +.hljs-emphasis, +.hljs-quote +{ + font-style:italic; +} + +.hljs-params, +.hljs-selector-class, +.hljs-strong, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-template-tag, +.hljs-section, +.hljs-keyword +{ + font-weight:bold; +} + + + + + + + + diff --git a/node_modules/highlight.js/styles/grayscale.css b/node_modules/highlight.js/styles/grayscale.css @@ -0,0 +1,101 @@ +/* + +grayscale style (c) MY Sun <simonmysun@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal { + color: #777; +} + +.hljs-string, +.hljs-doctag, +.hljs-formula { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #000; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-class .hljs-title, +.hljs-type, +.hljs-name { + color: #333; + font-weight: bold; +} + +.hljs-tag { + color: #333; +} + +.hljs-regexp { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #000; + text-decoration: underline; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + color: #fff; + background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat; +} + +.hljs-addition { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/gruvbox-dark.css b/node_modules/highlight.js/styles/gruvbox-dark.css @@ -0,0 +1,108 @@ +/* + +Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282828; +} + +.hljs, +.hljs-subst { + color: #ebdbb2; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #fb4934; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #83a598; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #fabd2f; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #fe8019; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #b8bb26; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #8ec07c; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #d3869b; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/gruvbox-light.css b/node_modules/highlight.js/styles/gruvbox-light.css @@ -0,0 +1,108 @@ +/* + +Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fbf1c7; +} + +.hljs, +.hljs-subst { + color: #3c3836; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #9d0006; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #076678; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #b57614; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #af3a03; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #79740e; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #427b58; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/hopscotch.css b/node_modules/highlight.js/styles/hopscotch.css @@ -0,0 +1,84 @@ +/* + * Hopscotch + * by Jan T. Sott + * https://github.com/idleberg/Hopscotch + * + * This work is licensed under the Creative Commons CC0 1.0 Universal License + */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #989498; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-deletion { + color: #dd464c; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #fd8b19; +} + +/* Yellow */ +.hljs-class .hljs-title { + color: #fdcc59; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #8fc13e; +} + +/* Aqua */ +.hljs-meta { + color: #149b93; +} + +/* Blue */ +.hljs-function, +.hljs-section, +.hljs-title { + color: #1290bf; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c85e7c; +} + +.hljs { + display: block; + overflow-x: auto; + background: #322931; + color: #b9b5b8; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/hybrid.css b/node_modules/highlight.js/styles/hybrid.css @@ -0,0 +1,102 @@ +/* + +vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) + +*/ + +/*background color*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1d1f21; +} + +/*selection color*/ +.hljs::selection, +.hljs span::selection { + background: #373b41; +} + +.hljs::-moz-selection, +.hljs span::-moz-selection { + background: #373b41; +} + +/*foreground color*/ +.hljs { + color: #c5c8c6; +} + +/*color: fg_yellow*/ +.hljs-title, +.hljs-name { + color: #f0c674; +} + +/*color: fg_comment*/ +.hljs-comment, +.hljs-meta, +.hljs-meta .hljs-keyword { + color: #707880; +} + +/*color: fg_red*/ +.hljs-number, +.hljs-symbol, +.hljs-literal, +.hljs-deletion, +.hljs-link { + color: #cc6666 +} + +/*color: fg_green*/ +.hljs-string, +.hljs-doctag, +.hljs-addition, +.hljs-regexp, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #b5bd68; +} + +/*color: fg_purple*/ +.hljs-attribute, +.hljs-code, +.hljs-selector-id { + color: #b294bb; +} + +/*color: fg_blue*/ +.hljs-keyword, +.hljs-selector-tag, +.hljs-bullet, +.hljs-tag { + color: #81a2be; +} + +/*color: fg_aqua*/ +.hljs-subst, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8abeb7; +} + +/*color: fg_orange*/ +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-quote, +.hljs-section, +.hljs-selector-class { + color: #de935f; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/idea.css b/node_modules/highlight.js/styles/idea.css @@ -0,0 +1,97 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #fff; +} + +.hljs-subst, +.hljs-title { + font-weight: normal; + color: #000; +} + +.hljs-comment, +.hljs-quote { + color: #808080; + font-style: italic; +} + +.hljs-meta { + color: #808000; +} + +.hljs-tag { + background: #efefef; +} + +.hljs-section, +.hljs-name, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class { + font-weight: bold; + color: #000080; +} + +.hljs-attribute, +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: bold; + color: #0000ff; +} + +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: normal; +} + +.hljs-string { + color: #008000; + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +.hljs-doctag { + text-decoration: underline; +} + +.hljs-variable, +.hljs-template-variable { + color: #660e7a; +} + +.hljs-addition { + background: #baeeba; +} + +.hljs-deletion { + background: #ffc8bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/ir-black.css b/node_modules/highlight.js/styles/ir-black.css @@ -0,0 +1,73 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru> +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7c7c7c; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag, +.hljs-name { + color: #96cbfe; +} + +.hljs-attribute, +.hljs-selector-id { + color: #ffffb6; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition { + color: #a8ff60; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-doctag { + color: #ffffb6; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-variable, +.hljs-template-variable, +.hljs-literal { + color: #c6c5fe; +} + +.hljs-number, +.hljs-deletion { + color:#ff73fd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/isbl-editor-dark.css b/node_modules/highlight.js/styles/isbl-editor-dark.css @@ -0,0 +1,112 @@ +/* + +ISBL Editor style dark color scheme (c) Dmitriy Tarasov <dimatar@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #404040; + color: #f0f0f0; +} + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #f0f0f0; +} + +.hljs-comment { + color: #b5b5b5; + font-style: italic; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + color: #f0f0f0; + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-string { + color: #97bf0d; +} + +.hljs-type, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #f0f0f0; +} + +.hljs-title, +.hljs-section { + color: #df471e; +} + +.hljs-title>.hljs-built_in { + color: #81bce9; + font-weight: normal; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #e2c696; +} + +/* Language color: hue: 90; */ + +.hljs-built_in, +.hljs-literal { + color: #97bf0d; + font-weight: bold; +} + +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + +.hljs-class { + color: #ce9d4d; + font-weight: bold; +} + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/isbl-editor-light.css b/node_modules/highlight.js/styles/isbl-editor-light.css @@ -0,0 +1,111 @@ +/* + +ISBL Editor style light color schemec (c) Dmitriy Tarasov <dimatar@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +/* Base color: saturation 0; */ + +.hljs-subst { + color: black; +} + +.hljs-comment { + color: #555555; + font-style: italic; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + color: #000000; + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-string { + color: #000080; +} + +.hljs-type, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #000000; +} + +.hljs-title, +.hljs-section { + color: #fb2c00; +} + +.hljs-title>.hljs-built_in { + color: #008080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #5e1700; +} + +/* Language color: hue: 90; */ + +.hljs-built_in, +.hljs-literal { + color: #000080; + font-weight: bold; +} + +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + +.hljs-class { + color: #6f1C00; + font-weight: bold; +} + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/kimbie.dark.css b/node_modules/highlight.js/styles/kimbie.dark.css @@ -0,0 +1,74 @@ +/* + Name: Kimbie (dark) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #d6baad; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #221a0f; + color: #d3af86; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/kimbie.light.css b/node_modules/highlight.js/styles/kimbie.light.css @@ -0,0 +1,74 @@ +/* + Name: Kimbie (light) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #a57a4c; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fbebd4; + color: #84613d; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/lightfair.css b/node_modules/highlight.js/styles/lightfair.css @@ -0,0 +1,88 @@ +/* + +Lightfair style (c) Tristian Kelly <tristian.kelly560@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + /* TODO: background? */ +} + +.hljs-name { + color:#01a3a3; +} + +.hljs-tag,.hljs-meta { + color:#778899; +} + +.hljs, +.hljs-subst { + color: #444 +} + +.hljs-comment { + color: #888888 +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold +} + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #4286f4 +} + +.hljs-title, +.hljs-section { + color: #4286f4; + font-weight: bold +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060 +} + +.hljs-literal { + color: #62bcbc +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #25c6c6 +} + +.hljs-meta-string { + color: #4d99bf +} + +.hljs-emphasis { + font-style: italic +} + +.hljs-strong { + font-weight: bold +} diff --git a/node_modules/highlight.js/styles/lioshi.css b/node_modules/highlight.js/styles/lioshi.css @@ -0,0 +1,88 @@ +/* lioshi Theme */ +/* Original theme - https://github.com/lioshi/vscode-lioshi-theme */ + +/* Comment */ +.hljs-comment { + color: #8d8d8d; +} + +/* quote */ +.hljs-quote { + color: #b3c7d8; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #cc6666; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-subst +.hljs-link { + color: #de935f; +} + +/* Yellow */ +.hljs-attribute { + color: #f0c674; +} + +/* Green */ +.hljs-string, +.hljs-bullet, +.hljs-params, +.hljs-addition { + color: #b5bd68; +} + +/* Blue */ +.hljs-title, +.hljs-meta, +.hljs-section { + color: #81a2be; +} + +/* Purple */ +.hljs-selector-tag, +.hljs-keyword, +.hljs-function, +.hljs-class { + color: #be94bb; +} + +/* Purple light */ +.hljs-symbol { + color: #dbc4d9; +} + +.hljs { + display: block; + overflow-x: auto; + background: #303030; + color: #c5c8c6; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + + + + diff --git a/node_modules/highlight.js/styles/magula.css b/node_modules/highlight.js/styles/magula.css @@ -0,0 +1,70 @@ +/* +Description: Magula style for highligh.js +Author: Ruslan Keba <rukeba@gmail.com> +Website: http://rukeba.com/ +Version: 1.0 +Date: 2009-01-03 +Music: Aphex Twin / Xtal +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background-color: #f4f4f4; + color: black; +} + +.hljs-subst { + color: black; +} + +.hljs-string, +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #050; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-type, +.hljs-link { + color: #800; +} + +.hljs-deletion, +.hljs-meta { + color: #00e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-tag, +.hljs-name { + font-weight: bold; + color: navy; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/mono-blue.css b/node_modules/highlight.js/styles/mono-blue.css @@ -0,0 +1,56 @@ +/* + Five-color theme from a single blue hue. +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eaeef3; + color: #00193a; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-comment { + color: #738191; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-literal, +.hljs-type, +.hljs-addition, +.hljs-tag, +.hljs-quote, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #0048ab; +} + +.hljs-meta, +.hljs-subst, +.hljs-symbol, +.hljs-regexp, +.hljs-attribute, +.hljs-deletion, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-bullet { + color: #4c81c9; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/monokai-sublime.css b/node_modules/highlight.js/styles/monokai-sublime.css @@ -0,0 +1,83 @@ +/* + +Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #23241f; +} + +.hljs, +.hljs-tag, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #ae81ff; +} + +.hljs-code, +.hljs-title, +.hljs-section, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-attr { + color: #f92672; +} + +.hljs-symbol, +.hljs-attribute { + color: #66d9ef; +} + +.hljs-params, +.hljs-class .hljs-title { + color: #f8f8f2; +} + +.hljs-string, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-variable { + color: #e6db74; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} diff --git a/node_modules/highlight.js/styles/monokai.css b/node_modules/highlight.js/styles/monokai.css @@ -0,0 +1,71 @@ +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #272822; + color: #ddd; +} + +.hljs-tag, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-strong, +.hljs-name { + color: #f92672; +} + +.hljs-code { + color: #66d9ef; +} + +.hljs-class .hljs-title { + color: white; +} + +.hljs-attribute, +.hljs-symbol, +.hljs-regexp, +.hljs-link { + color: #bf79db; +} + +.hljs-string, +.hljs-bullet, +.hljs-subst, +.hljs-title, +.hljs-section, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #a6e22e; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-selector-id { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/night-owl.css b/node_modules/highlight.js/styles/night-owl.css @@ -0,0 +1,182 @@ +/* + +Night Owl for highlight.js (c) Carl Baxter <carl@cbax.tech> + +An adaptation of Sarah Drasner's Night Owl VS Code Theme +https://github.com/sdras/night-owl-vscode-theme + +Copyright (c) 2018 Sarah Drasner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #011627; + color: #d6deeb; +} + +/* General Purpose */ +.hljs-keyword { + color: #c792ea; + font-style: italic; +} +.hljs-built_in { + color: #addb67; + font-style: italic; +} +.hljs-type { + color: #82aaff; +} +.hljs-literal { + color: #ff5874; +} +.hljs-number { + color: #F78C6C; +} +.hljs-regexp { + color: #5ca7e4; +} +.hljs-string { + color: #ecc48d; +} +.hljs-subst { + color: #d3423e; +} +.hljs-symbol { + color: #82aaff; +} +.hljs-class { + color: #ffcb8b; +} +.hljs-function { + color: #82AAFF; +} +.hljs-title { + color: #DCDCAA; + font-style: italic; +} +.hljs-params { + color: #7fdbca; +} + +/* Meta */ +.hljs-comment { + color: #637777; + font-style: italic; +} +.hljs-doctag { + color: #7fdbca; +} +.hljs-meta { + color: #82aaff; +} +.hljs-meta-keyword { + color: #82aaff; +} +.hljs-meta-string { + color: #ecc48d; +} + +/* Tags, attributes, config */ +.hljs-section { + color: #82b1ff; +} +.hljs-tag, +.hljs-name, +.hljs-builtin-name { + color: #7fdbca; +} +.hljs-attr { + color: #7fdbca; +} +.hljs-attribute { + color: #80cbc4; +} +.hljs-variable { + color: #addb67; +} + +/* Markup */ +.hljs-bullet { + color: #d9f5dd; +} +.hljs-code { + color: #80CBC4; +} +.hljs-emphasis { + color: #c792ea; + font-style: italic; +} +.hljs-strong { + color: #addb67; + font-weight: bold; +} +.hljs-formula { + color: #c792ea; +} +.hljs-link { + color: #ff869a; +} +.hljs-quote { + color: #697098; + font-style: italic; +} + +/* CSS */ +.hljs-selector-tag { + color: #ff6363; +} + +.hljs-selector-id { + color: #fad430; +} + +.hljs-selector-class { + color: #addb67; + font-style: italic; +} + +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #c792ea; + font-style: italic; +} + +/* Templates */ +.hljs-template-tag { + color: #c792ea; +} +.hljs-template-variable { + color: #addb67; +} + +/* diff */ +.hljs-addition { + color: #addb67ff; + font-style: italic; +} + +.hljs-deletion { + color: #EF535090; + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/nnfx-dark.css b/node_modules/highlight.js/styles/nnfx-dark.css @@ -0,0 +1,106 @@ +/** + * nnfx dark - a theme inspired by Netscape Navigator/Firefox + * + * @version 1.0.0 + * @author (c) 2020 Jim Mason <jmason@ibinx.com> + * @license https://creativecommons.org/licenses/by-sa/4.0 CC BY-SA 4.0 + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: #fff; +} + +.xml .hljs-meta { + font-weight: bold; + font-style: italic; + color: #69f; +} + +.hljs-comment, +.hljs-quote { + font-style: italic; + color: #9c6; +} + +.hljs-name, +.hljs-keyword { + color: #a7a; +} + +.hljs-name, +.hljs-attr { + font-weight: bold; +} + +.hljs-string { + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #588; +} + +.hljs-code, +.hljs-string, +.hljs-meta-string, +.hljs-number, +.hljs-regexp, +.hljs-link { + color: #bce; +} + +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name { + color: #d40; +} + +.hljs-section, +.hljs-meta { + color: #a85; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #96c; +} + +.hljs-function .hljs-title, +.hljs-attr, +.hljs-subst { + color: #fff; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #797; +} + +.hljs-deletion { + background-color: #c99; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #964; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/nnfx.css b/node_modules/highlight.js/styles/nnfx.css @@ -0,0 +1,106 @@ +/** + * nnfx - a theme inspired by Netscape Navigator/Firefox + * + * @version 1.0.0 + * @author (c) 2020 Jim Mason <jmason@ibinx.com> + * @license https://creativecommons.org/licenses/by-sa/4.0 CC BY-SA 4.0 + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; + color: #000; +} + +.xml .hljs-meta { + font-weight: bold; + font-style: italic; + color: #48b; +} + +.hljs-comment, +.hljs-quote { + font-style: italic; + color: #070; +} + +.hljs-name, +.hljs-keyword { + color: #808; +} + +.hljs-name, +.hljs-attr { + font-weight: bold; +} + +.hljs-string { + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #477; +} + +.hljs-code, +.hljs-string, +.hljs-meta-string, +.hljs-number, +.hljs-regexp, +.hljs-link { + color: #00f; +} + +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name { + color: #f40; +} + +.hljs-section, +.hljs-meta { + color: #642; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #639; +} + +.hljs-function .hljs-title, +.hljs-attr, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #beb; +} + +.hljs-deletion { + background-color: #fbb; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #964; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/nord.css b/node_modules/highlight.js/styles/nord.css @@ -0,0 +1,309 @@ +/* + * Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com> + * Copyright (c) 2017-present Sven Greb <development@svengreb.de> + * + * Project: Nord highlight.js + * Version: 0.1.0 + * Repository: https://github.com/arcticicestudio/nord-highlightjs + * License: MIT + * References: + * https://github.com/arcticicestudio/nord + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #2E3440; +} + +.hljs, +.hljs-subst { + color: #D8DEE9; +} + +.hljs-selector-tag { + color: #81A1C1; +} + +.hljs-selector-id { + color: #8FBCBB; + font-weight: bold; +} + +.hljs-selector-class { + color: #8FBCBB; +} + +.hljs-selector-attr { + color: #8FBCBB; +} + +.hljs-selector-pseudo { + color: #88C0D0; +} + +.hljs-addition { + background-color: rgba(163, 190, 140, 0.5); +} + +.hljs-deletion { + background-color: rgba(191, 97, 106, 0.5); +} + +.hljs-built_in, +.hljs-type { + color: #8FBCBB; +} + +.hljs-class { + color: #8FBCBB; +} + +.hljs-function { + color: #88C0D0; +} + +.hljs-function > .hljs-title { + color: #88C0D0; +} + +.hljs-keyword, +.hljs-literal, +.hljs-symbol { + color: #81A1C1; +} + +.hljs-number { + color: #B48EAD; +} + +.hljs-regexp { + color: #EBCB8B; +} + +.hljs-string { + color: #A3BE8C; +} + +.hljs-title { + color: #8FBCBB; +} + +.hljs-params { + color: #D8DEE9; +} + +.hljs-bullet { + color: #81A1C1; +} + +.hljs-code { + color: #8FBCBB; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-formula { + color: #8FBCBB; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link:hover { + text-decoration: underline; +} + +.hljs-quote { + color: #4C566A; +} + +.hljs-comment { + color: #4C566A; +} + +.hljs-doctag { + color: #8FBCBB; +} + +.hljs-meta, +.hljs-meta-keyword { + color: #5E81AC; +} + +.hljs-meta-string { + color: #A3BE8C; +} + +.hljs-attr { + color: #8FBCBB; +} + +.hljs-attribute { + color: #D8DEE9; +} + +.hljs-builtin-name { + color: #81A1C1; +} + +.hljs-name { + color: #81A1C1; +} + +.hljs-section { + color: #88C0D0; +} + +.hljs-tag { + color: #81A1C1; +} + +.hljs-variable { + color: #D8DEE9; +} + +.hljs-template-variable { + color: #D8DEE9; +} + +.hljs-template-tag { + color: #5E81AC; +} + +.abnf .hljs-attribute { + color: #88C0D0; +} + +.abnf .hljs-symbol { + color: #EBCB8B; +} + +.apache .hljs-attribute { + color: #88C0D0; +} + +.apache .hljs-section { + color: #81A1C1; +} + +.arduino .hljs-built_in { + color: #88C0D0; +} + +.aspectj .hljs-meta { + color: #D08770; +} + +.aspectj > .hljs-title { + color: #88C0D0; +} + +.bnf .hljs-attribute { + color: #8FBCBB; +} + +.clojure .hljs-name { + color: #88C0D0; +} + +.clojure .hljs-symbol { + color: #EBCB8B; +} + +.coq .hljs-built_in { + color: #88C0D0; +} + +.cpp .hljs-meta-string { + color: #8FBCBB; +} + +.css .hljs-built_in { + color: #88C0D0; +} + +.css .hljs-keyword { + color: #D08770; +} + +.diff .hljs-meta { + color: #8FBCBB; +} + +.ebnf .hljs-attribute { + color: #8FBCBB; +} + +.glsl .hljs-built_in { + color: #88C0D0; +} + +.groovy .hljs-meta:not(:first-child) { + color: #D08770; +} + +.haxe .hljs-meta { + color: #D08770; +} + +.java .hljs-meta { + color: #D08770; +} + +.ldif .hljs-attribute { + color: #8FBCBB; +} + +.lisp .hljs-name { + color: #88C0D0; +} + +.lua .hljs-built_in { + color: #88C0D0; +} + +.moonscript .hljs-built_in { + color: #88C0D0; +} + +.nginx .hljs-attribute { + color: #88C0D0; +} + +.nginx .hljs-section { + color: #5E81AC; +} + +.pf .hljs-built_in { + color: #88C0D0; +} + +.processing .hljs-built_in { + color: #88C0D0; +} + +.scss .hljs-keyword { + color: #81A1C1; +} + +.stylus .hljs-keyword { + color: #81A1C1; +} + +.swift .hljs-meta { + color: #D08770; +} + +.vim .hljs-built_in { + color: #88C0D0; + font-style: italic; +} + +.yaml .hljs-meta { + color: #D08770; +} diff --git a/node_modules/highlight.js/styles/obsidian.css b/node_modules/highlight.js/styles/obsidian.css @@ -0,0 +1,88 @@ +/** + * Obsidian style + * ported by Alexander Marenin (http://github.com/ioncreature) + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282b2e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-selector-id { + color: #93c763; +} + +.hljs-number { + color: #ffcd22; +} + +.hljs { + color: #e0e2e4; +} + +.hljs-attribute { + color: #668bb0; +} + +.hljs-code, +.hljs-class .hljs-title, +.hljs-section { + color: white; +} + +.hljs-regexp, +.hljs-link { + color: #d39745; +} + +.hljs-meta { + color: #557182; +} + +.hljs-tag, +.hljs-name, +.hljs-bullet, +.hljs-subst, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8cbbad; +} + +.hljs-string, +.hljs-symbol { + color: #ec7600; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion { + color: #818e96; +} + +.hljs-selector-class { + color: #A082BD +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/ocean.css b/node_modules/highlight.js/styles/ocean.css @@ -0,0 +1,74 @@ +/* Ocean Dark Theme */ +/* https://github.com/gavsiu */ +/* Original theme - https://github.com/chriskempson/base16 */ + +/* Ocean Comment */ +.hljs-comment, +.hljs-quote { + color: #65737e; +} + +/* Ocean Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #bf616a; +} + +/* Ocean Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #d08770; +} + +/* Ocean Yellow */ +.hljs-attribute { + color: #ebcb8b; +} + +/* Ocean Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #a3be8c; +} + +/* Ocean Blue */ +.hljs-title, +.hljs-section { + color: #8fa1b3; +} + +/* Ocean Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b48ead; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b303b; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/paraiso-dark.css b/node_modules/highlight.js/styles/paraiso-dark.css @@ -0,0 +1,72 @@ +/* + Paraíso (dark) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #8d8687; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2f1e2e; + color: #a39e9b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/paraiso-light.css b/node_modules/highlight.js/styles/paraiso-light.css @@ -0,0 +1,72 @@ +/* + Paraíso (light) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #776e71; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #e7e9db; + color: #4f424c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/pojoaque.css b/node_modules/highlight.js/styles/pojoaque.css @@ -0,0 +1,83 @@ +/* + +Pojoaque Style by Jason Tate +http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +Based on Solarized Style from http://ethanschoonover.com/solarized + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #dccf8f; + background: url(./pojoaque.jpg) repeat scroll left top #181914; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-addition { + color: #b64926; +} + +.hljs-number, +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #468966; +} + +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-name { + color: #ffb03b; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type, +.hljs-tag { + color: #b58900; +} + +.hljs-attribute { + color: #b89859; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-subst, +.hljs-meta { + color: #cb4b16; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #d3a60c; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/pojoaque.jpg b/node_modules/highlight.js/styles/pojoaque.jpg Binary files differ. diff --git a/node_modules/highlight.js/styles/purebasic.css b/node_modules/highlight.js/styles/purebasic.css @@ -0,0 +1,96 @@ +/* + +PureBASIC native IDE style ( version 1.0 - April 2016 ) + +by Tristano Ajmone <tajmone@gmail.com> + +Public Domain + +NOTE_1: PureBASIC code syntax highlighting only applies the following classes: + .hljs-comment + .hljs-function + .hljs-keywords + .hljs-string + .hljs-symbol + + Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style. + If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by + a "--- used for PureBASIC ... ---" comment on same line. + +NOTE_2: Color names provided in comments were derived using "Name that Color" online tool: + http://chir.ag/projects/name-that-color +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFDF; /* Half and Half (approx.) */ +/* --- Uncomment to add PureBASIC native IDE styled font! + font-family: Consolas; +*/ +} + +.hljs, /* --- used for PureBASIC base color --- */ +.hljs-type, /* --- used for PureBASIC Procedures return type --- */ +.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */ +.hljs-name, +.hljs-number, +.hljs-attr, +.hljs-params, +.hljs-subst { + color: #000000; /* Black */ +} + +.hljs-comment, /* --- used for PureBASIC Comments --- */ +.hljs-regexp, +.hljs-section, +.hljs-selector-pseudo, +.hljs-addition { + color: #00AAAA; /* Persian Green (approx.) */ +} + +.hljs-title, /* --- used for PureBASIC Procedures Names --- */ +.hljs-tag, +.hljs-variable, +.hljs-code { + color: #006666; /* Blue Stone (approx.) */ +} + +.hljs-keyword, /* --- used for PureBASIC Keywords --- */ +.hljs-class, +.hljs-meta-keyword, +.hljs-selector-class, +.hljs-built_in, +.hljs-builtin-name { + color: #006666; /* Blue Stone (approx.) */ + font-weight: bold; +} + +.hljs-string, /* --- used for PureBASIC Strings --- */ +.hljs-selector-attr { + color: #0080FF; /* Azure Radiance (approx.) */ +} + +.hljs-symbol, /* --- used for PureBASIC Constants --- */ +.hljs-link, +.hljs-deletion, +.hljs-attribute { + color: #924B72; /* Cannon Pink (approx.) */ +} + +.hljs-meta, +.hljs-literal, +.hljs-selector-id { + color: #924B72; /* Cannon Pink (approx.) */ + font-weight: bold; +} + +.hljs-strong, +.hljs-name { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/qtcreator_dark.css b/node_modules/highlight.js/styles/qtcreator_dark.css @@ -0,0 +1,83 @@ +/* + +Qt Creator dark color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000000; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #aaaaaa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #ff55ff; +} + +.hljs-code +.hljs-selector-class { + color: #aaaaff; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #ffff55; +} + +.hljs-attribute { + color: #ff5555; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #8888ff; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #ff55ff; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #55ffff; +} diff --git a/node_modules/highlight.js/styles/qtcreator_light.css b/node_modules/highlight.js/styles/qtcreator_light.css @@ -0,0 +1,83 @@ +/* + +Qt Creator light color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #ffffff; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #000000; +} + +.hljs-strong, +.hljs-emphasis { + color: #000000; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #000080; +} + +.hljs-code +.hljs-selector-class { + color: #800080; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #808000; +} + +.hljs-attribute { + color: #800000; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #0055AF; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #008000; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #008000; +} diff --git a/node_modules/highlight.js/styles/railscasts.css b/node_modules/highlight.js/styles/railscasts.css @@ -0,0 +1,106 @@ +/* + +Railscasts-like style (c) Visoft, Inc. (Damien White) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #232323; + color: #e6e1dc; +} + +.hljs-comment, +.hljs-quote { + color: #bc9458; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #c26230; +} + +.hljs-string, +.hljs-number, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable { + color: #a5c261; +} + +.hljs-subst { + color: #519f50; +} + +.hljs-tag, +.hljs-name { + color: #e8bf6a; +} + +.hljs-type { + color: #da4939; +} + + +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-attr, +.hljs-link { + color: #6d9cbe; +} + +.hljs-params { + color: #d0d0ff; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #9b859d; +} + +.hljs-title, +.hljs-section { + color: #ffc66d; +} + +.hljs-addition { + background-color: #144212; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/node_modules/highlight.js/styles/rainbow.css b/node_modules/highlight.js/styles/rainbow.css @@ -0,0 +1,85 @@ +/* + +Style with support for rainbow parens + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #474949; + color: #d1d9e1; +} + + +.hljs-comment, +.hljs-quote { + color: #969896; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-type, +.hljs-addition { + color: #cc99cc; +} + +.hljs-number, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #f99157; +} + +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #8abeb7; +} + +.hljs-title, +.hljs-name, +.hljs-section, +.hljs-built_in { + color: #b5bd68; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-class .hljs-title { + color: #ffcc66; +} + +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-attr, +.hljs-attribute { + color: #81a2be; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/routeros.css b/node_modules/highlight.js/styles/routeros.css @@ -0,0 +1,108 @@ +/* + + highlight.js style for Microtik RouterOS script + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + +.hljs-attribute { + color: #0E9A00; +} + +.hljs-function { + color: #99069A; +} + +.hljs-builtin-name { + color: #99069A; +} + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #0C9A9A; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/school-book.css b/node_modules/highlight.js/styles/school-book.css @@ -0,0 +1,69 @@ +/* + +School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 15px 0.5em 0.5em 30px; + font-size: 11px; + line-height:16px; + background:#f6f6ae url(./school-book.png); + border-top: solid 2px #d2e8b9; + border-bottom: solid 1px #d2e8b9; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #3e5915; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-built_in, +.hljs-builtin-name, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #e60415; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/school-book.png b/node_modules/highlight.js/styles/school-book.png Binary files differ. diff --git a/node_modules/highlight.js/styles/shades-of-purple.css b/node_modules/highlight.js/styles/shades-of-purple.css @@ -0,0 +1,96 @@ +/** + * Shades of Purple Theme — for Highlightjs. + * + * @author (c) Ahmad Awais <https://twitter.com/mrahmadawais/> + * @link GitHub Repo → https://github.com/ahmadawais/Shades-of-Purple-HighlightJS + * @version 1.5.0 + */ + +.hljs { + display: block; + overflow-x: auto; + /* Custom font is optional */ + /* font-family: 'Operator Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', 'monospace'; */ + padding: 0.5em; + background: #2d2b57; + font-weight: normal; +} + +.hljs-title { + color: #fad000; + font-weight: normal; +} + +.hljs-name { + color: #a1feff; +} + +.hljs-tag { + color: #ffffff; +} + +.hljs-attr { + color: #f8d000; + font-style: italic; +} + +.hljs-built_in, +.hljs-selector-tag, +.hljs-section { + color: #fb9e00; +} + +.hljs-keyword { + color: #fb9e00; +} + +.hljs, +.hljs-subst { + color: #e3dfff; +} + +.hljs-string, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-code, +.hljs-regexp, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-quote, +.hljs-deletion { + color: #4cd213; +} + +.hljs-meta, +.hljs-meta-string { + color: #fb9e00; +} + +.hljs-comment { + color: #ac65ff; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-name, +.hljs-strong { + font-weight: normal; +} + +.hljs-literal, +.hljs-number { + color: #fa658d; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/solarized-dark.css b/node_modules/highlight.js/styles/solarized-dark.css @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #002b36; + color: #839496; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/solarized-light.css b/node_modules/highlight.js/styles/solarized-light.css @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fdf6e3; + color: #657b83; +} + +.hljs-comment, +.hljs-quote { + color: #93a1a1; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/srcery.css b/node_modules/highlight.js/styles/srcery.css @@ -0,0 +1,78 @@ +/* +Description: Srcery dark color scheme for highlight.js +Author: Chen Bin <chen.bin@gmail.com> +Website: https://srcery-colors.github.io/ +Date: 2020-04-06 +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1C1B19; + color: #FCE8C3; +} + +.hljs-strong, +.hljs-emphasis { + color: #918175; +} + +.hljs-bullet, +.hljs-quote, +.hljs-link, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #FF5C8F; +} + +.hljs-code, +.hljs-selector-class { + color: #68A8E4 +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-attribute, +.hljs-variable { + color: #EF2F27; +} + +.hljs-name, +.hljs-title { + color: #FBB829; +} + +.hljs-type, +.hljs-params { + color: #0AAEB3; +} + +.hljs-string { + color: #98BC37; +} + +.hljs-subst, +.hljs-built_in, +.hljs-builtin-name, +.hljs-symbol, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #C07ABE; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #918175; +} diff --git a/node_modules/highlight.js/styles/sunburst.css b/node_modules/highlight.js/styles/sunburst.css @@ -0,0 +1,102 @@ +/* + +Sunburst-like style (c) Vasily Polovnyov <vast@whiteants.net> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #aeaeae; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #e28964; +} + +.hljs-string { + color: #65b042; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-tag, +.hljs-name { + color: #89bdff; +} + +.hljs-class .hljs-title, +.hljs-doctag { + text-decoration: underline; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-number { + color: #3387cc; +} + +.hljs-params, +.hljs-variable, +.hljs-template-variable { + color: #3e87e3; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #8996a8; +} + +.hljs-formula { + background-color: #0e2231; + color: #f8f8f8; + font-style: italic; +} + +.hljs-addition { + background-color: #253b22; + color: #f8f8f8; +} + +.hljs-deletion { + background-color: #420e09; + color: #f8f8f8; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/tomorrow-night-blue.css b/node_modules/highlight.js/styles/tomorrow-night-blue.css @@ -0,0 +1,75 @@ +/* Tomorrow Night Blue Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #7285b7; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #ff9da4; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #ffc58f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffeead; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #d1f1a9; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #bbdaff; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ebbbff; +} + +.hljs { + display: block; + overflow-x: auto; + background: #002451; + color: white; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/tomorrow-night-bright.css b/node_modules/highlight.js/styles/tomorrow-night-bright.css @@ -0,0 +1,74 @@ +/* Tomorrow Night Bright Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #d54e53; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #e78c45; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #e7c547; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b9ca4a; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #7aa6da; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c397d8; +} + +.hljs { + display: block; + overflow-x: auto; + background: black; + color: #eaeaea; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/tomorrow-night-eighties.css b/node_modules/highlight.js/styles/tomorrow-night-eighties.css @@ -0,0 +1,74 @@ +/* Tomorrow Night Eighties Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #999999; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #f2777a; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffcc66; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #99cc99; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #6699cc; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #cc99cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2d2d2d; + color: #cccccc; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/tomorrow-night.css b/node_modules/highlight.js/styles/tomorrow-night.css @@ -0,0 +1,75 @@ +/* Tomorrow Night Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #cc6666; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #de935f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #f0c674; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b5bd68; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #81a2be; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b294bb; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1d1f21; + color: #c5c8c6; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/tomorrow.css b/node_modules/highlight.js/styles/tomorrow.css @@ -0,0 +1,72 @@ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #8e908c; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #c82829; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5871f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #eab700; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #718c00; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #4271ae; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8959a8; +} + +.hljs { + display: block; + overflow-x: auto; + background: white; + color: #4d4d4c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/vs.css b/node_modules/highlight.js/styles/vs.css @@ -0,0 +1,68 @@ +/* + +Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name> + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote, +.hljs-variable { + color: #008000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-built_in, +.hljs-name, +.hljs-tag { + color: #00f; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-literal, +.hljs-template-tag, +.hljs-template-variable, +.hljs-type, +.hljs-addition { + color: #a31515; +} + +.hljs-deletion, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-meta { + color: #2b91af; +} + +.hljs-doctag { + color: #808080; +} + +.hljs-attr { + color: #f00; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #00b0e8; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/styles/vs2015.css b/node_modules/highlight.js/styles/vs2015.css @@ -0,0 +1,115 @@ +/* + * Visual Studio 2015 dark style + * Author: Nicolas LLOBERA <nllobera@gmail.com> + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1E1E1E; + color: #DCDCDC; +} + +.hljs-keyword, +.hljs-literal, +.hljs-symbol, +.hljs-name { + color: #569CD6; +} +.hljs-link { + color: #569CD6; + text-decoration: underline; +} + +.hljs-built_in, +.hljs-type { + color: #4EC9B0; +} + +.hljs-number, +.hljs-class { + color: #B8D7A3; +} + +.hljs-string, +.hljs-meta-string { + color: #D69D85; +} + +.hljs-regexp, +.hljs-template-tag { + color: #9A5334; +} + +.hljs-subst, +.hljs-function, +.hljs-title, +.hljs-params, +.hljs-formula { + color: #DCDCDC; +} + +.hljs-comment, +.hljs-quote { + color: #57A64A; + font-style: italic; +} + +.hljs-doctag { + color: #608B4E; +} + +.hljs-meta, +.hljs-meta-keyword, +.hljs-tag { + color: #9B9B9B; +} + +.hljs-variable, +.hljs-template-variable { + color: #BD63C5; +} + +.hljs-attr, +.hljs-attribute, +.hljs-builtin-name { + color: #9CDCFE; +} + +.hljs-section { + color: gold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +/*.hljs-code { + font-family:'Monospace'; +}*/ + +.hljs-bullet, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #D7BA7D; +} + +.hljs-addition { + background-color: #144212; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + display: inline-block; + width: 100%; +} diff --git a/node_modules/highlight.js/styles/xcode.css b/node_modules/highlight.js/styles/xcode.css @@ -0,0 +1,104 @@ +/* + +XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com> + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; + color: black; +} + +/* Gray DOCTYPE selectors like WebKit */ +.xml .hljs-meta { + color: #c0c0c0; +} + +.hljs-comment, +.hljs-quote { + color: #007400; +} + +.hljs-tag, +.hljs-attribute, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-name { + color: #aa0d91; +} + +.hljs-variable, +.hljs-template-variable { + color: #3F6E74; +} + +.hljs-code, +.hljs-string, +.hljs-meta-string { + color: #c41a16; +} + +.hljs-regexp, +.hljs-link { + color: #0E0EFF; +} + +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-number { + color: #1c00cf; +} + +.hljs-section, +.hljs-meta { + color: #643820; +} + + +.hljs-class .hljs-title, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #5c2699; +} + +.hljs-attr { + color: #836C28; +} + +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9b703f; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/node_modules/highlight.js/styles/xt256.css b/node_modules/highlight.js/styles/xt256.css @@ -0,0 +1,92 @@ + +/* + xt256.css + + Contact: initbar [at] protonmail [dot] ch + : github.com/initbar +*/ + +.hljs { + display: block; + overflow-x: auto; + color: #eaeaea; + background: #000; + padding: 0.5em; +} + +.hljs-subst { + color: #eaeaea; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-builtin-name, +.hljs-type { + color: #eaeaea; +} + +.hljs-params { + color: #da0000; +} + +.hljs-literal, +.hljs-number, +.hljs-name { + color: #ff0000; + font-weight: bolder; +} + +.hljs-comment { + color: #969896; +} + +.hljs-selector-id, +.hljs-quote { + color: #00ffff; +} + +.hljs-template-variable, +.hljs-variable, +.hljs-title { + color: #00ffff; + font-weight: bold; +} + +.hljs-selector-class, +.hljs-keyword, +.hljs-symbol { + color: #fff000; +} + +.hljs-string, +.hljs-bullet { + color: #00ff00; +} + +.hljs-tag, +.hljs-section { + color: #000fff; +} + +.hljs-selector-tag { + color: #000fff; + font-weight: bold; +} + +.hljs-attribute, +.hljs-built_in, +.hljs-regexp, +.hljs-link { + color: #ff00ff; +} + +.hljs-meta { + color: #fff; + font-weight: bolder; +} diff --git a/node_modules/highlight.js/styles/zenburn.css b/node_modules/highlight.js/styles/zenburn.css @@ -0,0 +1,80 @@ +/* + +Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru> +based on dark.css by Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #3f3f3f; + color: #dcdcdc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag { + color: #e3ceab; +} + +.hljs-template-tag { + color: #dcdcdc; +} + +.hljs-number { + color: #8cd0d3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-attribute { + color: #efdcbc; +} + +.hljs-literal { + color: #efefaf; +} + +.hljs-subst { + color: #8f8f8f; +} + +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #efef8f; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #dca3a3; +} + +.hljs-deletion, +.hljs-string, +.hljs-built_in, +.hljs-builtin-name { + color: #cc9393; +} + +.hljs-addition, +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7f9f7f; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/node_modules/highlight.js/types/index.d.ts b/node_modules/highlight.js/types/index.d.ts @@ -0,0 +1,235 @@ +// For TS consumers who use Node and don't have dom in their tsconfig lib, import the necessary types here. +/// <reference lib="dom" /> + +/* Public API */ + +// eslint-disable-next-line +declare const hljs : HLJSApi; + +type HLJSApi = PublicApi & ModesAPI + +interface VuePlugin { + install: (vue: any) => void +} + +interface PublicApi { + highlight: (languageName: string, code: string, ignoreIllegals?: boolean, continuation?: Mode) => HighlightResult + highlightAuto: (code: string, languageSubset?: string[]) => AutoHighlightResult + fixMarkup: (html: string) => string + highlightBlock: (element: HTMLElement) => void + configure: (options: Partial<HLJSOptions>) => void + initHighlighting: () => void + initHighlightingOnLoad: () => void + registerLanguage: (languageName: string, language: LanguageFn) => void + listLanguages: () => string[] + registerAliases: (aliasList: string | string[], { languageName } : {languageName: string}) => void + getLanguage: (languageName: string) => Language | undefined + requireLanguage: (languageName: string) => Language | never + autoDetection: (languageName: string) => boolean + inherit: <T>(original: T, ...args: Record<string, any>[]) => T + addPlugin: (plugin: HLJSPlugin) => void + debugMode: () => void + safeMode: () => void + versionString: string + vuePlugin: () => VuePlugin +} + +interface ModesAPI { + SHEBANG: (mode?: Partial<Mode> & {binary?: string | RegExp}) => Mode + BACKSLASH_ESCAPE: Mode + QUOTE_STRING_MODE: Mode + APOS_STRING_MODE: Mode + PHRASAL_WORDS_MODE: Mode + COMMENT: (begin: string | RegExp, end: string | RegExp, modeOpts?: Mode | {}) => Mode + C_LINE_COMMENT_MODE: Mode + C_BLOCK_COMMENT_MODE: Mode + HASH_COMMENT_MODE: Mode + NUMBER_MODE: Mode + C_NUMBER_MODE: Mode + BINARY_NUMBER_MODE: Mode + CSS_NUMBER_MODE: Mode + REGEXP_MODE: Mode + TITLE_MODE: Mode + UNDERSCORE_TITLE_MODE: Mode + METHOD_GUARD: Mode + END_SAME_AS_BEGIN: (mode: Mode) => Mode + // built in regex + IDENT_RE: string + UNDERSCORE_IDENT_RE: string + NUMBER_RE: string + C_NUMBER_RE: string + BINARY_NUMBER_RE: string + RE_STARTERS_RE: string +} + +type LanguageFn = (hljs?: HLJSApi) => Language + +interface HighlightResult { + relevance : number + value : string + language? : string + emitter : Emitter + illegal : boolean + top? : Language | CompiledMode + illegalBy? : illegalData + sofar? : string + errorRaised? : Error + // * for auto-highlight + second_best? : Omit<HighlightResult, 'second_best'> +} +interface AutoHighlightResult extends HighlightResult {} + +interface illegalData { + msg: string + context: string + mode: CompiledMode +} + +type PluginEvent = + 'before:highlight' + | 'after:highlight' + | 'before:highlightBlock' + | 'after:highlightBlock' + +type HLJSPlugin = { + [K in PluginEvent]? : any +} + +interface EmitterConstructor { + new (opts: any): Emitter +} + +interface HLJSOptions { + noHighlightRe: RegExp + languageDetectRe: RegExp + classPrefix: string + tabReplace?: string + useBR: boolean + languages?: string[] + __emitter: EmitterConstructor +} + +interface CallbackResponse { + data: Record<string, any> + ignoreMatch: () => void +} + +/************ + PRIVATE API + ************/ + +/* for jsdoc annotations in the JS source files */ + +type AnnotatedError = Error & {mode?: Mode | Language, languageName?: string, badRule?: Mode} + +type ModeCallback = (match: RegExpMatchArray, response: CallbackResponse) => void +type HighlightedHTMLElement = HTMLElement & {result?: object, second_best?: object, parentNode: HTMLElement} +type EnhancedMatch = RegExpMatchArray & {rule: CompiledMode, type: MatchType} +type MatchType = "begin" | "end" | "illegal" + + interface Emitter { + addKeyword(text: string, kind: string): void + addText(text: string): void + toHTML(): string + finalize(): void + closeAllNodes(): void + openNode(kind: string): void + closeNode(): void + addSublanguage(emitter: Emitter, subLanguageName: string): void + } + +/* modes */ + + interface ModeCallbacks { + "on:end"?: Function, + "on:begin"?: Function, + } + +interface Mode extends ModeCallbacks, ModeDetails { + +} + +interface LanguageDetail { + name?: string + rawDefinition?: () => Language + aliases?: string[] + disableAutodetect?: boolean + contains: ("self"|Mode)[] + case_insensitive?: boolean + keywords?: Record<string, any> | string + compiled?: boolean +} + +type Language = LanguageDetail & Partial<Mode> + +interface CompiledLanguage extends LanguageDetail, CompiledMode { + compiled: true + contains: CompiledMode[] + keywords: Record<string, any> +} + +type KeywordData = [string, number]; +type KeywordDict = Record<string, KeywordData> + +type CompiledMode = Omit<Mode, 'contains'> & + { + contains: CompiledMode[] + keywords: KeywordDict + data: Record<string, any> + terminator_end: string + keywordPatternRe: RegExp + beginRe: RegExp + endRe: RegExp + illegalRe: RegExp + matcher: any + compiled: true + starts?: CompiledMode + parent?: CompiledMode + } + +interface ModeDetails { + begin?: RegExp | string + end?: RegExp | string + className?: string + contains?: ("self" | Mode)[] + endsParent?: boolean + endsWithParent?: boolean + endSameAsBegin?: boolean + skip?: boolean + excludeBegin?: boolean + excludeEnd?: boolean + returnBegin?: boolean + returnEnd?: boolean + __beforeBegin?: Function + parent?: Mode + starts?:Mode + lexemes?: string | RegExp + keywords?: Record<string, any> | string + beginKeywords?: string + relevance?: number + illegal?: string | RegExp + variants?: Mode[] + cached_variants?: Mode[] + // parsed + subLanguage?: string | string[] + compiled?: boolean +} + +// deprecated API since v10 +// declare module 'highlight.js/lib/highlight.js'; + +declare module 'highlight.js' { + export = hljs; +} + +declare module 'highlight.js/lib/core' { + export = hljs; +} + +declare module 'highlight.js/lib/core.js' { + export = hljs; +} + +declare module 'highlight.js/lib/languages/*' { + export default function(hljs?: HLJSApi): LanguageDetail; +} diff --git a/node_modules/js-yaml/CHANGELOG.md b/node_modules/js-yaml/CHANGELOG.md @@ -0,0 +1,551 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [3.14.0] - 2020-05-22 +### Changed +- Support `safe/loadAll(input, options)` variant of call. +- CI: drop outdated nodejs versions. +- Dev deps bump. + +### Fixed +- Quote `=` in plain scalars #519. +- Check the node type for `!<?>` tag in case user manually specifies it. +- Verify that there are no null-bytes in input. +- Fix wrong quote position when writing condensed flow, #526. + + +## [3.13.1] - 2019-04-05 +### Security +- Fix possible code execution in (already unsafe) `.load()`, #480. + + +## [3.13.0] - 2019-03-20 +### Security +- Security fix: `safeLoad()` can hang when arrays with nested refs + used as key. Now throws exception for nested arrays. #475. + + +## [3.12.2] - 2019-02-26 +### Fixed +- Fix `noArrayIndent` option for root level, #468. + + +## [3.12.1] - 2019-01-05 +### Added +- Added `noArrayIndent` option, #432. + + +## [3.12.0] - 2018-06-02 +### Changed +- Support arrow functions without a block statement, #421. + + +## [3.11.0] - 2018-03-05 +### Added +- Add arrow functions suport for `!!js/function`. + +### Fixed +- Fix dump in bin/octal/hex formats for negative integers, #399. + + +## [3.10.0] - 2017-09-10 +### Fixed +- Fix `condenseFlow` output (quote keys for sure, instead of spaces), #371, #370. +- Dump astrals as codepoints instead of surrogate pair, #368. + + +## [3.9.1] - 2017-07-08 +### Fixed +- Ensure stack is present for custom errors in node 7.+, #351. + + +## [3.9.0] - 2017-07-08 +### Added +- Add `condenseFlow` option (to create pretty URL query params), #346. + +### Fixed +- Support array return from safeLoadAll/loadAll, #350. + + +## [3.8.4] - 2017-05-08 +### Fixed +- Dumper: prevent space after dash for arrays that wrap, #343. + + +## [3.8.3] - 2017-04-05 +### Fixed +- Should not allow numbers to begin and end with underscore, #335. + + +## [3.8.2] - 2017-03-02 +### Fixed +- Fix `!!float 123` (integers) parse, #333. +- Don't allow leading zeros in floats (except 0, 0.xxx). +- Allow positive exponent without sign in floats. + + +## [3.8.1] - 2017-02-07 +### Changed +- Maintenance: update browserified build. + + +## [3.8.0] - 2017-02-07 +### Fixed +- Fix reported position for `duplicated mapping key` errors. + Now points to block start instead of block end. + (#243, thanks to @shockey). + + +## [3.7.0] - 2016-11-12 +### Added +- Support polymorphism for tags (#300, thanks to @monken). + +### Fixed +- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). + + +## [3.6.1] - 2016-05-11 +### Fixed +- Fix output cut on a pipe, #286. + + +## [3.6.0] - 2016-04-16 +### Fixed +- Dumper rewrite, fix multiple bugs with trailing `\n`. + Big thanks to @aepsilon! +- Loader: fix leading/trailing newlines in block scalars, @aepsilon. + + +## [3.5.5] - 2016-03-17 +### Fixed +- Date parse fix: don't allow dates with on digit in month and day, #268. + + +## [3.5.4] - 2016-03-09 +### Added +- `noCompatMode` for dumper, to disable quoting YAML 1.1 values. + + +## [3.5.3] - 2016-02-11 +### Changed +- Maintenance release. + + +## [3.5.2] - 2016-01-11 +### Changed +- Maintenance: missed comma in bower config. + + +## [3.5.1] - 2016-01-11 +### Changed +- Removed `inherit` dependency, #239. +- Better browserify workaround for esprima load. +- Demo rewrite. + + +## [3.5.0] - 2016-01-10 +### Fixed +- Dumper. Fold strings only, #217. +- Dumper. `norefs` option, to clone linked objects, #229. +- Loader. Throw a warning for duplicate keys, #166. +- Improved browserify support (mark `esprima` & `Buffer` excluded). + + +## [3.4.6] - 2015-11-26 +### Changed +- Use standalone `inherit` to keep browserified files clear. + + +## [3.4.5] - 2015-11-23 +### Added +- Added `lineWidth` option to dumper. + + +## [3.4.4] - 2015-11-21 +### Fixed +- Fixed floats dump (missed dot for scientific format), #220. +- Allow non-printable characters inside quoted scalars, #192. + + +## [3.4.3] - 2015-10-10 +### Changed +- Maintenance release - deps bump (esprima, argparse). + + +## [3.4.2] - 2015-09-09 +### Fixed +- Fixed serialization of duplicated entries in sequences, #205. + Thanks to @vogelsgesang. + + +## [3.4.1] - 2015-09-05 +### Fixed +- Fixed stacktrace handling in generated errors, for browsers (FF/IE). + + +## [3.4.0] - 2015-08-23 +### Changed +- Don't throw on warnings anymore. Use `onWarning` option to catch. +- Throw error on unknown tags (was warning before). +- Reworked internals of error class. + +### Fixed +- Fixed multiline keys dump, #197. Thanks to @tcr. +- Fixed heading line breaks in some scalars (regression). + + +## [3.3.1] - 2015-05-13 +### Added +- Added `.sortKeys` dumper option, thanks to @rjmunro. + +### Fixed +- Fixed astral characters support, #191. + + +## [3.3.0] - 2015-04-26 +### Changed +- Significantly improved long strings formatting in dumper, thanks to @isaacs. +- Strip BOM if exists. + + +## [3.2.7] - 2015-02-19 +### Changed +- Maintenance release. +- Updated dependencies. +- HISTORY.md -> CHANGELOG.md + + +## [3.2.6] - 2015-02-07 +### Fixed +- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). +- Fixed demo dates dump (#113, thanks to @Hypercubed). + + +## [3.2.5] - 2014-12-28 +### Fixed +- Fixed resolving of all built-in types on empty nodes. +- Fixed invalid warning on empty lines within quoted scalars and flow collections. +- Fixed bug: Tag on an empty node didn't resolve in some cases. + + +## [3.2.4] - 2014-12-19 +### Fixed +- Fixed resolving of !!null tag on an empty node. + + +## [3.2.3] - 2014-11-08 +### Fixed +- Implemented dumping of objects with circular and cross references. +- Partially fixed aliasing of constructed objects. (see issue #141 for details) + + +## [3.2.2] - 2014-09-07 +### Fixed +- Fixed infinite loop on unindented block scalars. +- Rewritten base64 encode/decode in binary type, to keep code licence clear. + + +## [3.2.1] - 2014-08-24 +### Fixed +- Nothig new. Just fix npm publish error. + + +## [3.2.0] - 2014-08-24 +### Added +- Added input piping support to CLI. + +### Fixed +- Fixed typo, that could cause hand on initial indent (#139). + + +## [3.1.0] - 2014-07-07 +### Changed +- 1.5x-2x speed boost. +- Removed deprecated `require('xxx.yml')` support. +- Significant code cleanup and refactoring. +- Internal API changed. If you used custom types - see updated examples. + Others are not affected. +- Even if the input string has no trailing line break character, + it will be parsed as if it has one. +- Added benchmark scripts. +- Moved bower files to /dist folder +- Bugfixes. + + +## [3.0.2] - 2014-02-27 +### Fixed +- Fixed bug: "constructor" string parsed as `null`. + + +## [3.0.1] - 2013-12-22 +### Fixed +- Fixed parsing of literal scalars. (issue #108) +- Prevented adding unnecessary spaces in object dumps. (issue #68) +- Fixed dumping of objects with very long (> 1024 in length) keys. + + +## [3.0.0] - 2013-12-16 +### Changed +- Refactored code. Changed API for custom types. +- Removed output colors in CLI, dump json by default. +- Removed big dependencies from browser version (esprima, buffer). Load `esprima` manually, if `!!js/function` needed. `!!bin` now returns Array in browser +- AMD support. +- Don't quote dumped strings because of `-` & `?` (if not first char). +- __Deprecated__ loading yaml files via `require()`, as not recommended + behaviour for node. + + +## [2.1.3] - 2013-10-16 +### Fixed +- Fix wrong loading of empty block scalars. + + +## [2.1.2] - 2013-10-07 +### Fixed +- Fix unwanted line breaks in folded scalars. + + +## [2.1.1] - 2013-10-02 +### Fixed +- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 +- Fixed reader bug in JSON-like sequences/mappings. + + +## [2.1.0] - 2013-06-05 +### Added +- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), + JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). +- Add `skipInvalid` dumper option. + +### Changed +- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` + and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. +- Use `safeLoad` for `require` extension. + +### Fixed +- Bug fix: export `NIL` constant from the public interface. + + +## [2.0.5] - 2013-04-26 +### Security +- Close security issue in !!js/function constructor. + Big thanks to @nealpoole for security audit. + + +## [2.0.4] - 2013-04-08 +### Changed +- Updated .npmignore to reduce package size + + +## [2.0.3] - 2013-02-26 +### Fixed +- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) + + +## [2.0.2] - 2013-02-15 +### Fixed +- Fixed input validation: tabs are printable characters. + + +## [2.0.1] - 2013-02-09 +### Fixed +- Fixed error, when options not passed to function cass + + +## [2.0.0] - 2013-02-09 +### Changed +- Full rewrite. New architecture. Fast one-stage parsing. +- Changed custom types API. +- Added YAML dumper. + + +## [1.0.3] - 2012-11-05 +### Fixed +- Fixed utf-8 files loading. + + +## [1.0.2] - 2012-08-02 +### Fixed +- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. +- Fix timstamps incorectly parsed in local time when no time part specified. + + +## [1.0.1] - 2012-07-07 +### Fixed +- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. +- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. + + +## [1.0.0] - 2012-07-01 +### Changed +- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. + Fixes #42. +- `require(filename)` now returns a single document and throws an Error if + file contains more than one document. +- CLI was merged back from js-yaml.bin + + +## [0.3.7] - 2012-02-28 +### Fixed +- Fix export of `addConstructor()`. Closes #39. + + +## [0.3.6] - 2012-02-22 +### Changed +- Removed AMD parts - too buggy to use. Need help to rewrite from scratch + +### Fixed +- Removed YUI compressor warning (renamed `double` variable). Closes #40. + + +## [0.3.5] - 2012-01-10 +### Fixed +- Workagound for .npmignore fuckup under windows. Thanks to airportyh. + + +## [0.3.4] - 2011-12-24 +### Fixed +- Fixes str[] for oldIEs support. +- Adds better has change support for browserified demo. +- improves compact output of Error. Closes #33. + + +## [0.3.3] - 2011-12-20 +### Added +- adds `compact` stringification of Errors. + +### Changed +- jsyaml executable moved to separate module. + + +## [0.3.2] - 2011-12-16 +### Added +- Added jsyaml executable. +- Added !!js/function support. Closes #12. + +### Fixed +- Fixes ug with block style scalars. Closes #26. +- All sources are passing JSLint now. +- Fixes bug in Safari. Closes #28. +- Fixes bug in Opers. Closes #29. +- Improves browser support. Closes #20. + + +## [0.3.1] - 2011-11-18 +### Added +- Added AMD support for browserified version. +- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. +- Added !!js/regexp and !!js/undefined types. Partially solves #12. + +### Changed +- Wrapped browserified js-yaml into closure. + +### Fixed +- Fixed the resolvement of non-specific tags. Closes #17. +- Fixed !!set mapping. +- Fixed month parse in dates. Closes #19. + + +## [0.3.0] - 2011-11-09 +### Added +- Added browserified version. Closes #13. +- Added live demo of browserified version. +- Ported some of the PyYAML tests. See #14. + +### Fixed +- Removed JS.Class dependency. Closes #3. +- Fixed timestamp bug when fraction was given. + + +## [0.2.2] - 2011-11-06 +### Fixed +- Fixed crash on docs without ---. Closes #8. +- Fixed multiline string parse +- Fixed tests/comments for using array as key + + +## [0.2.1] - 2011-11-02 +### Fixed +- Fixed short file read (<4k). Closes #9. + + +## [0.2.0] - 2011-11-02 +### Changed +- First public release + + +[3.14.0]: https://github.com/nodeca/js-yaml/compare/3.13.1...3.14.0 +[3.13.1]: https://github.com/nodeca/js-yaml/compare/3.13.0...3.13.1 +[3.13.0]: https://github.com/nodeca/js-yaml/compare/3.12.2...3.13.0 +[3.12.2]: https://github.com/nodeca/js-yaml/compare/3.12.1...3.12.2 +[3.12.1]: https://github.com/nodeca/js-yaml/compare/3.12.0...3.12.1 +[3.12.0]: https://github.com/nodeca/js-yaml/compare/3.11.0...3.12.0 +[3.11.0]: https://github.com/nodeca/js-yaml/compare/3.10.0...3.11.0 +[3.10.0]: https://github.com/nodeca/js-yaml/compare/3.9.1...3.10.0 +[3.9.1]: https://github.com/nodeca/js-yaml/compare/3.9.0...3.9.1 +[3.9.0]: https://github.com/nodeca/js-yaml/compare/3.8.4...3.9.0 +[3.8.4]: https://github.com/nodeca/js-yaml/compare/3.8.3...3.8.4 +[3.8.3]: https://github.com/nodeca/js-yaml/compare/3.8.2...3.8.3 +[3.8.2]: https://github.com/nodeca/js-yaml/compare/3.8.1...3.8.2 +[3.8.1]: https://github.com/nodeca/js-yaml/compare/3.8.0...3.8.1 +[3.8.0]: https://github.com/nodeca/js-yaml/compare/3.7.0...3.8.0 +[3.7.0]: https://github.com/nodeca/js-yaml/compare/3.6.1...3.7.0 +[3.6.1]: https://github.com/nodeca/js-yaml/compare/3.6.0...3.6.1 +[3.6.0]: https://github.com/nodeca/js-yaml/compare/3.5.5...3.6.0 +[3.5.5]: https://github.com/nodeca/js-yaml/compare/3.5.4...3.5.5 +[3.5.4]: https://github.com/nodeca/js-yaml/compare/3.5.3...3.5.4 +[3.5.3]: https://github.com/nodeca/js-yaml/compare/3.5.2...3.5.3 +[3.5.2]: https://github.com/nodeca/js-yaml/compare/3.5.1...3.5.2 +[3.5.1]: https://github.com/nodeca/js-yaml/compare/3.5.0...3.5.1 +[3.5.0]: https://github.com/nodeca/js-yaml/compare/3.4.6...3.5.0 +[3.4.6]: https://github.com/nodeca/js-yaml/compare/3.4.5...3.4.6 +[3.4.5]: https://github.com/nodeca/js-yaml/compare/3.4.4...3.4.5 +[3.4.4]: https://github.com/nodeca/js-yaml/compare/3.4.3...3.4.4 +[3.4.3]: https://github.com/nodeca/js-yaml/compare/3.4.2...3.4.3 +[3.4.2]: https://github.com/nodeca/js-yaml/compare/3.4.1...3.4.2 +[3.4.1]: https://github.com/nodeca/js-yaml/compare/3.4.0...3.4.1 +[3.4.0]: https://github.com/nodeca/js-yaml/compare/3.3.1...3.4.0 +[3.3.1]: https://github.com/nodeca/js-yaml/compare/3.3.0...3.3.1 +[3.3.0]: https://github.com/nodeca/js-yaml/compare/3.2.7...3.3.0 +[3.2.7]: https://github.com/nodeca/js-yaml/compare/3.2.6...3.2.7 +[3.2.6]: https://github.com/nodeca/js-yaml/compare/3.2.5...3.2.6 +[3.2.5]: https://github.com/nodeca/js-yaml/compare/3.2.4...3.2.5 +[3.2.4]: https://github.com/nodeca/js-yaml/compare/3.2.3...3.2.4 +[3.2.3]: https://github.com/nodeca/js-yaml/compare/3.2.2...3.2.3 +[3.2.2]: https://github.com/nodeca/js-yaml/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/nodeca/js-yaml/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/nodeca/js-yaml/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/nodeca/js-yaml/compare/3.0.2...3.1.0 +[3.0.2]: https://github.com/nodeca/js-yaml/compare/3.0.1...3.0.2 +[3.0.1]: https://github.com/nodeca/js-yaml/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/nodeca/js-yaml/compare/2.1.3...3.0.0 +[2.1.3]: https://github.com/nodeca/js-yaml/compare/2.1.2...2.1.3 +[2.1.2]: https://github.com/nodeca/js-yaml/compare/2.1.1...2.1.2 +[2.1.1]: https://github.com/nodeca/js-yaml/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/nodeca/js-yaml/compare/2.0.5...2.1.0 +[2.0.5]: https://github.com/nodeca/js-yaml/compare/2.0.4...2.0.5 +[2.0.4]: https://github.com/nodeca/js-yaml/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/nodeca/js-yaml/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/nodeca/js-yaml/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/nodeca/js-yaml/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/js-yaml/compare/1.0.3...2.0.0 +[1.0.3]: https://github.com/nodeca/js-yaml/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/js-yaml/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/js-yaml/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/js-yaml/compare/0.3.7...1.0.0 +[0.3.7]: https://github.com/nodeca/js-yaml/compare/0.3.6...0.3.7 +[0.3.6]: https://github.com/nodeca/js-yaml/compare/0.3.5...0.3.6 +[0.3.5]: https://github.com/nodeca/js-yaml/compare/0.3.4...0.3.5 +[0.3.4]: https://github.com/nodeca/js-yaml/compare/0.3.3...0.3.4 +[0.3.3]: https://github.com/nodeca/js-yaml/compare/0.3.2...0.3.3 +[0.3.2]: https://github.com/nodeca/js-yaml/compare/0.3.1...0.3.2 +[0.3.1]: https://github.com/nodeca/js-yaml/compare/0.3.0...0.3.1 +[0.3.0]: https://github.com/nodeca/js-yaml/compare/0.2.2...0.3.0 +[0.2.2]: https://github.com/nodeca/js-yaml/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/nodeca/js-yaml/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/nodeca/js-yaml/releases/tag/0.2.0 diff --git a/node_modules/js-yaml/LICENSE b/node_modules/js-yaml/LICENSE @@ -0,0 +1,21 @@ +(The MIT License) + +Copyright (C) 2011-2015 by Vitaly Puzrin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/js-yaml/README.md b/node_modules/js-yaml/README.md @@ -0,0 +1,299 @@ +JS-YAML - YAML 1.2 parser / writer for JavaScript +================================================= + +[![Build Status](https://travis-ci.org/nodeca/js-yaml.svg?branch=master)](https://travis-ci.org/nodeca/js-yaml) +[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml) + +__[Online Demo](http://nodeca.github.com/js-yaml/)__ + + +This is an implementation of [YAML](http://yaml.org/), a human-friendly data +serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was +completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. + + +Installation +------------ + +### YAML module for node.js + +``` +npm install js-yaml +``` + + +### CLI executable + +If you want to inspect your YAML files from CLI, install js-yaml globally: + +``` +npm install -g js-yaml +``` + +#### Usage + +``` +usage: js-yaml [-h] [-v] [-c] [-t] file + +Positional arguments: + file File with YAML document(s) + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -c, --compact Display errors in compact mode + -t, --trace Show stack trace on error +``` + + +### Bundled YAML library for browsers + +``` html +<!-- esprima required only for !!js/function --> +<script src="esprima.js"></script> +<script src="js-yaml.min.js"></script> +<script type="text/javascript"> +var doc = jsyaml.load('greeting: hello\nname: world'); +</script> +``` + +Browser support was done mostly for the online demo. If you find any errors - feel +free to send pull requests with fixes. Also note, that IE and other old browsers +needs [es5-shims](https://github.com/kriskowal/es5-shim) to operate. + +Notes: + +1. We have no resources to support browserified version. Don't expect it to be + well tested. Don't expect fast fixes if something goes wrong there. +2. `!!js/function` in browser bundle will not work by default. If you really need + it - load `esprima` parser first (via amd or directly). +3. `!!bin` in browser will return `Array`, because browsers do not support + node.js `Buffer` and adding Buffer shims is completely useless on practice. + + +API +--- + +Here we cover the most 'useful' methods. If you need advanced details (creating +your own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and +[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more +info. + +``` javascript +const yaml = require('js-yaml'); +const fs = require('fs'); + +// Get document, or throw exception on error +try { + const doc = yaml.safeLoad(fs.readFileSync('/home/ixti/example.yml', 'utf8')); + console.log(doc); +} catch (e) { + console.log(e); +} +``` + + +### safeLoad (string [ , options ]) + +**Recommended loading way.** Parses `string` as single YAML document. Returns either a +plain object, a string or `undefined`, or throws `YAMLException` on error. By default, does +not support regexps, functions and undefined. This method is safe for untrusted data. + +options: + +- `filename` _(default: null)_ - string to be used as a file path in + error/warning messages. +- `onWarning` _(default: null)_ - function to call on warning messages. + Loader will call this function with an instance of `YAMLException` for each warning. +- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ - specifies a schema to use. + - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: + http://www.yaml.org/spec/1.2/spec.html#id2802346 + - `JSON_SCHEMA` - all JSON-supported types: + http://www.yaml.org/spec/1.2/spec.html#id2803231 + - `CORE_SCHEMA` - same as `JSON_SCHEMA`: + http://www.yaml.org/spec/1.2/spec.html#id2804923 + - `DEFAULT_SAFE_SCHEMA` - all supported YAML types, without unsafe ones + (`!!js/undefined`, `!!js/regexp` and `!!js/function`): + http://yaml.org/type/ + - `DEFAULT_FULL_SCHEMA` - all supported YAML types. +- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. + +NOTE: This function **does not** understand multi-document sources, it throws +exception on those. + +NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. +So, the JSON schema is not as strictly defined in the YAML specification. +It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. +The core schema also has no such restrictions. It allows binary notation for integers. + + +### load (string [ , options ]) + +**Use with care with untrusted sources**. The same as `safeLoad()` but uses +`DEFAULT_FULL_SCHEMA` by default - adds some JavaScript-specific types: +`!!js/function`, `!!js/regexp` and `!!js/undefined`. For untrusted sources, you +must additionally validate object structure to avoid injections: + +``` javascript +const untrusted_code = '"toString": !<tag:yaml.org,2002:js/function> "function (){very_evil_thing();}"'; + +// I'm just converting that string, what could possibly go wrong? +require('js-yaml').load(untrusted_code) + '' +``` + + +### safeLoadAll (string [, iterator] [, options ]) + +Same as `safeLoad()`, but understands multi-document sources. Applies +`iterator` to each document if specified, or returns array of documents. + +``` javascript +const yaml = require('js-yaml'); + +yaml.safeLoadAll(data, function (doc) { + console.log(doc); +}); +``` + + +### loadAll (string [, iterator] [ , options ]) + +Same as `safeLoadAll()` but uses `DEFAULT_FULL_SCHEMA` by default. + + +### safeDump (object [ , options ]) + +Serializes `object` as a YAML document. Uses `DEFAULT_SAFE_SCHEMA`, so it will +throw an exception if you try to dump regexps or functions. However, you can +disable exceptions by setting the `skipInvalid` option to `true`. + +options: + +- `indent` _(default: 2)_ - indentation width to use (in spaces). +- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements +- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function + in the safe schema) and skip pairs and single values with such types. +- `flowLevel` (default: -1) - specifies level of nesting, when to switch from + block to flow style for collections. -1 means block style everwhere +- `styles` - "tag" => "style" map. Each tag may have own set of styles. +- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ specifies a schema to use. +- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a + function, use the function to sort the keys. +- `lineWidth` _(default: `80`)_ - set max line width. +- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references +- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older + yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 +- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. + +The following table show availlable styles (e.g. "canonical", +"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml +output is shown on the right side after `=>` (default setting) or `->`: + +``` none +!!null + "canonical" -> "~" + "lowercase" => "null" + "uppercase" -> "NULL" + "camelcase" -> "Null" + +!!int + "binary" -> "0b1", "0b101010", "0b1110001111010" + "octal" -> "01", "052", "016172" + "decimal" => "1", "42", "7290" + "hexadecimal" -> "0x1", "0x2A", "0x1C7A" + +!!bool + "lowercase" => "true", "false" + "uppercase" -> "TRUE", "FALSE" + "camelcase" -> "True", "False" + +!!float + "lowercase" => ".nan", '.inf' + "uppercase" -> ".NAN", '.INF' + "camelcase" -> ".NaN", '.Inf' +``` + +Example: + +``` javascript +safeDump (object, { + 'styles': { + '!!null': 'canonical' // dump null as ~ + }, + 'sortKeys': true // sort object keys +}); +``` + +### dump (object [ , options ]) + +Same as `safeDump()` but without limits (uses `DEFAULT_FULL_SCHEMA` by default). + + +Supported YAML types +-------------------- + +The list of standard YAML tags and corresponding JavaScipt types. See also +[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and +[YAML types repository](http://yaml.org/type/). + +``` +!!null '' # null +!!bool 'yes' # bool +!!int '3...' # number +!!float '3.14...' # number +!!binary '...base64...' # buffer +!!timestamp 'YYYY-...' # date +!!omap [ ... ] # array of key-value pairs +!!pairs [ ... ] # array or array pairs +!!set { ... } # array of objects with given keys and null values +!!str '...' # string +!!seq [ ... ] # array +!!map { ... } # object +``` + +**JavaScript-specific tags** + +``` +!!js/regexp /pattern/gim # RegExp +!!js/undefined '' # Undefined +!!js/function 'function () {...}' # Function +``` + +Caveats +------- + +Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects +or arrays as keys, and stringifies (by calling `toString()` method) them at the +moment of adding them. + +``` yaml +--- +? [ foo, bar ] +: - baz +? { foo: bar } +: - baz + - baz +``` + +``` javascript +{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } +``` + +Also, reading of properties on implicit block mapping keys is not supported yet. +So, the following YAML document cannot be loaded. + +``` yaml +&anchor foo: + foo: bar + *anchor: duplicate key + baz: bat + *anchor: duplicate key +``` + + +js-yaml for enterprise +---------------------- + +Available as part of the Tidelift Subscription + +The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/js-yaml/bin/js-yaml.js b/node_modules/js-yaml/bin/js-yaml.js @@ -0,0 +1,132 @@ +#!/usr/bin/env node + + +'use strict'; + +/*eslint-disable no-console*/ + + +// stdlib +var fs = require('fs'); + + +// 3rd-party +var argparse = require('argparse'); + + +// internal +var yaml = require('..'); + + +//////////////////////////////////////////////////////////////////////////////// + + +var cli = new argparse.ArgumentParser({ + prog: 'js-yaml', + version: require('../package.json').version, + addHelp: true +}); + + +cli.addArgument([ '-c', '--compact' ], { + help: 'Display errors in compact mode', + action: 'storeTrue' +}); + + +// deprecated (not needed after we removed output colors) +// option suppressed, but not completely removed for compatibility +cli.addArgument([ '-j', '--to-json' ], { + help: argparse.Const.SUPPRESS, + dest: 'json', + action: 'storeTrue' +}); + + +cli.addArgument([ '-t', '--trace' ], { + help: 'Show stack trace on error', + action: 'storeTrue' +}); + +cli.addArgument([ 'file' ], { + help: 'File to read, utf-8 encoded without BOM', + nargs: '?', + defaultValue: '-' +}); + + +//////////////////////////////////////////////////////////////////////////////// + + +var options = cli.parseArgs(); + + +//////////////////////////////////////////////////////////////////////////////// + +function readFile(filename, encoding, callback) { + if (options.file === '-') { + // read from stdin + + var chunks = []; + + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }); + + process.stdin.on('end', function () { + return callback(null, Buffer.concat(chunks).toString(encoding)); + }); + } else { + fs.readFile(filename, encoding, callback); + } +} + +readFile(options.file, 'utf8', function (error, input) { + var output, isYaml; + + if (error) { + if (error.code === 'ENOENT') { + console.error('File not found: ' + options.file); + process.exit(2); + } + + console.error( + options.trace && error.stack || + error.message || + String(error)); + + process.exit(1); + } + + try { + output = JSON.parse(input); + isYaml = false; + } catch (err) { + if (err instanceof SyntaxError) { + try { + output = []; + yaml.loadAll(input, function (doc) { output.push(doc); }, {}); + isYaml = true; + + if (output.length === 0) output = null; + else if (output.length === 1) output = output[0]; + + } catch (e) { + if (options.trace && err.stack) console.error(e.stack); + else console.error(e.toString(options.compact)); + + process.exit(1); + } + } else { + console.error( + options.trace && err.stack || + err.message || + String(err)); + + process.exit(1); + } + } + + if (isYaml) console.log(JSON.stringify(output, null, ' ')); + else console.log(yaml.dump(output)); +}); diff --git a/node_modules/js-yaml/dist/js-yaml.js b/node_modules/js-yaml/dist/js-yaml.js @@ -0,0 +1,3989 @@ +/* js-yaml 3.14.0 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ +'use strict'; + + +var loader = require('./js-yaml/loader'); +var dumper = require('./js-yaml/dumper'); + + +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} + + +module.exports.Type = require('./js-yaml/type'); +module.exports.Schema = require('./js-yaml/schema'); +module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe'); +module.exports.JSON_SCHEMA = require('./js-yaml/schema/json'); +module.exports.CORE_SCHEMA = require('./js-yaml/schema/core'); +module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full'); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.safeLoad = loader.safeLoad; +module.exports.safeLoadAll = loader.safeLoadAll; +module.exports.dump = dumper.dump; +module.exports.safeDump = dumper.safeDump; +module.exports.YAMLException = require('./js-yaml/exception'); + +// Deprecated schema names from JS-YAML 2.0.x +module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe'); +module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full'); + +// Deprecated functions from JS-YAML 1.x.x +module.exports.scan = deprecated('scan'); +module.exports.parse = deprecated('parse'); +module.exports.compose = deprecated('compose'); +module.exports.addConstructor = deprecated('addConstructor'); + +},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(require,module,exports){ +'use strict'; + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; + +},{}],3:[function(require,module,exports){ +'use strict'; + +/*eslint-disable no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// [24] b-line-feed ::= #xA /* LF */ +// [25] b-carriage-return ::= #xD /* CR */ +// [3] c-byte-order-mark ::= #xFEFF +function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) + // byte-order-mark + && c !== 0xFEFF + // b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c, prev) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + // /* An ns-char preceding */ "#" + && c !== CHAR_COLON + && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (index !== 0) pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + +module.exports.dump = dump; +module.exports.safeDump = safeDump; + +},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(require,module,exports){ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; + +},{}],5:[function(require,module,exports){ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Mark = require('./mark'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent + atNewLine = false, + hasContent = false, + typeIndex, + typeQuantity, + type, + flowIndent, + blockIndent; + + if (state.listener !== null) { + state.listener('open', state); + } + + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + + allowBlockStyles = allowBlockScalars = allowBlockCollections = + CONTEXT_BLOCK_OUT === nodeContext || + CONTEXT_BLOCK_IN === nodeContext; + + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "!<?> [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, iterator, options) { + if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; + +},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(require,module,exports){ +'use strict'; + + +var common = require('./common'); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +module.exports = Mark; + +},{"./common":2}],7:[function(require,module,exports){ +'use strict'; + +/*eslint-disable max-len*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +module.exports = Schema; + +},{"./common":2,"./exception":4,"./type":13}],8:[function(require,module,exports){ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./json') + ] +}); + +},{"../schema":7,"./json":12}],9:[function(require,module,exports){ +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = Schema.DEFAULT = new Schema({ + include: [ + require('./default_safe') + ], + explicit: [ + require('../type/js/undefined'), + require('../type/js/regexp'), + require('../type/js/function') + ] +}); + +},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(require,module,exports){ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./core') + ], + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); + +},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(require,module,exports){ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); + +},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(require,module,exports){ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./failsafe') + ], + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); + +},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(require,module,exports){ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + +},{"./exception":4}],14:[function(require,module,exports){ +'use strict'; + +/*eslint-disable no-bitwise*/ + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +},{"../type":13}],15:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + +},{"../type":13}],16:[function(require,module,exports){ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +},{"../common":2,"../type":13}],17:[function(require,module,exports){ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 10 (except 0) or base 60 + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +},{"../common":2,"../type":13}],18:[function(require,module,exports){ +'use strict'; + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); +} catch (_) { + /* eslint-disable no-redeclare */ + /* global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + +var Type = require('../../type'); + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + if (ast.body[0].expression.body.type === 'BlockStatement') { + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + // ES6 arrow functions can omit the BlockStatement. In that case, just return + // the body. + /*eslint-disable no-new-func*/ + return new Function(params, 'return ' + source.slice(body[0], body[1])); +} + +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); + +},{"../../type":13}],19:[function(require,module,exports){ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + +},{"../../type":13}],20:[function(require,module,exports){ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); + +},{"../../type":13}],21:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + +},{"../type":13}],22:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +},{"../type":13}],23:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); + +},{"../type":13}],24:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +},{"../type":13}],25:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +},{"../type":13}],26:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +},{"../type":13}],27:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +},{"../type":13}],28:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + +},{"../type":13}],29:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +},{"../type":13}],"/":[function(require,module,exports){ +'use strict'; + + +var yaml = require('./lib/js-yaml.js'); + + +module.exports = yaml; + +},{"./lib/js-yaml.js":1}]},{},[])("/") +}); diff --git a/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/js-yaml/dist/js-yaml.min.js @@ -0,0 +1 @@ +!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsyaml=e()}(function(){return function o(a,s,c){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[t]={exports:{}};a[t][0].call(r.exports,function(e){return u(a[t][1][e]||e)},r,r.exports,o,a,s,c)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e<c.length;e++)u(c[e]);return u}({1:[function(e,t,n){"use strict";var i=e("./js-yaml/loader"),r=e("./js-yaml/dumper");function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=r.dump,t.exports.safeDump=r.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=o("scan"),t.exports.parse=o("parse"),t.exports.compose=o("compose"),t.exports.addConstructor=o("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(e,t,n){"use strict";function i(e){return null==e}t.exports.isNothing=i,t.exports.isObject=function(e){return"object"==typeof e&&null!==e},t.exports.toArray=function(e){return Array.isArray(e)?e:i(e)?[]:[e]},t.exports.repeat=function(e,t){for(var n="",i=0;i<t;i+=1)n+=e;return n},t.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},t.exports.extend=function(e,t){var n,i,r,o;if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r];return e}},{}],3:[function(e,t,n){"use strict";var c=e("./common"),d=e("./exception"),i=e("./schema/default_full"),r=e("./schema/default_safe"),p=Object.prototype.toString,u=Object.prototype.hasOwnProperty,o=9,h=10,a=13,s=32,m=33,g=34,y=35,x=37,v=38,A=39,b=42,w=44,C=45,k=58,j=61,S=62,I=63,O=64,E=91,F=93,_=96,N=123,M=124,T=125,l={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},f=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function L(e){var t,n,i=e.toString(16).toUpperCase();if(e<=255)t="x",n=2;else if(e<=65535)t="u",n=4;else{if(!(e<=4294967295))throw new d("code point within a string may not be greater than 0xFFFFFFFF");t="U",n=8}return"\\"+t+c.repeat("0",n-i.length)+i}function D(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=c.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,o,a,s,c;if(null===t)return{};for(n={},r=0,o=(i=Object.keys(t)).length;r<o;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&u.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function U(e,t){for(var n,i=c.repeat(" ",t),r=0,o=-1,a="",s=e.length;r<s;)r=-1===(o=e.indexOf("\n",r))?(n=e.slice(r),s):(n=e.slice(r,o+1),o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function q(e,t){return"\n"+c.repeat(" ",e.indent*t)}function Y(e){return e===s||e===o}function R(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function B(e,t){return R(e)&&65279!==e&&e!==w&&e!==E&&e!==F&&e!==N&&e!==T&&e!==k&&(e!==y||t&&(R(n=t)&&!Y(n)&&65279!==n&&n!==a&&n!==h));var n}function P(e){return/^\n* /.test(e)}var W=1,K=2,$=3,H=4,G=5;function V(e,t,n,i,r){var o,a,s,c,u=!1,l=!1,p=-1!==i,f=-1,d=R(c=e.charCodeAt(0))&&65279!==c&&!Y(c)&&c!==C&&c!==I&&c!==k&&c!==w&&c!==E&&c!==F&&c!==N&&c!==T&&c!==y&&c!==v&&c!==b&&c!==m&&c!==M&&c!==j&&c!==S&&c!==A&&c!==g&&c!==x&&c!==O&&c!==_&&!Y(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(!R(a=e.charCodeAt(o)))return G;s=0<o?e.charCodeAt(o-1):null,d=d&&B(a,s)}else{for(o=0;o<e.length;o++){if((a=e.charCodeAt(o))===h)u=!0,p&&(l=l||i<o-f-1&&" "!==e[f+1],f=o);else if(!R(a))return G;s=0<o?e.charCodeAt(o-1):null,d=d&&B(a,s)}l=l||p&&i<o-f-1&&" "!==e[f+1]}return u||l?9<n&&P(e)?G:l?H:$:d&&!r(e)?W:K}function Z(i,r,o,a){i.dump=function(){if(0===r.length)return"''";if(!i.noCompatMode&&-1!==f.indexOf(r))return"'"+r+"'";var e=i.indent*Math.max(1,o),t=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-e),n=a||-1<i.flowLevel&&o>=i.flowLevel;switch(V(r,n,i.indent,t,function(e){return function(e,t){for(var n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(i,e)})){case W:return r;case K:return"'"+r.replace(/'/g,"''")+"'";case $:return"|"+z(r,i.indent)+J(U(r,e));case H:return">"+z(r,i.indent)+J(U(function(t,n){var e,i,r=/(\n+)([^\n]*)/g,o=function(){var e=-1!==(e=t.indexOf("\n"))?e:t.length;return r.lastIndex=e,Q(t.slice(0,e),n)}(),a="\n"===t[0]||" "===t[0];for(;i=r.exec(t);){var s=i[1],c=i[2];e=" "===c[0],o+=s+(a||e||""===c?"":"\n")+Q(c,n),a=e}return o}(r,t),e));case G:return'"'+function(e){for(var t,n,i,r="",o=0;o<e.length;o++)55296<=(t=e.charCodeAt(o))&&t<=56319&&56320<=(n=e.charCodeAt(o+1))&&n<=57343?(r+=L(1024*(t-55296)+n-56320+65536),o++):(i=l[t],r+=!i&&R(t)?e[o]:i||L(t));return r}(r)+'"';default:throw new d("impossible error: invalid scalar style")}}()}function z(e,t){var n=P(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function J(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Q(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)t<(s=n.index)-o&&(i=o<a?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",e.length-o>t&&o<a?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function X(e,t,n){for(var i,r,o,a=n?e.explicitTypes:e.implicitTypes,s=0,c=a.length;s<c;s+=1)if(((r=a[s]).instanceOf||r.predicate)&&(!r.instanceOf||"object"==typeof t&&t instanceof r.instanceOf)&&(!r.predicate||r.predicate(t))){if(e.tag=n?r.tag:"?",r.represent){if(o=e.styleMap[r.tag]||r.defaultStyle,"[object Function]"===p.call(r.represent))i=r.represent(t,o);else{if(!u.call(r.represent,o))throw new d("!<"+r.tag+'> tag resolver accepts not "'+o+'" style');i=r.represent[o](t,o)}e.dump=i}return 1}}function ee(e,t,n,i,r,o){e.tag=null,e.dump=n,X(e,n,!1)||X(e,n,!0);var a=p.call(e.dump);i=i&&(e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&0<t)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var r,o,a,s,c,u,l="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new d("sortKeys must be a boolean or a function");for(r=0,o=f.length;r<o;r+=1)u="",i&&0===r||(u+=q(e,t)),s=n[a=f[r]],ee(e,t+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&h===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=q(e,t)),ee(e,t+1,s,!0,c)&&(e.dump&&h===e.dump.charCodeAt(0)?u+=":":u+=": ",l+=u+=e.dump));e.tag=p,e.dump=l||"{}"}(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(function(e,t,n){for(var i,r,o,a="",s=e.tag,c=Object.keys(n),u=0,l=c.length;u<l;u+=1)o="",0!==u&&(o+=", "),e.condenseFlow&&(o+='"'),r=n[i=c[u]],ee(e,t,i,!1,!1)&&(1024<e.dump.length&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ee(e,t,r,!1,!1)&&(a+=o+=e.dump));e.tag=s,e.dump="{"+a+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a){var l=e.noArrayIndent&&0<t?t-1:t;i&&0!==e.dump.length?(function(e,t,n,i){for(var r="",o=e.tag,a=0,s=n.length;a<s;a+=1)ee(e,t+1,n[a],!0,!0)&&(i&&0===a||(r+=q(e,t)),e.dump&&h===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=o,e.dump=r||"[]"}(e,l,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(function(e,t,n){for(var i="",r=e.tag,o=0,a=n.length;o<a;o+=1)ee(e,t,n[o],!1,!1)&&(0!==o&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=r,e.dump="["+i+"]"}(e,l,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump))}else{if("[object String]"!==a){if(e.skipInvalid)return;throw new d("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&Z(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return 1}function te(e,t){var n,i,r=[],o=[];for(!function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o<a;o+=1)e(t[o],n,i);else for(r=Object.keys(t),o=0,a=r.length;o<a;o+=1)e(t[r[o]],n,i)}(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function ne(e,t){var n=new D(t=t||{});return n.noRefs||te(e,n),ee(n,0,e,!0,!0)?n.dump+"\n":""}t.exports.dump=ne,t.exports.safeDump=function(e,t){return ne(e,c.extend({schema:r},t))}},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}((i.prototype=Object.create(Error.prototype)).constructor=i).prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";var g=e("./common"),i=e("./exception"),r=e("./mark"),o=e("./schema/default_safe"),a=e("./schema/default_full"),y=Object.prototype.hasOwnProperty,x=1,v=2,A=3,b=4,w=1,C=2,k=3,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=/[\x85\u2028\u2029]/,j=/[,\[\]\{\}]/,S=/^(?:!|!!|![a-z\-]+!)$/i,I=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function l(e){return Object.prototype.toString.call(e)}function O(e){return 10===e||13===e}function E(e){return 9===e||32===e}function F(e){return 9===e||32===e||10===e||13===e}function _(e){return 44===e||91===e||93===e||123===e||125===e}function u(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}for(var f=new Array(256),d=new Array(256),p=0;p<256;p++)f[p]=u(p)?1:0,d[p]=u(p);function h(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function m(e,t){return new i(t,new r(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function N(e,t){throw m(e,t)}function M(e,t){e.onWarning&&e.onWarning.call(null,m(e,t))}var T={YAML:function(e,t,n){var i,r,o;null!==e.version&&N(e,"duplication of %YAML directive"),1!==n.length&&N(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&N(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&N(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&M(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&N(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],S.test(i)||N(e,"ill-formed tag handle (first argument) of the TAG directive"),y.call(e.tagMap,i)&&N(e,'there is a previously declared suffix for "'+i+'" tag handle'),I.test(r)||N(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};function L(e,t,n,i){var r,o,a,s;if(t<n){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;r<o;r+=1)9===(a=s.charCodeAt(r))||32<=a&&a<=1114111||N(e,"expected valid JSON character");else c.test(s)&&N(e,"the stream contains non-printable characters");e.result+=s}}function D(e,t,n,i){var r,o,a,s;for(g.isObject(n)||N(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(r=Object.keys(n)).length;a<s;a+=1)o=r[a],y.call(t,o)||(t[o]=n[o],i[o]=!0)}function U(e,t,n,i,r,o,a,s){var c,u;if(Array.isArray(r))for(c=0,u=(r=Array.prototype.slice.call(r)).length;c<u;c+=1)Array.isArray(r[c])&&N(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===l(r[c])&&(r[c]="[object Object]");if("object"==typeof r&&"[object Object]"===l(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)D(e,t,o[c],n);else D(e,t,o,n);else e.json||y.call(n,r)||!y.call(t,r)||(e.line=a||e.line,e.position=s||e.position,N(e,"duplicated mapping key")),t[r]=o,delete n[r];return t}function q(e){var t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):N(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Y(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;E(r);)r=e.input.charCodeAt(++e.position);if(t&&35===r)for(;10!==(r=e.input.charCodeAt(++e.position))&&13!==r&&0!==r;);if(!O(r))break;for(q(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&M(e,"deficient indentation"),i}function R(e){var t=e.position,n=e.input.charCodeAt(t);return 45!==n&&46!==n||n!==e.input.charCodeAt(t+1)||n!==e.input.charCodeAt(t+2)||(t+=3,0!==(n=e.input.charCodeAt(t))&&!F(n))?void 0:1}function B(e,t){1===t?e.result+=" ":1<t&&(e.result+=g.repeat("\n",t-1))}function P(e,t){var n,i,r,o,a,s,c,u,l,p=e.input.charCodeAt(e.position);if(34===p){for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(p=e.input.charCodeAt(e.position));){if(34===p)return L(e,n,e.position,!0),e.position++,1;if(92===p){if(L(e,n,e.position,!0),O(p=e.input.charCodeAt(++e.position)))Y(e,!1,t);else if(p<256&&f[p])e.result+=d[p],e.position++;else if(0<(a=120===(l=p)?2:117===l?4:85===l?8:0)){for(r=a,o=0;0<r;r--)p=e.input.charCodeAt(++e.position),u=void 0,0<=(a=48<=(c=p)&&c<=57?c-48:97<=(u=32|c)&&u<=102?u-97+10:-1)?o=(o<<4)+a:N(e,"expected hexadecimal character");e.result+=(s=o)<=65535?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10),56320+(s-65536&1023)),e.position++}else N(e,"unknown escape sequence");n=i=e.position}else O(p)?(L(e,n,i,!0),B(e,Y(e,!1,t)),n=i=e.position):e.position===e.lineStart&&R(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}}function W(e,t){var n,i,r=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&45===i&&F(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Y(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,K(e,t,A,!1,!0),a.push(e.result),Y(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)N(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function K(e,t,n,i,r){var o,a,s,c,u,l,p,f,d=1,h=!1,m=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=b===n||A===n,i&&Y(e,!0,-1)&&(h=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;function(e){var t,n,i,r=!1,o=!1,a=e.input.charCodeAt(e.position);if(33===a){if(null!==e.tag&&N(e,"duplication of a tag property"),60===(a=e.input.charCodeAt(++e.position))?(r=!0,a=e.input.charCodeAt(++e.position)):33===a?(o=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){for(;0!==(a=e.input.charCodeAt(++e.position))&&62!==a;);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):N(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!F(a);)33===a&&(o?N(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),S.test(n)||N(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),j.test(i)&&N(e,"tag suffix cannot contain flow indicator characters")}return i&&!I.test(i)&&N(e,"tag name cannot contain such characters: "+i),r?e.tag=i:y.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:N(e,'undeclared tag handle "'+n+'"'),1}}(e)||function(e){var t,n=e.input.charCodeAt(e.position);if(38===n){for(null!==e.anchor&&N(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!F(n)&&!_(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),1}}(e);)Y(e,!0,-1)?(h=!0,s=o,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):s=!1;if(s=s&&(h||r),1!==d&&b!==n||(p=x===n||v===n?t:t+1,f=e.position-e.lineStart,1===d?s&&(W(e,f)||function(e,t,n){var i,r,o,a,s,c=e.tag,u=e.anchor,l={},p={},f=null,d=null,h=null,m=!1,g=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=l),s=e.input.charCodeAt(e.position);0!==s;){if(i=e.input.charCodeAt(e.position+1),o=e.line,a=e.position,63!==s&&58!==s||!F(i)){if(!K(e,n,v,!1,!0))break;if(e.line===o){for(s=e.input.charCodeAt(e.position);E(s);)s=e.input.charCodeAt(++e.position);if(58===s)F(s=e.input.charCodeAt(++e.position))||N(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(U(e,l,p,f,d,null),f=d=h=null),r=m=!(g=!0),f=e.tag,d=e.result;else{if(!g)return e.tag=c,e.anchor=u,1;N(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!g)return e.tag=c,e.anchor=u,1;N(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(m&&(U(e,l,p,f,d,null),f=d=h=null),r=m=g=!0):m?r=!(m=!1):N(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=i;if((e.line===o||e.lineIndent>t)&&(K(e,t,b,!0,r)&&(m?d=e.result:h=e.result),m||(U(e,l,p,f,d,h,o,a),f=d=h=null),Y(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)N(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&U(e,l,p,f,d,null),g&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=l),g}(e,f,p))||function(e,t){var n,i,r,o,a,s,c,u,l,p=!0,f=e.tag,d=e.anchor,h={},m=e.input.charCodeAt(e.position);if(91===m)s=!(r=93),i=[];else{if(123!==m)return;r=125,s=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),m=e.input.charCodeAt(++e.position);0!==m;){if(Y(e,!0,t),(m=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=f,e.anchor=d,e.kind=s?"mapping":"sequence",e.result=i,1;p||N(e,"missed comma between flow collection entries"),l=null,o=a=!1,63===m&&F(e.input.charCodeAt(e.position+1))&&(o=a=!0,e.position++,Y(e,!0,t)),n=e.line,K(e,t,x,!1,!0),u=e.tag,c=e.result,Y(e,!0,t),m=e.input.charCodeAt(e.position),!a&&e.line!==n||58!==m||(o=!0,m=e.input.charCodeAt(++e.position),Y(e,!0,t),K(e,t,x,!1,!0),l=e.result),s?U(e,i,h,u,c,l):o?i.push(U(e,null,h,u,c,l)):i.push(c),Y(e,!0,t),44===(m=e.input.charCodeAt(e.position))?(p=!0,m=e.input.charCodeAt(++e.position)):p=!1}N(e,"unexpected end of the stream within a flow collection")}(e,p)?m=!0:(a&&function(e,t){var n,i,r,o,a=w,s=!1,c=!1,u=t,l=0,p=!1,f=e.input.charCodeAt(e.position);if(124===f)i=!1;else{if(62!==f)return;i=!0}for(e.kind="scalar",e.result="";0!==f;)if(43===(f=e.input.charCodeAt(++e.position))||45===f)w===a?a=43===f?k:C:N(e,"repeat of a chomping mode identifier");else{if(!(0<=(r=48<=(o=f)&&o<=57?o-48:-1)))break;0==r?N(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?N(e,"repeat of an indentation width identifier"):(u=t+r-1,c=!0)}if(E(f)){for(;E(f=e.input.charCodeAt(++e.position)););if(35===f)for(;!O(f=e.input.charCodeAt(++e.position))&&0!==f;);}for(;0!==f;){for(q(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===f;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),O(f))l++;else{if(e.lineIndent<u){a===k?e.result+=g.repeat("\n",s?1+l:l):a===w&&s&&(e.result+="\n");break}for(i?E(f)?(p=!0,e.result+=g.repeat("\n",s?1+l:l)):p?(p=!1,e.result+=g.repeat("\n",l+1)):0===l?s&&(e.result+=" "):e.result+=g.repeat("\n",l):e.result+=g.repeat("\n",s?1+l:l),c=s=!0,l=0,n=e.position;!O(f)&&0!==f;)f=e.input.charCodeAt(++e.position);L(e,n,e.position,!1)}}return 1}(e,p)||function(e,t){var n,i,r=e.input.charCodeAt(e.position);if(39===r){for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(L(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return 1;n=e.position,e.position++,i=e.position}else O(r)?(L(e,n,i,!0),B(e,Y(e,!1,t)),n=i=e.position):e.position===e.lineStart&&R(e)?N(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);N(e,"unexpected end of the stream within a single quoted scalar")}}(e,p)||P(e,p)?m=!0:!function(e){var t,n,i=e.input.charCodeAt(e.position);if(42===i){for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!F(i)&&!_(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||N(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Y(e,!0,-1),1}}(e)?function(e,t,n){var i,r,o,a,s,c,u,l=e.kind,p=e.result,f=e.input.charCodeAt(e.position);if(!F(f)&&!_(f)&&35!==f&&38!==f&&42!==f&&33!==f&&124!==f&&62!==f&&39!==f&&34!==f&&37!==f&&64!==f&&96!==f&&(63!==f&&45!==f||!(F(i=e.input.charCodeAt(e.position+1))||n&&_(i)))){for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==f;){if(58===f){if(F(i=e.input.charCodeAt(e.position+1))||n&&_(i))break}else if(35===f){if(F(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||n&&_(f))break;if(O(f)){if(s=e.line,c=e.lineStart,u=e.lineIndent,Y(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(L(e,r,o,!1),B(e,e.line-s),r=o=e.position,a=!1),E(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(L(e,r,o,!1),e.result)return 1;e.kind=l,e.result=p}}(e,p,x===n)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||N(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(m=s&&W(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&N(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c<u;c+=1)if((l=e.implicitTypes[c]).resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else y.call(e.typeMap[e.kind||"fallback"],e.tag)?(l=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&l.kind!==e.kind&&N(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):N(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):N(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function $(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new h(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,N(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)!function(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(Y(e,!0,-1),r=e.input.charCodeAt(e.position),!(0<e.lineIndent||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!F(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&N(e,"directive name must not be less than one character in length");0!==r;){for(;E(r);)r=e.input.charCodeAt(++e.position);if(35===r){for(;0!==(r=e.input.charCodeAt(++e.position))&&!O(r););break}if(O(r))break;for(t=e.position;0!==r&&!F(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&q(e),y.call(T,n)?T[n](e,n,i):M(e,'unknown document directive "'+n+'"')}Y(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Y(e,!0,-1)):a&&N(e,"directives end mark is expected"),K(e,e.lineIndent-1,b,!1,!0),Y(e,!0,-1),e.checkLineBreaks&&s.test(e.input.slice(o,e.position))&&M(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&R(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Y(e,!0,-1)):e.position<e.length-1&&N(e,"end of the stream or a document separator is expected")}(n);return n.documents}function H(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=$(e,n);if("function"!=typeof t)return i;for(var r=0,o=i.length;r<o;r+=1)t(i[r])}function G(e,t){var n=$(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}t.exports.loadAll=H,t.exports.load=G,t.exports.safeLoadAll=function(e,t,n){return"object"==typeof t&&null!==t&&void 0===n&&(n=t,t=null),H(e,t,g.extend({schema:o},n))},t.exports.safeLoad=function(e,t){return G(e,g.extend({schema:o},t))}},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";var s=e("./common");function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}i.prototype.getSnippet=function(e,t){var n,i,r,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;0<i&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(--i,this.position-i>t/2-1){n=" ... ",i+=5;break}for(r="",o=this.position;o<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(o));)if((o+=1)-this.position>t/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(i,o),s.repeat(" ",e)+n+a+r+"\n"+s.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var r=e("./common"),o=e("./exception"),a=e("./type");function s(e,t,i){var r=[];return e.include.forEach(function(e){i=s(e,t,i)}),e[t].forEach(function(n){i.forEach(function(e,t){e.tag===n.tag&&e.kind===n.kind&&r.push(t)}),i.push(n)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function c(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(this.compiledImplicit,this.compiledExplicit)}c.DEFAULT=null,c.create=function(e,t){var n,i;switch(arguments.length){case 1:n=c.DEFAULT,i=e;break;case 2:n=e,i=t;break;default:throw new o("Wrong number of arguments for Schema.create function")}if(n=r.toArray(n),i=r.toArray(i),!n.every(function(e){return e instanceof c}))throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!i.every(function(e){return e instanceof a}))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new c({include:n,explicit:i})},t.exports=c},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t,n){"use strict";var r=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];t.exports=function(t,e){var n,i;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===o.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,i={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){i[String(e)]=t})}),i),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},{"./exception":4}],14:[function(e,t,n){"use strict";try{var c=e("buffer").Buffer}catch(e){}var i=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;for(var t,n=0,i=e.length,r=u,o=0;o<i;o++)if(!(64<(t=r.indexOf(e.charAt(o))))){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){for(var t,n=e.replace(/[\r\n=]/g,""),i=n.length,r=u,o=0,a=[],s=0;s<i;s++)s%4==0&&s&&(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|r.indexOf(n.charAt(s));return 0==(t=i%4*6)?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18==t?(a.push(o>>10&255),a.push(o>>2&255)):12==t&&a.push(o>>4&255),c?c.from?c.from(a):new c(a):a},predicate:function(e){return c&&c.isBuffer(e)},represent:function(e){for(var t,n="",i=0,r=e.length,o=u,a=0;a<r;a++)a%3==0&&a&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[a];return 0==(t=r%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2==t?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1==t&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n=e.replace(/_/g,"").toLowerCase(),i="-"===n[0]?-1:1,r=[];return 0<="+-".indexOf(n[0])&&(n=n.slice(1)),".inf"===n?1==i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:0<=n.indexOf(":")?(n.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),n=0,t=1,r.forEach(function(e){n+=e*t,t*=60}),i*n):i*parseFloat(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type");t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;a<o;a++)if("_"!==(t=e[a])){if("0"!==t&&"1"!==t)return!1;s=!0}return s&&"_"!==t}if("x"===t){for(a++;a<o;a++)if("_"!==(t=e[a])){if(!(48<=(i=e.charCodeAt(a))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;s=!0}return s&&"_"!==t}for(;a<o;a++)if("_"!==(t=e[a])){if(!(48<=(n=e.charCodeAt(a))&&n<=55))return!1;s=!0}return s&&"_"!==t}if("_"===t)return!1;for(;a<o;a++)if("_"!==(t=e[a])){if(":"===t)break;if(!(48<=(r=e.charCodeAt(a))&&r<=57))return!1;s=!0}return!(!s||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(a)))},construct:function(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),"-"!==(t=i[0])&&"+"!==t||("-"===t&&(r=-1),t=(i=i.slice(1))[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),i=0,n=1,o.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!i.isNegativeZero(e)},represent:{binary:function(e){return 0<=e?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return 0<=e?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return 0<=e?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t,n){"use strict";try{var o=e("esprima")}catch(e){"undefined"!=typeof window&&(o=window.esprima)}var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=o.parse(t,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=o.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){r.push(e.name)}),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(r,n.slice(t[0]+1,t[1]-1)):new Function(r,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},{"../../type":13}],19:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),3<i.length)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},{"../../type":13}],20:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},{"../type":13}],23:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";var i=e("../type"),c=Object.prototype.hasOwnProperty,u=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;for(var t,n,i,r=[],o=e,a=0,s=o.length;a<s;a+=1){if(t=o[a],i=!1,"[object Object]"!==u.call(t))return!1;for(n in t)if(c.call(t,n)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==r.indexOf(n))return!1;r.push(n)}return!0},construct:function(e){return null!==e?e:[]}})},{"../type":13}],25:[function(e,t,n){"use strict";var i=e("../type"),s=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;for(var t,n,i=e,r=new Array(i.length),o=0,a=i.length;o<a;o+=1){if(t=i[o],"[object Object]"!==s.call(t))return!1;if(1!==(n=Object.keys(t)).length)return!1;r[o]=[n[0],t[n[0]]]}return!0},construct:function(e){if(null===e)return[];for(var t,n,i=e,r=new Array(i.length),o=0,a=i.length;o<a;o+=1)t=i[o],n=Object.keys(t),r[o]=[n[0],t[n[0]]];return r}})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";var i=e("../type"),r=Object.prototype.hasOwnProperty;t.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(r.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";var i=e("../type"),p=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),f=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==p.exec(e)||null!==f.exec(e))},construct:function(e){var t,n,i,r,o,a,s,c=0,u=null,l=p.exec(e);if(null===l&&(l=f.exec(e)),null===l)throw new Error("Date resolve error");if(t=+l[1],n=l[2]-1,i=+l[3],!l[4])return new Date(Date.UTC(t,n,i));if(r=+l[4],o=+l[5],a=+l[6],l[7]){for(c=l[7].slice(0,3);c.length<3;)c+="0";c=+c}return l[9]&&(u=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9]&&(u=-u)),s=new Date(Date.UTC(t,n,i,r,o,a,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}})},{"../type":13}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); diff --git a/node_modules/js-yaml/index.js b/node_modules/js-yaml/index.js @@ -0,0 +1,7 @@ +'use strict'; + + +var yaml = require('./lib/js-yaml.js'); + + +module.exports = yaml; diff --git a/node_modules/js-yaml/lib/js-yaml.js b/node_modules/js-yaml/lib/js-yaml.js @@ -0,0 +1,39 @@ +'use strict'; + + +var loader = require('./js-yaml/loader'); +var dumper = require('./js-yaml/dumper'); + + +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} + + +module.exports.Type = require('./js-yaml/type'); +module.exports.Schema = require('./js-yaml/schema'); +module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe'); +module.exports.JSON_SCHEMA = require('./js-yaml/schema/json'); +module.exports.CORE_SCHEMA = require('./js-yaml/schema/core'); +module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full'); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.safeLoad = loader.safeLoad; +module.exports.safeLoadAll = loader.safeLoadAll; +module.exports.dump = dumper.dump; +module.exports.safeDump = dumper.safeDump; +module.exports.YAMLException = require('./js-yaml/exception'); + +// Deprecated schema names from JS-YAML 2.0.x +module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe'); +module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full'); + +// Deprecated functions from JS-YAML 1.x.x +module.exports.scan = deprecated('scan'); +module.exports.parse = deprecated('parse'); +module.exports.compose = deprecated('compose'); +module.exports.addConstructor = deprecated('addConstructor'); diff --git a/node_modules/js-yaml/lib/js-yaml/common.js b/node_modules/js-yaml/lib/js-yaml/common.js @@ -0,0 +1,59 @@ +'use strict'; + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; diff --git a/node_modules/js-yaml/lib/js-yaml/dumper.js b/node_modules/js-yaml/lib/js-yaml/dumper.js @@ -0,0 +1,850 @@ +'use strict'; + +/*eslint-disable no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// [24] b-line-feed ::= #xA /* LF */ +// [25] b-carriage-return ::= #xD /* CR */ +// [3] c-byte-order-mark ::= #xFEFF +function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) + // byte-order-mark + && c !== 0xFEFF + // b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c, prev) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + // /* An ns-char preceding */ "#" + && c !== CHAR_COLON + && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (index !== 0) pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + +module.exports.dump = dump; +module.exports.safeDump = safeDump; diff --git a/node_modules/js-yaml/lib/js-yaml/exception.js b/node_modules/js-yaml/lib/js-yaml/exception.js @@ -0,0 +1,43 @@ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; diff --git a/node_modules/js-yaml/lib/js-yaml/loader.js b/node_modules/js-yaml/lib/js-yaml/loader.js @@ -0,0 +1,1644 @@ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Mark = require('./mark'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent + atNewLine = false, + hasContent = false, + typeIndex, + typeQuantity, + type, + flowIndent, + blockIndent; + + if (state.listener !== null) { + state.listener('open', state); + } + + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + + allowBlockStyles = allowBlockScalars = allowBlockCollections = + CONTEXT_BLOCK_OUT === nodeContext || + CONTEXT_BLOCK_IN === nodeContext; + + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "!<?> [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, iterator, options) { + if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; diff --git a/node_modules/js-yaml/lib/js-yaml/mark.js b/node_modules/js-yaml/lib/js-yaml/mark.js @@ -0,0 +1,76 @@ +'use strict'; + + +var common = require('./common'); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +module.exports = Mark; diff --git a/node_modules/js-yaml/lib/js-yaml/schema.js b/node_modules/js-yaml/lib/js-yaml/schema.js @@ -0,0 +1,108 @@ +'use strict'; + +/*eslint-disable max-len*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +module.exports = Schema; diff --git a/node_modules/js-yaml/lib/js-yaml/schema/core.js b/node_modules/js-yaml/lib/js-yaml/schema/core.js @@ -0,0 +1,18 @@ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./json') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_full.js b/node_modules/js-yaml/lib/js-yaml/schema/default_full.js @@ -0,0 +1,25 @@ +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = Schema.DEFAULT = new Schema({ + include: [ + require('./default_safe') + ], + explicit: [ + require('../type/js/undefined'), + require('../type/js/regexp'), + require('../type/js/function') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js b/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js @@ -0,0 +1,28 @@ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./core') + ], + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js b/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js @@ -0,0 +1,17 @@ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/json.js b/node_modules/js-yaml/lib/js-yaml/schema/json.js @@ -0,0 +1,25 @@ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./failsafe') + ], + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type.js b/node_modules/js-yaml/lib/js-yaml/type.js @@ -0,0 +1,61 @@ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; diff --git a/node_modules/js-yaml/lib/js-yaml/type/binary.js b/node_modules/js-yaml/lib/js-yaml/type/binary.js @@ -0,0 +1,138 @@ +'use strict'; + +/*eslint-disable no-bitwise*/ + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/bool.js b/node_modules/js-yaml/lib/js-yaml/type/bool.js @@ -0,0 +1,35 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/float.js b/node_modules/js-yaml/lib/js-yaml/type/float.js @@ -0,0 +1,116 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/int.js b/node_modules/js-yaml/lib/js-yaml/type/int.js @@ -0,0 +1,173 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 10 (except 0) or base 60 + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/node_modules/js-yaml/lib/js-yaml/type/js/function.js @@ -0,0 +1,93 @@ +'use strict'; + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); +} catch (_) { + /* eslint-disable no-redeclare */ + /* global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + +var Type = require('../../type'); + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + if (ast.body[0].expression.body.type === 'BlockStatement') { + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + // ES6 arrow functions can omit the BlockStatement. In that case, just return + // the body. + /*eslint-disable no-new-func*/ + return new Function(params, 'return ' + source.slice(body[0], body[1])); +} + +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js @@ -0,0 +1,60 @@ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js b/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js @@ -0,0 +1,28 @@ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/map.js b/node_modules/js-yaml/lib/js-yaml/type/map.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/merge.js b/node_modules/js-yaml/lib/js-yaml/type/merge.js @@ -0,0 +1,12 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/null.js b/node_modules/js-yaml/lib/js-yaml/type/null.js @@ -0,0 +1,34 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/omap.js b/node_modules/js-yaml/lib/js-yaml/type/omap.js @@ -0,0 +1,44 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/pairs.js b/node_modules/js-yaml/lib/js-yaml/type/pairs.js @@ -0,0 +1,53 @@ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/seq.js b/node_modules/js-yaml/lib/js-yaml/type/seq.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/set.js b/node_modules/js-yaml/lib/js-yaml/type/set.js @@ -0,0 +1,29 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/str.js b/node_modules/js-yaml/lib/js-yaml/type/str.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/node_modules/js-yaml/lib/js-yaml/type/timestamp.js @@ -0,0 +1,88 @@ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json @@ -0,0 +1,95 @@ +{ + "_from": "js-yaml@^3.13.1", + "_id": "js-yaml@3.14.0", + "_inBundle": false, + "_integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "_location": "/js-yaml", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "js-yaml@^3.13.1", + "name": "js-yaml", + "escapedName": "js-yaml", + "rawSpec": "^3.13.1", + "saveSpec": null, + "fetchSpec": "^3.13.1" + }, + "_requiredBy": [ + "/front-matter" + ], + "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "_shasum": "a7a34170f26a21bb162424d8adacb4113a69e482", + "_spec": "js-yaml@^3.13.1", + "_where": "/home/l0bster/Documents/l0bsterSSG/node_modules/front-matter", + "author": { + "name": "Vladimir Zapparov", + "email": "dervus.grim@gmail.com" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + }, + "bugs": { + "url": "https://github.com/nodeca/js-yaml/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Aleksey V Zapparov", + "email": "ixti@member.fsf.org", + "url": "http://www.ixti.net/" + }, + { + "name": "Vitaly Puzrin", + "email": "vitaly@rcdesign.ru", + "url": "https://github.com/puzrin" + }, + { + "name": "Martin Grenfell", + "email": "martin.grenfell@gmail.com", + "url": "http://got-ravings.blogspot.com" + } + ], + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "deprecated": false, + "description": "YAML 1.2 parser and serializer", + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "browserify": "^16.2.2", + "codemirror": "^5.13.4", + "eslint": "^7.0.0", + "fast-check": "^1.24.2", + "istanbul": "^0.4.5", + "mocha": "^7.1.2", + "uglify-js": "^3.0.1" + }, + "files": [ + "index.js", + "lib/", + "bin/", + "dist/" + ], + "homepage": "https://github.com/nodeca/js-yaml", + "jsdelivr": "dist/js-yaml.min.js", + "keywords": [ + "yaml", + "parser", + "serializer", + "pyyaml" + ], + "license": "MIT", + "name": "js-yaml", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/js-yaml.git" + }, + "scripts": { + "test": "make test" + }, + "unpkg": "dist/js-yaml.min.js", + "version": "3.14.0" +} diff --git a/node_modules/marked/LICENSE.md b/node_modules/marked/LICENSE.md @@ -0,0 +1,43 @@ +# License information + +## Contribution License Agreement + +If you contribute code to this project, you are implicitly allowing your code +to be distributed under the MIT license. You are also implicitly verifying that +all code is your original work. `</legalese>` + +## Marked + +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## Markdown + +Copyright © 2004, John Gruber +http://daringfireball.net/ +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 “Markdown” 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 the copyright owner or contributors 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/node_modules/marked/README.md b/node_modules/marked/README.md @@ -0,0 +1,76 @@ +<a href="https://marked.js.org"> + <img width="60px" height="60px" src="https://marked.js.org/img/logo-black.svg" align="right" /> +</a> + +# Marked + +[![npm](https://badgen.net/npm/v/marked)](https://www.npmjs.com/package/marked) +[![gzip size](https://badgen.net/badgesize/gzip/https://cdn.jsdelivr.net/npm/marked/marked.min.js)](https://cdn.jsdelivr.net/npm/marked/marked.min.js) +[![install size](https://badgen.net/packagephobia/install/marked)](https://packagephobia.now.sh/result?p=marked) +[![downloads](https://badgen.net/npm/dt/marked)](https://www.npmjs.com/package/marked) +[![dep](https://badgen.net/david/dep/markedjs/marked?label=deps)](https://david-dm.org/markedjs/marked) +[![dev dep](https://badgen.net/david/dev/markedjs/marked?label=devDeps)](https://david-dm.org/markedjs/marked?type=dev) +[![github actions](https://github.com/markedjs/marked/workflows/Tests/badge.svg)](https://github.com/markedjs/marked/actions) +[![snyk](https://snyk.io/test/npm/marked/badge.svg)](https://snyk.io/test/npm/marked) + +- ⚡ built for speed +- ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time +- ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications +- 🌐 works in a browser, on a server, or from a command line interface (CLI) + +## Demo + +Checkout the [demo page](https://marked.js.org/demo/) to see marked in action ⛹️ + +## Docs + +Our [documentation pages](https://marked.js.org) are also rendered using marked 💯 + +Also read about: + +* [Options](https://marked.js.org/#/USING_ADVANCED.md) +* [Extensibility](https://marked.js.org/#/USING_PRO.md) + +## Installation + +**CLI:** `npm install -g marked` + +**In-browser:** `npm install marked` + +## Usage + +### Warning: 🚨 Marked does not [sanitize](https://marked.js.org/#/USING_ADVANCED.md#options) the output HTML. Please use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the output HTML! 🚨 + +**CLI** + +``` bash +$ marked -o hello.html +hello world +^D +$ cat hello.html +<p>hello world</p> +``` + +**Browser** + +```html +<!doctype html> +<html> +<head> + <meta charset="utf-8"/> + <title>Marked in the browser</title> +</head> +<body> + <div id="content"></div> + <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> + <script> + document.getElementById('content').innerHTML = + marked('# Marked in the browser\n\nRendered by **marked**.'); + </script> +</body> +</html> +``` + +## License + +Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License) diff --git a/node_modules/marked/bin/marked b/node_modules/marked/bin/marked @@ -0,0 +1,215 @@ +#!/usr/bin/env node + +/** + * Marked CLI + * Copyright (c) 2011-2013, Christopher Jeffrey (MIT License) + */ + +const fs = require('fs'), + path = require('path'), + marked = require('../'); + +/** + * Man Page + */ + +function help() { + const spawn = require('child_process').spawn; + + const options = { + cwd: process.cwd(), + env: process.env, + setsid: false, + stdio: 'inherit' + }; + + spawn('man', [path.resolve(__dirname, '../man/marked.1')], options) + .on('error', function() { + fs.readFile(path.resolve(__dirname, '../man/marked.1.txt'), 'utf8', function(err, data) { + if (err) throw err; + console.log(data); + }); + }); +} + +function version() { + const pkg = require('../package.json'); + console.log(pkg.version); +} + +/** + * Main + */ + +function main(argv, callback) { + const files = [], + options = {}; + let input, + output, + string, + arg, + tokens, + opt; + + function getarg() { + let arg = argv.shift(); + + if (arg.indexOf('--') === 0) { + // e.g. --opt + arg = arg.split('='); + if (arg.length > 1) { + // e.g. --opt=val + argv.unshift(arg.slice(1).join('=')); + } + arg = arg[0]; + } else if (arg[0] === '-') { + if (arg.length > 2) { + // e.g. -abc + argv = arg.substring(1).split('').map(function(ch) { + return '-' + ch; + }).concat(argv); + arg = argv.shift(); + } else { + // e.g. -a + } + } else { + // e.g. foo + } + + return arg; + } + + while (argv.length) { + arg = getarg(); + switch (arg) { + case '--test': + return require('../test').main(process.argv.slice()); + case '-o': + case '--output': + output = argv.shift(); + break; + case '-i': + case '--input': + input = argv.shift(); + break; + case '-s': + case '--string': + string = argv.shift(); + break; + case '-t': + case '--tokens': + tokens = true; + break; + case '-h': + case '--help': + return help(); + case '-v': + case '--version': + return version(); + default: + if (arg.indexOf('--') === 0) { + opt = camelize(arg.replace(/^--(no-)?/, '')); + if (!marked.defaults.hasOwnProperty(opt)) { + continue; + } + if (arg.indexOf('--no-') === 0) { + options[opt] = typeof marked.defaults[opt] !== 'boolean' + ? null + : false; + } else { + options[opt] = typeof marked.defaults[opt] !== 'boolean' + ? argv.shift() + : true; + } + } else { + files.push(arg); + } + break; + } + } + + function getData(callback) { + if (!input) { + if (files.length <= 2) { + if (string) { + return callback(null, string); + } + return getStdin(callback); + } + input = files.pop(); + } + return fs.readFile(input, 'utf8', callback); + } + + return getData(function(err, data) { + if (err) return callback(err); + + data = tokens + ? JSON.stringify(marked.lexer(data, options), null, 2) + : marked(data, options); + + if (!output) { + process.stdout.write(data + '\n'); + return callback(); + } + + return fs.writeFile(output, data, callback); + }); +} + +/** + * Helpers + */ + +function getStdin(callback) { + const stdin = process.stdin; + let buff = ''; + + stdin.setEncoding('utf8'); + + stdin.on('data', function(data) { + buff += data; + }); + + stdin.on('error', function(err) { + return callback(err); + }); + + stdin.on('end', function() { + return callback(null, buff); + }); + + try { + stdin.resume(); + } catch (e) { + callback(e); + } +} + +function camelize(text) { + return text.replace(/(\w)-(\w)/g, function(_, a, b) { + return a + b.toUpperCase(); + }); +} + +function handleError(err) { + if (err.code === 'ENOENT') { + console.error('marked: output to ' + err.path + ': No such directory'); + return process.exit(1); + } + throw err; +} + +/** + * Expose / Entry Point + */ + +if (!module.parent) { + process.title = 'marked'; + main(process.argv.slice(), function(err, code) { + if (err) return handleError(err); + return process.exit(code || 0); + }); +} else { + module.exports = main; +} diff --git a/node_modules/marked/lib/marked.esm.js b/node_modules/marked/lib/marked.esm.js @@ -0,0 +1,2539 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2020, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ + +/** + * DO NOT EDIT THIS FILE + * The code in this file is generated from files in ./src/ + */ + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var defaults = createCommonjsModule(function (module) { +function getDefaults() { + return { + baseUrl: null, + breaks: false, + gfm: true, + headerIds: true, + headerPrefix: '', + highlight: null, + langPrefix: 'language-', + mangle: true, + pedantic: false, + renderer: null, + sanitize: false, + sanitizer: null, + silent: false, + smartLists: false, + smartypants: false, + tokenizer: null, + walkTokens: null, + xhtml: false + }; +} + +function changeDefaults(newDefaults) { + module.exports.defaults = newDefaults; +} + +module.exports = { + defaults: getDefaults(), + getDefaults, + changeDefaults +}; +}); +var defaults_1 = defaults.defaults; +var defaults_2 = defaults.getDefaults; +var defaults_3 = defaults.changeDefaults; + +/** + * Helpers + */ +const escapeTest = /[&<>"']/; +const escapeReplace = /[&<>"']/g; +const escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/; +const escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g; +const escapeReplacements = { + '&': '&amp;', + '<': '&lt;', + '>': '&gt;', + '"': '&quot;', + "'": '&#39;' +}; +const getEscapeReplacement = (ch) => escapeReplacements[ch]; +function escape(html, encode) { + if (encode) { + if (escapeTest.test(html)) { + return html.replace(escapeReplace, getEscapeReplacement); + } + } else { + if (escapeTestNoEncode.test(html)) { + return html.replace(escapeReplaceNoEncode, getEscapeReplacement); + } + } + + return html; +} + +const unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; + +function unescape(html) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(unescapeTest, (_, n) => { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' + ? String.fromCharCode(parseInt(n.substring(2), 16)) + : String.fromCharCode(+n.substring(1)); + } + return ''; + }); +} + +const caret = /(^|[^\[])\^/g; +function edit(regex, opt) { + regex = regex.source || regex; + opt = opt || ''; + const obj = { + replace: (name, val) => { + val = val.source || val; + val = val.replace(caret, '$1'); + regex = regex.replace(name, val); + return obj; + }, + getRegex: () => { + return new RegExp(regex, opt); + } + }; + return obj; +} + +const nonWordAndColonTest = /[^\w:]/g; +const originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; +function cleanUrl(sanitize, base, href) { + if (sanitize) { + let prot; + try { + prot = decodeURIComponent(unescape(href)) + .replace(nonWordAndColonTest, '') + .toLowerCase(); + } catch (e) { + return null; + } + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { + return null; + } + } + if (base && !originIndependentUrl.test(href)) { + href = resolveUrl(base, href); + } + try { + href = encodeURI(href).replace(/%25/g, '%'); + } catch (e) { + return null; + } + return href; +} + +const baseUrls = {}; +const justDomain = /^[^:]+:\/*[^/]*$/; +const protocol = /^([^:]+:)[\s\S]*$/; +const domain = /^([^:]+:\/*[^/]*)[\s\S]*$/; + +function resolveUrl(base, href) { + if (!baseUrls[' ' + base]) { + // we can ignore everything in base after the last slash of its path component, + // but we might need to add _that_ + // https://tools.ietf.org/html/rfc3986#section-3 + if (justDomain.test(base)) { + baseUrls[' ' + base] = base + '/'; + } else { + baseUrls[' ' + base] = rtrim(base, '/', true); + } + } + base = baseUrls[' ' + base]; + const relativeBase = base.indexOf(':') === -1; + + if (href.substring(0, 2) === '//') { + if (relativeBase) { + return href; + } + return base.replace(protocol, '$1') + href; + } else if (href.charAt(0) === '/') { + if (relativeBase) { + return href; + } + return base.replace(domain, '$1') + href; + } else { + return base + href; + } +} + +const noopTest = { exec: function noopTest() {} }; + +function merge(obj) { + let i = 1, + target, + key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; +} + +function splitCells(tableRow, count) { + // ensure that every cell-delimiting pipe has a space + // before it to distinguish it from an escaped pipe + const row = tableRow.replace(/\|/g, (match, offset, str) => { + let escaped = false, + curr = offset; + while (--curr >= 0 && str[curr] === '\\') escaped = !escaped; + if (escaped) { + // odd number of slashes means | is escaped + // so we leave it alone + return '|'; + } else { + // add space before unescaped | + return ' |'; + } + }), + cells = row.split(/ \|/); + let i = 0; + + if (cells.length > count) { + cells.splice(count); + } else { + while (cells.length < count) cells.push(''); + } + + for (; i < cells.length; i++) { + // leading or trailing whitespace is ignored per the gfm spec + cells[i] = cells[i].trim().replace(/\\\|/g, '|'); + } + return cells; +} + +// Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). +// /c*$/ is vulnerable to REDOS. +// invert: Remove suffix of non-c chars instead. Default falsey. +function rtrim(str, c, invert) { + const l = str.length; + if (l === 0) { + return ''; + } + + // Length of suffix matching the invert condition. + let suffLen = 0; + + // Step left until we fail to match the invert condition. + while (suffLen < l) { + const currChar = str.charAt(l - suffLen - 1); + if (currChar === c && !invert) { + suffLen++; + } else if (currChar !== c && invert) { + suffLen++; + } else { + break; + } + } + + return str.substr(0, l - suffLen); +} + +function findClosingBracket(str, b) { + if (str.indexOf(b[1]) === -1) { + return -1; + } + const l = str.length; + let level = 0, + i = 0; + for (; i < l; i++) { + if (str[i] === '\\') { + i++; + } else if (str[i] === b[0]) { + level++; + } else if (str[i] === b[1]) { + level--; + if (level < 0) { + return i; + } + } + } + return -1; +} + +function checkSanitizeDeprecation(opt) { + if (opt && opt.sanitize && !opt.silent) { + console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options'); + } +} + +var helpers = { + escape, + unescape, + edit, + cleanUrl, + resolveUrl, + noopTest, + merge, + splitCells, + rtrim, + findClosingBracket, + checkSanitizeDeprecation +}; + +const { defaults: defaults$1 } = defaults; +const { + rtrim: rtrim$1, + splitCells: splitCells$1, + escape: escape$1, + findClosingBracket: findClosingBracket$1 +} = helpers; + +function outputLink(cap, link, raw) { + const href = link.href; + const title = link.title ? escape$1(link.title) : null; + const text = cap[1].replace(/\\([\[\]])/g, '$1'); + + if (cap[0].charAt(0) !== '!') { + return { + type: 'link', + raw, + href, + title, + text + }; + } else { + return { + type: 'image', + raw, + href, + title, + text: escape$1(text) + }; + } +} + +function indentCodeCompensation(raw, text) { + const matchIndentToCode = raw.match(/^(\s+)(?:```)/); + + if (matchIndentToCode === null) { + return text; + } + + const indentToCode = matchIndentToCode[1]; + + return text + .split('\n') + .map(node => { + const matchIndentInNode = node.match(/^\s+/); + if (matchIndentInNode === null) { + return node; + } + + const [indentInNode] = matchIndentInNode; + + if (indentInNode.length >= indentToCode.length) { + return node.slice(indentToCode.length); + } + + return node; + }) + .join('\n'); +} + +/** + * Tokenizer + */ +var Tokenizer_1 = class Tokenizer { + constructor(options) { + this.options = options || defaults$1; + } + + space(src) { + const cap = this.rules.block.newline.exec(src); + if (cap) { + if (cap[0].length > 1) { + return { + type: 'space', + raw: cap[0] + }; + } + return { raw: '\n' }; + } + } + + code(src, tokens) { + const cap = this.rules.block.code.exec(src); + if (cap) { + const lastToken = tokens[tokens.length - 1]; + // An indented code block cannot interrupt a paragraph. + if (lastToken && lastToken.type === 'paragraph') { + return { + raw: cap[0], + text: cap[0].trimRight() + }; + } + + const text = cap[0].replace(/^ {4}/gm, ''); + return { + type: 'code', + raw: cap[0], + codeBlockStyle: 'indented', + text: !this.options.pedantic + ? rtrim$1(text, '\n') + : text + }; + } + } + + fences(src) { + const cap = this.rules.block.fences.exec(src); + if (cap) { + const raw = cap[0]; + const text = indentCodeCompensation(raw, cap[3] || ''); + + return { + type: 'code', + raw, + lang: cap[2] ? cap[2].trim() : cap[2], + text + }; + } + } + + heading(src) { + const cap = this.rules.block.heading.exec(src); + if (cap) { + return { + type: 'heading', + raw: cap[0], + depth: cap[1].length, + text: cap[2] + }; + } + } + + nptable(src) { + const cap = this.rules.block.nptable.exec(src); + if (cap) { + const item = { + type: 'table', + header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [], + raw: cap[0] + }; + + if (item.header.length === item.align.length) { + let l = item.align.length; + let i; + for (i = 0; i < l; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + l = item.cells.length; + for (i = 0; i < l; i++) { + item.cells[i] = splitCells$1(item.cells[i], item.header.length); + } + + return item; + } + } + } + + hr(src) { + const cap = this.rules.block.hr.exec(src); + if (cap) { + return { + type: 'hr', + raw: cap[0] + }; + } + } + + blockquote(src) { + const cap = this.rules.block.blockquote.exec(src); + if (cap) { + const text = cap[0].replace(/^ *> ?/gm, ''); + + return { + type: 'blockquote', + raw: cap[0], + text + }; + } + } + + list(src) { + const cap = this.rules.block.list.exec(src); + if (cap) { + let raw = cap[0]; + const bull = cap[2]; + const isordered = bull.length > 1; + const isparen = bull[bull.length - 1] === ')'; + + const list = { + type: 'list', + raw, + ordered: isordered, + start: isordered ? +bull.slice(0, -1) : '', + loose: false, + items: [] + }; + + // Get each top-level item. + const itemMatch = cap[0].match(this.rules.block.item); + + let next = false, + item, + space, + b, + addBack, + loose, + istask, + ischecked; + + const l = itemMatch.length; + for (let i = 0; i < l; i++) { + item = itemMatch[i]; + raw = item; + + // Remove the list item's bullet + // so it is seen as the next token. + space = item.length; + item = item.replace(/^ *([*+-]|\d+[.)]) */, ''); + + // Outdent whatever the + // list item contains. Hacky. + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') + : item.replace(/^ {1,4}/gm, ''); + } + + // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + if (i !== l - 1) { + b = this.rules.block.bullet.exec(itemMatch[i + 1])[0]; + if (isordered ? b.length === 1 || (!isparen && b[b.length - 1] === ')') + : (b.length > 1 || (this.options.smartLists && b !== bull))) { + addBack = itemMatch.slice(i + 1).join('\n'); + list.raw = list.raw.substring(0, list.raw.length - addBack.length); + i = l - 1; + } + } + + // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + loose = next || /\n\n(?!\s*$)/.test(item); + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + if (loose) { + list.loose = true; + } + + // Check for task list items + istask = /^\[[ xX]\] /.test(item); + ischecked = undefined; + if (istask) { + ischecked = item[1] !== ' '; + item = item.replace(/^\[[ xX]\] +/, ''); + } + + list.items.push({ + type: 'list_item', + raw, + task: istask, + checked: ischecked, + loose: loose, + text: item + }); + } + + return list; + } + } + + html(src) { + const cap = this.rules.block.html.exec(src); + if (cap) { + return { + type: this.options.sanitize + ? 'paragraph' + : 'html', + raw: cap[0], + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), + text: this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$1(cap[0])) : cap[0] + }; + } + } + + def(src) { + const cap = this.rules.block.def.exec(src); + if (cap) { + if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); + const tag = cap[1].toLowerCase().replace(/\s+/g, ' '); + return { + tag, + raw: cap[0], + href: cap[2], + title: cap[3] + }; + } + } + + table(src) { + const cap = this.rules.block.table.exec(src); + if (cap) { + const item = { + type: 'table', + header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + item.raw = cap[0]; + + let l = item.align.length; + let i; + for (i = 0; i < l; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + l = item.cells.length; + for (i = 0; i < l; i++) { + item.cells[i] = splitCells$1( + item.cells[i].replace(/^ *\| *| *\| *$/g, ''), + item.header.length); + } + + return item; + } + } + } + + lheading(src) { + const cap = this.rules.block.lheading.exec(src); + if (cap) { + return { + type: 'heading', + raw: cap[0], + depth: cap[2].charAt(0) === '=' ? 1 : 2, + text: cap[1] + }; + } + } + + paragraph(src) { + const cap = this.rules.block.paragraph.exec(src); + if (cap) { + return { + type: 'paragraph', + raw: cap[0], + text: cap[1].charAt(cap[1].length - 1) === '\n' + ? cap[1].slice(0, -1) + : cap[1] + }; + } + } + + text(src, tokens) { + const cap = this.rules.block.text.exec(src); + if (cap) { + const lastToken = tokens[tokens.length - 1]; + if (lastToken && lastToken.type === 'text') { + return { + raw: cap[0], + text: cap[0] + }; + } + + return { + type: 'text', + raw: cap[0], + text: cap[0] + }; + } + } + + escape(src) { + const cap = this.rules.inline.escape.exec(src); + if (cap) { + return { + type: 'escape', + raw: cap[0], + text: escape$1(cap[1]) + }; + } + } + + tag(src, inLink, inRawBlock) { + const cap = this.rules.inline.tag.exec(src); + if (cap) { + if (!inLink && /^<a /i.test(cap[0])) { + inLink = true; + } else if (inLink && /^<\/a>/i.test(cap[0])) { + inLink = false; + } + if (!inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { + inRawBlock = true; + } else if (inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { + inRawBlock = false; + } + + return { + type: this.options.sanitize + ? 'text' + : 'html', + raw: cap[0], + inLink, + inRawBlock, + text: this.options.sanitize + ? (this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape$1(cap[0])) + : cap[0] + }; + } + } + + link(src) { + const cap = this.rules.inline.link.exec(src); + if (cap) { + const lastParenIndex = findClosingBracket$1(cap[2], '()'); + if (lastParenIndex > -1) { + const start = cap[0].indexOf('!') === 0 ? 5 : 4; + const linkLen = start + cap[1].length + lastParenIndex; + cap[2] = cap[2].substring(0, lastParenIndex); + cap[0] = cap[0].substring(0, linkLen).trim(); + cap[3] = ''; + } + let href = cap[2]; + let title = ''; + if (this.options.pedantic) { + const link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); + + if (link) { + href = link[1]; + title = link[3]; + } else { + title = ''; + } + } else { + title = cap[3] ? cap[3].slice(1, -1) : ''; + } + href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); + const token = outputLink(cap, { + href: href ? href.replace(this.rules.inline._escapes, '$1') : href, + title: title ? title.replace(this.rules.inline._escapes, '$1') : title + }, cap[0]); + return token; + } + } + + reflink(src, links) { + let cap; + if ((cap = this.rules.inline.reflink.exec(src)) + || (cap = this.rules.inline.nolink.exec(src))) { + let link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = links[link.toLowerCase()]; + if (!link || !link.href) { + const text = cap[0].charAt(0); + return { + type: 'text', + raw: text, + text + }; + } + const token = outputLink(cap, link, cap[0]); + return token; + } + } + + strong(src, maskedSrc, prevChar = '') { + let match = this.rules.inline.strong.start.exec(src); + + if (match && (!match[1] || (match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))))) { + maskedSrc = maskedSrc.slice(-1 * src.length); + const endReg = match[0] === '**' ? this.rules.inline.strong.endAst : this.rules.inline.strong.endUnd; + + endReg.lastIndex = 0; + + let cap; + while ((match = endReg.exec(maskedSrc)) != null) { + cap = this.rules.inline.strong.middle.exec(maskedSrc.slice(0, match.index + 3)); + if (cap) { + return { + type: 'strong', + raw: src.slice(0, cap[0].length), + text: src.slice(2, cap[0].length - 2) + }; + } + } + } + } + + em(src, maskedSrc, prevChar = '') { + let match = this.rules.inline.em.start.exec(src); + + if (match && (!match[1] || (match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))))) { + maskedSrc = maskedSrc.slice(-1 * src.length); + const endReg = match[0] === '*' ? this.rules.inline.em.endAst : this.rules.inline.em.endUnd; + + endReg.lastIndex = 0; + + let cap; + while ((match = endReg.exec(maskedSrc)) != null) { + cap = this.rules.inline.em.middle.exec(maskedSrc.slice(0, match.index + 2)); + if (cap) { + return { + type: 'em', + raw: src.slice(0, cap[0].length), + text: src.slice(1, cap[0].length - 1) + }; + } + } + } + } + + codespan(src) { + const cap = this.rules.inline.code.exec(src); + if (cap) { + let text = cap[2].replace(/\n/g, ' '); + const hasNonSpaceChars = /[^ ]/.test(text); + const hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' '); + if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) { + text = text.substring(1, text.length - 1); + } + text = escape$1(text, true); + return { + type: 'codespan', + raw: cap[0], + text + }; + } + } + + br(src) { + const cap = this.rules.inline.br.exec(src); + if (cap) { + return { + type: 'br', + raw: cap[0] + }; + } + } + + del(src) { + const cap = this.rules.inline.del.exec(src); + if (cap) { + return { + type: 'del', + raw: cap[0], + text: cap[1] + }; + } + } + + autolink(src, mangle) { + const cap = this.rules.inline.autolink.exec(src); + if (cap) { + let text, href; + if (cap[2] === '@') { + text = escape$1(this.options.mangle ? mangle(cap[1]) : cap[1]); + href = 'mailto:' + text; + } else { + text = escape$1(cap[1]); + href = text; + } + + return { + type: 'link', + raw: cap[0], + text, + href, + tokens: [ + { + type: 'text', + raw: text, + text + } + ] + }; + } + } + + url(src, mangle) { + let cap; + if (cap = this.rules.inline.url.exec(src)) { + let text, href; + if (cap[2] === '@') { + text = escape$1(this.options.mangle ? mangle(cap[0]) : cap[0]); + href = 'mailto:' + text; + } else { + // do extended autolink path validation + let prevCapZero; + do { + prevCapZero = cap[0]; + cap[0] = this.rules.inline._backpedal.exec(cap[0])[0]; + } while (prevCapZero !== cap[0]); + text = escape$1(cap[0]); + if (cap[1] === 'www.') { + href = 'http://' + text; + } else { + href = text; + } + } + return { + type: 'link', + raw: cap[0], + text, + href, + tokens: [ + { + type: 'text', + raw: text, + text + } + ] + }; + } + } + + inlineText(src, inRawBlock, smartypants) { + const cap = this.rules.inline.text.exec(src); + if (cap) { + let text; + if (inRawBlock) { + text = this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape$1(cap[0])) : cap[0]; + } else { + text = escape$1(this.options.smartypants ? smartypants(cap[0]) : cap[0]); + } + return { + type: 'text', + raw: cap[0], + text + }; + } + } +}; + +const { + noopTest: noopTest$1, + edit: edit$1, + merge: merge$1 +} = helpers; + +/** + * Block-Level Grammar + */ +const block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/, + hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, + heading: /^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: '^ {0,3}(?:' // optional indentation + + '<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1) + + '|comment[^\\n]*(\\n+|$)' // (2) + + '|<\\?[\\s\\S]*?(?:\\?>\\n*|$)' // (3) + + '|<![A-Z][\\s\\S]*?(?:>\\n*|$)' // (4) + + '|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)' // (5) + + '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6) + + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag + + '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag + + ')', + def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, + nptable: noopTest$1, + table: noopTest$1, + lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, + // regex template, placeholders will be replaced according to different paragraph + // interruption rules of commonmark and the original markdown spec: + _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/, + text: /^[^\n]+/ +}; + +block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; +block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; +block.def = edit$1(block.def) + .replace('label', block._label) + .replace('title', block._title) + .getRegex(); + +block.bullet = /(?:[*+-]|\d{1,9}[.)])/; +block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/; +block.item = edit$1(block.item, 'gm') + .replace(/bull/g, block.bullet) + .getRegex(); + +block.list = edit$1(block.list) + .replace(/bull/g, block.bullet) + .replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))') + .replace('def', '\\n+(?=' + block.def.source + ')') + .getRegex(); + +block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + + '|track|ul'; +block._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/; +block.html = edit$1(block.html, 'i') + .replace('comment', block._comment) + .replace('tag', block._tag) + .replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/) + .getRegex(); + +block.paragraph = edit$1(block._paragraph) + .replace('hr', block.hr) + .replace('heading', ' {0,3}#{1,6} ') + .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs + .replace('blockquote', ' {0,3}>') + .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n') + .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)') + .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks + .getRegex(); + +block.blockquote = edit$1(block.blockquote) + .replace('paragraph', block.paragraph) + .getRegex(); + +/** + * Normal Block Grammar + */ + +block.normal = merge$1({}, block); + +/** + * GFM Block Grammar + */ + +block.gfm = merge$1({}, block.normal, { + nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header + + ' {0,3}([-:]+ *\\|[-| :]*)' // Align + + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells + table: '^ *\\|(.+)\\n' // Header + + ' {0,3}\\|?( *[-:]+[-| :]*)' // Align + + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells +}); + +block.gfm.nptable = edit$1(block.gfm.nptable) + .replace('hr', block.hr) + .replace('heading', ' {0,3}#{1,6} ') + .replace('blockquote', ' {0,3}>') + .replace('code', ' {4}[^\\n]') + .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n') + .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)') + .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks + .getRegex(); + +block.gfm.table = edit$1(block.gfm.table) + .replace('hr', block.hr) + .replace('heading', ' {0,3}#{1,6} ') + .replace('blockquote', ' {0,3}>') + .replace('code', ' {4}[^\\n]') + .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n') + .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)') + .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks + .getRegex(); + +/** + * Pedantic grammar (original John Gruber's loose markdown specification) + */ + +block.pedantic = merge$1({}, block.normal, { + html: edit$1( + '^ *(?:comment *(?:\\n|\\s*$)' + + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag + + '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))') + .replace('comment', block._comment) + .replace(/tag/g, '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b') + .getRegex(), + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, + fences: noopTest$1, // fences not supported + paragraph: edit$1(block.normal._paragraph) + .replace('hr', block.hr) + .replace('heading', ' *#{1,6} *[^\n]') + .replace('lheading', block.lheading) + .replace('blockquote', ' {0,3}>') + .replace('|fences', '') + .replace('|list', '') + .replace('|html', '') + .getRegex() +}); + +/** + * Inline-Level Grammar + */ +const inline = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: noopTest$1, + tag: '^comment' + + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag + + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag + + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?> + + '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html> + + '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>', // CDATA section + link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, + nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, + reflinkSearch: 'reflink|nolink(?!\\()', + strong: { + start: /^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/, // (1) returns if starts w/ punctuation + middle: /^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/, + endAst: /[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/, // last char can't be punct, or final * must also be followed by punct (or endline) + endUnd: /[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) + }, + em: { + start: /^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/, // (1) returns if starts w/ punctuation + middle: /^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/, + endAst: /[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/, // last char can't be punct, or final * must also be followed by punct (or endline) + endUnd: /[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) + }, + code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: noopTest$1, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/, + punctuation: /^([\s*punctuation])/ +}; + +// list of punctuation marks from common mark spec +// without * and _ to workaround cases with double emphasis +inline._punctuation = '!"#$%&\'()+\\-.,/:;<=>?@\\[\\]`^{|}~'; +inline.punctuation = edit$1(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); + +// sequences em should skip over [title](link), `code`, <html> +inline._blockSkip = '\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>'; +inline._overlapSkip = '__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*'; + +inline._comment = edit$1(block._comment).replace('(?:-->|$)', '-->').getRegex(); + +inline.em.start = edit$1(inline.em.start) + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.em.middle = edit$1(inline.em.middle) + .replace(/punctuation/g, inline._punctuation) + .replace(/overlapSkip/g, inline._overlapSkip) + .getRegex(); + +inline.em.endAst = edit$1(inline.em.endAst, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.em.endUnd = edit$1(inline.em.endUnd, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.strong.start = edit$1(inline.strong.start) + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.strong.middle = edit$1(inline.strong.middle) + .replace(/punctuation/g, inline._punctuation) + .replace(/overlapSkip/g, inline._overlapSkip) + .getRegex(); + +inline.strong.endAst = edit$1(inline.strong.endAst, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.strong.endUnd = edit$1(inline.strong.endUnd, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.blockSkip = edit$1(inline._blockSkip, 'g') + .getRegex(); + +inline.overlapSkip = edit$1(inline._overlapSkip, 'g') + .getRegex(); + +inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; + +inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; +inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; +inline.autolink = edit$1(inline.autolink) + .replace('scheme', inline._scheme) + .replace('email', inline._email) + .getRegex(); + +inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; + +inline.tag = edit$1(inline.tag) + .replace('comment', inline._comment) + .replace('attribute', inline._attribute) + .getRegex(); + +inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; +inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/; +inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; + +inline.link = edit$1(inline.link) + .replace('label', inline._label) + .replace('href', inline._href) + .replace('title', inline._title) + .getRegex(); + +inline.reflink = edit$1(inline.reflink) + .replace('label', inline._label) + .getRegex(); + +inline.reflinkSearch = edit$1(inline.reflinkSearch, 'g') + .replace('reflink', inline.reflink) + .replace('nolink', inline.nolink) + .getRegex(); + +/** + * Normal Inline Grammar + */ + +inline.normal = merge$1({}, inline); + +/** + * Pedantic Inline Grammar + */ + +inline.pedantic = merge$1({}, inline.normal, { + strong: { + start: /^__|\*\*/, + middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + endAst: /\*\*(?!\*)/g, + endUnd: /__(?!_)/g + }, + em: { + start: /^_|\*/, + middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, + endAst: /\*(?!\*)/g, + endUnd: /_(?!_)/g + }, + link: edit$1(/^!?\[(label)\]\((.*?)\)/) + .replace('label', inline._label) + .getRegex(), + reflink: edit$1(/^!?\[(label)\]\s*\[([^\]]*)\]/) + .replace('label', inline._label) + .getRegex() +}); + +/** + * GFM Inline Grammar + */ + +inline.gfm = merge$1({}, inline.normal, { + escape: edit$1(inline.escape).replace('])', '~|])').getRegex(), + _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, + url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, + _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, + del: /^~+(?=\S)([\s\S]*?\S)~+/, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/ +}); + +inline.gfm.url = edit$1(inline.gfm.url, 'i') + .replace('email', inline.gfm._extended_email) + .getRegex(); +/** + * GFM + Line Breaks Inline Grammar + */ + +inline.breaks = merge$1({}, inline.gfm, { + br: edit$1(inline.br).replace('{2,}', '*').getRegex(), + text: edit$1(inline.gfm.text) + .replace('\\b_', '\\b_| {2,}\\n') + .replace(/\{2,\}/g, '*') + .getRegex() +}); + +var rules = { + block, + inline +}; + +const { defaults: defaults$2 } = defaults; +const { block: block$1, inline: inline$1 } = rules; + +/** + * smartypants text replacement + */ +function smartypants(text) { + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); +} + +/** + * mangle email addresses + */ +function mangle(text) { + let out = '', + i, + ch; + + const l = text.length; + for (i = 0; i < l; i++) { + ch = text.charCodeAt(i); + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + out += '&#' + ch + ';'; + } + + return out; +} + +/** + * Block Lexer + */ +var Lexer_1 = class Lexer { + constructor(options) { + this.tokens = []; + this.tokens.links = Object.create(null); + this.options = options || defaults$2; + this.options.tokenizer = this.options.tokenizer || new Tokenizer_1(); + this.tokenizer = this.options.tokenizer; + this.tokenizer.options = this.options; + + const rules = { + block: block$1.normal, + inline: inline$1.normal + }; + + if (this.options.pedantic) { + rules.block = block$1.pedantic; + rules.inline = inline$1.pedantic; + } else if (this.options.gfm) { + rules.block = block$1.gfm; + if (this.options.breaks) { + rules.inline = inline$1.breaks; + } else { + rules.inline = inline$1.gfm; + } + } + this.tokenizer.rules = rules; + } + + /** + * Expose Rules + */ + static get rules() { + return { + block: block$1, + inline: inline$1 + }; + } + + /** + * Static Lex Method + */ + static lex(src, options) { + const lexer = new Lexer(options); + return lexer.lex(src); + } + + /** + * Static Lex Inline Method + */ + static lexInline(src, options) { + const lexer = new Lexer(options); + return lexer.inlineTokens(src); + } + + /** + * Preprocessing + */ + lex(src) { + src = src + .replace(/\r\n|\r/g, '\n') + .replace(/\t/g, ' '); + + this.blockTokens(src, this.tokens, true); + + this.inline(this.tokens); + + return this.tokens; + } + + /** + * Lexing + */ + blockTokens(src, tokens = [], top = true) { + src = src.replace(/^ +$/gm, ''); + let token, i, l, lastToken; + + while (src) { + // newline + if (token = this.tokenizer.space(src)) { + src = src.substring(token.raw.length); + if (token.type) { + tokens.push(token); + } + continue; + } + + // code + if (token = this.tokenizer.code(src, tokens)) { + src = src.substring(token.raw.length); + if (token.type) { + tokens.push(token); + } else { + lastToken = tokens[tokens.length - 1]; + lastToken.raw += '\n' + token.raw; + lastToken.text += '\n' + token.text; + } + continue; + } + + // fences + if (token = this.tokenizer.fences(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // heading + if (token = this.tokenizer.heading(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // table no leading pipe (gfm) + if (token = this.tokenizer.nptable(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // hr + if (token = this.tokenizer.hr(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // blockquote + if (token = this.tokenizer.blockquote(src)) { + src = src.substring(token.raw.length); + token.tokens = this.blockTokens(token.text, [], top); + tokens.push(token); + continue; + } + + // list + if (token = this.tokenizer.list(src)) { + src = src.substring(token.raw.length); + l = token.items.length; + for (i = 0; i < l; i++) { + token.items[i].tokens = this.blockTokens(token.items[i].text, [], false); + } + tokens.push(token); + continue; + } + + // html + if (token = this.tokenizer.html(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // def + if (top && (token = this.tokenizer.def(src))) { + src = src.substring(token.raw.length); + if (!this.tokens.links[token.tag]) { + this.tokens.links[token.tag] = { + href: token.href, + title: token.title + }; + } + continue; + } + + // table (gfm) + if (token = this.tokenizer.table(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // lheading + if (token = this.tokenizer.lheading(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // top-level paragraph + if (top && (token = this.tokenizer.paragraph(src))) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // text + if (token = this.tokenizer.text(src, tokens)) { + src = src.substring(token.raw.length); + if (token.type) { + tokens.push(token); + } else { + lastToken = tokens[tokens.length - 1]; + lastToken.raw += '\n' + token.raw; + lastToken.text += '\n' + token.text; + } + continue; + } + + if (src) { + const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); + if (this.options.silent) { + console.error(errMsg); + break; + } else { + throw new Error(errMsg); + } + } + } + + return tokens; + } + + inline(tokens) { + let i, + j, + k, + l2, + row, + token; + + const l = tokens.length; + for (i = 0; i < l; i++) { + token = tokens[i]; + switch (token.type) { + case 'paragraph': + case 'text': + case 'heading': { + token.tokens = []; + this.inlineTokens(token.text, token.tokens); + break; + } + case 'table': { + token.tokens = { + header: [], + cells: [] + }; + + // header + l2 = token.header.length; + for (j = 0; j < l2; j++) { + token.tokens.header[j] = []; + this.inlineTokens(token.header[j], token.tokens.header[j]); + } + + // cells + l2 = token.cells.length; + for (j = 0; j < l2; j++) { + row = token.cells[j]; + token.tokens.cells[j] = []; + for (k = 0; k < row.length; k++) { + token.tokens.cells[j][k] = []; + this.inlineTokens(row[k], token.tokens.cells[j][k]); + } + } + + break; + } + case 'blockquote': { + this.inline(token.tokens); + break; + } + case 'list': { + l2 = token.items.length; + for (j = 0; j < l2; j++) { + this.inline(token.items[j].tokens); + } + break; + } + } + } + + return tokens; + } + + /** + * Lexing/Compiling + */ + inlineTokens(src, tokens = [], inLink = false, inRawBlock = false, prevChar = '') { + let token; + + // String with links masked to avoid interference with em and strong + let maskedSrc = src; + let match; + + // Mask out reflinks + if (this.tokens.links) { + const links = Object.keys(this.tokens.links); + if (links.length > 0) { + while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) { + if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) { + maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex); + } + } + } + } + // Mask out other blocks + while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) { + maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + } + + while (src) { + // escape + if (token = this.tokenizer.escape(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // tag + if (token = this.tokenizer.tag(src, inLink, inRawBlock)) { + src = src.substring(token.raw.length); + inLink = token.inLink; + inRawBlock = token.inRawBlock; + tokens.push(token); + continue; + } + + // link + if (token = this.tokenizer.link(src)) { + src = src.substring(token.raw.length); + if (token.type === 'link') { + token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); + } + tokens.push(token); + continue; + } + + // reflink, nolink + if (token = this.tokenizer.reflink(src, this.tokens.links)) { + src = src.substring(token.raw.length); + if (token.type === 'link') { + token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); + } + tokens.push(token); + continue; + } + + // strong + if (token = this.tokenizer.strong(src, maskedSrc, prevChar)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } + + // em + if (token = this.tokenizer.em(src, maskedSrc, prevChar)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } + + // code + if (token = this.tokenizer.codespan(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // br + if (token = this.tokenizer.br(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // del (gfm) + if (token = this.tokenizer.del(src)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } + + // autolink + if (token = this.tokenizer.autolink(src, mangle)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // url (gfm) + if (!inLink && (token = this.tokenizer.url(src, mangle))) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // text + if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) { + src = src.substring(token.raw.length); + prevChar = token.raw.slice(-1); + tokens.push(token); + continue; + } + + if (src) { + const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); + if (this.options.silent) { + console.error(errMsg); + break; + } else { + throw new Error(errMsg); + } + } + } + + return tokens; + } +}; + +const { defaults: defaults$3 } = defaults; +const { + cleanUrl: cleanUrl$1, + escape: escape$2 +} = helpers; + +/** + * Renderer + */ +var Renderer_1 = class Renderer { + constructor(options) { + this.options = options || defaults$3; + } + + code(code, infostring, escaped) { + const lang = (infostring || '').match(/\S*/)[0]; + if (this.options.highlight) { + const out = this.options.highlight(code, lang); + if (out != null && out !== code) { + escaped = true; + code = out; + } + } + + if (!lang) { + return '<pre><code>' + + (escaped ? code : escape$2(code, true)) + + '</code></pre>\n'; + } + + return '<pre><code class="' + + this.options.langPrefix + + escape$2(lang, true) + + '">' + + (escaped ? code : escape$2(code, true)) + + '</code></pre>\n'; + } + + blockquote(quote) { + return '<blockquote>\n' + quote + '</blockquote>\n'; + } + + html(html) { + return html; + } + + heading(text, level, raw, slugger) { + if (this.options.headerIds) { + return '<h' + + level + + ' id="' + + this.options.headerPrefix + + slugger.slug(raw) + + '">' + + text + + '</h' + + level + + '>\n'; + } + // ignore IDs + return '<h' + level + '>' + text + '</h' + level + '>\n'; + } + + hr() { + return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; + } + + list(body, ordered, start) { + const type = ordered ? 'ol' : 'ul', + startatt = (ordered && start !== 1) ? (' start="' + start + '"') : ''; + return '<' + type + startatt + '>\n' + body + '</' + type + '>\n'; + } + + listitem(text) { + return '<li>' + text + '</li>\n'; + } + + checkbox(checked) { + return '<input ' + + (checked ? 'checked="" ' : '') + + 'disabled="" type="checkbox"' + + (this.options.xhtml ? ' /' : '') + + '> '; + } + + paragraph(text) { + return '<p>' + text + '</p>\n'; + } + + table(header, body) { + if (body) body = '<tbody>' + body + '</tbody>'; + + return '<table>\n' + + '<thead>\n' + + header + + '</thead>\n' + + body + + '</table>\n'; + } + + tablerow(content) { + return '<tr>\n' + content + '</tr>\n'; + } + + tablecell(content, flags) { + const type = flags.header ? 'th' : 'td'; + const tag = flags.align + ? '<' + type + ' align="' + flags.align + '">' + : '<' + type + '>'; + return tag + content + '</' + type + '>\n'; + } + + // span level renderer + strong(text) { + return '<strong>' + text + '</strong>'; + } + + em(text) { + return '<em>' + text + '</em>'; + } + + codespan(text) { + return '<code>' + text + '</code>'; + } + + br() { + return this.options.xhtml ? '<br/>' : '<br>'; + } + + del(text) { + return '<del>' + text + '</del>'; + } + + link(href, title, text) { + href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href); + if (href === null) { + return text; + } + let out = '<a href="' + escape$2(href) + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += '>' + text + '</a>'; + return out; + } + + image(href, title, text) { + href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href); + if (href === null) { + return text; + } + + let out = '<img src="' + href + '" alt="' + text + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += this.options.xhtml ? '/>' : '>'; + return out; + } + + text(text) { + return text; + } +}; + +/** + * TextRenderer + * returns only the textual part of the token + */ +var TextRenderer_1 = class TextRenderer { + // no need for block level renderers + strong(text) { + return text; + } + + em(text) { + return text; + } + + codespan(text) { + return text; + } + + del(text) { + return text; + } + + html(text) { + return text; + } + + text(text) { + return text; + } + + link(href, title, text) { + return '' + text; + } + + image(href, title, text) { + return '' + text; + } + + br() { + return ''; + } +}; + +/** + * Slugger generates header id + */ +var Slugger_1 = class Slugger { + constructor() { + this.seen = {}; + } + + serialize(value) { + return value + .toLowerCase() + .trim() + // remove html tags + .replace(/<[!\/a-z].*?>/ig, '') + // remove unwanted chars + .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '') + .replace(/\s/g, '-'); + } + + /** + * Finds the next safe (unique) slug to use + */ + getNextSafeSlug(originalSlug, isDryRun) { + let slug = originalSlug; + let occurenceAccumulator = 0; + if (this.seen.hasOwnProperty(slug)) { + occurenceAccumulator = this.seen[originalSlug]; + do { + occurenceAccumulator++; + slug = originalSlug + '-' + occurenceAccumulator; + } while (this.seen.hasOwnProperty(slug)); + } + if (!isDryRun) { + this.seen[originalSlug] = occurenceAccumulator; + this.seen[slug] = 0; + } + return slug; + } + + /** + * Convert string to unique id + * @param {object} options + * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator. + */ + slug(value, options = {}) { + const slug = this.serialize(value); + return this.getNextSafeSlug(slug, options.dryrun); + } +}; + +const { defaults: defaults$4 } = defaults; +const { + unescape: unescape$1 +} = helpers; + +/** + * Parsing & Compiling + */ +var Parser_1 = class Parser { + constructor(options) { + this.options = options || defaults$4; + this.options.renderer = this.options.renderer || new Renderer_1(); + this.renderer = this.options.renderer; + this.renderer.options = this.options; + this.textRenderer = new TextRenderer_1(); + this.slugger = new Slugger_1(); + } + + /** + * Static Parse Method + */ + static parse(tokens, options) { + const parser = new Parser(options); + return parser.parse(tokens); + } + + /** + * Static Parse Inline Method + */ + static parseInline(tokens, options) { + const parser = new Parser(options); + return parser.parseInline(tokens); + } + + /** + * Parse Loop + */ + parse(tokens, top = true) { + let out = '', + i, + j, + k, + l2, + l3, + row, + cell, + header, + body, + token, + ordered, + start, + loose, + itemBody, + item, + checked, + task, + checkbox; + + const l = tokens.length; + for (i = 0; i < l; i++) { + token = tokens[i]; + switch (token.type) { + case 'space': { + continue; + } + case 'hr': { + out += this.renderer.hr(); + continue; + } + case 'heading': { + out += this.renderer.heading( + this.parseInline(token.tokens), + token.depth, + unescape$1(this.parseInline(token.tokens, this.textRenderer)), + this.slugger); + continue; + } + case 'code': { + out += this.renderer.code(token.text, + token.lang, + token.escaped); + continue; + } + case 'table': { + header = ''; + + // header + cell = ''; + l2 = token.header.length; + for (j = 0; j < l2; j++) { + cell += this.renderer.tablecell( + this.parseInline(token.tokens.header[j]), + { header: true, align: token.align[j] } + ); + } + header += this.renderer.tablerow(cell); + + body = ''; + l2 = token.cells.length; + for (j = 0; j < l2; j++) { + row = token.tokens.cells[j]; + + cell = ''; + l3 = row.length; + for (k = 0; k < l3; k++) { + cell += this.renderer.tablecell( + this.parseInline(row[k]), + { header: false, align: token.align[k] } + ); + } + + body += this.renderer.tablerow(cell); + } + out += this.renderer.table(header, body); + continue; + } + case 'blockquote': { + body = this.parse(token.tokens); + out += this.renderer.blockquote(body); + continue; + } + case 'list': { + ordered = token.ordered; + start = token.start; + loose = token.loose; + l2 = token.items.length; + + body = ''; + for (j = 0; j < l2; j++) { + item = token.items[j]; + checked = item.checked; + task = item.task; + + itemBody = ''; + if (item.task) { + checkbox = this.renderer.checkbox(checked); + if (loose) { + if (item.tokens.length > 0 && item.tokens[0].type === 'text') { + item.tokens[0].text = checkbox + ' ' + item.tokens[0].text; + if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') { + item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text; + } + } else { + item.tokens.unshift({ + type: 'text', + text: checkbox + }); + } + } else { + itemBody += checkbox; + } + } + + itemBody += this.parse(item.tokens, loose); + body += this.renderer.listitem(itemBody, task, checked); + } + + out += this.renderer.list(body, ordered, start); + continue; + } + case 'html': { + // TODO parse inline content if parameter markdown=1 + out += this.renderer.html(token.text); + continue; + } + case 'paragraph': { + out += this.renderer.paragraph(this.parseInline(token.tokens)); + continue; + } + case 'text': { + body = token.tokens ? this.parseInline(token.tokens) : token.text; + while (i + 1 < l && tokens[i + 1].type === 'text') { + token = tokens[++i]; + body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text); + } + out += top ? this.renderer.paragraph(body) : body; + continue; + } + default: { + const errMsg = 'Token with "' + token.type + '" type was not found.'; + if (this.options.silent) { + console.error(errMsg); + return; + } else { + throw new Error(errMsg); + } + } + } + } + + return out; + } + + /** + * Parse Inline Tokens + */ + parseInline(tokens, renderer) { + renderer = renderer || this.renderer; + let out = '', + i, + token; + + const l = tokens.length; + for (i = 0; i < l; i++) { + token = tokens[i]; + switch (token.type) { + case 'escape': { + out += renderer.text(token.text); + break; + } + case 'html': { + out += renderer.html(token.text); + break; + } + case 'link': { + out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer)); + break; + } + case 'image': { + out += renderer.image(token.href, token.title, token.text); + break; + } + case 'strong': { + out += renderer.strong(this.parseInline(token.tokens, renderer)); + break; + } + case 'em': { + out += renderer.em(this.parseInline(token.tokens, renderer)); + break; + } + case 'codespan': { + out += renderer.codespan(token.text); + break; + } + case 'br': { + out += renderer.br(); + break; + } + case 'del': { + out += renderer.del(this.parseInline(token.tokens, renderer)); + break; + } + case 'text': { + out += renderer.text(token.text); + break; + } + default: { + const errMsg = 'Token with "' + token.type + '" type was not found.'; + if (this.options.silent) { + console.error(errMsg); + return; + } else { + throw new Error(errMsg); + } + } + } + } + return out; + } +}; + +const { + merge: merge$2, + checkSanitizeDeprecation: checkSanitizeDeprecation$1, + escape: escape$3 +} = helpers; +const { + getDefaults, + changeDefaults, + defaults: defaults$5 +} = defaults; + +/** + * Marked + */ +function marked(src, opt, callback) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked(): input parameter is undefined or null'); + } + if (typeof src !== 'string') { + throw new Error('marked(): input parameter is of type ' + + Object.prototype.toString.call(src) + ', string expected'); + } + + if (typeof opt === 'function') { + callback = opt; + opt = null; + } + + opt = merge$2({}, marked.defaults, opt || {}); + checkSanitizeDeprecation$1(opt); + + if (callback) { + const highlight = opt.highlight; + let tokens; + + try { + tokens = Lexer_1.lex(src, opt); + } catch (e) { + return callback(e); + } + + const done = function(err) { + let out; + + if (!err) { + try { + out = Parser_1.parse(tokens, opt); + } catch (e) { + err = e; + } + } + + opt.highlight = highlight; + + return err + ? callback(err) + : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + + if (!tokens.length) return done(); + + let pending = 0; + marked.walkTokens(tokens, function(token) { + if (token.type === 'code') { + pending++; + setTimeout(() => { + highlight(token.text, token.lang, function(err, code) { + if (err) { + return done(err); + } + if (code != null && code !== token.text) { + token.text = code; + token.escaped = true; + } + + pending--; + if (pending === 0) { + done(); + } + }); + }, 0); + } + }); + + if (pending === 0) { + done(); + } + + return; + } + + try { + const tokens = Lexer_1.lex(src, opt); + if (opt.walkTokens) { + marked.walkTokens(tokens, opt.walkTokens); + } + return Parser_1.parse(tokens, opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + if (opt.silent) { + return '<p>An error occurred:</p><pre>' + + escape$3(e.message + '', true) + + '</pre>'; + } + throw e; + } +} + +/** + * Options + */ + +marked.options = +marked.setOptions = function(opt) { + merge$2(marked.defaults, opt); + changeDefaults(marked.defaults); + return marked; +}; + +marked.getDefaults = getDefaults; + +marked.defaults = defaults$5; + +/** + * Use Extension + */ + +marked.use = function(extension) { + const opts = merge$2({}, extension); + if (extension.renderer) { + const renderer = marked.defaults.renderer || new Renderer_1(); + for (const prop in extension.renderer) { + const prevRenderer = renderer[prop]; + renderer[prop] = (...args) => { + let ret = extension.renderer[prop].apply(renderer, args); + if (ret === false) { + ret = prevRenderer.apply(renderer, args); + } + return ret; + }; + } + opts.renderer = renderer; + } + if (extension.tokenizer) { + const tokenizer = marked.defaults.tokenizer || new Tokenizer_1(); + for (const prop in extension.tokenizer) { + const prevTokenizer = tokenizer[prop]; + tokenizer[prop] = (...args) => { + let ret = extension.tokenizer[prop].apply(tokenizer, args); + if (ret === false) { + ret = prevTokenizer.apply(tokenizer, args); + } + return ret; + }; + } + opts.tokenizer = tokenizer; + } + if (extension.walkTokens) { + const walkTokens = marked.defaults.walkTokens; + opts.walkTokens = (token) => { + extension.walkTokens(token); + if (walkTokens) { + walkTokens(token); + } + }; + } + marked.setOptions(opts); +}; + +/** + * Run callback for every token + */ + +marked.walkTokens = function(tokens, callback) { + for (const token of tokens) { + callback(token); + switch (token.type) { + case 'table': { + for (const cell of token.tokens.header) { + marked.walkTokens(cell, callback); + } + for (const row of token.tokens.cells) { + for (const cell of row) { + marked.walkTokens(cell, callback); + } + } + break; + } + case 'list': { + marked.walkTokens(token.items, callback); + break; + } + default: { + if (token.tokens) { + marked.walkTokens(token.tokens, callback); + } + } + } + } +}; + +/** + * Parse Inline + */ +marked.parseInline = function(src, opt) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked.parseInline(): input parameter is undefined or null'); + } + if (typeof src !== 'string') { + throw new Error('marked.parseInline(): input parameter is of type ' + + Object.prototype.toString.call(src) + ', string expected'); + } + + opt = merge$2({}, marked.defaults, opt || {}); + checkSanitizeDeprecation$1(opt); + + try { + const tokens = Lexer_1.lexInline(src, opt); + if (opt.walkTokens) { + marked.walkTokens(tokens, opt.walkTokens); + } + return Parser_1.parseInline(tokens, opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + if (opt.silent) { + return '<p>An error occurred:</p><pre>' + + escape$3(e.message + '', true) + + '</pre>'; + } + throw e; + } +}; + +/** + * Expose + */ + +marked.Parser = Parser_1; +marked.parser = Parser_1.parse; + +marked.Renderer = Renderer_1; +marked.TextRenderer = TextRenderer_1; + +marked.Lexer = Lexer_1; +marked.lexer = Lexer_1.lex; + +marked.Tokenizer = Tokenizer_1; + +marked.Slugger = Slugger_1; + +marked.parse = marked; + +var marked_1 = marked; + +export default marked_1; diff --git a/node_modules/marked/lib/marked.js b/node_modules/marked/lib/marked.js @@ -0,0 +1,2678 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2020, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ + +/** + * DO NOT EDIT THIS FILE + * The code in this file is generated from files in ./src/ + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.marked = factory()); +}(this, (function () { 'use strict'; + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _createForOfIteratorHelperLoose(o, allowArrayLike) { + var it; + + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + return function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + it = o[Symbol.iterator](); + return it.next.bind(it); + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var defaults = createCommonjsModule(function (module) { + function getDefaults() { + return { + baseUrl: null, + breaks: false, + gfm: true, + headerIds: true, + headerPrefix: '', + highlight: null, + langPrefix: 'language-', + mangle: true, + pedantic: false, + renderer: null, + sanitize: false, + sanitizer: null, + silent: false, + smartLists: false, + smartypants: false, + tokenizer: null, + walkTokens: null, + xhtml: false + }; + } + + function changeDefaults(newDefaults) { + module.exports.defaults = newDefaults; + } + + module.exports = { + defaults: getDefaults(), + getDefaults: getDefaults, + changeDefaults: changeDefaults + }; + }); + var defaults_1 = defaults.defaults; + var defaults_2 = defaults.getDefaults; + var defaults_3 = defaults.changeDefaults; + + /** + * Helpers + */ + var escapeTest = /[&<>"']/; + var escapeReplace = /[&<>"']/g; + var escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/; + var escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g; + var escapeReplacements = { + '&': '&amp;', + '<': '&lt;', + '>': '&gt;', + '"': '&quot;', + "'": '&#39;' + }; + + var getEscapeReplacement = function getEscapeReplacement(ch) { + return escapeReplacements[ch]; + }; + + function escape(html, encode) { + if (encode) { + if (escapeTest.test(html)) { + return html.replace(escapeReplace, getEscapeReplacement); + } + } else { + if (escapeTestNoEncode.test(html)) { + return html.replace(escapeReplaceNoEncode, getEscapeReplacement); + } + } + + return html; + } + + var unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; + + function unescape(html) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(unescapeTest, function (_, n) { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)); + } + + return ''; + }); + } + + var caret = /(^|[^\[])\^/g; + + function edit(regex, opt) { + regex = regex.source || regex; + opt = opt || ''; + var obj = { + replace: function replace(name, val) { + val = val.source || val; + val = val.replace(caret, '$1'); + regex = regex.replace(name, val); + return obj; + }, + getRegex: function getRegex() { + return new RegExp(regex, opt); + } + }; + return obj; + } + + var nonWordAndColonTest = /[^\w:]/g; + var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; + + function cleanUrl(sanitize, base, href) { + if (sanitize) { + var prot; + + try { + prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase(); + } catch (e) { + return null; + } + + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { + return null; + } + } + + if (base && !originIndependentUrl.test(href)) { + href = resolveUrl(base, href); + } + + try { + href = encodeURI(href).replace(/%25/g, '%'); + } catch (e) { + return null; + } + + return href; + } + + var baseUrls = {}; + var justDomain = /^[^:]+:\/*[^/]*$/; + var protocol = /^([^:]+:)[\s\S]*$/; + var domain = /^([^:]+:\/*[^/]*)[\s\S]*$/; + + function resolveUrl(base, href) { + if (!baseUrls[' ' + base]) { + // we can ignore everything in base after the last slash of its path component, + // but we might need to add _that_ + // https://tools.ietf.org/html/rfc3986#section-3 + if (justDomain.test(base)) { + baseUrls[' ' + base] = base + '/'; + } else { + baseUrls[' ' + base] = rtrim(base, '/', true); + } + } + + base = baseUrls[' ' + base]; + var relativeBase = base.indexOf(':') === -1; + + if (href.substring(0, 2) === '//') { + if (relativeBase) { + return href; + } + + return base.replace(protocol, '$1') + href; + } else if (href.charAt(0) === '/') { + if (relativeBase) { + return href; + } + + return base.replace(domain, '$1') + href; + } else { + return base + href; + } + } + + var noopTest = { + exec: function noopTest() {} + }; + + function merge(obj) { + var i = 1, + target, + key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; + } + + function splitCells(tableRow, count) { + // ensure that every cell-delimiting pipe has a space + // before it to distinguish it from an escaped pipe + var row = tableRow.replace(/\|/g, function (match, offset, str) { + var escaped = false, + curr = offset; + + while (--curr >= 0 && str[curr] === '\\') { + escaped = !escaped; + } + + if (escaped) { + // odd number of slashes means | is escaped + // so we leave it alone + return '|'; + } else { + // add space before unescaped | + return ' |'; + } + }), + cells = row.split(/ \|/); + var i = 0; + + if (cells.length > count) { + cells.splice(count); + } else { + while (cells.length < count) { + cells.push(''); + } + } + + for (; i < cells.length; i++) { + // leading or trailing whitespace is ignored per the gfm spec + cells[i] = cells[i].trim().replace(/\\\|/g, '|'); + } + + return cells; + } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). + // /c*$/ is vulnerable to REDOS. + // invert: Remove suffix of non-c chars instead. Default falsey. + + + function rtrim(str, c, invert) { + var l = str.length; + + if (l === 0) { + return ''; + } // Length of suffix matching the invert condition. + + + var suffLen = 0; // Step left until we fail to match the invert condition. + + while (suffLen < l) { + var currChar = str.charAt(l - suffLen - 1); + + if (currChar === c && !invert) { + suffLen++; + } else if (currChar !== c && invert) { + suffLen++; + } else { + break; + } + } + + return str.substr(0, l - suffLen); + } + + function findClosingBracket(str, b) { + if (str.indexOf(b[1]) === -1) { + return -1; + } + + var l = str.length; + var level = 0, + i = 0; + + for (; i < l; i++) { + if (str[i] === '\\') { + i++; + } else if (str[i] === b[0]) { + level++; + } else if (str[i] === b[1]) { + level--; + + if (level < 0) { + return i; + } + } + } + + return -1; + } + + function checkSanitizeDeprecation(opt) { + if (opt && opt.sanitize && !opt.silent) { + console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options'); + } + } + + var helpers = { + escape: escape, + unescape: unescape, + edit: edit, + cleanUrl: cleanUrl, + resolveUrl: resolveUrl, + noopTest: noopTest, + merge: merge, + splitCells: splitCells, + rtrim: rtrim, + findClosingBracket: findClosingBracket, + checkSanitizeDeprecation: checkSanitizeDeprecation + }; + + var defaults$1 = defaults.defaults; + var rtrim$1 = helpers.rtrim, + splitCells$1 = helpers.splitCells, + _escape = helpers.escape, + findClosingBracket$1 = helpers.findClosingBracket; + + function outputLink(cap, link, raw) { + var href = link.href; + var title = link.title ? _escape(link.title) : null; + var text = cap[1].replace(/\\([\[\]])/g, '$1'); + + if (cap[0].charAt(0) !== '!') { + return { + type: 'link', + raw: raw, + href: href, + title: title, + text: text + }; + } else { + return { + type: 'image', + raw: raw, + href: href, + title: title, + text: _escape(text) + }; + } + } + + function indentCodeCompensation(raw, text) { + var matchIndentToCode = raw.match(/^(\s+)(?:```)/); + + if (matchIndentToCode === null) { + return text; + } + + var indentToCode = matchIndentToCode[1]; + return text.split('\n').map(function (node) { + var matchIndentInNode = node.match(/^\s+/); + + if (matchIndentInNode === null) { + return node; + } + + var indentInNode = matchIndentInNode[0]; + + if (indentInNode.length >= indentToCode.length) { + return node.slice(indentToCode.length); + } + + return node; + }).join('\n'); + } + /** + * Tokenizer + */ + + + var Tokenizer_1 = /*#__PURE__*/function () { + function Tokenizer(options) { + this.options = options || defaults$1; + } + + var _proto = Tokenizer.prototype; + + _proto.space = function space(src) { + var cap = this.rules.block.newline.exec(src); + + if (cap) { + if (cap[0].length > 1) { + return { + type: 'space', + raw: cap[0] + }; + } + + return { + raw: '\n' + }; + } + }; + + _proto.code = function code(src, tokens) { + var cap = this.rules.block.code.exec(src); + + if (cap) { + var lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph. + + if (lastToken && lastToken.type === 'paragraph') { + return { + raw: cap[0], + text: cap[0].trimRight() + }; + } + + var text = cap[0].replace(/^ {4}/gm, ''); + return { + type: 'code', + raw: cap[0], + codeBlockStyle: 'indented', + text: !this.options.pedantic ? rtrim$1(text, '\n') : text + }; + } + }; + + _proto.fences = function fences(src) { + var cap = this.rules.block.fences.exec(src); + + if (cap) { + var raw = cap[0]; + var text = indentCodeCompensation(raw, cap[3] || ''); + return { + type: 'code', + raw: raw, + lang: cap[2] ? cap[2].trim() : cap[2], + text: text + }; + } + }; + + _proto.heading = function heading(src) { + var cap = this.rules.block.heading.exec(src); + + if (cap) { + return { + type: 'heading', + raw: cap[0], + depth: cap[1].length, + text: cap[2] + }; + } + }; + + _proto.nptable = function nptable(src) { + var cap = this.rules.block.nptable.exec(src); + + if (cap) { + var item = { + type: 'table', + header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [], + raw: cap[0] + }; + + if (item.header.length === item.align.length) { + var l = item.align.length; + var i; + + for (i = 0; i < l; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + l = item.cells.length; + + for (i = 0; i < l; i++) { + item.cells[i] = splitCells$1(item.cells[i], item.header.length); + } + + return item; + } + } + }; + + _proto.hr = function hr(src) { + var cap = this.rules.block.hr.exec(src); + + if (cap) { + return { + type: 'hr', + raw: cap[0] + }; + } + }; + + _proto.blockquote = function blockquote(src) { + var cap = this.rules.block.blockquote.exec(src); + + if (cap) { + var text = cap[0].replace(/^ *> ?/gm, ''); + return { + type: 'blockquote', + raw: cap[0], + text: text + }; + } + }; + + _proto.list = function list(src) { + var cap = this.rules.block.list.exec(src); + + if (cap) { + var raw = cap[0]; + var bull = cap[2]; + var isordered = bull.length > 1; + var isparen = bull[bull.length - 1] === ')'; + var list = { + type: 'list', + raw: raw, + ordered: isordered, + start: isordered ? +bull.slice(0, -1) : '', + loose: false, + items: [] + }; // Get each top-level item. + + var itemMatch = cap[0].match(this.rules.block.item); + var next = false, + item, + space, + b, + addBack, + loose, + istask, + ischecked; + var l = itemMatch.length; + + for (var i = 0; i < l; i++) { + item = itemMatch[i]; + raw = item; // Remove the list item's bullet + // so it is seen as the next token. + + space = item.length; + item = item.replace(/^ *([*+-]|\d+[.)]) */, ''); // Outdent whatever the + // list item contains. Hacky. + + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, ''); + } // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + + + if (i !== l - 1) { + b = this.rules.block.bullet.exec(itemMatch[i + 1])[0]; + + if (isordered ? b.length === 1 || !isparen && b[b.length - 1] === ')' : b.length > 1 || this.options.smartLists && b !== bull) { + addBack = itemMatch.slice(i + 1).join('\n'); + list.raw = list.raw.substring(0, list.raw.length - addBack.length); + i = l - 1; + } + } // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + + + loose = next || /\n\n(?!\s*$)/.test(item); + + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + if (loose) { + list.loose = true; + } // Check for task list items + + + istask = /^\[[ xX]\] /.test(item); + ischecked = undefined; + + if (istask) { + ischecked = item[1] !== ' '; + item = item.replace(/^\[[ xX]\] +/, ''); + } + + list.items.push({ + type: 'list_item', + raw: raw, + task: istask, + checked: ischecked, + loose: loose, + text: item + }); + } + + return list; + } + }; + + _proto.html = function html(src) { + var cap = this.rules.block.html.exec(src); + + if (cap) { + return { + type: this.options.sanitize ? 'paragraph' : 'html', + raw: cap[0], + pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), + text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0] + }; + } + }; + + _proto.def = function def(src) { + var cap = this.rules.block.def.exec(src); + + if (cap) { + if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); + var tag = cap[1].toLowerCase().replace(/\s+/g, ' '); + return { + tag: tag, + raw: cap[0], + href: cap[2], + title: cap[3] + }; + } + }; + + _proto.table = function table(src) { + var cap = this.rules.block.table.exec(src); + + if (cap) { + var item = { + type: 'table', + header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + item.raw = cap[0]; + var l = item.align.length; + var i; + + for (i = 0; i < l; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + l = item.cells.length; + + for (i = 0; i < l; i++) { + item.cells[i] = splitCells$1(item.cells[i].replace(/^ *\| *| *\| *$/g, ''), item.header.length); + } + + return item; + } + } + }; + + _proto.lheading = function lheading(src) { + var cap = this.rules.block.lheading.exec(src); + + if (cap) { + return { + type: 'heading', + raw: cap[0], + depth: cap[2].charAt(0) === '=' ? 1 : 2, + text: cap[1] + }; + } + }; + + _proto.paragraph = function paragraph(src) { + var cap = this.rules.block.paragraph.exec(src); + + if (cap) { + return { + type: 'paragraph', + raw: cap[0], + text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1] + }; + } + }; + + _proto.text = function text(src, tokens) { + var cap = this.rules.block.text.exec(src); + + if (cap) { + var lastToken = tokens[tokens.length - 1]; + + if (lastToken && lastToken.type === 'text') { + return { + raw: cap[0], + text: cap[0] + }; + } + + return { + type: 'text', + raw: cap[0], + text: cap[0] + }; + } + }; + + _proto.escape = function escape(src) { + var cap = this.rules.inline.escape.exec(src); + + if (cap) { + return { + type: 'escape', + raw: cap[0], + text: _escape(cap[1]) + }; + } + }; + + _proto.tag = function tag(src, inLink, inRawBlock) { + var cap = this.rules.inline.tag.exec(src); + + if (cap) { + if (!inLink && /^<a /i.test(cap[0])) { + inLink = true; + } else if (inLink && /^<\/a>/i.test(cap[0])) { + inLink = false; + } + + if (!inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { + inRawBlock = true; + } else if (inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { + inRawBlock = false; + } + + return { + type: this.options.sanitize ? 'text' : 'html', + raw: cap[0], + inLink: inLink, + inRawBlock: inRawBlock, + text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0] + }; + } + }; + + _proto.link = function link(src) { + var cap = this.rules.inline.link.exec(src); + + if (cap) { + var lastParenIndex = findClosingBracket$1(cap[2], '()'); + + if (lastParenIndex > -1) { + var start = cap[0].indexOf('!') === 0 ? 5 : 4; + var linkLen = start + cap[1].length + lastParenIndex; + cap[2] = cap[2].substring(0, lastParenIndex); + cap[0] = cap[0].substring(0, linkLen).trim(); + cap[3] = ''; + } + + var href = cap[2]; + var title = ''; + + if (this.options.pedantic) { + var link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); + + if (link) { + href = link[1]; + title = link[3]; + } else { + title = ''; + } + } else { + title = cap[3] ? cap[3].slice(1, -1) : ''; + } + + href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); + var token = outputLink(cap, { + href: href ? href.replace(this.rules.inline._escapes, '$1') : href, + title: title ? title.replace(this.rules.inline._escapes, '$1') : title + }, cap[0]); + return token; + } + }; + + _proto.reflink = function reflink(src, links) { + var cap; + + if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) { + var link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = links[link.toLowerCase()]; + + if (!link || !link.href) { + var text = cap[0].charAt(0); + return { + type: 'text', + raw: text, + text: text + }; + } + + var token = outputLink(cap, link, cap[0]); + return token; + } + }; + + _proto.strong = function strong(src, maskedSrc, prevChar) { + if (prevChar === void 0) { + prevChar = ''; + } + + var match = this.rules.inline.strong.start.exec(src); + + if (match && (!match[1] || match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) { + maskedSrc = maskedSrc.slice(-1 * src.length); + var endReg = match[0] === '**' ? this.rules.inline.strong.endAst : this.rules.inline.strong.endUnd; + endReg.lastIndex = 0; + var cap; + + while ((match = endReg.exec(maskedSrc)) != null) { + cap = this.rules.inline.strong.middle.exec(maskedSrc.slice(0, match.index + 3)); + + if (cap) { + return { + type: 'strong', + raw: src.slice(0, cap[0].length), + text: src.slice(2, cap[0].length - 2) + }; + } + } + } + }; + + _proto.em = function em(src, maskedSrc, prevChar) { + if (prevChar === void 0) { + prevChar = ''; + } + + var match = this.rules.inline.em.start.exec(src); + + if (match && (!match[1] || match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) { + maskedSrc = maskedSrc.slice(-1 * src.length); + var endReg = match[0] === '*' ? this.rules.inline.em.endAst : this.rules.inline.em.endUnd; + endReg.lastIndex = 0; + var cap; + + while ((match = endReg.exec(maskedSrc)) != null) { + cap = this.rules.inline.em.middle.exec(maskedSrc.slice(0, match.index + 2)); + + if (cap) { + return { + type: 'em', + raw: src.slice(0, cap[0].length), + text: src.slice(1, cap[0].length - 1) + }; + } + } + } + }; + + _proto.codespan = function codespan(src) { + var cap = this.rules.inline.code.exec(src); + + if (cap) { + var text = cap[2].replace(/\n/g, ' '); + var hasNonSpaceChars = /[^ ]/.test(text); + var hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' '); + + if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) { + text = text.substring(1, text.length - 1); + } + + text = _escape(text, true); + return { + type: 'codespan', + raw: cap[0], + text: text + }; + } + }; + + _proto.br = function br(src) { + var cap = this.rules.inline.br.exec(src); + + if (cap) { + return { + type: 'br', + raw: cap[0] + }; + } + }; + + _proto.del = function del(src) { + var cap = this.rules.inline.del.exec(src); + + if (cap) { + return { + type: 'del', + raw: cap[0], + text: cap[1] + }; + } + }; + + _proto.autolink = function autolink(src, mangle) { + var cap = this.rules.inline.autolink.exec(src); + + if (cap) { + var text, href; + + if (cap[2] === '@') { + text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]); + href = 'mailto:' + text; + } else { + text = _escape(cap[1]); + href = text; + } + + return { + type: 'link', + raw: cap[0], + text: text, + href: href, + tokens: [{ + type: 'text', + raw: text, + text: text + }] + }; + } + }; + + _proto.url = function url(src, mangle) { + var cap; + + if (cap = this.rules.inline.url.exec(src)) { + var text, href; + + if (cap[2] === '@') { + text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]); + href = 'mailto:' + text; + } else { + // do extended autolink path validation + var prevCapZero; + + do { + prevCapZero = cap[0]; + cap[0] = this.rules.inline._backpedal.exec(cap[0])[0]; + } while (prevCapZero !== cap[0]); + + text = _escape(cap[0]); + + if (cap[1] === 'www.') { + href = 'http://' + text; + } else { + href = text; + } + } + + return { + type: 'link', + raw: cap[0], + text: text, + href: href, + tokens: [{ + type: 'text', + raw: text, + text: text + }] + }; + } + }; + + _proto.inlineText = function inlineText(src, inRawBlock, smartypants) { + var cap = this.rules.inline.text.exec(src); + + if (cap) { + var text; + + if (inRawBlock) { + text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]; + } else { + text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]); + } + + return { + type: 'text', + raw: cap[0], + text: text + }; + } + }; + + return Tokenizer; + }(); + + var noopTest$1 = helpers.noopTest, + edit$1 = helpers.edit, + merge$1 = helpers.merge; + /** + * Block-Level Grammar + */ + + var block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/, + hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, + heading: /^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: '^ {0,3}(?:' // optional indentation + + '<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1) + + '|comment[^\\n]*(\\n+|$)' // (2) + + '|<\\?[\\s\\S]*?(?:\\?>\\n*|$)' // (3) + + '|<![A-Z][\\s\\S]*?(?:>\\n*|$)' // (4) + + '|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)' // (5) + + '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6) + + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag + + '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag + + ')', + def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, + nptable: noopTest$1, + table: noopTest$1, + lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, + // regex template, placeholders will be replaced according to different paragraph + // interruption rules of commonmark and the original markdown spec: + _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/, + text: /^[^\n]+/ + }; + block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; + block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; + block.def = edit$1(block.def).replace('label', block._label).replace('title', block._title).getRegex(); + block.bullet = /(?:[*+-]|\d{1,9}[.)])/; + block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/; + block.item = edit$1(block.item, 'gm').replace(/bull/g, block.bullet).getRegex(); + block.list = edit$1(block.list).replace(/bull/g, block.bullet).replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))').replace('def', '\\n+(?=' + block.def.source + ')').getRegex(); + block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul'; + block._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/; + block.html = edit$1(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); + block.paragraph = edit$1(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs + .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks + .getRegex(); + block.blockquote = edit$1(block.blockquote).replace('paragraph', block.paragraph).getRegex(); + /** + * Normal Block Grammar + */ + + block.normal = merge$1({}, block); + /** + * GFM Block Grammar + */ + + block.gfm = merge$1({}, block.normal, { + nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header + + ' {0,3}([-:]+ *\\|[-| :]*)' // Align + + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', + // Cells + table: '^ *\\|(.+)\\n' // Header + + ' {0,3}\\|?( *[-:]+[-| :]*)' // Align + + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells + + }); + block.gfm.nptable = edit$1(block.gfm.nptable).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks + .getRegex(); + block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks + .getRegex(); + /** + * Pedantic grammar (original John Gruber's loose markdown specification) + */ + + block.pedantic = merge$1({}, block.normal, { + html: edit$1('^ *(?:comment *(?:\\n|\\s*$)' + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag + + '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b').getRegex(), + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, + fences: noopTest$1, + // fences not supported + paragraph: edit$1(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex() + }); + /** + * Inline-Level Grammar + */ + + var inline = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: noopTest$1, + tag: '^comment' + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag + + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag + + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?> + + '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html> + + '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>', + // CDATA section + link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, + nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, + reflinkSearch: 'reflink|nolink(?!\\()', + strong: { + start: /^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/, + // (1) returns if starts w/ punctuation + middle: /^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/, + endAst: /[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/, + // last char can't be punct, or final * must also be followed by punct (or endline) + endUnd: /[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) + + }, + em: { + start: /^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/, + // (1) returns if starts w/ punctuation + middle: /^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/, + endAst: /[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/, + // last char can't be punct, or final * must also be followed by punct (or endline) + endUnd: /[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) + + }, + code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: noopTest$1, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/, + punctuation: /^([\s*punctuation])/ + }; // list of punctuation marks from common mark spec + // without * and _ to workaround cases with double emphasis + + inline._punctuation = '!"#$%&\'()+\\-.,/:;<=>?@\\[\\]`^{|}~'; + inline.punctuation = edit$1(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, <html> + + inline._blockSkip = '\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>'; + inline._overlapSkip = '__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*'; + inline._comment = edit$1(block._comment).replace('(?:-->|$)', '-->').getRegex(); + inline.em.start = edit$1(inline.em.start).replace(/punctuation/g, inline._punctuation).getRegex(); + inline.em.middle = edit$1(inline.em.middle).replace(/punctuation/g, inline._punctuation).replace(/overlapSkip/g, inline._overlapSkip).getRegex(); + inline.em.endAst = edit$1(inline.em.endAst, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); + inline.em.endUnd = edit$1(inline.em.endUnd, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); + inline.strong.start = edit$1(inline.strong.start).replace(/punctuation/g, inline._punctuation).getRegex(); + inline.strong.middle = edit$1(inline.strong.middle).replace(/punctuation/g, inline._punctuation).replace(/overlapSkip/g, inline._overlapSkip).getRegex(); + inline.strong.endAst = edit$1(inline.strong.endAst, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); + inline.strong.endUnd = edit$1(inline.strong.endUnd, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); + inline.blockSkip = edit$1(inline._blockSkip, 'g').getRegex(); + inline.overlapSkip = edit$1(inline._overlapSkip, 'g').getRegex(); + inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; + inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; + inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; + inline.autolink = edit$1(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex(); + inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; + inline.tag = edit$1(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex(); + inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; + inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/; + inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; + inline.link = edit$1(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex(); + inline.reflink = edit$1(inline.reflink).replace('label', inline._label).getRegex(); + inline.reflinkSearch = edit$1(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex(); + /** + * Normal Inline Grammar + */ + + inline.normal = merge$1({}, inline); + /** + * Pedantic Inline Grammar + */ + + inline.pedantic = merge$1({}, inline.normal, { + strong: { + start: /^__|\*\*/, + middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + endAst: /\*\*(?!\*)/g, + endUnd: /__(?!_)/g + }, + em: { + start: /^_|\*/, + middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, + endAst: /\*(?!\*)/g, + endUnd: /_(?!_)/g + }, + link: edit$1(/^!?\[(label)\]\((.*?)\)/).replace('label', inline._label).getRegex(), + reflink: edit$1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace('label', inline._label).getRegex() + }); + /** + * GFM Inline Grammar + */ + + inline.gfm = merge$1({}, inline.normal, { + escape: edit$1(inline.escape).replace('])', '~|])').getRegex(), + _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, + url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, + _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, + del: /^~+(?=\S)([\s\S]*?\S)~+/, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/ + }); + inline.gfm.url = edit$1(inline.gfm.url, 'i').replace('email', inline.gfm._extended_email).getRegex(); + /** + * GFM + Line Breaks Inline Grammar + */ + + inline.breaks = merge$1({}, inline.gfm, { + br: edit$1(inline.br).replace('{2,}', '*').getRegex(), + text: edit$1(inline.gfm.text).replace('\\b_', '\\b_| {2,}\\n').replace(/\{2,\}/g, '*').getRegex() + }); + var rules = { + block: block, + inline: inline + }; + + var defaults$2 = defaults.defaults; + var block$1 = rules.block, + inline$1 = rules.inline; + /** + * smartypants text replacement + */ + + function smartypants(text) { + return text // em-dashes + .replace(/---/g, "\u2014") // en-dashes + .replace(/--/g, "\u2013") // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // closing singles & apostrophes + .replace(/'/g, "\u2019") // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201C") // closing doubles + .replace(/"/g, "\u201D") // ellipses + .replace(/\.{3}/g, "\u2026"); + } + /** + * mangle email addresses + */ + + + function mangle(text) { + var out = '', + i, + ch; + var l = text.length; + + for (i = 0; i < l; i++) { + ch = text.charCodeAt(i); + + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + + out += '&#' + ch + ';'; + } + + return out; + } + /** + * Block Lexer + */ + + + var Lexer_1 = /*#__PURE__*/function () { + function Lexer(options) { + this.tokens = []; + this.tokens.links = Object.create(null); + this.options = options || defaults$2; + this.options.tokenizer = this.options.tokenizer || new Tokenizer_1(); + this.tokenizer = this.options.tokenizer; + this.tokenizer.options = this.options; + var rules = { + block: block$1.normal, + inline: inline$1.normal + }; + + if (this.options.pedantic) { + rules.block = block$1.pedantic; + rules.inline = inline$1.pedantic; + } else if (this.options.gfm) { + rules.block = block$1.gfm; + + if (this.options.breaks) { + rules.inline = inline$1.breaks; + } else { + rules.inline = inline$1.gfm; + } + } + + this.tokenizer.rules = rules; + } + /** + * Expose Rules + */ + + + /** + * Static Lex Method + */ + Lexer.lex = function lex(src, options) { + var lexer = new Lexer(options); + return lexer.lex(src); + } + /** + * Static Lex Inline Method + */ + ; + + Lexer.lexInline = function lexInline(src, options) { + var lexer = new Lexer(options); + return lexer.inlineTokens(src); + } + /** + * Preprocessing + */ + ; + + var _proto = Lexer.prototype; + + _proto.lex = function lex(src) { + src = src.replace(/\r\n|\r/g, '\n').replace(/\t/g, ' '); + this.blockTokens(src, this.tokens, true); + this.inline(this.tokens); + return this.tokens; + } + /** + * Lexing + */ + ; + + _proto.blockTokens = function blockTokens(src, tokens, top) { + if (tokens === void 0) { + tokens = []; + } + + if (top === void 0) { + top = true; + } + + src = src.replace(/^ +$/gm, ''); + var token, i, l, lastToken; + + while (src) { + // newline + if (token = this.tokenizer.space(src)) { + src = src.substring(token.raw.length); + + if (token.type) { + tokens.push(token); + } + + continue; + } // code + + + if (token = this.tokenizer.code(src, tokens)) { + src = src.substring(token.raw.length); + + if (token.type) { + tokens.push(token); + } else { + lastToken = tokens[tokens.length - 1]; + lastToken.raw += '\n' + token.raw; + lastToken.text += '\n' + token.text; + } + + continue; + } // fences + + + if (token = this.tokenizer.fences(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // heading + + + if (token = this.tokenizer.heading(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // table no leading pipe (gfm) + + + if (token = this.tokenizer.nptable(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // hr + + + if (token = this.tokenizer.hr(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // blockquote + + + if (token = this.tokenizer.blockquote(src)) { + src = src.substring(token.raw.length); + token.tokens = this.blockTokens(token.text, [], top); + tokens.push(token); + continue; + } // list + + + if (token = this.tokenizer.list(src)) { + src = src.substring(token.raw.length); + l = token.items.length; + + for (i = 0; i < l; i++) { + token.items[i].tokens = this.blockTokens(token.items[i].text, [], false); + } + + tokens.push(token); + continue; + } // html + + + if (token = this.tokenizer.html(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // def + + + if (top && (token = this.tokenizer.def(src))) { + src = src.substring(token.raw.length); + + if (!this.tokens.links[token.tag]) { + this.tokens.links[token.tag] = { + href: token.href, + title: token.title + }; + } + + continue; + } // table (gfm) + + + if (token = this.tokenizer.table(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // lheading + + + if (token = this.tokenizer.lheading(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // top-level paragraph + + + if (top && (token = this.tokenizer.paragraph(src))) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // text + + + if (token = this.tokenizer.text(src, tokens)) { + src = src.substring(token.raw.length); + + if (token.type) { + tokens.push(token); + } else { + lastToken = tokens[tokens.length - 1]; + lastToken.raw += '\n' + token.raw; + lastToken.text += '\n' + token.text; + } + + continue; + } + + if (src) { + var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); + + if (this.options.silent) { + console.error(errMsg); + break; + } else { + throw new Error(errMsg); + } + } + } + + return tokens; + }; + + _proto.inline = function inline(tokens) { + var i, j, k, l2, row, token; + var l = tokens.length; + + for (i = 0; i < l; i++) { + token = tokens[i]; + + switch (token.type) { + case 'paragraph': + case 'text': + case 'heading': + { + token.tokens = []; + this.inlineTokens(token.text, token.tokens); + break; + } + + case 'table': + { + token.tokens = { + header: [], + cells: [] + }; // header + + l2 = token.header.length; + + for (j = 0; j < l2; j++) { + token.tokens.header[j] = []; + this.inlineTokens(token.header[j], token.tokens.header[j]); + } // cells + + + l2 = token.cells.length; + + for (j = 0; j < l2; j++) { + row = token.cells[j]; + token.tokens.cells[j] = []; + + for (k = 0; k < row.length; k++) { + token.tokens.cells[j][k] = []; + this.inlineTokens(row[k], token.tokens.cells[j][k]); + } + } + + break; + } + + case 'blockquote': + { + this.inline(token.tokens); + break; + } + + case 'list': + { + l2 = token.items.length; + + for (j = 0; j < l2; j++) { + this.inline(token.items[j].tokens); + } + + break; + } + } + } + + return tokens; + } + /** + * Lexing/Compiling + */ + ; + + _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock, prevChar) { + if (tokens === void 0) { + tokens = []; + } + + if (inLink === void 0) { + inLink = false; + } + + if (inRawBlock === void 0) { + inRawBlock = false; + } + + if (prevChar === void 0) { + prevChar = ''; + } + + var token; // String with links masked to avoid interference with em and strong + + var maskedSrc = src; + var match; // Mask out reflinks + + if (this.tokens.links) { + var links = Object.keys(this.tokens.links); + + if (links.length > 0) { + while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) { + if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) { + maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex); + } + } + } + } // Mask out other blocks + + + while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) { + maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + } + + while (src) { + // escape + if (token = this.tokenizer.escape(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // tag + + + if (token = this.tokenizer.tag(src, inLink, inRawBlock)) { + src = src.substring(token.raw.length); + inLink = token.inLink; + inRawBlock = token.inRawBlock; + tokens.push(token); + continue; + } // link + + + if (token = this.tokenizer.link(src)) { + src = src.substring(token.raw.length); + + if (token.type === 'link') { + token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); + } + + tokens.push(token); + continue; + } // reflink, nolink + + + if (token = this.tokenizer.reflink(src, this.tokens.links)) { + src = src.substring(token.raw.length); + + if (token.type === 'link') { + token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); + } + + tokens.push(token); + continue; + } // strong + + + if (token = this.tokenizer.strong(src, maskedSrc, prevChar)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } // em + + + if (token = this.tokenizer.em(src, maskedSrc, prevChar)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } // code + + + if (token = this.tokenizer.codespan(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // br + + + if (token = this.tokenizer.br(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // del (gfm) + + + if (token = this.tokenizer.del(src)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } // autolink + + + if (token = this.tokenizer.autolink(src, mangle)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // url (gfm) + + + if (!inLink && (token = this.tokenizer.url(src, mangle))) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } // text + + + if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) { + src = src.substring(token.raw.length); + prevChar = token.raw.slice(-1); + tokens.push(token); + continue; + } + + if (src) { + var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); + + if (this.options.silent) { + console.error(errMsg); + break; + } else { + throw new Error(errMsg); + } + } + } + + return tokens; + }; + + _createClass(Lexer, null, [{ + key: "rules", + get: function get() { + return { + block: block$1, + inline: inline$1 + }; + } + }]); + + return Lexer; + }(); + + var defaults$3 = defaults.defaults; + var cleanUrl$1 = helpers.cleanUrl, + escape$1 = helpers.escape; + /** + * Renderer + */ + + var Renderer_1 = /*#__PURE__*/function () { + function Renderer(options) { + this.options = options || defaults$3; + } + + var _proto = Renderer.prototype; + + _proto.code = function code(_code, infostring, escaped) { + var lang = (infostring || '').match(/\S*/)[0]; + + if (this.options.highlight) { + var out = this.options.highlight(_code, lang); + + if (out != null && out !== _code) { + escaped = true; + _code = out; + } + } + + if (!lang) { + return '<pre><code>' + (escaped ? _code : escape$1(_code, true)) + '</code></pre>\n'; + } + + return '<pre><code class="' + this.options.langPrefix + escape$1(lang, true) + '">' + (escaped ? _code : escape$1(_code, true)) + '</code></pre>\n'; + }; + + _proto.blockquote = function blockquote(quote) { + return '<blockquote>\n' + quote + '</blockquote>\n'; + }; + + _proto.html = function html(_html) { + return _html; + }; + + _proto.heading = function heading(text, level, raw, slugger) { + if (this.options.headerIds) { + return '<h' + level + ' id="' + this.options.headerPrefix + slugger.slug(raw) + '">' + text + '</h' + level + '>\n'; + } // ignore IDs + + + return '<h' + level + '>' + text + '</h' + level + '>\n'; + }; + + _proto.hr = function hr() { + return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; + }; + + _proto.list = function list(body, ordered, start) { + var type = ordered ? 'ol' : 'ul', + startatt = ordered && start !== 1 ? ' start="' + start + '"' : ''; + return '<' + type + startatt + '>\n' + body + '</' + type + '>\n'; + }; + + _proto.listitem = function listitem(text) { + return '<li>' + text + '</li>\n'; + }; + + _proto.checkbox = function checkbox(checked) { + return '<input ' + (checked ? 'checked="" ' : '') + 'disabled="" type="checkbox"' + (this.options.xhtml ? ' /' : '') + '> '; + }; + + _proto.paragraph = function paragraph(text) { + return '<p>' + text + '</p>\n'; + }; + + _proto.table = function table(header, body) { + if (body) body = '<tbody>' + body + '</tbody>'; + return '<table>\n' + '<thead>\n' + header + '</thead>\n' + body + '</table>\n'; + }; + + _proto.tablerow = function tablerow(content) { + return '<tr>\n' + content + '</tr>\n'; + }; + + _proto.tablecell = function tablecell(content, flags) { + var type = flags.header ? 'th' : 'td'; + var tag = flags.align ? '<' + type + ' align="' + flags.align + '">' : '<' + type + '>'; + return tag + content + '</' + type + '>\n'; + } // span level renderer + ; + + _proto.strong = function strong(text) { + return '<strong>' + text + '</strong>'; + }; + + _proto.em = function em(text) { + return '<em>' + text + '</em>'; + }; + + _proto.codespan = function codespan(text) { + return '<code>' + text + '</code>'; + }; + + _proto.br = function br() { + return this.options.xhtml ? '<br/>' : '<br>'; + }; + + _proto.del = function del(text) { + return '<del>' + text + '</del>'; + }; + + _proto.link = function link(href, title, text) { + href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href); + + if (href === null) { + return text; + } + + var out = '<a href="' + escape$1(href) + '"'; + + if (title) { + out += ' title="' + title + '"'; + } + + out += '>' + text + '</a>'; + return out; + }; + + _proto.image = function image(href, title, text) { + href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href); + + if (href === null) { + return text; + } + + var out = '<img src="' + href + '" alt="' + text + '"'; + + if (title) { + out += ' title="' + title + '"'; + } + + out += this.options.xhtml ? '/>' : '>'; + return out; + }; + + _proto.text = function text(_text) { + return _text; + }; + + return Renderer; + }(); + + /** + * TextRenderer + * returns only the textual part of the token + */ + var TextRenderer_1 = /*#__PURE__*/function () { + function TextRenderer() {} + + var _proto = TextRenderer.prototype; + + // no need for block level renderers + _proto.strong = function strong(text) { + return text; + }; + + _proto.em = function em(text) { + return text; + }; + + _proto.codespan = function codespan(text) { + return text; + }; + + _proto.del = function del(text) { + return text; + }; + + _proto.html = function html(text) { + return text; + }; + + _proto.text = function text(_text) { + return _text; + }; + + _proto.link = function link(href, title, text) { + return '' + text; + }; + + _proto.image = function image(href, title, text) { + return '' + text; + }; + + _proto.br = function br() { + return ''; + }; + + return TextRenderer; + }(); + + /** + * Slugger generates header id + */ + var Slugger_1 = /*#__PURE__*/function () { + function Slugger() { + this.seen = {}; + } + + var _proto = Slugger.prototype; + + _proto.serialize = function serialize(value) { + return value.toLowerCase().trim() // remove html tags + .replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars + .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-'); + } + /** + * Finds the next safe (unique) slug to use + */ + ; + + _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) { + var slug = originalSlug; + var occurenceAccumulator = 0; + + if (this.seen.hasOwnProperty(slug)) { + occurenceAccumulator = this.seen[originalSlug]; + + do { + occurenceAccumulator++; + slug = originalSlug + '-' + occurenceAccumulator; + } while (this.seen.hasOwnProperty(slug)); + } + + if (!isDryRun) { + this.seen[originalSlug] = occurenceAccumulator; + this.seen[slug] = 0; + } + + return slug; + } + /** + * Convert string to unique id + * @param {object} options + * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator. + */ + ; + + _proto.slug = function slug(value, options) { + if (options === void 0) { + options = {}; + } + + var slug = this.serialize(value); + return this.getNextSafeSlug(slug, options.dryrun); + }; + + return Slugger; + }(); + + var defaults$4 = defaults.defaults; + var unescape$1 = helpers.unescape; + /** + * Parsing & Compiling + */ + + var Parser_1 = /*#__PURE__*/function () { + function Parser(options) { + this.options = options || defaults$4; + this.options.renderer = this.options.renderer || new Renderer_1(); + this.renderer = this.options.renderer; + this.renderer.options = this.options; + this.textRenderer = new TextRenderer_1(); + this.slugger = new Slugger_1(); + } + /** + * Static Parse Method + */ + + + Parser.parse = function parse(tokens, options) { + var parser = new Parser(options); + return parser.parse(tokens); + } + /** + * Static Parse Inline Method + */ + ; + + Parser.parseInline = function parseInline(tokens, options) { + var parser = new Parser(options); + return parser.parseInline(tokens); + } + /** + * Parse Loop + */ + ; + + var _proto = Parser.prototype; + + _proto.parse = function parse(tokens, top) { + if (top === void 0) { + top = true; + } + + var out = '', + i, + j, + k, + l2, + l3, + row, + cell, + header, + body, + token, + ordered, + start, + loose, + itemBody, + item, + checked, + task, + checkbox; + var l = tokens.length; + + for (i = 0; i < l; i++) { + token = tokens[i]; + + switch (token.type) { + case 'space': + { + continue; + } + + case 'hr': + { + out += this.renderer.hr(); + continue; + } + + case 'heading': + { + out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape$1(this.parseInline(token.tokens, this.textRenderer)), this.slugger); + continue; + } + + case 'code': + { + out += this.renderer.code(token.text, token.lang, token.escaped); + continue; + } + + case 'table': + { + header = ''; // header + + cell = ''; + l2 = token.header.length; + + for (j = 0; j < l2; j++) { + cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), { + header: true, + align: token.align[j] + }); + } + + header += this.renderer.tablerow(cell); + body = ''; + l2 = token.cells.length; + + for (j = 0; j < l2; j++) { + row = token.tokens.cells[j]; + cell = ''; + l3 = row.length; + + for (k = 0; k < l3; k++) { + cell += this.renderer.tablecell(this.parseInline(row[k]), { + header: false, + align: token.align[k] + }); + } + + body += this.renderer.tablerow(cell); + } + + out += this.renderer.table(header, body); + continue; + } + + case 'blockquote': + { + body = this.parse(token.tokens); + out += this.renderer.blockquote(body); + continue; + } + + case 'list': + { + ordered = token.ordered; + start = token.start; + loose = token.loose; + l2 = token.items.length; + body = ''; + + for (j = 0; j < l2; j++) { + item = token.items[j]; + checked = item.checked; + task = item.task; + itemBody = ''; + + if (item.task) { + checkbox = this.renderer.checkbox(checked); + + if (loose) { + if (item.tokens.length > 0 && item.tokens[0].type === 'text') { + item.tokens[0].text = checkbox + ' ' + item.tokens[0].text; + + if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') { + item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text; + } + } else { + item.tokens.unshift({ + type: 'text', + text: checkbox + }); + } + } else { + itemBody += checkbox; + } + } + + itemBody += this.parse(item.tokens, loose); + body += this.renderer.listitem(itemBody, task, checked); + } + + out += this.renderer.list(body, ordered, start); + continue; + } + + case 'html': + { + // TODO parse inline content if parameter markdown=1 + out += this.renderer.html(token.text); + continue; + } + + case 'paragraph': + { + out += this.renderer.paragraph(this.parseInline(token.tokens)); + continue; + } + + case 'text': + { + body = token.tokens ? this.parseInline(token.tokens) : token.text; + + while (i + 1 < l && tokens[i + 1].type === 'text') { + token = tokens[++i]; + body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text); + } + + out += top ? this.renderer.paragraph(body) : body; + continue; + } + + default: + { + var errMsg = 'Token with "' + token.type + '" type was not found.'; + + if (this.options.silent) { + console.error(errMsg); + return; + } else { + throw new Error(errMsg); + } + } + } + } + + return out; + } + /** + * Parse Inline Tokens + */ + ; + + _proto.parseInline = function parseInline(tokens, renderer) { + renderer = renderer || this.renderer; + var out = '', + i, + token; + var l = tokens.length; + + for (i = 0; i < l; i++) { + token = tokens[i]; + + switch (token.type) { + case 'escape': + { + out += renderer.text(token.text); + break; + } + + case 'html': + { + out += renderer.html(token.text); + break; + } + + case 'link': + { + out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer)); + break; + } + + case 'image': + { + out += renderer.image(token.href, token.title, token.text); + break; + } + + case 'strong': + { + out += renderer.strong(this.parseInline(token.tokens, renderer)); + break; + } + + case 'em': + { + out += renderer.em(this.parseInline(token.tokens, renderer)); + break; + } + + case 'codespan': + { + out += renderer.codespan(token.text); + break; + } + + case 'br': + { + out += renderer.br(); + break; + } + + case 'del': + { + out += renderer.del(this.parseInline(token.tokens, renderer)); + break; + } + + case 'text': + { + out += renderer.text(token.text); + break; + } + + default: + { + var errMsg = 'Token with "' + token.type + '" type was not found.'; + + if (this.options.silent) { + console.error(errMsg); + return; + } else { + throw new Error(errMsg); + } + } + } + } + + return out; + }; + + return Parser; + }(); + + var merge$2 = helpers.merge, + checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation, + escape$2 = helpers.escape; + var getDefaults = defaults.getDefaults, + changeDefaults = defaults.changeDefaults, + defaults$5 = defaults.defaults; + /** + * Marked + */ + + function marked(src, opt, callback) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked(): input parameter is undefined or null'); + } + + if (typeof src !== 'string') { + throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'); + } + + if (typeof opt === 'function') { + callback = opt; + opt = null; + } + + opt = merge$2({}, marked.defaults, opt || {}); + checkSanitizeDeprecation$1(opt); + + if (callback) { + var highlight = opt.highlight; + var tokens; + + try { + tokens = Lexer_1.lex(src, opt); + } catch (e) { + return callback(e); + } + + var done = function done(err) { + var out; + + if (!err) { + try { + out = Parser_1.parse(tokens, opt); + } catch (e) { + err = e; + } + } + + opt.highlight = highlight; + return err ? callback(err) : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + if (!tokens.length) return done(); + var pending = 0; + marked.walkTokens(tokens, function (token) { + if (token.type === 'code') { + pending++; + setTimeout(function () { + highlight(token.text, token.lang, function (err, code) { + if (err) { + return done(err); + } + + if (code != null && code !== token.text) { + token.text = code; + token.escaped = true; + } + + pending--; + + if (pending === 0) { + done(); + } + }); + }, 0); + } + }); + + if (pending === 0) { + done(); + } + + return; + } + + try { + var _tokens = Lexer_1.lex(src, opt); + + if (opt.walkTokens) { + marked.walkTokens(_tokens, opt.walkTokens); + } + + return Parser_1.parse(_tokens, opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + + if (opt.silent) { + return '<p>An error occurred:</p><pre>' + escape$2(e.message + '', true) + '</pre>'; + } + + throw e; + } + } + /** + * Options + */ + + + marked.options = marked.setOptions = function (opt) { + merge$2(marked.defaults, opt); + changeDefaults(marked.defaults); + return marked; + }; + + marked.getDefaults = getDefaults; + marked.defaults = defaults$5; + /** + * Use Extension + */ + + marked.use = function (extension) { + var opts = merge$2({}, extension); + + if (extension.renderer) { + (function () { + var renderer = marked.defaults.renderer || new Renderer_1(); + + var _loop = function _loop(prop) { + var prevRenderer = renderer[prop]; + + renderer[prop] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var ret = extension.renderer[prop].apply(renderer, args); + + if (ret === false) { + ret = prevRenderer.apply(renderer, args); + } + + return ret; + }; + }; + + for (var prop in extension.renderer) { + _loop(prop); + } + + opts.renderer = renderer; + })(); + } + + if (extension.tokenizer) { + (function () { + var tokenizer = marked.defaults.tokenizer || new Tokenizer_1(); + + var _loop2 = function _loop2(prop) { + var prevTokenizer = tokenizer[prop]; + + tokenizer[prop] = function () { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + var ret = extension.tokenizer[prop].apply(tokenizer, args); + + if (ret === false) { + ret = prevTokenizer.apply(tokenizer, args); + } + + return ret; + }; + }; + + for (var prop in extension.tokenizer) { + _loop2(prop); + } + + opts.tokenizer = tokenizer; + })(); + } + + if (extension.walkTokens) { + var walkTokens = marked.defaults.walkTokens; + + opts.walkTokens = function (token) { + extension.walkTokens(token); + + if (walkTokens) { + walkTokens(token); + } + }; + } + + marked.setOptions(opts); + }; + /** + * Run callback for every token + */ + + + marked.walkTokens = function (tokens, callback) { + for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) { + var token = _step.value; + callback(token); + + switch (token.type) { + case 'table': + { + for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) { + var cell = _step2.value; + marked.walkTokens(cell, callback); + } + + for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) { + var row = _step3.value; + + for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) { + var _cell = _step4.value; + marked.walkTokens(_cell, callback); + } + } + + break; + } + + case 'list': + { + marked.walkTokens(token.items, callback); + break; + } + + default: + { + if (token.tokens) { + marked.walkTokens(token.tokens, callback); + } + } + } + } + }; + /** + * Parse Inline + */ + + + marked.parseInline = function (src, opt) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked.parseInline(): input parameter is undefined or null'); + } + + if (typeof src !== 'string') { + throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'); + } + + opt = merge$2({}, marked.defaults, opt || {}); + checkSanitizeDeprecation$1(opt); + + try { + var tokens = Lexer_1.lexInline(src, opt); + + if (opt.walkTokens) { + marked.walkTokens(tokens, opt.walkTokens); + } + + return Parser_1.parseInline(tokens, opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + + if (opt.silent) { + return '<p>An error occurred:</p><pre>' + escape$2(e.message + '', true) + '</pre>'; + } + + throw e; + } + }; + /** + * Expose + */ + + + marked.Parser = Parser_1; + marked.parser = Parser_1.parse; + marked.Renderer = Renderer_1; + marked.TextRenderer = TextRenderer_1; + marked.Lexer = Lexer_1; + marked.lexer = Lexer_1.lex; + marked.Tokenizer = Tokenizer_1; + marked.Slugger = Slugger_1; + marked.parse = marked; + var marked_1 = marked; + + return marked_1; + +}))); diff --git a/node_modules/marked/man/marked.1 b/node_modules/marked/man/marked.1 @@ -0,0 +1,111 @@ +.ds q \N'34' +.TH marked 1 + +.SH NAME +marked \- a javascript markdown parser + +.SH SYNOPSIS +.B marked +[\-o \fI<output>\fP] [\-i \fI<input>\fP] [\-\-help] +[\-\-tokens] [\-\-pedantic] [\-\-gfm] +[\-\-breaks] [\-\-sanitize] +[\-\-smart\-lists] [\-\-lang\-prefix \fI<prefix>\fP] +[\-\-no\-etc...] [\-\-silent] [\fIfilename\fP] + +.SH DESCRIPTION +.B marked +is a full-featured javascript markdown parser, built for speed. +It also includes multiple GFM features. + +.SH EXAMPLES +.TP +cat in.md | marked > out.html +.TP +echo "hello *world*" | marked +.TP +marked \-o out.html \-i in.md \-\-gfm +.TP +marked \-\-output="hello world.html" \-i in.md \-\-no-breaks + +.SH OPTIONS +.TP +.BI \-o,\ \-\-output\ [\fIoutput\fP] +Specify file output. If none is specified, write to stdout. +.TP +.BI \-i,\ \-\-input\ [\fIinput\fP] +Specify file input, otherwise use last argument as input file. +If no input file is specified, read from stdin. +.TP +.BI \-\-test +Makes sure the test(s) pass. +.RS +.PP +.B \-\-glob [\fIfile\fP] +Specify which test to use. +.PP +.B \-\-fix +Fixes tests. +.PP +.B \-\-bench +Benchmarks the test(s). +.PP +.B \-\-time +Times The test(s). +.PP +.B \-\-minified +Runs test file(s) as minified. +.PP +.B \-\-stop +Stop process if a test fails. +.RE +.TP +.BI \-t,\ \-\-tokens +Output a token stream instead of html. +.TP +.BI \-\-pedantic +Conform to obscure parts of markdown.pl as much as possible. +Don't fix original markdown bugs. +.TP +.BI \-\-gfm +Enable github flavored markdown. +.TP +.BI \-\-breaks +Enable GFM line breaks. Only works with the gfm option. +.TP +.BI \-\-sanitize +Sanitize output. Ignore any HTML input. +.TP +.BI \-\-smart\-lists +Use smarter list behavior than the original markdown. +.TP +.BI \-\-lang\-prefix\ [\fIprefix\fP] +Set the prefix for code block classes. +.TP +.BI \-\-mangle +Mangle email addresses. +.TP +.BI \-\-no\-sanitize,\ \-no-etc... +The inverse of any of the marked options above. +.TP +.BI \-\-silent +Silence error output. +.TP +.BI \-h,\ \-\-help +Display help information. + +.SH CONFIGURATION +For configuring and running programmatically. + +.B Example + + require('marked')('*foo*', { gfm: true }); + +.SH BUGS +Please report any bugs to https://github.com/markedjs/marked. + +.SH LICENSE +Copyright (c) 2011-2014, Christopher Jeffrey (MIT License). + +.SH "SEE ALSO" +.BR markdown(1), +.BR node.js(1) diff --git a/node_modules/marked/man/marked.1.txt b/node_modules/marked/man/marked.1.txt @@ -0,0 +1,96 @@ +marked(1) General Commands Manual marked(1) + +NAME + marked - a javascript markdown parser + +SYNOPSIS + marked [-o <output>] [-i <input>] [--help] [--tokens] [--pedantic] + [--gfm] [--breaks] [--sanitize] [--smart-lists] [--lang-prefix <pre- + fix>] [--no-etc...] [--silent] [filename] + + +DESCRIPTION + marked is a full-featured javascript markdown parser, built for speed. + It also includes multiple GFM features. + +EXAMPLES + cat in.md | marked > out.html + + echo "hello *world*" | marked + + marked -o out.html -i in.md --gfm + + marked --output="hello world.html" -i in.md --no-breaks + +OPTIONS + -o, --output [output] + Specify file output. If none is specified, write to stdout. + + -i, --input [input] + Specify file input, otherwise use last argument as input file. + If no input file is specified, read from stdin. + + --test Makes sure the test(s) pass. + + --glob [file] Specify which test to use. + + --fix Fixes tests. + + --bench Benchmarks the test(s). + + --time Times The test(s). + + --minified Runs test file(s) as minified. + + --stop Stop process if a test fails. + + -t, --tokens + Output a token stream instead of html. + + --pedantic + Conform to obscure parts of markdown.pl as much as possible. + Don't fix original markdown bugs. + + --gfm Enable github flavored markdown. + + --breaks + Enable GFM line breaks. Only works with the gfm option. + + --sanitize + Sanitize output. Ignore any HTML input. + + --smart-lists + Use smarter list behavior than the original markdown. + + --lang-prefix [prefix] + Set the prefix for code block classes. + + --mangle + Mangle email addresses. + + --no-sanitize, -no-etc... + The inverse of any of the marked options above. + + --silent + Silence error output. + + -h, --help + Display help information. + +CONFIGURATION + For configuring and running programmatically. + + Example + + require('marked')('*foo*', { gfm: true }); + +BUGS + Please report any bugs to https://github.com/markedjs/marked. + +LICENSE + Copyright (c) 2011-2014, Christopher Jeffrey (MIT License). + +SEE ALSO + markdown(1), node.js(1) + + marked(1) diff --git a/node_modules/marked/marked.min.js b/node_modules/marked/marked.min.js @@ -0,0 +1,6 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2020, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).marked=t()}(this,function(){"use strict";function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(n=e[Symbol.iterator]()).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e){return c[e]}var e,t=(function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:e(),getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}}(e={exports:{}}),e.exports),r=(t.defaults,t.getDefaults,t.changeDefaults,/[&<>"']/),l=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function p(e){return e.replace(u,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var h=/(^|[^\[])\^/g;var f=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var k={},b=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){k[" "+e]||(b.test(e)?k[" "+e]=e+"/":k[" "+e]=w(e,"/",!0));var n=-1===(e=k[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(x,"$1")+t:e+t}function w(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var s=e.charAt(r-i-1);if(s!==t||n){if(s===t||!n)break;i++}else i++}return e.substr(0,r-i)}var _=function(e,t){if(t){if(r.test(e))return e.replace(l,n)}else if(a.test(e))return e.replace(o,n);return e},y=p,z=function(n,e){n=n.source||n,e=e||"";var r={replace:function(e,t){return t=(t=t.source||t).replace(h,"$1"),n=n.replace(e,t),r},getRegex:function(){return new RegExp(n,e)}};return r},S=function(e,t,n){if(e){var r;try{r=decodeURIComponent(p(n)).replace(f,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!d.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},$={exec:function(){}},A=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},R=function(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;0<=--i&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},T=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1},I=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},Z=t.defaults,q=w,O=R,C=_,U=T;function j(e,t,n){var r=t.href,i=t.title?C(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:s}:{type:"image",raw:n,href:r,title:i,text:C(s)}}var E=function(){function e(e){this.options=e||Z}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return 1<t[0].length?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:q(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map(function(e){var t=e.match(/^\s+/);return null!==t&&t[0].length>=r.length?e.slice(r.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:O(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){for(var r=n.align.length,i=0;i<r;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(r=n.cells.length,i=0;i<r;i++)n.cells[i]=O(n.cells[i],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,s,l,a,o,c=t[0],u=t[2],p=1<u.length,h=")"===u[u.length-1],g={type:"list",raw:c,ordered:p,start:p?+u.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),d=!1,k=f.length,b=0;b<k;b++)r=(c=n=f[b]).length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),b!==k-1&&(i=this.rules.block.bullet.exec(f[b+1])[0],(p?1===i.length||!h&&")"===i[i.length-1]:1<i.length||this.options.smartLists&&i!==u)&&(s=f.slice(b+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),b=k-1)),l=d||/\n\n(?!\s*$)/.test(n),b!==k-1&&(d="\n"===n.charAt(n.length-1),l=l||d),l&&(g.loose=!0),o=void 0,(a=/^\[[ xX]\] /.test(n))&&(o=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),g.items.push({type:"list_item",raw:c,task:a,checked:o,loose:l,text:n});return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):C(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:O(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];for(var r=n.align.length,i=0;i<r;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(r=n.cells.length,i=0;i<r;i++)n.cells[i]=O(n.cells[i].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:C(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):C(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n,r=U(t[2],"()");-1<r&&(n=(0===t[0].indexOf("!")?5:4)+t[1].length+r,t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,n).trim(),t[3]="");var i,s=t[2],l="";return l=this.options.pedantic?(i=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s),i?(s=i[1],i[3]):""):t[3]?t[3].slice(1,-1):"",j(t,{href:(s=s.trim().replace(/^<([\s\S]*)>$/,"$1"))?s.replace(this.rules.inline._escapes,"$1"):s,title:l?l.replace(this.rules.inline._escapes,"$1"):l},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if((r=t[r.toLowerCase()])&&r.href)return j(n,r,n[0]);var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,s="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(r=s.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,s="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(r=s.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=C(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n=this.rules.inline.autolink.exec(e);if(n){var r,i="@"===n[2]?"mailto:"+(r=C(this.options.mangle?t(n[1]):n[1])):r=C(n[1]);return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.url=function(e,t){var n,r,i,s;if(n=this.rules.inline.url.exec(e)){if("@"===n[2])i="mailto:"+(r=C(this.options.mangle?t(n[0]):n[0]));else{for(;s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],s!==n[0];);r=C(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r=this.rules.inline.text.exec(e);if(r){var i=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):C(r[0]):r[0]:C(this.options.smartypants?n(r[0]):r[0]);return{type:"text",raw:r[0],text:i}}},e}(),D=$,P=z,L=A,N={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:D,table:D,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};N.def=P(N.def).replace("label",N._label).replace("title",N._title).getRegex(),N.bullet=/(?:[*+-]|\d{1,9}[.)])/,N.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,N.item=P(N.item,"gm").replace(/bull/g,N.bullet).getRegex(),N.list=P(N.list).replace(/bull/g,N.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+N.def.source+")").getRegex(),N._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",N._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,N.html=P(N.html,"i").replace("comment",N._comment).replace("tag",N._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N.paragraph=P(N._paragraph).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",N._tag).getRegex(),N.blockquote=P(N.blockquote).replace("paragraph",N.paragraph).getRegex(),N.normal=L({},N),N.gfm=L({},N.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),N.gfm.nptable=P(N.gfm.nptable).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",N._tag).getRegex(),N.gfm.table=P(N.gfm.table).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",N._tag).getRegex(),N.pedantic=L({},N.normal,{html:P("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",N._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:D,paragraph:P(N.normal._paragraph).replace("hr",N.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",N.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:D,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:D,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};B.punctuation=P(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",B._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",B._comment=P(N._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),B.em.start=P(B.em.start).replace(/punctuation/g,B._punctuation).getRegex(),B.em.middle=P(B.em.middle).replace(/punctuation/g,B._punctuation).replace(/overlapSkip/g,B._overlapSkip).getRegex(),B.em.endAst=P(B.em.endAst,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.em.endUnd=P(B.em.endUnd,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.strong.start=P(B.strong.start).replace(/punctuation/g,B._punctuation).getRegex(),B.strong.middle=P(B.strong.middle).replace(/punctuation/g,B._punctuation).replace(/overlapSkip/g,B._overlapSkip).getRegex(),B.strong.endAst=P(B.strong.endAst,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.strong.endUnd=P(B.strong.endUnd,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=P(B._blockSkip,"g").getRegex(),B.overlapSkip=P(B._overlapSkip,"g").getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,B.autolink=P(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=P(B.tag).replace("comment",B._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=P(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=P(B.reflink).replace("label",B._label).getRegex(),B.reflinkSearch=P(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=L({},B),B.pedantic=L({},B.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=L({},B.normal,{escape:P(B.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),B.gfm.url=P(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=L({},B.gfm,{br:P(B.br).replace("{2,}","*").getRegex(),text:P(B.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var F={block:N,inline:B},M=t.defaults,W=F.block,X=F.inline;function G(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function V(e){for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),.5<Math.random()&&(t="x"+t.toString(16)),n+="&#"+t+";";return n}var H=function(){function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:X.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=X.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=X.breaks:t.inline=X.gfm),this.tokenizer.rules=t}n.lex=function(e,t){return new n(t).lex(e)},n.lexInline=function(e,t){return new n(t).inlineTokens(e)};var e,t,r,i=n.prototype;return i.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.blockTokens=function(e,t,n){var r,i,s,l;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((l=t[t.length-1]).raw+="\n"+r.raw,l.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),s=r.items.length,i=0;i<s;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((l=t[t.length-1]).raw+="\n"+r.raw,l.text+="\n"+r.text);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return t},i.inline=function(e){for(var t,n,r,i,s,l=e.length,a=0;a<l;a++)switch((s=e[a]).type){case"paragraph":case"text":case"heading":s.tokens=[],this.inlineTokens(s.text,s.tokens);break;case"table":for(s.tokens={header:[],cells:[]},r=s.header.length,t=0;t<r;t++)s.tokens.header[t]=[],this.inlineTokens(s.header[t],s.tokens.header[t]);for(r=s.cells.length,t=0;t<r;t++)for(i=s.cells[t],s.tokens.cells[t]=[],n=0;n<i.length;n++)s.tokens.cells[t][n]=[],this.inlineTokens(i[n],s.tokens.cells[t][n]);break;case"blockquote":this.inline(s.tokens);break;case"list":for(r=s.items.length,t=0;t<r;t++)this.inline(s.items[t].tokens)}return e},i.inlineTokens=function(e,t,n,r,i){var s;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i="");var l,a=e;if(this.tokens.links){var o=Object.keys(this.tokens.links);if(0<o.length)for(;null!=(l=this.tokenizer.rules.inline.reflinkSearch.exec(a));)o.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(l=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(s=this.tokenizer.escape(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.tag(e,n,r))e=e.substring(s.raw.length),n=s.inLink,r=s.inRawBlock,t.push(s);else if(s=this.tokenizer.link(e))e=e.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),t.push(s);else if(s=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),t.push(s);else if(s=this.tokenizer.strong(e,a,i))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],n,r),t.push(s);else if(s=this.tokenizer.em(e,a,i))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],n,r),t.push(s);else if(s=this.tokenizer.codespan(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.br(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.del(e))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],n,r),t.push(s);else if(s=this.tokenizer.autolink(e,V))e=e.substring(s.raw.length),t.push(s);else if(n||!(s=this.tokenizer.url(e,V))){if(s=this.tokenizer.inlineText(e,r,G))e=e.substring(s.raw.length),i=s.raw.slice(-1),t.push(s);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(s.raw.length),t.push(s);return t},e=n,r=[{key:"rules",get:function(){return{block:W,inline:X}}}],(t=null)&&s(e.prototype,t),r&&s(e,r),n}(),J=t.defaults,K=S,Q=_,Y=function(){function e(e){this.options=e||J}var t=e.prototype;return t.code=function(e,t,n){var r,i=(t||"").match(/\S*/)[0];return!this.options.highlight||null!=(r=this.options.highlight(e,i))&&r!==e&&(n=!0,e=r),i?'<pre><code class="'+this.options.langPrefix+Q(i,!0)+'">'+(n?e:Q(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Q(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&"<tbody>"+t+"</tbody>")+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=K(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+Q(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=K(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];n=e+"-"+ ++r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ne=t.defaults,re=y,ie=function(){function n(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}n.parse=function(e,t){return new n(t).parse(e)},n.parseInline=function(e,t){return new n(t).parseInline(e)};var e=n.prototype;return e.parse=function(e,t){void 0===t&&(t=!0);for(var n,r,i,s,l,a,o,c,u,p,h,g,f,d,k,b,m,x="",v=e.length,w=0;w<v;w++)switch((u=e[w]).type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(u.tokens),u.depth,re(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(a=o="",i=u.header.length,n=0;n<i;n++)a+=this.renderer.tablecell(this.parseInline(u.tokens.header[n]),{header:!0,align:u.align[n]});for(o+=this.renderer.tablerow(a),c="",i=u.cells.length,n=0;n<i;n++){for(a="",s=(l=u.tokens.cells[n]).length,r=0;r<s;r++)a+=this.renderer.tablecell(this.parseInline(l[r]),{header:!1,align:u.align[r]});c+=this.renderer.tablerow(a)}x+=this.renderer.table(o,c);continue;case"blockquote":c=this.parse(u.tokens),x+=this.renderer.blockquote(c);continue;case"list":for(p=u.ordered,h=u.start,g=u.loose,i=u.items.length,c="",n=0;n<i;n++)k=(d=u.items[n]).checked,b=d.task,f="",d.task&&(m=this.renderer.checkbox(k),g?0<d.tokens.length&&"text"===d.tokens[0].type?(d.tokens[0].text=m+" "+d.tokens[0].text,d.tokens[0].tokens&&0<d.tokens[0].tokens.length&&"text"===d.tokens[0].tokens[0].type&&(d.tokens[0].tokens[0].text=m+" "+d.tokens[0].tokens[0].text)):d.tokens.unshift({type:"text",text:m}):f+=m),f+=this.parse(d.tokens,g),c+=this.renderer.listitem(f,b,k);x+=this.renderer.list(c,p,h);continue;case"html":x+=this.renderer.html(u.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(c=u.tokens?this.parseInline(u.tokens):u.text;w+1<v&&"text"===e[w+1].type;)c+="\n"+((u=e[++w]).tokens?this.parseInline(u.tokens):u.text);x+=t?this.renderer.paragraph(c):c;continue;default:var _='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(_);throw new Error(_)}return x},e.parseInline=function(e,t){t=t||this.renderer;for(var n,r="",i=e.length,s=0;s<i;s++)switch((n=e[s]).type){case"escape":r+=t.text(n.text);break;case"html":r+=t.html(n.text);break;case"link":r+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":r+=t.image(n.href,n.title,n.text);break;case"strong":r+=t.strong(this.parseInline(n.tokens,t));break;case"em":r+=t.em(this.parseInline(n.tokens,t));break;case"codespan":r+=t.codespan(n.text);break;case"br":r+=t.br();break;case"del":r+=t.del(this.parseInline(n.tokens,t));break;case"text":r+=t.text(n.text);break;default:var l='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(l);throw new Error(l)}return r},n}(),se=A,le=I,ae=_,oe=t.getDefaults,ce=t.changeDefaults,ue=t.defaults;function pe(e,n,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof n&&(r=n,n=null),n=se({},pe.defaults,n||{}),le(n),r){var i,s=n.highlight;try{i=H.lex(e,n)}catch(e){return r(e)}var l=function(t){var e;if(!t)try{e=ie.parse(i,n)}catch(e){t=e}return n.highlight=s,t?r(t):r(null,e)};if(!s||s.length<3)return l();if(delete n.highlight,!i.length)return l();var a=0;return pe.walkTokens(i,function(n){"code"===n.type&&(a++,setTimeout(function(){s(n.text,n.lang,function(e,t){return e?l(e):(null!=t&&t!==n.text&&(n.text=t,n.escaped=!0),void(0===--a&&l()))})},0))}),void(0===a&&l())}try{var t=H.lex(e,n);return n.walkTokens&&pe.walkTokens(t,n.walkTokens),ie.parse(t,n)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",n.silent)return"<p>An error occurred:</p><pre>"+ae(e.message+"",!0)+"</pre>";throw e}}return pe.options=pe.setOptions=function(e){return se(pe.defaults,e),ce(pe.defaults),pe},pe.getDefaults=oe,pe.defaults=ue,pe.use=function(a){var t,n=se({},a);a.renderer&&function(){var l=pe.defaults.renderer||new Y;for(var e in a.renderer)!function(i){var s=l[i];l[i]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a.renderer[i].apply(l,t);return!1===r&&(r=s.apply(l,t)),r}}(e);n.renderer=l}(),a.tokenizer&&function(){var l=pe.defaults.tokenizer||new E;for(var e in a.tokenizer)!function(i){var s=l[i];l[i]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a.tokenizer[i].apply(l,t);return!1===r&&(r=s.apply(l,t)),r}}(e);n.tokenizer=l}(),a.walkTokens&&(t=pe.defaults.walkTokens,n.walkTokens=function(e){a.walkTokens(e),t&&t(e)}),pe.setOptions(n)},pe.walkTokens=function(e,t){for(var n,r=g(e);!(n=r()).done;){var i=n.value;switch(t(i),i.type){case"table":for(var s,l=g(i.tokens.header);!(s=l()).done;){var a=s.value;pe.walkTokens(a,t)}for(var o,c=g(i.tokens.cells);!(o=c()).done;)for(var u,p=g(o.value);!(u=p()).done;){var h=u.value;pe.walkTokens(h,t)}break;case"list":pe.walkTokens(i.items,t);break;default:i.tokens&&pe.walkTokens(i.tokens,t)}}},pe.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=se({},pe.defaults,t||{}),le(t);try{var n=H.lexInline(e,t);return t.walkTokens&&pe.walkTokens(n,t.walkTokens),ie.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ae(e.message+"",!0)+"</pre>";throw e}},pe.Parser=ie,pe.parser=ie.parse,pe.Renderer=Y,pe.TextRenderer=ee,pe.Lexer=H,pe.lexer=H.lex,pe.Tokenizer=E,pe.Slugger=te,pe.parse=pe});+ \ No newline at end of file diff --git a/node_modules/marked/package.json b/node_modules/marked/package.json @@ -0,0 +1,117 @@ +{ + "_from": "marked", + "_id": "marked@1.2.0", + "_inBundle": false, + "_integrity": "sha512-tiRxakgbNPBr301ihe/785NntvYyhxlqcL3YaC8CaxJQh7kiaEtrN9B/eK2I2943Yjkh5gw25chYFDQhOMCwMA==", + "_location": "/marked", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "marked", + "name": "marked", + "escapedName": "marked", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/marked/-/marked-1.2.0.tgz", + "_shasum": "7221ce2395fa6cf6d722e6f2871a32d3513c85ca", + "_spec": "marked", + "_where": "/home/l0bster/Documents/l0bsterSSG", + "author": { + "name": "Christopher Jeffrey" + }, + "bin": { + "marked": "bin/marked" + }, + "browser": "./lib/marked.js", + "bugs": { + "url": "http://github.com/markedjs/marked/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A markdown parser built for speed", + "devDependencies": { + "@babel/core": "^7.10.4", + "@babel/preset-env": "^7.10.4", + "@markedjs/html-differ": "^3.0.2", + "cheerio": "^1.0.0-rc.3", + "commonmark": "0.29.1", + "eslint": "^7.4.0", + "eslint-config-standard": "^14.1.1", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", + "front-matter": "^4.0.2", + "highlight.js": "^10.1.2", + "jasmine": "^3.5.0", + "markdown": "0.5.x", + "markdown-it": "11.x", + "node-fetch": "^2.6.0", + "rollup": "^2.21.0", + "rollup-plugin-babel": "^4.4.0", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-license": "^2.1.0", + "titleize": "^2.1.0", + "uglify-js": "^3.10.0", + "vuln-regex-detector": "^1.3.0" + }, + "engines": { + "node": ">= 8.16.2" + }, + "files": [ + "bin/", + "lib/", + "src/", + "man/", + "marked.min.js" + ], + "homepage": "https://marked.js.org", + "keywords": [ + "markdown", + "markup", + "html" + ], + "license": "MIT", + "main": "./src/marked.js", + "man": [ + "./man/marked.1" + ], + "name": "marked", + "repository": { + "type": "git", + "url": "git://github.com/markedjs/marked.git" + }, + "scripts": { + "bench": "npm run rollup && node test/bench.js", + "build": "npm run rollup && npm run minify", + "build:docs": "node build-docs.js", + "build:reset": "git checkout upstream/master lib/marked.js lib/marked.esm.js marked.min.js", + "lint": "eslint --fix bin/marked .", + "minify": "uglifyjs lib/marked.js -cm --comments /Copyright/ -o marked.min.js", + "preversion": "npm run build && (git diff --quiet || git commit -am build)", + "rollup": "npm run rollup:umd && npm run rollup:esm", + "rollup:esm": "rollup -c rollup.config.esm.js", + "rollup:umd": "rollup -c rollup.config.js", + "rules": "node test/rules.js", + "test": "jasmine --config=jasmine.json", + "test:all": "npm test && npm run test:lint", + "test:lint": "eslint bin/marked .", + "test:redos": "node test/vuln-regex.js", + "test:specs": "npm test -- test/specs/**/*-spec.js", + "test:unit": "npm test -- test/unit/**/*-spec.js", + "test:update": "node test/update-specs.js" + }, + "tags": [ + "markdown", + "markup", + "html" + ], + "version": "1.2.0" +} diff --git a/node_modules/marked/src/Lexer.js b/node_modules/marked/src/Lexer.js @@ -0,0 +1,463 @@ +const Tokenizer = require('./Tokenizer.js'); +const { defaults } = require('./defaults.js'); +const { block, inline } = require('./rules.js'); + +/** + * smartypants text replacement + */ +function smartypants(text) { + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); +} + +/** + * mangle email addresses + */ +function mangle(text) { + let out = '', + i, + ch; + + const l = text.length; + for (i = 0; i < l; i++) { + ch = text.charCodeAt(i); + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + out += '&#' + ch + ';'; + } + + return out; +} + +/** + * Block Lexer + */ +module.exports = class Lexer { + constructor(options) { + this.tokens = []; + this.tokens.links = Object.create(null); + this.options = options || defaults; + this.options.tokenizer = this.options.tokenizer || new Tokenizer(); + this.tokenizer = this.options.tokenizer; + this.tokenizer.options = this.options; + + const rules = { + block: block.normal, + inline: inline.normal + }; + + if (this.options.pedantic) { + rules.block = block.pedantic; + rules.inline = inline.pedantic; + } else if (this.options.gfm) { + rules.block = block.gfm; + if (this.options.breaks) { + rules.inline = inline.breaks; + } else { + rules.inline = inline.gfm; + } + } + this.tokenizer.rules = rules; + } + + /** + * Expose Rules + */ + static get rules() { + return { + block, + inline + }; + } + + /** + * Static Lex Method + */ + static lex(src, options) { + const lexer = new Lexer(options); + return lexer.lex(src); + } + + /** + * Static Lex Inline Method + */ + static lexInline(src, options) { + const lexer = new Lexer(options); + return lexer.inlineTokens(src); + } + + /** + * Preprocessing + */ + lex(src) { + src = src + .replace(/\r\n|\r/g, '\n') + .replace(/\t/g, ' '); + + this.blockTokens(src, this.tokens, true); + + this.inline(this.tokens); + + return this.tokens; + } + + /** + * Lexing + */ + blockTokens(src, tokens = [], top = true) { + src = src.replace(/^ +$/gm, ''); + let token, i, l, lastToken; + + while (src) { + // newline + if (token = this.tokenizer.space(src)) { + src = src.substring(token.raw.length); + if (token.type) { + tokens.push(token); + } + continue; + } + + // code + if (token = this.tokenizer.code(src, tokens)) { + src = src.substring(token.raw.length); + if (token.type) { + tokens.push(token); + } else { + lastToken = tokens[tokens.length - 1]; + lastToken.raw += '\n' + token.raw; + lastToken.text += '\n' + token.text; + } + continue; + } + + // fences + if (token = this.tokenizer.fences(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // heading + if (token = this.tokenizer.heading(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // table no leading pipe (gfm) + if (token = this.tokenizer.nptable(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // hr + if (token = this.tokenizer.hr(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // blockquote + if (token = this.tokenizer.blockquote(src)) { + src = src.substring(token.raw.length); + token.tokens = this.blockTokens(token.text, [], top); + tokens.push(token); + continue; + } + + // list + if (token = this.tokenizer.list(src)) { + src = src.substring(token.raw.length); + l = token.items.length; + for (i = 0; i < l; i++) { + token.items[i].tokens = this.blockTokens(token.items[i].text, [], false); + } + tokens.push(token); + continue; + } + + // html + if (token = this.tokenizer.html(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // def + if (top && (token = this.tokenizer.def(src))) { + src = src.substring(token.raw.length); + if (!this.tokens.links[token.tag]) { + this.tokens.links[token.tag] = { + href: token.href, + title: token.title + }; + } + continue; + } + + // table (gfm) + if (token = this.tokenizer.table(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // lheading + if (token = this.tokenizer.lheading(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // top-level paragraph + if (top && (token = this.tokenizer.paragraph(src))) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // text + if (token = this.tokenizer.text(src, tokens)) { + src = src.substring(token.raw.length); + if (token.type) { + tokens.push(token); + } else { + lastToken = tokens[tokens.length - 1]; + lastToken.raw += '\n' + token.raw; + lastToken.text += '\n' + token.text; + } + continue; + } + + if (src) { + const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); + if (this.options.silent) { + console.error(errMsg); + break; + } else { + throw new Error(errMsg); + } + } + } + + return tokens; + } + + inline(tokens) { + let i, + j, + k, + l2, + row, + token; + + const l = tokens.length; + for (i = 0; i < l; i++) { + token = tokens[i]; + switch (token.type) { + case 'paragraph': + case 'text': + case 'heading': { + token.tokens = []; + this.inlineTokens(token.text, token.tokens); + break; + } + case 'table': { + token.tokens = { + header: [], + cells: [] + }; + + // header + l2 = token.header.length; + for (j = 0; j < l2; j++) { + token.tokens.header[j] = []; + this.inlineTokens(token.header[j], token.tokens.header[j]); + } + + // cells + l2 = token.cells.length; + for (j = 0; j < l2; j++) { + row = token.cells[j]; + token.tokens.cells[j] = []; + for (k = 0; k < row.length; k++) { + token.tokens.cells[j][k] = []; + this.inlineTokens(row[k], token.tokens.cells[j][k]); + } + } + + break; + } + case 'blockquote': { + this.inline(token.tokens); + break; + } + case 'list': { + l2 = token.items.length; + for (j = 0; j < l2; j++) { + this.inline(token.items[j].tokens); + } + break; + } + default: { + // do nothing + } + } + } + + return tokens; + } + + /** + * Lexing/Compiling + */ + inlineTokens(src, tokens = [], inLink = false, inRawBlock = false, prevChar = '') { + let token; + + // String with links masked to avoid interference with em and strong + let maskedSrc = src; + let match; + + // Mask out reflinks + if (this.tokens.links) { + const links = Object.keys(this.tokens.links); + if (links.length > 0) { + while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) { + if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) { + maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex); + } + } + } + } + // Mask out other blocks + while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) { + maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + } + + while (src) { + // escape + if (token = this.tokenizer.escape(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // tag + if (token = this.tokenizer.tag(src, inLink, inRawBlock)) { + src = src.substring(token.raw.length); + inLink = token.inLink; + inRawBlock = token.inRawBlock; + tokens.push(token); + continue; + } + + // link + if (token = this.tokenizer.link(src)) { + src = src.substring(token.raw.length); + if (token.type === 'link') { + token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); + } + tokens.push(token); + continue; + } + + // reflink, nolink + if (token = this.tokenizer.reflink(src, this.tokens.links)) { + src = src.substring(token.raw.length); + if (token.type === 'link') { + token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); + } + tokens.push(token); + continue; + } + + // strong + if (token = this.tokenizer.strong(src, maskedSrc, prevChar)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } + + // em + if (token = this.tokenizer.em(src, maskedSrc, prevChar)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } + + // code + if (token = this.tokenizer.codespan(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // br + if (token = this.tokenizer.br(src)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // del (gfm) + if (token = this.tokenizer.del(src)) { + src = src.substring(token.raw.length); + token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); + tokens.push(token); + continue; + } + + // autolink + if (token = this.tokenizer.autolink(src, mangle)) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // url (gfm) + if (!inLink && (token = this.tokenizer.url(src, mangle))) { + src = src.substring(token.raw.length); + tokens.push(token); + continue; + } + + // text + if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) { + src = src.substring(token.raw.length); + prevChar = token.raw.slice(-1); + tokens.push(token); + continue; + } + + if (src) { + const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); + if (this.options.silent) { + console.error(errMsg); + break; + } else { + throw new Error(errMsg); + } + } + } + + return tokens; + } +}; diff --git a/node_modules/marked/src/Parser.js b/node_modules/marked/src/Parser.js @@ -0,0 +1,263 @@ +const Renderer = require('./Renderer.js'); +const TextRenderer = require('./TextRenderer.js'); +const Slugger = require('./Slugger.js'); +const { defaults } = require('./defaults.js'); +const { + unescape +} = require('./helpers.js'); + +/** + * Parsing & Compiling + */ +module.exports = class Parser { + constructor(options) { + this.options = options || defaults; + this.options.renderer = this.options.renderer || new Renderer(); + this.renderer = this.options.renderer; + this.renderer.options = this.options; + this.textRenderer = new TextRenderer(); + this.slugger = new Slugger(); + } + + /** + * Static Parse Method + */ + static parse(tokens, options) { + const parser = new Parser(options); + return parser.parse(tokens); + } + + /** + * Static Parse Inline Method + */ + static parseInline(tokens, options) { + const parser = new Parser(options); + return parser.parseInline(tokens); + } + + /** + * Parse Loop + */ + parse(tokens, top = true) { + let out = '', + i, + j, + k, + l2, + l3, + row, + cell, + header, + body, + token, + ordered, + start, + loose, + itemBody, + item, + checked, + task, + checkbox; + + const l = tokens.length; + for (i = 0; i < l; i++) { + token = tokens[i]; + switch (token.type) { + case 'space': { + continue; + } + case 'hr': { + out += this.renderer.hr(); + continue; + } + case 'heading': { + out += this.renderer.heading( + this.parseInline(token.tokens), + token.depth, + unescape(this.parseInline(token.tokens, this.textRenderer)), + this.slugger); + continue; + } + case 'code': { + out += this.renderer.code(token.text, + token.lang, + token.escaped); + continue; + } + case 'table': { + header = ''; + + // header + cell = ''; + l2 = token.header.length; + for (j = 0; j < l2; j++) { + cell += this.renderer.tablecell( + this.parseInline(token.tokens.header[j]), + { header: true, align: token.align[j] } + ); + } + header += this.renderer.tablerow(cell); + + body = ''; + l2 = token.cells.length; + for (j = 0; j < l2; j++) { + row = token.tokens.cells[j]; + + cell = ''; + l3 = row.length; + for (k = 0; k < l3; k++) { + cell += this.renderer.tablecell( + this.parseInline(row[k]), + { header: false, align: token.align[k] } + ); + } + + body += this.renderer.tablerow(cell); + } + out += this.renderer.table(header, body); + continue; + } + case 'blockquote': { + body = this.parse(token.tokens); + out += this.renderer.blockquote(body); + continue; + } + case 'list': { + ordered = token.ordered; + start = token.start; + loose = token.loose; + l2 = token.items.length; + + body = ''; + for (j = 0; j < l2; j++) { + item = token.items[j]; + checked = item.checked; + task = item.task; + + itemBody = ''; + if (item.task) { + checkbox = this.renderer.checkbox(checked); + if (loose) { + if (item.tokens.length > 0 && item.tokens[0].type === 'text') { + item.tokens[0].text = checkbox + ' ' + item.tokens[0].text; + if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') { + item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text; + } + } else { + item.tokens.unshift({ + type: 'text', + text: checkbox + }); + } + } else { + itemBody += checkbox; + } + } + + itemBody += this.parse(item.tokens, loose); + body += this.renderer.listitem(itemBody, task, checked); + } + + out += this.renderer.list(body, ordered, start); + continue; + } + case 'html': { + // TODO parse inline content if parameter markdown=1 + out += this.renderer.html(token.text); + continue; + } + case 'paragraph': { + out += this.renderer.paragraph(this.parseInline(token.tokens)); + continue; + } + case 'text': { + body = token.tokens ? this.parseInline(token.tokens) : token.text; + while (i + 1 < l && tokens[i + 1].type === 'text') { + token = tokens[++i]; + body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text); + } + out += top ? this.renderer.paragraph(body) : body; + continue; + } + default: { + const errMsg = 'Token with "' + token.type + '" type was not found.'; + if (this.options.silent) { + console.error(errMsg); + return; + } else { + throw new Error(errMsg); + } + } + } + } + + return out; + } + + /** + * Parse Inline Tokens + */ + parseInline(tokens, renderer) { + renderer = renderer || this.renderer; + let out = '', + i, + token; + + const l = tokens.length; + for (i = 0; i < l; i++) { + token = tokens[i]; + switch (token.type) { + case 'escape': { + out += renderer.text(token.text); + break; + } + case 'html': { + out += renderer.html(token.text); + break; + } + case 'link': { + out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer)); + break; + } + case 'image': { + out += renderer.image(token.href, token.title, token.text); + break; + } + case 'strong': { + out += renderer.strong(this.parseInline(token.tokens, renderer)); + break; + } + case 'em': { + out += renderer.em(this.parseInline(token.tokens, renderer)); + break; + } + case 'codespan': { + out += renderer.codespan(token.text); + break; + } + case 'br': { + out += renderer.br(); + break; + } + case 'del': { + out += renderer.del(this.parseInline(token.tokens, renderer)); + break; + } + case 'text': { + out += renderer.text(token.text); + break; + } + default: { + const errMsg = 'Token with "' + token.type + '" type was not found.'; + if (this.options.silent) { + console.error(errMsg); + return; + } else { + throw new Error(errMsg); + } + } + } + } + return out; + } +}; diff --git a/node_modules/marked/src/Renderer.js b/node_modules/marked/src/Renderer.js @@ -0,0 +1,164 @@ +const { defaults } = require('./defaults.js'); +const { + cleanUrl, + escape +} = require('./helpers.js'); + +/** + * Renderer + */ +module.exports = class Renderer { + constructor(options) { + this.options = options || defaults; + } + + code(code, infostring, escaped) { + const lang = (infostring || '').match(/\S*/)[0]; + if (this.options.highlight) { + const out = this.options.highlight(code, lang); + if (out != null && out !== code) { + escaped = true; + code = out; + } + } + + if (!lang) { + return '<pre><code>' + + (escaped ? code : escape(code, true)) + + '</code></pre>\n'; + } + + return '<pre><code class="' + + this.options.langPrefix + + escape(lang, true) + + '">' + + (escaped ? code : escape(code, true)) + + '</code></pre>\n'; + } + + blockquote(quote) { + return '<blockquote>\n' + quote + '</blockquote>\n'; + } + + html(html) { + return html; + } + + heading(text, level, raw, slugger) { + if (this.options.headerIds) { + return '<h' + + level + + ' id="' + + this.options.headerPrefix + + slugger.slug(raw) + + '">' + + text + + '</h' + + level + + '>\n'; + } + // ignore IDs + return '<h' + level + '>' + text + '</h' + level + '>\n'; + } + + hr() { + return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; + } + + list(body, ordered, start) { + const type = ordered ? 'ol' : 'ul', + startatt = (ordered && start !== 1) ? (' start="' + start + '"') : ''; + return '<' + type + startatt + '>\n' + body + '</' + type + '>\n'; + } + + listitem(text) { + return '<li>' + text + '</li>\n'; + } + + checkbox(checked) { + return '<input ' + + (checked ? 'checked="" ' : '') + + 'disabled="" type="checkbox"' + + (this.options.xhtml ? ' /' : '') + + '> '; + } + + paragraph(text) { + return '<p>' + text + '</p>\n'; + } + + table(header, body) { + if (body) body = '<tbody>' + body + '</tbody>'; + + return '<table>\n' + + '<thead>\n' + + header + + '</thead>\n' + + body + + '</table>\n'; + } + + tablerow(content) { + return '<tr>\n' + content + '</tr>\n'; + } + + tablecell(content, flags) { + const type = flags.header ? 'th' : 'td'; + const tag = flags.align + ? '<' + type + ' align="' + flags.align + '">' + : '<' + type + '>'; + return tag + content + '</' + type + '>\n'; + } + + // span level renderer + strong(text) { + return '<strong>' + text + '</strong>'; + } + + em(text) { + return '<em>' + text + '</em>'; + } + + codespan(text) { + return '<code>' + text + '</code>'; + } + + br() { + return this.options.xhtml ? '<br/>' : '<br>'; + } + + del(text) { + return '<del>' + text + '</del>'; + } + + link(href, title, text) { + href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); + if (href === null) { + return text; + } + let out = '<a href="' + escape(href) + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += '>' + text + '</a>'; + return out; + } + + image(href, title, text) { + href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); + if (href === null) { + return text; + } + + let out = '<img src="' + href + '" alt="' + text + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += this.options.xhtml ? '/>' : '>'; + return out; + } + + text(text) { + return text; + } +}; diff --git a/node_modules/marked/src/Slugger.js b/node_modules/marked/src/Slugger.js @@ -0,0 +1,49 @@ +/** + * Slugger generates header id + */ +module.exports = class Slugger { + constructor() { + this.seen = {}; + } + + serialize(value) { + return value + .toLowerCase() + .trim() + // remove html tags + .replace(/<[!\/a-z].*?>/ig, '') + // remove unwanted chars + .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '') + .replace(/\s/g, '-'); + } + + /** + * Finds the next safe (unique) slug to use + */ + getNextSafeSlug(originalSlug, isDryRun) { + let slug = originalSlug; + let occurenceAccumulator = 0; + if (this.seen.hasOwnProperty(slug)) { + occurenceAccumulator = this.seen[originalSlug]; + do { + occurenceAccumulator++; + slug = originalSlug + '-' + occurenceAccumulator; + } while (this.seen.hasOwnProperty(slug)); + } + if (!isDryRun) { + this.seen[originalSlug] = occurenceAccumulator; + this.seen[slug] = 0; + } + return slug; + } + + /** + * Convert string to unique id + * @param {object} options + * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator. + */ + slug(value, options = {}) { + const slug = this.serialize(value); + return this.getNextSafeSlug(slug, options.dryrun); + } +}; diff --git a/node_modules/marked/src/TextRenderer.js b/node_modules/marked/src/TextRenderer.js @@ -0,0 +1,42 @@ +/** + * TextRenderer + * returns only the textual part of the token + */ +module.exports = class TextRenderer { + // no need for block level renderers + strong(text) { + return text; + } + + em(text) { + return text; + } + + codespan(text) { + return text; + } + + del(text) { + return text; + } + + html(text) { + return text; + } + + text(text) { + return text; + } + + link(href, title, text) { + return '' + text; + } + + image(href, title, text) { + return '' + text; + } + + br() { + return ''; + } +}; diff --git a/node_modules/marked/src/Tokenizer.js b/node_modules/marked/src/Tokenizer.js @@ -0,0 +1,659 @@ +const { defaults } = require('./defaults.js'); +const { + rtrim, + splitCells, + escape, + findClosingBracket +} = require('./helpers.js'); + +function outputLink(cap, link, raw) { + const href = link.href; + const title = link.title ? escape(link.title) : null; + const text = cap[1].replace(/\\([\[\]])/g, '$1'); + + if (cap[0].charAt(0) !== '!') { + return { + type: 'link', + raw, + href, + title, + text + }; + } else { + return { + type: 'image', + raw, + href, + title, + text: escape(text) + }; + } +} + +function indentCodeCompensation(raw, text) { + const matchIndentToCode = raw.match(/^(\s+)(?:```)/); + + if (matchIndentToCode === null) { + return text; + } + + const indentToCode = matchIndentToCode[1]; + + return text + .split('\n') + .map(node => { + const matchIndentInNode = node.match(/^\s+/); + if (matchIndentInNode === null) { + return node; + } + + const [indentInNode] = matchIndentInNode; + + if (indentInNode.length >= indentToCode.length) { + return node.slice(indentToCode.length); + } + + return node; + }) + .join('\n'); +} + +/** + * Tokenizer + */ +module.exports = class Tokenizer { + constructor(options) { + this.options = options || defaults; + } + + space(src) { + const cap = this.rules.block.newline.exec(src); + if (cap) { + if (cap[0].length > 1) { + return { + type: 'space', + raw: cap[0] + }; + } + return { raw: '\n' }; + } + } + + code(src, tokens) { + const cap = this.rules.block.code.exec(src); + if (cap) { + const lastToken = tokens[tokens.length - 1]; + // An indented code block cannot interrupt a paragraph. + if (lastToken && lastToken.type === 'paragraph') { + return { + raw: cap[0], + text: cap[0].trimRight() + }; + } + + const text = cap[0].replace(/^ {4}/gm, ''); + return { + type: 'code', + raw: cap[0], + codeBlockStyle: 'indented', + text: !this.options.pedantic + ? rtrim(text, '\n') + : text + }; + } + } + + fences(src) { + const cap = this.rules.block.fences.exec(src); + if (cap) { + const raw = cap[0]; + const text = indentCodeCompensation(raw, cap[3] || ''); + + return { + type: 'code', + raw, + lang: cap[2] ? cap[2].trim() : cap[2], + text + }; + } + } + + heading(src) { + const cap = this.rules.block.heading.exec(src); + if (cap) { + return { + type: 'heading', + raw: cap[0], + depth: cap[1].length, + text: cap[2] + }; + } + } + + nptable(src) { + const cap = this.rules.block.nptable.exec(src); + if (cap) { + const item = { + type: 'table', + header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [], + raw: cap[0] + }; + + if (item.header.length === item.align.length) { + let l = item.align.length; + let i; + for (i = 0; i < l; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + l = item.cells.length; + for (i = 0; i < l; i++) { + item.cells[i] = splitCells(item.cells[i], item.header.length); + } + + return item; + } + } + } + + hr(src) { + const cap = this.rules.block.hr.exec(src); + if (cap) { + return { + type: 'hr', + raw: cap[0] + }; + } + } + + blockquote(src) { + const cap = this.rules.block.blockquote.exec(src); + if (cap) { + const text = cap[0].replace(/^ *> ?/gm, ''); + + return { + type: 'blockquote', + raw: cap[0], + text + }; + } + } + + list(src) { + const cap = this.rules.block.list.exec(src); + if (cap) { + let raw = cap[0]; + const bull = cap[2]; + const isordered = bull.length > 1; + const isparen = bull[bull.length - 1] === ')'; + + const list = { + type: 'list', + raw, + ordered: isordered, + start: isordered ? +bull.slice(0, -1) : '', + loose: false, + items: [] + }; + + // Get each top-level item. + const itemMatch = cap[0].match(this.rules.block.item); + + let next = false, + item, + space, + b, + addBack, + loose, + istask, + ischecked; + + const l = itemMatch.length; + for (let i = 0; i < l; i++) { + item = itemMatch[i]; + raw = item; + + // Remove the list item's bullet + // so it is seen as the next token. + space = item.length; + item = item.replace(/^ *([*+-]|\d+[.)]) */, ''); + + // Outdent whatever the + // list item contains. Hacky. + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') + : item.replace(/^ {1,4}/gm, ''); + } + + // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + if (i !== l - 1) { + b = this.rules.block.bullet.exec(itemMatch[i + 1])[0]; + if (isordered ? b.length === 1 || (!isparen && b[b.length - 1] === ')') + : (b.length > 1 || (this.options.smartLists && b !== bull))) { + addBack = itemMatch.slice(i + 1).join('\n'); + list.raw = list.raw.substring(0, list.raw.length - addBack.length); + i = l - 1; + } + } + + // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + loose = next || /\n\n(?!\s*$)/.test(item); + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + if (loose) { + list.loose = true; + } + + // Check for task list items + istask = /^\[[ xX]\] /.test(item); + ischecked = undefined; + if (istask) { + ischecked = item[1] !== ' '; + item = item.replace(/^\[[ xX]\] +/, ''); + } + + list.items.push({ + type: 'list_item', + raw, + task: istask, + checked: ischecked, + loose: loose, + text: item + }); + } + + return list; + } + } + + html(src) { + const cap = this.rules.block.html.exec(src); + if (cap) { + return { + type: this.options.sanitize + ? 'paragraph' + : 'html', + raw: cap[0], + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), + text: this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0] + }; + } + } + + def(src) { + const cap = this.rules.block.def.exec(src); + if (cap) { + if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); + const tag = cap[1].toLowerCase().replace(/\s+/g, ' '); + return { + tag, + raw: cap[0], + href: cap[2], + title: cap[3] + }; + } + } + + table(src) { + const cap = this.rules.block.table.exec(src); + if (cap) { + const item = { + type: 'table', + header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + item.raw = cap[0]; + + let l = item.align.length; + let i; + for (i = 0; i < l; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + l = item.cells.length; + for (i = 0; i < l; i++) { + item.cells[i] = splitCells( + item.cells[i].replace(/^ *\| *| *\| *$/g, ''), + item.header.length); + } + + return item; + } + } + } + + lheading(src) { + const cap = this.rules.block.lheading.exec(src); + if (cap) { + return { + type: 'heading', + raw: cap[0], + depth: cap[2].charAt(0) === '=' ? 1 : 2, + text: cap[1] + }; + } + } + + paragraph(src) { + const cap = this.rules.block.paragraph.exec(src); + if (cap) { + return { + type: 'paragraph', + raw: cap[0], + text: cap[1].charAt(cap[1].length - 1) === '\n' + ? cap[1].slice(0, -1) + : cap[1] + }; + } + } + + text(src, tokens) { + const cap = this.rules.block.text.exec(src); + if (cap) { + const lastToken = tokens[tokens.length - 1]; + if (lastToken && lastToken.type === 'text') { + return { + raw: cap[0], + text: cap[0] + }; + } + + return { + type: 'text', + raw: cap[0], + text: cap[0] + }; + } + } + + escape(src) { + const cap = this.rules.inline.escape.exec(src); + if (cap) { + return { + type: 'escape', + raw: cap[0], + text: escape(cap[1]) + }; + } + } + + tag(src, inLink, inRawBlock) { + const cap = this.rules.inline.tag.exec(src); + if (cap) { + if (!inLink && /^<a /i.test(cap[0])) { + inLink = true; + } else if (inLink && /^<\/a>/i.test(cap[0])) { + inLink = false; + } + if (!inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { + inRawBlock = true; + } else if (inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { + inRawBlock = false; + } + + return { + type: this.options.sanitize + ? 'text' + : 'html', + raw: cap[0], + inLink, + inRawBlock, + text: this.options.sanitize + ? (this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0])) + : cap[0] + }; + } + } + + link(src) { + const cap = this.rules.inline.link.exec(src); + if (cap) { + const lastParenIndex = findClosingBracket(cap[2], '()'); + if (lastParenIndex > -1) { + const start = cap[0].indexOf('!') === 0 ? 5 : 4; + const linkLen = start + cap[1].length + lastParenIndex; + cap[2] = cap[2].substring(0, lastParenIndex); + cap[0] = cap[0].substring(0, linkLen).trim(); + cap[3] = ''; + } + let href = cap[2]; + let title = ''; + if (this.options.pedantic) { + const link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); + + if (link) { + href = link[1]; + title = link[3]; + } else { + title = ''; + } + } else { + title = cap[3] ? cap[3].slice(1, -1) : ''; + } + href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); + const token = outputLink(cap, { + href: href ? href.replace(this.rules.inline._escapes, '$1') : href, + title: title ? title.replace(this.rules.inline._escapes, '$1') : title + }, cap[0]); + return token; + } + } + + reflink(src, links) { + let cap; + if ((cap = this.rules.inline.reflink.exec(src)) + || (cap = this.rules.inline.nolink.exec(src))) { + let link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = links[link.toLowerCase()]; + if (!link || !link.href) { + const text = cap[0].charAt(0); + return { + type: 'text', + raw: text, + text + }; + } + const token = outputLink(cap, link, cap[0]); + return token; + } + } + + strong(src, maskedSrc, prevChar = '') { + let match = this.rules.inline.strong.start.exec(src); + + if (match && (!match[1] || (match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))))) { + maskedSrc = maskedSrc.slice(-1 * src.length); + const endReg = match[0] === '**' ? this.rules.inline.strong.endAst : this.rules.inline.strong.endUnd; + + endReg.lastIndex = 0; + + let cap; + while ((match = endReg.exec(maskedSrc)) != null) { + cap = this.rules.inline.strong.middle.exec(maskedSrc.slice(0, match.index + 3)); + if (cap) { + return { + type: 'strong', + raw: src.slice(0, cap[0].length), + text: src.slice(2, cap[0].length - 2) + }; + } + } + } + } + + em(src, maskedSrc, prevChar = '') { + let match = this.rules.inline.em.start.exec(src); + + if (match && (!match[1] || (match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))))) { + maskedSrc = maskedSrc.slice(-1 * src.length); + const endReg = match[0] === '*' ? this.rules.inline.em.endAst : this.rules.inline.em.endUnd; + + endReg.lastIndex = 0; + + let cap; + while ((match = endReg.exec(maskedSrc)) != null) { + cap = this.rules.inline.em.middle.exec(maskedSrc.slice(0, match.index + 2)); + if (cap) { + return { + type: 'em', + raw: src.slice(0, cap[0].length), + text: src.slice(1, cap[0].length - 1) + }; + } + } + } + } + + codespan(src) { + const cap = this.rules.inline.code.exec(src); + if (cap) { + let text = cap[2].replace(/\n/g, ' '); + const hasNonSpaceChars = /[^ ]/.test(text); + const hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' '); + if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) { + text = text.substring(1, text.length - 1); + } + text = escape(text, true); + return { + type: 'codespan', + raw: cap[0], + text + }; + } + } + + br(src) { + const cap = this.rules.inline.br.exec(src); + if (cap) { + return { + type: 'br', + raw: cap[0] + }; + } + } + + del(src) { + const cap = this.rules.inline.del.exec(src); + if (cap) { + return { + type: 'del', + raw: cap[0], + text: cap[1] + }; + } + } + + autolink(src, mangle) { + const cap = this.rules.inline.autolink.exec(src); + if (cap) { + let text, href; + if (cap[2] === '@') { + text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]); + href = 'mailto:' + text; + } else { + text = escape(cap[1]); + href = text; + } + + return { + type: 'link', + raw: cap[0], + text, + href, + tokens: [ + { + type: 'text', + raw: text, + text + } + ] + }; + } + } + + url(src, mangle) { + let cap; + if (cap = this.rules.inline.url.exec(src)) { + let text, href; + if (cap[2] === '@') { + text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]); + href = 'mailto:' + text; + } else { + // do extended autolink path validation + let prevCapZero; + do { + prevCapZero = cap[0]; + cap[0] = this.rules.inline._backpedal.exec(cap[0])[0]; + } while (prevCapZero !== cap[0]); + text = escape(cap[0]); + if (cap[1] === 'www.') { + href = 'http://' + text; + } else { + href = text; + } + } + return { + type: 'link', + raw: cap[0], + text, + href, + tokens: [ + { + type: 'text', + raw: text, + text + } + ] + }; + } + } + + inlineText(src, inRawBlock, smartypants) { + const cap = this.rules.inline.text.exec(src); + if (cap) { + let text; + if (inRawBlock) { + text = this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0]; + } else { + text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]); + } + return { + type: 'text', + raw: cap[0], + text + }; + } + } +}; diff --git a/node_modules/marked/src/defaults.js b/node_modules/marked/src/defaults.js @@ -0,0 +1,32 @@ +function getDefaults() { + return { + baseUrl: null, + breaks: false, + gfm: true, + headerIds: true, + headerPrefix: '', + highlight: null, + langPrefix: 'language-', + mangle: true, + pedantic: false, + renderer: null, + sanitize: false, + sanitizer: null, + silent: false, + smartLists: false, + smartypants: false, + tokenizer: null, + walkTokens: null, + xhtml: false + }; +} + +function changeDefaults(newDefaults) { + module.exports.defaults = newDefaults; +} + +module.exports = { + defaults: getDefaults(), + getDefaults, + changeDefaults +}; diff --git a/node_modules/marked/src/helpers.js b/node_modules/marked/src/helpers.js @@ -0,0 +1,243 @@ +/** + * Helpers + */ +const escapeTest = /[&<>"']/; +const escapeReplace = /[&<>"']/g; +const escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/; +const escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g; +const escapeReplacements = { + '&': '&amp;', + '<': '&lt;', + '>': '&gt;', + '"': '&quot;', + "'": '&#39;' +}; +const getEscapeReplacement = (ch) => escapeReplacements[ch]; +function escape(html, encode) { + if (encode) { + if (escapeTest.test(html)) { + return html.replace(escapeReplace, getEscapeReplacement); + } + } else { + if (escapeTestNoEncode.test(html)) { + return html.replace(escapeReplaceNoEncode, getEscapeReplacement); + } + } + + return html; +} + +const unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; + +function unescape(html) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(unescapeTest, (_, n) => { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' + ? String.fromCharCode(parseInt(n.substring(2), 16)) + : String.fromCharCode(+n.substring(1)); + } + return ''; + }); +} + +const caret = /(^|[^\[])\^/g; +function edit(regex, opt) { + regex = regex.source || regex; + opt = opt || ''; + const obj = { + replace: (name, val) => { + val = val.source || val; + val = val.replace(caret, '$1'); + regex = regex.replace(name, val); + return obj; + }, + getRegex: () => { + return new RegExp(regex, opt); + } + }; + return obj; +} + +const nonWordAndColonTest = /[^\w:]/g; +const originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; +function cleanUrl(sanitize, base, href) { + if (sanitize) { + let prot; + try { + prot = decodeURIComponent(unescape(href)) + .replace(nonWordAndColonTest, '') + .toLowerCase(); + } catch (e) { + return null; + } + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { + return null; + } + } + if (base && !originIndependentUrl.test(href)) { + href = resolveUrl(base, href); + } + try { + href = encodeURI(href).replace(/%25/g, '%'); + } catch (e) { + return null; + } + return href; +} + +const baseUrls = {}; +const justDomain = /^[^:]+:\/*[^/]*$/; +const protocol = /^([^:]+:)[\s\S]*$/; +const domain = /^([^:]+:\/*[^/]*)[\s\S]*$/; + +function resolveUrl(base, href) { + if (!baseUrls[' ' + base]) { + // we can ignore everything in base after the last slash of its path component, + // but we might need to add _that_ + // https://tools.ietf.org/html/rfc3986#section-3 + if (justDomain.test(base)) { + baseUrls[' ' + base] = base + '/'; + } else { + baseUrls[' ' + base] = rtrim(base, '/', true); + } + } + base = baseUrls[' ' + base]; + const relativeBase = base.indexOf(':') === -1; + + if (href.substring(0, 2) === '//') { + if (relativeBase) { + return href; + } + return base.replace(protocol, '$1') + href; + } else if (href.charAt(0) === '/') { + if (relativeBase) { + return href; + } + return base.replace(domain, '$1') + href; + } else { + return base + href; + } +} + +const noopTest = { exec: function noopTest() {} }; + +function merge(obj) { + let i = 1, + target, + key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; +} + +function splitCells(tableRow, count) { + // ensure that every cell-delimiting pipe has a space + // before it to distinguish it from an escaped pipe + const row = tableRow.replace(/\|/g, (match, offset, str) => { + let escaped = false, + curr = offset; + while (--curr >= 0 && str[curr] === '\\') escaped = !escaped; + if (escaped) { + // odd number of slashes means | is escaped + // so we leave it alone + return '|'; + } else { + // add space before unescaped | + return ' |'; + } + }), + cells = row.split(/ \|/); + let i = 0; + + if (cells.length > count) { + cells.splice(count); + } else { + while (cells.length < count) cells.push(''); + } + + for (; i < cells.length; i++) { + // leading or trailing whitespace is ignored per the gfm spec + cells[i] = cells[i].trim().replace(/\\\|/g, '|'); + } + return cells; +} + +// Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). +// /c*$/ is vulnerable to REDOS. +// invert: Remove suffix of non-c chars instead. Default falsey. +function rtrim(str, c, invert) { + const l = str.length; + if (l === 0) { + return ''; + } + + // Length of suffix matching the invert condition. + let suffLen = 0; + + // Step left until we fail to match the invert condition. + while (suffLen < l) { + const currChar = str.charAt(l - suffLen - 1); + if (currChar === c && !invert) { + suffLen++; + } else if (currChar !== c && invert) { + suffLen++; + } else { + break; + } + } + + return str.substr(0, l - suffLen); +} + +function findClosingBracket(str, b) { + if (str.indexOf(b[1]) === -1) { + return -1; + } + const l = str.length; + let level = 0, + i = 0; + for (; i < l; i++) { + if (str[i] === '\\') { + i++; + } else if (str[i] === b[0]) { + level++; + } else if (str[i] === b[1]) { + level--; + if (level < 0) { + return i; + } + } + } + return -1; +} + +function checkSanitizeDeprecation(opt) { + if (opt && opt.sanitize && !opt.silent) { + console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options'); + } +} + +module.exports = { + escape, + unescape, + edit, + cleanUrl, + resolveUrl, + noopTest, + merge, + splitCells, + rtrim, + findClosingBracket, + checkSanitizeDeprecation +}; diff --git a/node_modules/marked/src/marked.js b/node_modules/marked/src/marked.js @@ -0,0 +1,267 @@ +const Lexer = require('./Lexer.js'); +const Parser = require('./Parser.js'); +const Tokenizer = require('./Tokenizer.js'); +const Renderer = require('./Renderer.js'); +const TextRenderer = require('./TextRenderer.js'); +const Slugger = require('./Slugger.js'); +const { + merge, + checkSanitizeDeprecation, + escape +} = require('./helpers.js'); +const { + getDefaults, + changeDefaults, + defaults +} = require('./defaults.js'); + +/** + * Marked + */ +function marked(src, opt, callback) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked(): input parameter is undefined or null'); + } + if (typeof src !== 'string') { + throw new Error('marked(): input parameter is of type ' + + Object.prototype.toString.call(src) + ', string expected'); + } + + if (typeof opt === 'function') { + callback = opt; + opt = null; + } + + opt = merge({}, marked.defaults, opt || {}); + checkSanitizeDeprecation(opt); + + if (callback) { + const highlight = opt.highlight; + let tokens; + + try { + tokens = Lexer.lex(src, opt); + } catch (e) { + return callback(e); + } + + const done = function(err) { + let out; + + if (!err) { + try { + out = Parser.parse(tokens, opt); + } catch (e) { + err = e; + } + } + + opt.highlight = highlight; + + return err + ? callback(err) + : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + + if (!tokens.length) return done(); + + let pending = 0; + marked.walkTokens(tokens, function(token) { + if (token.type === 'code') { + pending++; + setTimeout(() => { + highlight(token.text, token.lang, function(err, code) { + if (err) { + return done(err); + } + if (code != null && code !== token.text) { + token.text = code; + token.escaped = true; + } + + pending--; + if (pending === 0) { + done(); + } + }); + }, 0); + } + }); + + if (pending === 0) { + done(); + } + + return; + } + + try { + const tokens = Lexer.lex(src, opt); + if (opt.walkTokens) { + marked.walkTokens(tokens, opt.walkTokens); + } + return Parser.parse(tokens, opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + if (opt.silent) { + return '<p>An error occurred:</p><pre>' + + escape(e.message + '', true) + + '</pre>'; + } + throw e; + } +} + +/** + * Options + */ + +marked.options = +marked.setOptions = function(opt) { + merge(marked.defaults, opt); + changeDefaults(marked.defaults); + return marked; +}; + +marked.getDefaults = getDefaults; + +marked.defaults = defaults; + +/** + * Use Extension + */ + +marked.use = function(extension) { + const opts = merge({}, extension); + if (extension.renderer) { + const renderer = marked.defaults.renderer || new Renderer(); + for (const prop in extension.renderer) { + const prevRenderer = renderer[prop]; + renderer[prop] = (...args) => { + let ret = extension.renderer[prop].apply(renderer, args); + if (ret === false) { + ret = prevRenderer.apply(renderer, args); + } + return ret; + }; + } + opts.renderer = renderer; + } + if (extension.tokenizer) { + const tokenizer = marked.defaults.tokenizer || new Tokenizer(); + for (const prop in extension.tokenizer) { + const prevTokenizer = tokenizer[prop]; + tokenizer[prop] = (...args) => { + let ret = extension.tokenizer[prop].apply(tokenizer, args); + if (ret === false) { + ret = prevTokenizer.apply(tokenizer, args); + } + return ret; + }; + } + opts.tokenizer = tokenizer; + } + if (extension.walkTokens) { + const walkTokens = marked.defaults.walkTokens; + opts.walkTokens = (token) => { + extension.walkTokens(token); + if (walkTokens) { + walkTokens(token); + } + }; + } + marked.setOptions(opts); +}; + +/** + * Run callback for every token + */ + +marked.walkTokens = function(tokens, callback) { + for (const token of tokens) { + callback(token); + switch (token.type) { + case 'table': { + for (const cell of token.tokens.header) { + marked.walkTokens(cell, callback); + } + for (const row of token.tokens.cells) { + for (const cell of row) { + marked.walkTokens(cell, callback); + } + } + break; + } + case 'list': { + marked.walkTokens(token.items, callback); + break; + } + default: { + if (token.tokens) { + marked.walkTokens(token.tokens, callback); + } + } + } + } +}; + +/** + * Parse Inline + */ +marked.parseInline = function(src, opt) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked.parseInline(): input parameter is undefined or null'); + } + if (typeof src !== 'string') { + throw new Error('marked.parseInline(): input parameter is of type ' + + Object.prototype.toString.call(src) + ', string expected'); + } + + opt = merge({}, marked.defaults, opt || {}); + checkSanitizeDeprecation(opt); + + try { + const tokens = Lexer.lexInline(src, opt); + if (opt.walkTokens) { + marked.walkTokens(tokens, opt.walkTokens); + } + return Parser.parseInline(tokens, opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + if (opt.silent) { + return '<p>An error occurred:</p><pre>' + + escape(e.message + '', true) + + '</pre>'; + } + throw e; + } +}; + +/** + * Expose + */ + +marked.Parser = Parser; +marked.parser = Parser.parse; + +marked.Renderer = Renderer; +marked.TextRenderer = TextRenderer; + +marked.Lexer = Lexer; +marked.lexer = Lexer.lex; + +marked.Tokenizer = Tokenizer; + +marked.Slugger = Slugger; + +marked.parse = marked; + +module.exports = marked; diff --git a/node_modules/marked/src/rules.js b/node_modules/marked/src/rules.js @@ -0,0 +1,339 @@ +const { + noopTest, + edit, + merge +} = require('./helpers.js'); + +/** + * Block-Level Grammar + */ +const block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/, + hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, + heading: /^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: '^ {0,3}(?:' // optional indentation + + '<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1) + + '|comment[^\\n]*(\\n+|$)' // (2) + + '|<\\?[\\s\\S]*?(?:\\?>\\n*|$)' // (3) + + '|<![A-Z][\\s\\S]*?(?:>\\n*|$)' // (4) + + '|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)' // (5) + + '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6) + + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag + + '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag + + ')', + def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, + nptable: noopTest, + table: noopTest, + lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, + // regex template, placeholders will be replaced according to different paragraph + // interruption rules of commonmark and the original markdown spec: + _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/, + text: /^[^\n]+/ +}; + +block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; +block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; +block.def = edit(block.def) + .replace('label', block._label) + .replace('title', block._title) + .getRegex(); + +block.bullet = /(?:[*+-]|\d{1,9}[.)])/; +block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/; +block.item = edit(block.item, 'gm') + .replace(/bull/g, block.bullet) + .getRegex(); + +block.list = edit(block.list) + .replace(/bull/g, block.bullet) + .replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))') + .replace('def', '\\n+(?=' + block.def.source + ')') + .getRegex(); + +block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + + '|track|ul'; +block._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/; +block.html = edit(block.html, 'i') + .replace('comment', block._comment) + .replace('tag', block._tag) + .replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/) + .getRegex(); + +block.paragraph = edit(block._paragraph) + .replace('hr', block.hr) + .replace('heading', ' {0,3}#{1,6} ') + .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs + .replace('blockquote', ' {0,3}>') + .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n') + .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)') + .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks + .getRegex(); + +block.blockquote = edit(block.blockquote) + .replace('paragraph', block.paragraph) + .getRegex(); + +/** + * Normal Block Grammar + */ + +block.normal = merge({}, block); + +/** + * GFM Block Grammar + */ + +block.gfm = merge({}, block.normal, { + nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header + + ' {0,3}([-:]+ *\\|[-| :]*)' // Align + + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells + table: '^ *\\|(.+)\\n' // Header + + ' {0,3}\\|?( *[-:]+[-| :]*)' // Align + + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells +}); + +block.gfm.nptable = edit(block.gfm.nptable) + .replace('hr', block.hr) + .replace('heading', ' {0,3}#{1,6} ') + .replace('blockquote', ' {0,3}>') + .replace('code', ' {4}[^\\n]') + .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n') + .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)') + .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks + .getRegex(); + +block.gfm.table = edit(block.gfm.table) + .replace('hr', block.hr) + .replace('heading', ' {0,3}#{1,6} ') + .replace('blockquote', ' {0,3}>') + .replace('code', ' {4}[^\\n]') + .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n') + .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt + .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)') + .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks + .getRegex(); + +/** + * Pedantic grammar (original John Gruber's loose markdown specification) + */ + +block.pedantic = merge({}, block.normal, { + html: edit( + '^ *(?:comment *(?:\\n|\\s*$)' + + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag + + '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))') + .replace('comment', block._comment) + .replace(/tag/g, '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b') + .getRegex(), + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, + fences: noopTest, // fences not supported + paragraph: edit(block.normal._paragraph) + .replace('hr', block.hr) + .replace('heading', ' *#{1,6} *[^\n]') + .replace('lheading', block.lheading) + .replace('blockquote', ' {0,3}>') + .replace('|fences', '') + .replace('|list', '') + .replace('|html', '') + .getRegex() +}); + +/** + * Inline-Level Grammar + */ +const inline = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: noopTest, + tag: '^comment' + + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag + + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag + + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?> + + '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html> + + '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>', // CDATA section + link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, + nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, + reflinkSearch: 'reflink|nolink(?!\\()', + strong: { + start: /^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/, // (1) returns if starts w/ punctuation + middle: /^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/, + endAst: /[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/, // last char can't be punct, or final * must also be followed by punct (or endline) + endUnd: /[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) + }, + em: { + start: /^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/, // (1) returns if starts w/ punctuation + middle: /^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/, + endAst: /[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/, // last char can't be punct, or final * must also be followed by punct (or endline) + endUnd: /[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) + }, + code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: noopTest, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/, + punctuation: /^([\s*punctuation])/ +}; + +// list of punctuation marks from common mark spec +// without * and _ to workaround cases with double emphasis +inline._punctuation = '!"#$%&\'()+\\-.,/:;<=>?@\\[\\]`^{|}~'; +inline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); + +// sequences em should skip over [title](link), `code`, <html> +inline._blockSkip = '\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>'; +inline._overlapSkip = '__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*'; + +inline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex(); + +inline.em.start = edit(inline.em.start) + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.em.middle = edit(inline.em.middle) + .replace(/punctuation/g, inline._punctuation) + .replace(/overlapSkip/g, inline._overlapSkip) + .getRegex(); + +inline.em.endAst = edit(inline.em.endAst, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.em.endUnd = edit(inline.em.endUnd, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.strong.start = edit(inline.strong.start) + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.strong.middle = edit(inline.strong.middle) + .replace(/punctuation/g, inline._punctuation) + .replace(/overlapSkip/g, inline._overlapSkip) + .getRegex(); + +inline.strong.endAst = edit(inline.strong.endAst, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.strong.endUnd = edit(inline.strong.endUnd, 'g') + .replace(/punctuation/g, inline._punctuation) + .getRegex(); + +inline.blockSkip = edit(inline._blockSkip, 'g') + .getRegex(); + +inline.overlapSkip = edit(inline._overlapSkip, 'g') + .getRegex(); + +inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; + +inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; +inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; +inline.autolink = edit(inline.autolink) + .replace('scheme', inline._scheme) + .replace('email', inline._email) + .getRegex(); + +inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; + +inline.tag = edit(inline.tag) + .replace('comment', inline._comment) + .replace('attribute', inline._attribute) + .getRegex(); + +inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; +inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/; +inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; + +inline.link = edit(inline.link) + .replace('label', inline._label) + .replace('href', inline._href) + .replace('title', inline._title) + .getRegex(); + +inline.reflink = edit(inline.reflink) + .replace('label', inline._label) + .getRegex(); + +inline.reflinkSearch = edit(inline.reflinkSearch, 'g') + .replace('reflink', inline.reflink) + .replace('nolink', inline.nolink) + .getRegex(); + +/** + * Normal Inline Grammar + */ + +inline.normal = merge({}, inline); + +/** + * Pedantic Inline Grammar + */ + +inline.pedantic = merge({}, inline.normal, { + strong: { + start: /^__|\*\*/, + middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + endAst: /\*\*(?!\*)/g, + endUnd: /__(?!_)/g + }, + em: { + start: /^_|\*/, + middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, + endAst: /\*(?!\*)/g, + endUnd: /_(?!_)/g + }, + link: edit(/^!?\[(label)\]\((.*?)\)/) + .replace('label', inline._label) + .getRegex(), + reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/) + .replace('label', inline._label) + .getRegex() +}); + +/** + * GFM Inline Grammar + */ + +inline.gfm = merge({}, inline.normal, { + escape: edit(inline.escape).replace('])', '~|])').getRegex(), + _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, + url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, + _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, + del: /^~+(?=\S)([\s\S]*?\S)~+/, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/ +}); + +inline.gfm.url = edit(inline.gfm.url, 'i') + .replace('email', inline.gfm._extended_email) + .getRegex(); +/** + * GFM + Line Breaks Inline Grammar + */ + +inline.breaks = merge({}, inline.gfm, { + br: edit(inline.br).replace('{2,}', '*').getRegex(), + text: edit(inline.gfm.text) + .replace('\\b_', '\\b_| {2,}\\n') + .replace(/\{2,\}/g, '*') + .getRegex() +}); + +module.exports = { + block, + inline +}; diff --git a/node_modules/sprintf-js/.npmignore b/node_modules/sprintf-js/.npmignore @@ -0,0 +1 @@ +/node_modules/+ \ No newline at end of file diff --git a/node_modules/sprintf-js/LICENSE b/node_modules/sprintf-js/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2007-2014, Alexandru Marasteanu <hello [at) alexei (dot] ro> +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 this software 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 THE AUTHORS OR COPYRIGHT HOLDERS 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/node_modules/sprintf-js/README.md b/node_modules/sprintf-js/README.md @@ -0,0 +1,88 @@ +# sprintf.js +**sprintf.js** is a complete open source JavaScript sprintf implementation for the *browser* and *node.js*. + +Its prototype is simple: + + string sprintf(string format , [mixed arg1 [, mixed arg2 [ ,...]]]) + +The placeholders in the format string are marked by `%` and are followed by one or more of these elements, in this order: + +* An optional number followed by a `$` sign that selects which argument index to use for the value. If not specified, arguments will be placed in the same order as the placeholders in the input string. +* An optional `+` sign that forces to preceed the result with a plus or minus sign on numeric values. By default, only the `-` sign is used on negative numbers. +* An optional padding specifier that says what character to use for padding (if specified). Possible values are `0` or any other character precedeed by a `'` (single quote). The default is to pad with *spaces*. +* An optional `-` sign, that causes sprintf to left-align the result of this placeholder. The default is to right-align the result. +* An optional number, that says how many characters the result should have. If the value to be returned is shorter than this number, the result will be padded. When used with the `j` (JSON) type specifier, the padding length specifies the tab size used for indentation. +* An optional precision modifier, consisting of a `.` (dot) followed by a number, that says how many digits should be displayed for floating point numbers. When used with the `g` type specifier, it specifies the number of significant digits. When used on a string, it causes the result to be truncated. +* A type specifier that can be any of: + * `%` — yields a literal `%` character + * `b` — yields an integer as a binary number + * `c` — yields an integer as the character with that ASCII value + * `d` or `i` — yields an integer as a signed decimal number + * `e` — yields a float using scientific notation + * `u` — yields an integer as an unsigned decimal number + * `f` — yields a float as is; see notes on precision above + * `g` — yields a float as is; see notes on precision above + * `o` — yields an integer as an octal number + * `s` — yields a string as is + * `x` — yields an integer as a hexadecimal number (lower-case) + * `X` — yields an integer as a hexadecimal number (upper-case) + * `j` — yields a JavaScript object or array as a JSON encoded string + +## JavaScript `vsprintf` +`vsprintf` is the same as `sprintf` except that it accepts an array of arguments, rather than a variable number of arguments: + + vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"]) + +## Argument swapping +You can also swap the arguments. That is, the order of the placeholders doesn't have to match the order of the arguments. You can do that by simply indicating in the format string which arguments the placeholders refer to: + + sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants") +And, of course, you can repeat the placeholders without having to increase the number of arguments. + +## Named arguments +Format strings may contain replacement fields rather than positional placeholders. Instead of referring to a certain argument, you can now refer to a certain key within an object. Replacement fields are surrounded by rounded parentheses - `(` and `)` - and begin with a keyword that refers to a key: + + var user = { + name: "Dolly" + } + sprintf("Hello %(name)s", user) // Hello Dolly +Keywords in replacement fields can be optionally followed by any number of keywords or indexes: + + var users = [ + {name: "Dolly"}, + {name: "Molly"}, + {name: "Polly"} + ] + sprintf("Hello %(users[0].name)s, %(users[1].name)s and %(users[2].name)s", {users: users}) // Hello Dolly, Molly and Polly +Note: mixing positional and named placeholders is not (yet) supported + +## Computed values +You can pass in a function as a dynamic value and it will be invoked (with no arguments) in order to compute the value on-the-fly. + + sprintf("Current timestamp: %d", Date.now) // Current timestamp: 1398005382890 + sprintf("Current date and time: %s", function() { return new Date().toString() }) + +# AngularJS +You can now use `sprintf` and `vsprintf` (also aliased as `fmt` and `vfmt` respectively) in your AngularJS projects. See `demo/`. + +# Installation + +## Via Bower + + bower install sprintf + +## Or as a node.js module + + npm install sprintf-js + +### Usage + + var sprintf = require("sprintf-js").sprintf, + vsprintf = require("sprintf-js").vsprintf + + sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants") + vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"]) + +# License + +**sprintf.js** is licensed under the terms of the 3-clause BSD license. diff --git a/node_modules/sprintf-js/bower.json b/node_modules/sprintf-js/bower.json @@ -0,0 +1,14 @@ +{ + "name": "sprintf", + "description": "JavaScript sprintf implementation", + "version": "1.0.3", + "main": "src/sprintf.js", + "license": "BSD-3-Clause-Clear", + "keywords": ["sprintf", "string", "formatting"], + "authors": ["Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/)"], + "homepage": "https://github.com/alexei/sprintf.js", + "repository": { + "type": "git", + "url": "git://github.com/alexei/sprintf.js.git" + } +} diff --git a/node_modules/sprintf-js/demo/angular.html b/node_modules/sprintf-js/demo/angular.html @@ -0,0 +1,20 @@ +<!doctype html> +<html ng-app="app"> +<head> + <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.3/angular.min.js"></script> + <script src="../src/sprintf.js"></script> + <script src="../src/angular-sprintf.js"></script> +</head> +<body> + <pre>{{ "%+010d"|sprintf:-123 }}</pre> + <pre>{{ "%+010d"|vsprintf:[-123] }}</pre> + <pre>{{ "%+010d"|fmt:-123 }}</pre> + <pre>{{ "%+010d"|vfmt:[-123] }}</pre> + <pre>{{ "I've got %2$d apples and %1$d oranges."|fmt:4:2 }}</pre> + <pre>{{ "I've got %(apples)d apples and %(oranges)d oranges."|fmt:{apples: 2, oranges: 4} }}</pre> + + <script> + angular.module("app", ["sprintf"]) + </script> +</body> +</html> diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.js b/node_modules/sprintf-js/dist/angular-sprintf.min.js @@ -0,0 +1,4 @@ +/*! sprintf-js | Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/) | BSD-3-Clause */ + +angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]); +//# sourceMappingURL=angular-sprintf.min.map+ \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.js.map b/node_modules/sprintf-js/dist/angular-sprintf.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"}+ \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.map b/node_modules/sprintf-js/dist/angular-sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"}+ \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/sprintf.min.js b/node_modules/sprintf-js/dist/sprintf.min.js @@ -0,0 +1,4 @@ +/*! sprintf-js | Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/) | BSD-3-Clause */ + +!function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i<j[2].length;i++){if(!g.hasOwnProperty(j[2][i]))throw new Error(b("[sprintf] property '%s' does not exist",j[2][i]));g=g[j[2][i]]}else g=j[1]?f[j[1]]:f[n++];if("function"==c(g)&&(g=g()),e.not_string.test(j[8])&&e.not_json.test(j[8])&&"number"!=c(g)&&isNaN(g))throw new TypeError(b("[sprintf] expecting number but found %s",c(g)));switch(e.number.test(j[8])&&(r=g>=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"j":g=JSON.stringify(g,null,j[6]?parseInt(j[6]):0);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"g":g=j[7]?parseFloat(g).toPrecision(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}e.json.test(j[8])?q[q.length]=g:(!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g)}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window); +//# sourceMappingURL=sprintf.min.map+ \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/sprintf.min.js.map b/node_modules/sprintf-js/dist/sprintf.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA4JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GApLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,SACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYnC,EAASuB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI7B,eAAegC,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM9C,EAAQ,yCAA0CoC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjBhC,EAASyB,KACTA,EAAMA,KAGNb,EAAGC,WAAW0B,KAAKX,EAAM,KAAOhB,EAAGI,SAASuB,KAAKX,EAAM,KAAyB,UAAjB5B,EAASyB,IAAoBe,MAAMf,GAClG,KAAM,IAAIgB,WAAUjD,EAAQ,0CAA2CQ,EAASyB,IAOpF,QAJIb,EAAGE,OAAOyB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMoB,KAAKC,UAAUrB,EAAK,KAAMG,EAAM,GAAKgB,SAAShB,EAAM,IAAM,EACpE,MACA,KAAK,IACDH,EAAMG,EAAM,GAAKH,EAAIsB,cAAcnB,EAAM,IAAMH,EAAIsB,eACvD,MACA,KAAK,IACDtB,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKwB,QAAQrB,EAAM,IAAMoB,WAAWvB,EACpE,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAIyB,UAAU,EAAGtB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,GACvB,MACA,KAAK,IACDqB,EAAMA,EAAIrB,SAAS,IAAI+C,cAG3BvC,EAAGG,KAAKwB,KAAKX,EAAM,IACnBQ,EAAOA,EAAOF,QAAUT,IAGpBb,EAAGE,OAAOyB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAIrB,WAAWgD,QAAQxC,EAAGU,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAGyB,OAAO,GAAK,IACzEtB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAIxB,EAAWuB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,GAI3H,MAAOW,GAAOzB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAASyD,GAErB,IADA,GAAIC,GAAOD,EAAK1B,KAAYL,KAAiBiC,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhC3B,EAAQhB,EAAGK,KAAKwC,KAAKF,IACtBhC,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQhB,EAAGM,OAAOuC,KAAKF,IAC7BhC,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYsC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI9B,EAAM,GAAI,CACV4B,GAAa,CACb,IAAIG,MAAiBC,EAAoBhC,EAAM,GAAIiC,IACnD,IAAuD,QAAlDA,EAAcjD,EAAGnB,IAAIgE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAWzB,QAAU2B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG3B,UACnE,GAA8D,QAAzD2B,EAAcjD,EAAGQ,WAAWqC,KAAKG,IAClCD,EAAWA,EAAWzB,QAAU2B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAcjD,EAAGS,aAAaoC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAWzB,QAAU2B,EAAY,GAUxDjC,EAAM,GAAK+B,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAIlB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC2B,EAAOA,EAAKL,UAAUtB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIuC,GAAW,SAASR,EAAK9B,EAAMuC,GAG/B,MAFAA,IAASvC,OAAYnB,MAAM,GAC3B0D,EAAMC,OAAO,EAAG,EAAGV,GACZ9D,EAAQyE,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ1E,QAAUA,EAClB0E,QAAQJ,SAAWA,IAGnBvE,EAAOC,QAAUA,EACjBD,EAAOuE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI3E,QAASA,EACTsE,SAAUA,OAKT,mBAAXvE,QAAyB8E,KAAO9E"}+ \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/sprintf.min.map b/node_modules/sprintf-js/dist/sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","toPrecision","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA+JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GAvLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,UACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYnC,EAASuB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI7B,eAAegC,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM9C,EAAQ,yCAA0CoC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjBhC,EAASyB,KACTA,EAAMA,KAGNb,EAAGC,WAAW0B,KAAKX,EAAM,KAAOhB,EAAGI,SAASuB,KAAKX,EAAM,KAAyB,UAAjB5B,EAASyB,IAAoBe,MAAMf,GAClG,KAAM,IAAIgB,WAAUjD,EAAQ,0CAA2CQ,EAASyB,IAOpF,QAJIb,EAAGE,OAAOyB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMoB,KAAKC,UAAUrB,EAAK,KAAMG,EAAM,GAAKgB,SAAShB,EAAM,IAAM,EACpE,MACA,KAAK,IACDH,EAAMG,EAAM,GAAKH,EAAIsB,cAAcnB,EAAM,IAAMH,EAAIsB,eACvD,MACA,KAAK,IACDtB,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKwB,QAAQrB,EAAM,IAAMoB,WAAWvB,EACpE,MACA,KAAK,IACDA,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKyB,YAAYtB,EAAM,IAAMoB,WAAWvB,EACxE,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAI0B,UAAU,EAAGvB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,GACvB,MACA,KAAK,IACDqB,EAAMA,EAAIrB,SAAS,IAAIgD,cAG3BxC,EAAGG,KAAKwB,KAAKX,EAAM,IACnBQ,EAAOA,EAAOF,QAAUT,IAGpBb,EAAGE,OAAOyB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAIrB,WAAWiD,QAAQzC,EAAGU,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAG0B,OAAO,GAAK,IACzEvB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAIxB,EAAWuB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,GAI3H,MAAOW,GAAOzB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAAS0D,GAErB,IADA,GAAIC,GAAOD,EAAK3B,KAAYL,KAAiBkC,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhC5B,EAAQhB,EAAGK,KAAKyC,KAAKF,IACtBjC,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQhB,EAAGM,OAAOwC,KAAKF,IAC7BjC,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYuC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI/B,EAAM,GAAI,CACV6B,GAAa,CACb,IAAIG,MAAiBC,EAAoBjC,EAAM,GAAIkC,IACnD,IAAuD,QAAlDA,EAAclD,EAAGnB,IAAIiE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAW1B,QAAU4B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG5B,UACnE,GAA8D,QAAzD4B,EAAclD,EAAGQ,WAAWsC,KAAKG,IAClCD,EAAWA,EAAW1B,QAAU4B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAclD,EAAGS,aAAaqC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAW1B,QAAU4B,EAAY,GAUxDlC,EAAM,GAAKgC,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAInB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC4B,EAAOA,EAAKL,UAAUvB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIwC,GAAW,SAASR,EAAK/B,EAAMwC,GAG/B,MAFAA,IAASxC,OAAYnB,MAAM,GAC3B2D,EAAMC,OAAO,EAAG,EAAGV,GACZ/D,EAAQ0E,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ3E,QAAUA,EAClB2E,QAAQJ,SAAWA,IAGnBxE,EAAOC,QAAUA,EACjBD,EAAOwE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI5E,QAASA,EACTuE,SAAUA,OAKT,mBAAXxE,QAAyB+E,KAAO/E"}+ \ No newline at end of file diff --git a/node_modules/sprintf-js/gruntfile.js b/node_modules/sprintf-js/gruntfile.js @@ -0,0 +1,36 @@ +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), + + uglify: { + options: { + banner: "/*! <%= pkg.name %> | <%= pkg.author %> | <%= pkg.license %> */\n", + sourceMap: true + }, + build: { + files: [ + { + src: "src/sprintf.js", + dest: "dist/sprintf.min.js" + }, + { + src: "src/angular-sprintf.js", + dest: "dist/angular-sprintf.min.js" + } + ] + } + }, + + watch: { + js: { + files: "src/*.js", + tasks: ["uglify"] + } + } + }) + + grunt.loadNpmTasks("grunt-contrib-uglify") + grunt.loadNpmTasks("grunt-contrib-watch") + + grunt.registerTask("default", ["uglify", "watch"]) +} diff --git a/node_modules/sprintf-js/package.json b/node_modules/sprintf-js/package.json @@ -0,0 +1,54 @@ +{ + "_from": "sprintf-js@~1.0.2", + "_id": "sprintf-js@1.0.3", + "_inBundle": false, + "_integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "_location": "/sprintf-js", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "sprintf-js@~1.0.2", + "name": "sprintf-js", + "escapedName": "sprintf-js", + "rawSpec": "~1.0.2", + "saveSpec": null, + "fetchSpec": "~1.0.2" + }, + "_requiredBy": [ + "/argparse" + ], + "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "_shasum": "04e6926f662895354f3dd015203633b857297e2c", + "_spec": "sprintf-js@~1.0.2", + "_where": "/home/l0bster/Documents/l0bsterSSG/node_modules/argparse", + "author": { + "name": "Alexandru Marasteanu", + "email": "hello@alexei.ro", + "url": "http://alexei.ro/" + }, + "bugs": { + "url": "https://github.com/alexei/sprintf.js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "JavaScript sprintf implementation", + "devDependencies": { + "grunt": "*", + "grunt-contrib-uglify": "*", + "grunt-contrib-watch": "*", + "mocha": "*" + }, + "homepage": "https://github.com/alexei/sprintf.js#readme", + "license": "BSD-3-Clause", + "main": "src/sprintf.js", + "name": "sprintf-js", + "repository": { + "type": "git", + "url": "git+https://github.com/alexei/sprintf.js.git" + }, + "scripts": { + "test": "mocha test/test.js" + }, + "version": "1.0.3" +} diff --git a/node_modules/sprintf-js/src/angular-sprintf.js b/node_modules/sprintf-js/src/angular-sprintf.js @@ -0,0 +1,18 @@ +angular. + module("sprintf", []). + filter("sprintf", function() { + return function() { + return sprintf.apply(null, arguments) + } + }). + filter("fmt", ["$filter", function($filter) { + return $filter("sprintf") + }]). + filter("vsprintf", function() { + return function(format, argv) { + return vsprintf(format, argv) + } + }). + filter("vfmt", ["$filter", function($filter) { + return $filter("vsprintf") + }]) diff --git a/node_modules/sprintf-js/src/sprintf.js b/node_modules/sprintf-js/src/sprintf.js @@ -0,0 +1,208 @@ +(function(window) { + var re = { + not_string: /[^s]/, + number: /[diefg]/, + json: /[j]/, + not_json: /[^j]/, + text: /^[^\x25]+/, + modulo: /^\x25{2}/, + placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/, + key: /^([a-z_][a-z_\d]*)/i, + key_access: /^\.([a-z_][a-z_\d]*)/i, + index_access: /^\[(\d+)\]/, + sign: /^[\+\-]/ + } + + function sprintf() { + var key = arguments[0], cache = sprintf.cache + if (!(cache[key] && cache.hasOwnProperty(key))) { + cache[key] = sprintf.parse(key) + } + return sprintf.format.call(null, cache[key], arguments) + } + + sprintf.format = function(parse_tree, argv) { + var cursor = 1, tree_length = parse_tree.length, node_type = "", arg, output = [], i, k, match, pad, pad_character, pad_length, is_positive = true, sign = "" + for (i = 0; i < tree_length; i++) { + node_type = get_type(parse_tree[i]) + if (node_type === "string") { + output[output.length] = parse_tree[i] + } + else if (node_type === "array") { + match = parse_tree[i] // convenience purposes only + if (match[2]) { // keyword argument + arg = argv[cursor] + for (k = 0; k < match[2].length; k++) { + if (!arg.hasOwnProperty(match[2][k])) { + throw new Error(sprintf("[sprintf] property '%s' does not exist", match[2][k])) + } + arg = arg[match[2][k]] + } + } + else if (match[1]) { // positional argument (explicit) + arg = argv[match[1]] + } + else { // positional argument (implicit) + arg = argv[cursor++] + } + + if (get_type(arg) == "function") { + arg = arg() + } + + if (re.not_string.test(match[8]) && re.not_json.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) { + throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg))) + } + + if (re.number.test(match[8])) { + is_positive = arg >= 0 + } + + switch (match[8]) { + case "b": + arg = arg.toString(2) + break + case "c": + arg = String.fromCharCode(arg) + break + case "d": + case "i": + arg = parseInt(arg, 10) + break + case "j": + arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0) + break + case "e": + arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential() + break + case "f": + arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg) + break + case "g": + arg = match[7] ? parseFloat(arg).toPrecision(match[7]) : parseFloat(arg) + break + case "o": + arg = arg.toString(8) + break + case "s": + arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg) + break + case "u": + arg = arg >>> 0 + break + case "x": + arg = arg.toString(16) + break + case "X": + arg = arg.toString(16).toUpperCase() + break + } + if (re.json.test(match[8])) { + output[output.length] = arg + } + else { + if (re.number.test(match[8]) && (!is_positive || match[3])) { + sign = is_positive ? "+" : "-" + arg = arg.toString().replace(re.sign, "") + } + else { + sign = "" + } + pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " " + pad_length = match[6] - (sign + arg).length + pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : "" + output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg) + } + } + } + return output.join("") + } + + sprintf.cache = {} + + sprintf.parse = function(fmt) { + var _fmt = fmt, match = [], parse_tree = [], arg_names = 0 + while (_fmt) { + if ((match = re.text.exec(_fmt)) !== null) { + parse_tree[parse_tree.length] = match[0] + } + else if ((match = re.modulo.exec(_fmt)) !== null) { + parse_tree[parse_tree.length] = "%" + } + else if ((match = re.placeholder.exec(_fmt)) !== null) { + if (match[2]) { + arg_names |= 1 + var field_list = [], replacement_field = match[2], field_match = [] + if ((field_match = re.key.exec(replacement_field)) !== null) { + field_list[field_list.length] = field_match[1] + while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") { + if ((field_match = re.key_access.exec(replacement_field)) !== null) { + field_list[field_list.length] = field_match[1] + } + else if ((field_match = re.index_access.exec(replacement_field)) !== null) { + field_list[field_list.length] = field_match[1] + } + else { + throw new SyntaxError("[sprintf] failed to parse named argument key") + } + } + } + else { + throw new SyntaxError("[sprintf] failed to parse named argument key") + } + match[2] = field_list + } + else { + arg_names |= 2 + } + if (arg_names === 3) { + throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported") + } + parse_tree[parse_tree.length] = match + } + else { + throw new SyntaxError("[sprintf] unexpected placeholder") + } + _fmt = _fmt.substring(match[0].length) + } + return parse_tree + } + + var vsprintf = function(fmt, argv, _argv) { + _argv = (argv || []).slice(0) + _argv.splice(0, 0, fmt) + return sprintf.apply(null, _argv) + } + + /** + * helpers + */ + function get_type(variable) { + return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase() + } + + function str_repeat(input, multiplier) { + return Array(multiplier + 1).join(input) + } + + /** + * export to either browser or node.js + */ + if (typeof exports !== "undefined") { + exports.sprintf = sprintf + exports.vsprintf = vsprintf + } + else { + window.sprintf = sprintf + window.vsprintf = vsprintf + + if (typeof define === "function" && define.amd) { + define(function() { + return { + sprintf: sprintf, + vsprintf: vsprintf + } + }) + } + } +})(typeof window === "undefined" ? this : window); diff --git a/node_modules/sprintf-js/test/test.js b/node_modules/sprintf-js/test/test.js @@ -0,0 +1,82 @@ +var assert = require("assert"), + sprintfjs = require("../src/sprintf.js"), + sprintf = sprintfjs.sprintf, + vsprintf = sprintfjs.vsprintf + +describe("sprintfjs", function() { + var pi = 3.141592653589793 + + it("should return formated strings for simple placeholders", function() { + assert.equal("%", sprintf("%%")) + assert.equal("10", sprintf("%b", 2)) + assert.equal("A", sprintf("%c", 65)) + assert.equal("2", sprintf("%d", 2)) + assert.equal("2", sprintf("%i", 2)) + assert.equal("2", sprintf("%d", "2")) + assert.equal("2", sprintf("%i", "2")) + assert.equal('{"foo":"bar"}', sprintf("%j", {foo: "bar"})) + assert.equal('["foo","bar"]', sprintf("%j", ["foo", "bar"])) + assert.equal("2e+0", sprintf("%e", 2)) + assert.equal("2", sprintf("%u", 2)) + assert.equal("4294967294", sprintf("%u", -2)) + assert.equal("2.2", sprintf("%f", 2.2)) + assert.equal("3.141592653589793", sprintf("%g", pi)) + assert.equal("10", sprintf("%o", 8)) + assert.equal("%s", sprintf("%s", "%s")) + assert.equal("ff", sprintf("%x", 255)) + assert.equal("FF", sprintf("%X", 255)) + assert.equal("Polly wants a cracker", sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants")) + assert.equal("Hello world!", sprintf("Hello %(who)s!", {"who": "world"})) + }) + + it("should return formated strings for complex placeholders", function() { + // sign + assert.equal("2", sprintf("%d", 2)) + assert.equal("-2", sprintf("%d", -2)) + assert.equal("+2", sprintf("%+d", 2)) + assert.equal("-2", sprintf("%+d", -2)) + assert.equal("2", sprintf("%i", 2)) + assert.equal("-2", sprintf("%i", -2)) + assert.equal("+2", sprintf("%+i", 2)) + assert.equal("-2", sprintf("%+i", -2)) + assert.equal("2.2", sprintf("%f", 2.2)) + assert.equal("-2.2", sprintf("%f", -2.2)) + assert.equal("+2.2", sprintf("%+f", 2.2)) + assert.equal("-2.2", sprintf("%+f", -2.2)) + assert.equal("-2.3", sprintf("%+.1f", -2.34)) + assert.equal("-0.0", sprintf("%+.1f", -0.01)) + assert.equal("3.14159", sprintf("%.6g", pi)) + assert.equal("3.14", sprintf("%.3g", pi)) + assert.equal("3", sprintf("%.1g", pi)) + assert.equal("-000000123", sprintf("%+010d", -123)) + assert.equal("______-123", sprintf("%+'_10d", -123)) + assert.equal("-234.34 123.2", sprintf("%f %f", -234.34, 123.2)) + + // padding + assert.equal("-0002", sprintf("%05d", -2)) + assert.equal("-0002", sprintf("%05i", -2)) + assert.equal(" <", sprintf("%5s", "<")) + assert.equal("0000<", sprintf("%05s", "<")) + assert.equal("____<", sprintf("%'_5s", "<")) + assert.equal("> ", sprintf("%-5s", ">")) + assert.equal(">0000", sprintf("%0-5s", ">")) + assert.equal(">____", sprintf("%'_-5s", ">")) + assert.equal("xxxxxx", sprintf("%5s", "xxxxxx")) + assert.equal("1234", sprintf("%02u", 1234)) + assert.equal(" -10.235", sprintf("%8.3f", -10.23456)) + assert.equal("-12.34 xxx", sprintf("%f %s", -12.34, "xxx")) + assert.equal('{\n "foo": "bar"\n}', sprintf("%2j", {foo: "bar"})) + assert.equal('[\n "foo",\n "bar"\n]', sprintf("%2j", ["foo", "bar"])) + + // precision + assert.equal("2.3", sprintf("%.1f", 2.345)) + assert.equal("xxxxx", sprintf("%5.5s", "xxxxxx")) + assert.equal(" x", sprintf("%5.1s", "xxxxxx")) + + }) + + it("should return formated strings for callbacks", function() { + assert.equal("foobar", sprintf("%s", function() { return "foobar" })) + assert.equal(Date.now(), sprintf("%s", Date.now)) // should pass... + }) +}) diff --git a/package-lock.json b/package-lock.json @@ -0,0 +1,53 @@ +{ + "name": "l0bsterssg", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "front-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", + "requires": { + "js-yaml": "^3.13.1" + } + }, + "highlight.js": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.2.1.tgz", + "integrity": "sha512-A+sckVPIb9zQTUydC9lpRX1qRFO/N0OKEh0NwIr65ckvWA/oMY8v9P3+kGRK3w2ULSh9E8v5MszXafodQ6039g==" + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "marked": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.0.tgz", + "integrity": "sha512-tiRxakgbNPBr301ihe/785NntvYyhxlqcL3YaC8CaxJQh7kiaEtrN9B/eK2I2943Yjkh5gw25chYFDQhOMCwMA==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + } + } +} diff --git a/package.json b/package.json @@ -17,5 +17,10 @@ "API" ], "author": "l0bster", - "license": "MIT" + "license": "MIT", + "dependencies": { + "front-matter": "^4.0.2", + "highlight.js": "^10.2.1", + "marked": "^1.2.0" + } }