c0ckp1t 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +5 -0
- package/c0ckp1t-demo/Constants.mjs +125 -0
- package/c0ckp1t-demo/components/sidebar.vue +82 -0
- package/c0ckp1t-demo/main.vue +39 -0
- package/c0ckp1t-demo/pages/devices.vue +63 -0
- package/c0ckp1t-demo/pages/homepage.vue +63 -0
- package/c0ckp1t-demo/pages/report.vue +63 -0
- package/c0ckp1t-demo/store.mjs +133 -0
- package/components/ExecButton.vue +62 -0
- package/components/FsTree.vue +550 -0
- package/components/Markdown.mjs +274 -0
- package/components/MarkdownUtils.mjs +180 -0
- package/components/Tree.mjs +175 -0
- package/components/code-mirror.vue +445 -0
- package/components/vue3-ace-editor.vue +331 -0
- package/components/xbutton.vue +45 -0
- package/components/xcard-h.vue +175 -0
- package/components/xcard.vue +76 -0
- package/components/xcheck.vue +35 -0
- package/components/xcheckbox.vue +52 -0
- package/components/xcode.vue +139 -0
- package/components/xcollapse.vue +52 -0
- package/components/xcolor.vue +84 -0
- package/components/xdropdown.vue +104 -0
- package/components/xdropdown2.vue +140 -0
- package/components/xhidden.vue +30 -0
- package/components/xinput.vue +101 -0
- package/components/xinput2.vue +101 -0
- package/components/xjson.vue +95 -0
- package/components/xkv.vue +41 -0
- package/components/xlabel.vue +56 -0
- package/components/xlist.vue +83 -0
- package/components/xmap.vue +106 -0
- package/components/xmarkdown.vue +269 -0
- package/components/xnav.vue +98 -0
- package/components/xsection.vue +164 -0
- package/components/xsound.vue +251 -0
- package/components/xtable-open.vue +179 -0
- package/components/xtabs.vue +72 -0
- package/components/xterminal.vue +456 -0
- package/components/xtextarea.vue +83 -0
- package/components/xtoggle.vue +68 -0
- package/components/xtoggle3.vue +67 -0
- package/components/xtree.vue +140 -0
- package/components/xupload.vue +129 -0
- package/core/Content.mjs +92 -0
- package/core/DocUtils.mjs +189 -0
- package/core/GlobalStore.mjs +329 -0
- package/core/Island.mjs +429 -0
- package/core/IslandDefault.mjs +229 -0
- package/core/JsUtils.mjs +483 -0
- package/core/Logging.mjs +59 -0
- package/core/Page404.vue +152 -0
- package/core/PageFallback.vue +168 -0
- package/core/PageMain.vue +181 -0
- package/core/Theme.mjs +1759 -0
- package/core/VueUtils.mjs +200 -0
- package/core/WsUtils.mjs +274 -0
- package/core/img/Flag_of_the_United_States.svg +25 -0
- package/core/img/logo_v1.svg +98 -0
- package/core/img/logo_v2.svg +98 -0
- package/core/img/state-uniqueId-8k.wav +0 -0
- package/core/main-offcanvas.vue +99 -0
- package/core/nodes/_api.vue +82 -0
- package/core/nodes/node-container.vue +103 -0
- package/core/nodes/node.vue +246 -0
- package/core/nodes/place-holder.vue +47 -0
- package/core/nodes/root.vue +52 -0
- package/core/notify/NotifyUtils.mjs +150 -0
- package/core/notify/toast.vue +150 -0
- package/core/pages/About.vue +57 -0
- package/core/pages/Cache.vue +155 -0
- package/core/pages/Connection.vue +192 -0
- package/core/pages/Connections.vue +102 -0
- package/core/pages/Documentation.vue +263 -0
- package/core/pages/Notifies.vue +156 -0
- package/core/pages/Traffic.vue +152 -0
- package/core/pages/connections/connection-header-details.vue +80 -0
- package/core/pages/connections/page-connection-default.vue +92 -0
- package/core/pages/connections/page-connection.vue +176 -0
- package/core/pages/connections/ws-connection.vue +146 -0
- package/core/pages/frontend/Bootstrap.vue +1140 -0
- package/core/pages/frontend/Components.vue +56 -0
- package/core/pages/frontend/ComponentsAdv.vue +203 -0
- package/core/pages/frontend/ComponentsBasic.vue +336 -0
- package/core/pages/frontend/Theme.vue +473 -0
- package/core/pages/frontend/component-view.vue +65 -0
- package/core/pages/traffic/WsLogUtils.mjs +91 -0
- package/core/pages/traffic/log-ws-exec.vue +124 -0
- package/core/pages/traffic/log-ws-exec2.vue +129 -0
- package/core/sfc/code-item.vue +169 -0
- package/core/sfc/connection-header.vue +62 -0
- package/core/sfc/info-api.vue +158 -0
- package/core/sfc/md-toc.vue +346 -0
- package/core/sfc/scroll-to-top.vue +69 -0
- package/core/sfc/task.vue +98 -0
- package/core/sfc/text-to-md.vue +25 -0
- package/core/sfc/toc-list.vue +175 -0
- package/core/ws-client/AuthNState.mjs +84 -0
- package/core/ws-client/Connection.mjs +580 -0
- package/core/ws-client/Session.mjs +72 -0
- package/core/ws-client/WsClient.mjs +230 -0
- package/core/ws-client/WsLogUtils.mjs +91 -0
- package/core/ws-client/ws-connection.vue +144 -0
- package/css/Changa-Medium.ttf +0 -0
- package/css/Makefile +10 -0
- package/css/README.md +25 -0
- package/css/bootstrap-c0ckp1t.css +11861 -0
- package/css/bootstrap.min.css +6 -0
- package/css/fontawesome/brands.min.css +6 -0
- package/css/fontawesome/fontawesome.min.css +8 -0
- package/css/fontawesome/regular.min.css +6 -0
- package/css/fontawesome/solid.min.css +6 -0
- package/css/webfonts/fa-brands-400.woff2 +0 -0
- package/css/webfonts/fa-regular-400.woff2 +0 -0
- package/css/webfonts/fa-solid-900.woff2 +0 -0
- package/docs/Introduction.md +3 -0
- package/favicon-192x192.png +0 -0
- package/favicon-32x32.png +0 -0
- package/favicon-64x64.png +0 -0
- package/favicon.ico +0 -0
- package/index-cdn.html +66 -0
- package/js_ext/Makefile +26 -0
- package/js_ext/ace-editor/ace.js +22037 -0
- package/js_ext/ace-editor/ext-beautify.js +343 -0
- package/js_ext/ace-editor/ext-code_lens.js +204 -0
- package/js_ext/ace-editor/ext-command_bar.js +469 -0
- package/js_ext/ace-editor/ext-diff.js +4265 -0
- package/js_ext/ace-editor/ext-elastic_tabstops_lite.js +238 -0
- package/js_ext/ace-editor/ext-emmet.js +1303 -0
- package/js_ext/ace-editor/ext-error_marker.js +9 -0
- package/js_ext/ace-editor/ext-hardwrap.js +127 -0
- package/js_ext/ace-editor/ext-inline_autocomplete.js +3547 -0
- package/js_ext/ace-editor/ext-keybinding_menu.js +185 -0
- package/js_ext/ace-editor/ext-language_tools.js +2724 -0
- package/js_ext/ace-editor/ext-linking.js +66 -0
- package/js_ext/ace-editor/ext-modelist.js +276 -0
- package/js_ext/ace-editor/ext-options.js +859 -0
- package/js_ext/ace-editor/ext-prompt.js +3161 -0
- package/js_ext/ace-editor/ext-rtl.js +146 -0
- package/js_ext/ace-editor/ext-searchbox.js +385 -0
- package/js_ext/ace-editor/ext-settings_menu.js +859 -0
- package/js_ext/ace-editor/ext-simple_tokenizer.js +137 -0
- package/js_ext/ace-editor/ext-spellcheck.js +79 -0
- package/js_ext/ace-editor/ext-split.js +203 -0
- package/js_ext/ace-editor/ext-static_highlight.js +194 -0
- package/js_ext/ace-editor/ext-statusbar.js +63 -0
- package/js_ext/ace-editor/ext-textarea.js +400 -0
- package/js_ext/ace-editor/ext-themelist.js +80 -0
- package/js_ext/ace-editor/ext-whitespace.js +201 -0
- package/js_ext/ace-editor/keybinding-emacs.js +1067 -0
- package/js_ext/ace-editor/keybinding-sublime.js +409 -0
- package/js_ext/ace-editor/keybinding-vim.js +7101 -0
- package/js_ext/ace-editor/keybinding-vscode.js +255 -0
- package/js_ext/ace-editor/mode-abap.js +200 -0
- package/js_ext/ace-editor/mode-abc.js +243 -0
- package/js_ext/ace-editor/mode-actionscript.js +234 -0
- package/js_ext/ace-editor/mode-ada.js +108 -0
- package/js_ext/ace-editor/mode-alda.js +279 -0
- package/js_ext/ace-editor/mode-apache_conf.js +318 -0
- package/js_ext/ace-editor/mode-apex.js +402 -0
- package/js_ext/ace-editor/mode-applescript.js +232 -0
- package/js_ext/ace-editor/mode-aql.js +92 -0
- package/js_ext/ace-editor/mode-asciidoc.js +311 -0
- package/js_ext/ace-editor/mode-asl.js +357 -0
- package/js_ext/ace-editor/mode-assembly_arm32.js +185 -0
- package/js_ext/ace-editor/mode-assembly_x86.js +170 -0
- package/js_ext/ace-editor/mode-astro.js +2474 -0
- package/js_ext/ace-editor/mode-autohotkey.js +208 -0
- package/js_ext/ace-editor/mode-basic.js +201 -0
- package/js_ext/ace-editor/mode-batchfile.js +199 -0
- package/js_ext/ace-editor/mode-bibtex.js +318 -0
- package/js_ext/ace-editor/mode-c9search.js +250 -0
- package/js_ext/ace-editor/mode-c_cpp.js +417 -0
- package/js_ext/ace-editor/mode-cirru.js +192 -0
- package/js_ext/ace-editor/mode-clojure.js +322 -0
- package/js_ext/ace-editor/mode-clue.js +361 -0
- package/js_ext/ace-editor/mode-cobol.js +82 -0
- package/js_ext/ace-editor/mode-coffee.js +335 -0
- package/js_ext/ace-editor/mode-coldfusion.js +2409 -0
- package/js_ext/ace-editor/mode-crystal.js +586 -0
- package/js_ext/ace-editor/mode-csharp.js +413 -0
- package/js_ext/ace-editor/mode-csound_document.js +4072 -0
- package/js_ext/ace-editor/mode-csound_orchestra.js +2923 -0
- package/js_ext/ace-editor/mode-csound_score.js +409 -0
- package/js_ext/ace-editor/mode-csp.js +59 -0
- package/js_ext/ace-editor/mode-css.js +632 -0
- package/js_ext/ace-editor/mode-csv.js +97 -0
- package/js_ext/ace-editor/mode-curly.js +2381 -0
- package/js_ext/ace-editor/mode-cuttlefish.js +56 -0
- package/js_ext/ace-editor/mode-d.js +450 -0
- package/js_ext/ace-editor/mode-dart.js +618 -0
- package/js_ext/ace-editor/mode-diff.js +129 -0
- package/js_ext/ace-editor/mode-django.js +2422 -0
- package/js_ext/ace-editor/mode-dockerfile.js +427 -0
- package/js_ext/ace-editor/mode-dot.js +348 -0
- package/js_ext/ace-editor/mode-drools.js +607 -0
- package/js_ext/ace-editor/mode-edifact.js +130 -0
- package/js_ext/ace-editor/mode-eiffel.js +120 -0
- package/js_ext/ace-editor/mode-ejs.js +3277 -0
- package/js_ext/ace-editor/mode-elixir.js +443 -0
- package/js_ext/ace-editor/mode-elm.js +274 -0
- package/js_ext/ace-editor/mode-erlang.js +836 -0
- package/js_ext/ace-editor/mode-flix.js +164 -0
- package/js_ext/ace-editor/mode-forth.js +253 -0
- package/js_ext/ace-editor/mode-fortran.js +361 -0
- package/js_ext/ace-editor/mode-fsharp.js +277 -0
- package/js_ext/ace-editor/mode-fsl.js +226 -0
- package/js_ext/ace-editor/mode-ftl.js +1255 -0
- package/js_ext/ace-editor/mode-gcode.js +74 -0
- package/js_ext/ace-editor/mode-gherkin.js +154 -0
- package/js_ext/ace-editor/mode-gitignore.js +49 -0
- package/js_ext/ace-editor/mode-glsl.js +475 -0
- package/js_ext/ace-editor/mode-gobstones.js +1459 -0
- package/js_ext/ace-editor/mode-golang.js +341 -0
- package/js_ext/ace-editor/mode-graphqlschema.js +174 -0
- package/js_ext/ace-editor/mode-groovy.js +1401 -0
- package/js_ext/ace-editor/mode-haml.js +1906 -0
- package/js_ext/ace-editor/mode-handlebars.js +2438 -0
- package/js_ext/ace-editor/mode-haskell.js +324 -0
- package/js_ext/ace-editor/mode-haskell_cabal.js +135 -0
- package/js_ext/ace-editor/mode-haxe.js +313 -0
- package/js_ext/ace-editor/mode-hjson.js +318 -0
- package/js_ext/ace-editor/mode-html.js +2339 -0
- package/js_ext/ace-editor/mode-html_elixir.js +2845 -0
- package/js_ext/ace-editor/mode-html_ruby.js +3294 -0
- package/js_ext/ace-editor/mode-ini.js +138 -0
- package/js_ext/ace-editor/mode-io.js +210 -0
- package/js_ext/ace-editor/mode-ion.js +477 -0
- package/js_ext/ace-editor/mode-jack.js +293 -0
- package/js_ext/ace-editor/mode-jade.js +2017 -0
- package/js_ext/ace-editor/mode-java.js +1565 -0
- package/js_ext/ace-editor/mode-javascript.js +1191 -0
- package/js_ext/ace-editor/mode-jexl.js +270 -0
- package/js_ext/ace-editor/mode-json.js +275 -0
- package/js_ext/ace-editor/mode-json5.js +308 -0
- package/js_ext/ace-editor/mode-jsoniq.js +2577 -0
- package/js_ext/ace-editor/mode-jsp.js +1618 -0
- package/js_ext/ace-editor/mode-jssm.js +293 -0
- package/js_ext/ace-editor/mode-jsx.js +1209 -0
- package/js_ext/ace-editor/mode-julia.js +254 -0
- package/js_ext/ace-editor/mode-kotlin.js +445 -0
- package/js_ext/ace-editor/mode-latex.js +252 -0
- package/js_ext/ace-editor/mode-latte.js +2522 -0
- package/js_ext/ace-editor/mode-less.js +742 -0
- package/js_ext/ace-editor/mode-liquid.js +2741 -0
- package/js_ext/ace-editor/mode-lisp.js +104 -0
- package/js_ext/ace-editor/mode-livescript.js +272 -0
- package/js_ext/ace-editor/mode-logiql.js +272 -0
- package/js_ext/ace-editor/mode-logtalk.js +309 -0
- package/js_ext/ace-editor/mode-lsl.js +287 -0
- package/js_ext/ace-editor/mode-lua.js +393 -0
- package/js_ext/ace-editor/mode-luapage.js +2785 -0
- package/js_ext/ace-editor/mode-lucene.js +145 -0
- package/js_ext/ace-editor/mode-makefile.js +374 -0
- package/js_ext/ace-editor/mode-markdown.js +2935 -0
- package/js_ext/ace-editor/mode-mask.js +1757 -0
- package/js_ext/ace-editor/mode-matlab.js +239 -0
- package/js_ext/ace-editor/mode-maze.js +256 -0
- package/js_ext/ace-editor/mode-mediawiki.js +580 -0
- package/js_ext/ace-editor/mode-mel.js +213 -0
- package/js_ext/ace-editor/mode-mips.js +231 -0
- package/js_ext/ace-editor/mode-mixal.js +110 -0
- package/js_ext/ace-editor/mode-mushcode.js +642 -0
- package/js_ext/ace-editor/mode-mysql.js +150 -0
- package/js_ext/ace-editor/mode-nasal.js +513 -0
- package/js_ext/ace-editor/mode-nginx.js +262 -0
- package/js_ext/ace-editor/mode-nim.js +325 -0
- package/js_ext/ace-editor/mode-nix.js +555 -0
- package/js_ext/ace-editor/mode-nsis.js +279 -0
- package/js_ext/ace-editor/mode-nunjucks.js +2677 -0
- package/js_ext/ace-editor/mode-objectivec.js +626 -0
- package/js_ext/ace-editor/mode-ocaml.js +378 -0
- package/js_ext/ace-editor/mode-odin.js +449 -0
- package/js_ext/ace-editor/mode-partiql.js +750 -0
- package/js_ext/ace-editor/mode-pascal.js +204 -0
- package/js_ext/ace-editor/mode-perl.js +318 -0
- package/js_ext/ace-editor/mode-pgsql.js +1860 -0
- package/js_ext/ace-editor/mode-php.js +14072 -0
- package/js_ext/ace-editor/mode-php_laravel_blade.js +14260 -0
- package/js_ext/ace-editor/mode-pig.js +278 -0
- package/js_ext/ace-editor/mode-plain_text.js +27 -0
- package/js_ext/ace-editor/mode-plsql.js +268 -0
- package/js_ext/ace-editor/mode-powershell.js +567 -0
- package/js_ext/ace-editor/mode-praat.js +412 -0
- package/js_ext/ace-editor/mode-prisma.js +457 -0
- package/js_ext/ace-editor/mode-prolog.js +305 -0
- package/js_ext/ace-editor/mode-properties.js +69 -0
- package/js_ext/ace-editor/mode-protobuf.js +498 -0
- package/js_ext/ace-editor/mode-prql.js +323 -0
- package/js_ext/ace-editor/mode-puppet.js +316 -0
- package/js_ext/ace-editor/mode-python.js +476 -0
- package/js_ext/ace-editor/mode-qml.js +346 -0
- package/js_ext/ace-editor/mode-r.js +387 -0
- package/js_ext/ace-editor/mode-raku.js +516 -0
- package/js_ext/ace-editor/mode-razor.js +2697 -0
- package/js_ext/ace-editor/mode-rdoc.js +286 -0
- package/js_ext/ace-editor/mode-red.js +388 -0
- package/js_ext/ace-editor/mode-redshift.js +321 -0
- package/js_ext/ace-editor/mode-rhtml.js +2750 -0
- package/js_ext/ace-editor/mode-robot.js +168 -0
- package/js_ext/ace-editor/mode-rst.js +245 -0
- package/js_ext/ace-editor/mode-ruby.js +921 -0
- package/js_ext/ace-editor/mode-rust.js +393 -0
- package/js_ext/ace-editor/mode-sac.js +349 -0
- package/js_ext/ace-editor/mode-sass.js +480 -0
- package/js_ext/ace-editor/mode-scad.js +350 -0
- package/js_ext/ace-editor/mode-scala.js +1395 -0
- package/js_ext/ace-editor/mode-scheme.js +210 -0
- package/js_ext/ace-editor/mode-scrypt.js +317 -0
- package/js_ext/ace-editor/mode-scss.js +768 -0
- package/js_ext/ace-editor/mode-sh.js +387 -0
- package/js_ext/ace-editor/mode-sjs.js +1393 -0
- package/js_ext/ace-editor/mode-slim.js +4770 -0
- package/js_ext/ace-editor/mode-smarty.js +2436 -0
- package/js_ext/ace-editor/mode-smithy.js +456 -0
- package/js_ext/ace-editor/mode-snippets.js +183 -0
- package/js_ext/ace-editor/mode-soy_template.js +2611 -0
- package/js_ext/ace-editor/mode-space.js +151 -0
- package/js_ext/ace-editor/mode-sparql.js +288 -0
- package/js_ext/ace-editor/mode-sql.js +221 -0
- package/js_ext/ace-editor/mode-sqlserver.js +391 -0
- package/js_ext/ace-editor/mode-stylus.js +443 -0
- package/js_ext/ace-editor/mode-svg.js +1487 -0
- package/js_ext/ace-editor/mode-swift.js +342 -0
- package/js_ext/ace-editor/mode-tcl.js +338 -0
- package/js_ext/ace-editor/mode-terraform.js +346 -0
- package/js_ext/ace-editor/mode-tex.js +212 -0
- package/js_ext/ace-editor/mode-text.js +9 -0
- package/js_ext/ace-editor/mode-textile.js +125 -0
- package/js_ext/ace-editor/mode-toml.js +129 -0
- package/js_ext/ace-editor/mode-tsv.js +124 -0
- package/js_ext/ace-editor/mode-tsx.js +1276 -0
- package/js_ext/ace-editor/mode-turtle.js +264 -0
- package/js_ext/ace-editor/mode-twig.js +2502 -0
- package/js_ext/ace-editor/mode-typescript.js +1254 -0
- package/js_ext/ace-editor/mode-vala.js +554 -0
- package/js_ext/ace-editor/mode-vbscript.js +731 -0
- package/js_ext/ace-editor/mode-velocity.js +2580 -0
- package/js_ext/ace-editor/mode-verilog.js +98 -0
- package/js_ext/ace-editor/mode-vhdl.js +94 -0
- package/js_ext/ace-editor/mode-visualforce.js +2454 -0
- package/js_ext/ace-editor/mode-vue.js +3834 -0
- package/js_ext/ace-editor/mode-wollok.js +1329 -0
- package/js_ext/ace-editor/mode-xml.js +477 -0
- package/js_ext/ace-editor/mode-xquery.js +2589 -0
- package/js_ext/ace-editor/mode-yaml.js +395 -0
- package/js_ext/ace-editor/mode-zeek.js +502 -0
- package/js_ext/ace-editor/mode-zig.js +585 -0
- package/js_ext/ace-editor/snippets/abap.js +9 -0
- package/js_ext/ace-editor/snippets/abc.js +16 -0
- package/js_ext/ace-editor/snippets/actionscript.js +16 -0
- package/js_ext/ace-editor/snippets/ada.js +9 -0
- package/js_ext/ace-editor/snippets/alda.js +9 -0
- package/js_ext/ace-editor/snippets/apache_conf.js +9 -0
- package/js_ext/ace-editor/snippets/apex.js +9 -0
- package/js_ext/ace-editor/snippets/applescript.js +9 -0
- package/js_ext/ace-editor/snippets/aql.js +9 -0
- package/js_ext/ace-editor/snippets/asciidoc.js +9 -0
- package/js_ext/ace-editor/snippets/asl.js +9 -0
- package/js_ext/ace-editor/snippets/assembly_arm32.js +9 -0
- package/js_ext/ace-editor/snippets/assembly_x86.js +9 -0
- package/js_ext/ace-editor/snippets/astro.js +9 -0
- package/js_ext/ace-editor/snippets/autohotkey.js +9 -0
- package/js_ext/ace-editor/snippets/basic.js +9 -0
- package/js_ext/ace-editor/snippets/batchfile.js +9 -0
- package/js_ext/ace-editor/snippets/bibtex.js +9 -0
- package/js_ext/ace-editor/snippets/c9search.js +9 -0
- package/js_ext/ace-editor/snippets/c_cpp.js +16 -0
- package/js_ext/ace-editor/snippets/cirru.js +9 -0
- package/js_ext/ace-editor/snippets/clojure.js +16 -0
- package/js_ext/ace-editor/snippets/clue.js +9 -0
- package/js_ext/ace-editor/snippets/cobol.js +9 -0
- package/js_ext/ace-editor/snippets/coffee.js +16 -0
- package/js_ext/ace-editor/snippets/coldfusion.js +9 -0
- package/js_ext/ace-editor/snippets/crystal.js +9 -0
- package/js_ext/ace-editor/snippets/csharp.js +9 -0
- package/js_ext/ace-editor/snippets/csound_document.js +16 -0
- package/js_ext/ace-editor/snippets/csound_orchestra.js +16 -0
- package/js_ext/ace-editor/snippets/csound_score.js +9 -0
- package/js_ext/ace-editor/snippets/csp.js +9 -0
- package/js_ext/ace-editor/snippets/css.js +16 -0
- package/js_ext/ace-editor/snippets/csv.js +9 -0
- package/js_ext/ace-editor/snippets/curly.js +9 -0
- package/js_ext/ace-editor/snippets/cuttlefish.js +9 -0
- package/js_ext/ace-editor/snippets/d.js +9 -0
- package/js_ext/ace-editor/snippets/dart.js +16 -0
- package/js_ext/ace-editor/snippets/diff.js +16 -0
- package/js_ext/ace-editor/snippets/django.js +16 -0
- package/js_ext/ace-editor/snippets/dockerfile.js +9 -0
- package/js_ext/ace-editor/snippets/dot.js +9 -0
- package/js_ext/ace-editor/snippets/drools.js +16 -0
- package/js_ext/ace-editor/snippets/edifact.js +16 -0
- package/js_ext/ace-editor/snippets/eiffel.js +9 -0
- package/js_ext/ace-editor/snippets/ejs.js +9 -0
- package/js_ext/ace-editor/snippets/elixir.js +9 -0
- package/js_ext/ace-editor/snippets/elm.js +9 -0
- package/js_ext/ace-editor/snippets/erlang.js +16 -0
- package/js_ext/ace-editor/snippets/flix.js +9 -0
- package/js_ext/ace-editor/snippets/forth.js +9 -0
- package/js_ext/ace-editor/snippets/fortran.js +9 -0
- package/js_ext/ace-editor/snippets/fsharp.js +9 -0
- package/js_ext/ace-editor/snippets/fsl.js +16 -0
- package/js_ext/ace-editor/snippets/ftl.js +9 -0
- package/js_ext/ace-editor/snippets/gcode.js +9 -0
- package/js_ext/ace-editor/snippets/gherkin.js +9 -0
- package/js_ext/ace-editor/snippets/gitignore.js +9 -0
- package/js_ext/ace-editor/snippets/glsl.js +9 -0
- package/js_ext/ace-editor/snippets/gobstones.js +16 -0
- package/js_ext/ace-editor/snippets/golang.js +9 -0
- package/js_ext/ace-editor/snippets/graphqlschema.js +16 -0
- package/js_ext/ace-editor/snippets/groovy.js +9 -0
- package/js_ext/ace-editor/snippets/haml.js +16 -0
- package/js_ext/ace-editor/snippets/handlebars.js +9 -0
- package/js_ext/ace-editor/snippets/haskell.js +16 -0
- package/js_ext/ace-editor/snippets/haskell_cabal.js +9 -0
- package/js_ext/ace-editor/snippets/haxe.js +9 -0
- package/js_ext/ace-editor/snippets/hjson.js +9 -0
- package/js_ext/ace-editor/snippets/html.js +16 -0
- package/js_ext/ace-editor/snippets/html_elixir.js +9 -0
- package/js_ext/ace-editor/snippets/html_ruby.js +9 -0
- package/js_ext/ace-editor/snippets/ini.js +9 -0
- package/js_ext/ace-editor/snippets/io.js +74 -0
- package/js_ext/ace-editor/snippets/ion.js +9 -0
- package/js_ext/ace-editor/snippets/jack.js +9 -0
- package/js_ext/ace-editor/snippets/jade.js +9 -0
- package/js_ext/ace-editor/snippets/java.js +16 -0
- package/js_ext/ace-editor/snippets/javascript.js +16 -0
- package/js_ext/ace-editor/snippets/jexl.js +9 -0
- package/js_ext/ace-editor/snippets/json.js +9 -0
- package/js_ext/ace-editor/snippets/json5.js +9 -0
- package/js_ext/ace-editor/snippets/jsoniq.js +78 -0
- package/js_ext/ace-editor/snippets/jsp.js +16 -0
- package/js_ext/ace-editor/snippets/jssm.js +9 -0
- package/js_ext/ace-editor/snippets/jsx.js +9 -0
- package/js_ext/ace-editor/snippets/julia.js +9 -0
- package/js_ext/ace-editor/snippets/kotlin.js +9 -0
- package/js_ext/ace-editor/snippets/latex.js +9 -0
- package/js_ext/ace-editor/snippets/latte.js +9 -0
- package/js_ext/ace-editor/snippets/less.js +9 -0
- package/js_ext/ace-editor/snippets/liquid.js +16 -0
- package/js_ext/ace-editor/snippets/lisp.js +9 -0
- package/js_ext/ace-editor/snippets/livescript.js +9 -0
- package/js_ext/ace-editor/snippets/logiql.js +9 -0
- package/js_ext/ace-editor/snippets/logtalk.js +9 -0
- package/js_ext/ace-editor/snippets/lsl.js +16 -0
- package/js_ext/ace-editor/snippets/lua.js +16 -0
- package/js_ext/ace-editor/snippets/luapage.js +9 -0
- package/js_ext/ace-editor/snippets/lucene.js +9 -0
- package/js_ext/ace-editor/snippets/makefile.js +16 -0
- package/js_ext/ace-editor/snippets/markdown.js +16 -0
- package/js_ext/ace-editor/snippets/mask.js +9 -0
- package/js_ext/ace-editor/snippets/matlab.js +9 -0
- package/js_ext/ace-editor/snippets/maze.js +16 -0
- package/js_ext/ace-editor/snippets/mediawiki.js +9 -0
- package/js_ext/ace-editor/snippets/mel.js +9 -0
- package/js_ext/ace-editor/snippets/mips.js +9 -0
- package/js_ext/ace-editor/snippets/mixal.js +9 -0
- package/js_ext/ace-editor/snippets/mushcode.js +9 -0
- package/js_ext/ace-editor/snippets/mysql.js +9 -0
- package/js_ext/ace-editor/snippets/nasal.js +9 -0
- package/js_ext/ace-editor/snippets/nginx.js +9 -0
- package/js_ext/ace-editor/snippets/nim.js +9 -0
- package/js_ext/ace-editor/snippets/nix.js +9 -0
- package/js_ext/ace-editor/snippets/nsis.js +9 -0
- package/js_ext/ace-editor/snippets/nunjucks.js +9 -0
- package/js_ext/ace-editor/snippets/objectivec.js +9 -0
- package/js_ext/ace-editor/snippets/ocaml.js +9 -0
- package/js_ext/ace-editor/snippets/odin.js +9 -0
- package/js_ext/ace-editor/snippets/partiql.js +9 -0
- package/js_ext/ace-editor/snippets/pascal.js +9 -0
- package/js_ext/ace-editor/snippets/perl.js +16 -0
- package/js_ext/ace-editor/snippets/pgsql.js +9 -0
- package/js_ext/ace-editor/snippets/php.js +16 -0
- package/js_ext/ace-editor/snippets/php_laravel_blade.js +9 -0
- package/js_ext/ace-editor/snippets/pig.js +9 -0
- package/js_ext/ace-editor/snippets/plain_text.js +9 -0
- package/js_ext/ace-editor/snippets/plsql.js +9 -0
- package/js_ext/ace-editor/snippets/powershell.js +9 -0
- package/js_ext/ace-editor/snippets/praat.js +9 -0
- package/js_ext/ace-editor/snippets/prisma.js +9 -0
- package/js_ext/ace-editor/snippets/prolog.js +9 -0
- package/js_ext/ace-editor/snippets/properties.js +9 -0
- package/js_ext/ace-editor/snippets/protobuf.js +9 -0
- package/js_ext/ace-editor/snippets/prql.js +9 -0
- package/js_ext/ace-editor/snippets/puppet.js +9 -0
- package/js_ext/ace-editor/snippets/python.js +16 -0
- package/js_ext/ace-editor/snippets/qml.js +9 -0
- package/js_ext/ace-editor/snippets/r.js +16 -0
- package/js_ext/ace-editor/snippets/raku.js +9 -0
- package/js_ext/ace-editor/snippets/razor.js +16 -0
- package/js_ext/ace-editor/snippets/rdoc.js +9 -0
- package/js_ext/ace-editor/snippets/red.js +9 -0
- package/js_ext/ace-editor/snippets/redshift.js +9 -0
- package/js_ext/ace-editor/snippets/rhtml.js +9 -0
- package/js_ext/ace-editor/snippets/robot.js +16 -0
- package/js_ext/ace-editor/snippets/rst.js +16 -0
- package/js_ext/ace-editor/snippets/ruby.js +16 -0
- package/js_ext/ace-editor/snippets/rust.js +9 -0
- package/js_ext/ace-editor/snippets/sac.js +9 -0
- package/js_ext/ace-editor/snippets/sass.js +9 -0
- package/js_ext/ace-editor/snippets/scad.js +9 -0
- package/js_ext/ace-editor/snippets/scala.js +9 -0
- package/js_ext/ace-editor/snippets/scheme.js +9 -0
- package/js_ext/ace-editor/snippets/scrypt.js +9 -0
- package/js_ext/ace-editor/snippets/scss.js +9 -0
- package/js_ext/ace-editor/snippets/sh.js +16 -0
- package/js_ext/ace-editor/snippets/sjs.js +9 -0
- package/js_ext/ace-editor/snippets/slim.js +9 -0
- package/js_ext/ace-editor/snippets/smarty.js +9 -0
- package/js_ext/ace-editor/snippets/smithy.js +9 -0
- package/js_ext/ace-editor/snippets/snippets.js +16 -0
- package/js_ext/ace-editor/snippets/soy_template.js +9 -0
- package/js_ext/ace-editor/snippets/space.js +9 -0
- package/js_ext/ace-editor/snippets/sparql.js +9 -0
- package/js_ext/ace-editor/snippets/sql.js +16 -0
- package/js_ext/ace-editor/snippets/sqlserver.js +16 -0
- package/js_ext/ace-editor/snippets/stylus.js +9 -0
- package/js_ext/ace-editor/snippets/svg.js +9 -0
- package/js_ext/ace-editor/snippets/swift.js +9 -0
- package/js_ext/ace-editor/snippets/tcl.js +16 -0
- package/js_ext/ace-editor/snippets/terraform.js +9 -0
- package/js_ext/ace-editor/snippets/tex.js +16 -0
- package/js_ext/ace-editor/snippets/text.js +9 -0
- package/js_ext/ace-editor/snippets/textile.js +16 -0
- package/js_ext/ace-editor/snippets/toml.js +9 -0
- package/js_ext/ace-editor/snippets/tsv.js +9 -0
- package/js_ext/ace-editor/snippets/tsx.js +9 -0
- package/js_ext/ace-editor/snippets/turtle.js +9 -0
- package/js_ext/ace-editor/snippets/twig.js +9 -0
- package/js_ext/ace-editor/snippets/typescript.js +9 -0
- package/js_ext/ace-editor/snippets/vala.js +199 -0
- package/js_ext/ace-editor/snippets/vbscript.js +9 -0
- package/js_ext/ace-editor/snippets/velocity.js +17 -0
- package/js_ext/ace-editor/snippets/verilog.js +9 -0
- package/js_ext/ace-editor/snippets/vhdl.js +9 -0
- package/js_ext/ace-editor/snippets/visualforce.js +9 -0
- package/js_ext/ace-editor/snippets/vue.js +9 -0
- package/js_ext/ace-editor/snippets/wollok.js +16 -0
- package/js_ext/ace-editor/snippets/xml.js +9 -0
- package/js_ext/ace-editor/snippets/xquery.js +78 -0
- package/js_ext/ace-editor/snippets/yaml.js +9 -0
- package/js_ext/ace-editor/snippets/zeek.js +9 -0
- package/js_ext/ace-editor/snippets/zig.js +9 -0
- package/js_ext/ace-editor/theme-ambiance.js +18 -0
- package/js_ext/ace-editor/theme-chaos.js +18 -0
- package/js_ext/ace-editor/theme-chrome.js +18 -0
- package/js_ext/ace-editor/theme-cloud9_day.js +19 -0
- package/js_ext/ace-editor/theme-cloud9_night.js +18 -0
- package/js_ext/ace-editor/theme-cloud9_night_low_color.js +18 -0
- package/js_ext/ace-editor/theme-cloud_editor.js +19 -0
- package/js_ext/ace-editor/theme-cloud_editor_dark.js +19 -0
- package/js_ext/ace-editor/theme-clouds.js +18 -0
- package/js_ext/ace-editor/theme-clouds_midnight.js +18 -0
- package/js_ext/ace-editor/theme-cobalt.js +18 -0
- package/js_ext/ace-editor/theme-crimson_editor.js +18 -0
- package/js_ext/ace-editor/theme-dawn.js +18 -0
- package/js_ext/ace-editor/theme-dracula.js +19 -0
- package/js_ext/ace-editor/theme-dreamweaver.js +18 -0
- package/js_ext/ace-editor/theme-eclipse.js +19 -0
- package/js_ext/ace-editor/theme-github.js +18 -0
- package/js_ext/ace-editor/theme-github_dark.js +18 -0
- package/js_ext/ace-editor/theme-github_light_default.js +18 -0
- package/js_ext/ace-editor/theme-gob.js +18 -0
- package/js_ext/ace-editor/theme-gruvbox.js +18 -0
- package/js_ext/ace-editor/theme-gruvbox_dark_hard.js +18 -0
- package/js_ext/ace-editor/theme-gruvbox_light_hard.js +18 -0
- package/js_ext/ace-editor/theme-idle_fingers.js +18 -0
- package/js_ext/ace-editor/theme-iplastic.js +18 -0
- package/js_ext/ace-editor/theme-katzenmilch.js +18 -0
- package/js_ext/ace-editor/theme-kr_theme.js +18 -0
- package/js_ext/ace-editor/theme-kuroir.js +18 -0
- package/js_ext/ace-editor/theme-merbivore.js +18 -0
- package/js_ext/ace-editor/theme-merbivore_soft.js +18 -0
- package/js_ext/ace-editor/theme-mono_industrial.js +18 -0
- package/js_ext/ace-editor/theme-monokai.js +18 -0
- package/js_ext/ace-editor/theme-nord_dark.js +19 -0
- package/js_ext/ace-editor/theme-one_dark.js +18 -0
- package/js_ext/ace-editor/theme-pastel_on_dark.js +18 -0
- package/js_ext/ace-editor/theme-solarized_dark.js +18 -0
- package/js_ext/ace-editor/theme-solarized_light.js +18 -0
- package/js_ext/ace-editor/theme-sqlserver.js +18 -0
- package/js_ext/ace-editor/theme-terminal.js +18 -0
- package/js_ext/ace-editor/theme-textmate.js +16 -0
- package/js_ext/ace-editor/theme-tomorrow.js +18 -0
- package/js_ext/ace-editor/theme-tomorrow_night.js +18 -0
- package/js_ext/ace-editor/theme-tomorrow_night_blue.js +18 -0
- package/js_ext/ace-editor/theme-tomorrow_night_bright.js +18 -0
- package/js_ext/ace-editor/theme-tomorrow_night_eighties.js +18 -0
- package/js_ext/ace-editor/theme-twilight.js +18 -0
- package/js_ext/ace-editor/theme-vibrant_ink.js +18 -0
- package/js_ext/ace-editor/theme-xcode.js +18 -0
- package/js_ext/ace-editor/worker-base.js +1332 -0
- package/js_ext/ace-editor/worker-coffee.js +1381 -0
- package/js_ext/ace-editor/worker-css.js +8913 -0
- package/js_ext/ace-editor/worker-html.js +10843 -0
- package/js_ext/ace-editor/worker-javascript.js +15353 -0
- package/js_ext/ace-editor/worker-json.js +1626 -0
- package/js_ext/ace-editor/worker-lua.js +3519 -0
- package/js_ext/ace-editor/worker-php.js +3788 -0
- package/js_ext/ace-editor/worker-xml.js +3122 -0
- package/js_ext/ace-editor/worker-xquery.js +57579 -0
- package/js_ext/ace-editor/worker-yaml.js +5819 -0
- package/js_ext/bootstrap.bundle.min.js +7 -0
- package/js_ext/highlight/default.min.css +9 -0
- package/js_ext/highlight/go.min.js +14 -0
- package/js_ext/highlight/highlight.min.js +1207 -0
- package/js_ext/highlight/stackoverflow-dark.min.css +13 -0
- package/js_ext/idb-keyval-6.2.2.mjs +7 -0
- package/js_ext/json-viewer.bundle.js +52 -0
- package/js_ext/loglevel-plugin-prefix.min.js +1 -0
- package/js_ext/loglevel.min.js +2 -0
- package/js_ext/markdown/auto-render.min.js +1 -0
- package/js_ext/markdown/auto-render.mjs +245 -0
- package/js_ext/markdown/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/js_ext/markdown/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/js_ext/markdown/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Main-Bold.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Main-Italic.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Main-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Math-Italic.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/js_ext/markdown/fonts/KaTeX_Script-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/js_ext/markdown/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/js_ext/markdown/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/js_ext/markdown/katex.min.css +1 -0
- package/js_ext/markdown/katex.min.js +1 -0
- package/js_ext/markdown/katex.mjs +18416 -0
- package/js_ext/markdown/markdown-it.min.js +3 -0
- package/js_ext/markdown/markdownItAnchor.umd.js +2 -0
- package/js_ext/mitt.mjs +2 -0
- package/js_ext/moment.min.js +1 -0
- package/js_ext/msgpack.mjs +1612 -0
- package/js_ext/rxjs.umd.min.js +195 -0
- package/js_ext/rxjs.umd.min.js.map +1 -0
- package/js_ext/vue-router.esm-browser.prod.js +6 -0
- package/js_ext/vue.esm-browser.min.js +18 -0
- package/js_ext/vue.esm-browser.prod.min.js +3 -0
- package/js_ext/vue3-sfc-loader.esm.js +1840 -0
- package/js_ext/vue3-sfc-loader.esm.js.map +4 -0
- package/js_ext/vue3-sfc-loader.js +1839 -0
- package/js_ext/wavesurfer.esm.mjs +1 -0
- package/js_ext/xstate.web.mjs +15 -0
- package/package.json +50 -0
- package/style.css +31 -0
|
@@ -0,0 +1,1487 @@
|
|
|
1
|
+
ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
|
|
2
|
+
var oop = require("../lib/oop");
|
|
3
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
4
|
+
var XmlHighlightRules = function (normalize) {
|
|
5
|
+
var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
|
|
6
|
+
this.$rules = {
|
|
7
|
+
start: [
|
|
8
|
+
{ token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
|
|
9
|
+
{
|
|
10
|
+
token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
|
|
11
|
+
regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
|
|
12
|
+
},
|
|
13
|
+
{ token: "comment.start.xml", regex: "<\\!--", next: "comment" },
|
|
14
|
+
{
|
|
15
|
+
token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
|
|
16
|
+
regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
|
|
17
|
+
},
|
|
18
|
+
{ include: "tag" },
|
|
19
|
+
{ token: "text.end-tag-open.xml", regex: "</" },
|
|
20
|
+
{ token: "text.tag-open.xml", regex: "<" },
|
|
21
|
+
{ include: "reference" },
|
|
22
|
+
{ defaultToken: "text.xml" }
|
|
23
|
+
],
|
|
24
|
+
processing_instruction: [{
|
|
25
|
+
token: "entity.other.attribute-name.decl-attribute-name.xml",
|
|
26
|
+
regex: tagRegex
|
|
27
|
+
}, {
|
|
28
|
+
token: "keyword.operator.decl-attribute-equals.xml",
|
|
29
|
+
regex: "="
|
|
30
|
+
}, {
|
|
31
|
+
include: "whitespace"
|
|
32
|
+
}, {
|
|
33
|
+
include: "string"
|
|
34
|
+
}, {
|
|
35
|
+
token: "punctuation.xml-decl.xml",
|
|
36
|
+
regex: "\\?>",
|
|
37
|
+
next: "start"
|
|
38
|
+
}],
|
|
39
|
+
doctype: [
|
|
40
|
+
{ include: "whitespace" },
|
|
41
|
+
{ include: "string" },
|
|
42
|
+
{ token: "xml-pe.doctype.xml", regex: ">", next: "start" },
|
|
43
|
+
{ token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
|
|
44
|
+
{ token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
|
|
45
|
+
],
|
|
46
|
+
int_subset: [{
|
|
47
|
+
token: "text.xml",
|
|
48
|
+
regex: "\\s+"
|
|
49
|
+
}, {
|
|
50
|
+
token: "punctuation.int-subset.xml",
|
|
51
|
+
regex: "]",
|
|
52
|
+
next: "pop"
|
|
53
|
+
}, {
|
|
54
|
+
token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
|
|
55
|
+
regex: "(<\\!)(" + tagRegex + ")",
|
|
56
|
+
push: [{
|
|
57
|
+
token: "text",
|
|
58
|
+
regex: "\\s+"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
token: "punctuation.markup-decl.xml",
|
|
62
|
+
regex: ">",
|
|
63
|
+
next: "pop"
|
|
64
|
+
},
|
|
65
|
+
{ include: "string" }]
|
|
66
|
+
}],
|
|
67
|
+
cdata: [
|
|
68
|
+
{ token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
|
|
69
|
+
{ token: "text.xml", regex: "\\s+" },
|
|
70
|
+
{ token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
|
|
71
|
+
],
|
|
72
|
+
comment: [
|
|
73
|
+
{ token: "comment.end.xml", regex: "-->", next: "start" },
|
|
74
|
+
{ defaultToken: "comment.xml" }
|
|
75
|
+
],
|
|
76
|
+
reference: [{
|
|
77
|
+
token: "constant.language.escape.reference.xml",
|
|
78
|
+
regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
79
|
+
}],
|
|
80
|
+
attr_reference: [{
|
|
81
|
+
token: "constant.language.escape.reference.attribute-value.xml",
|
|
82
|
+
regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
83
|
+
}],
|
|
84
|
+
tag: [{
|
|
85
|
+
token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
|
|
86
|
+
regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
|
|
87
|
+
next: [
|
|
88
|
+
{ include: "attributes" },
|
|
89
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
|
|
90
|
+
]
|
|
91
|
+
}],
|
|
92
|
+
tag_whitespace: [
|
|
93
|
+
{ token: "text.tag-whitespace.xml", regex: "\\s+" }
|
|
94
|
+
],
|
|
95
|
+
whitespace: [
|
|
96
|
+
{ token: "text.whitespace.xml", regex: "\\s+" }
|
|
97
|
+
],
|
|
98
|
+
string: [{
|
|
99
|
+
token: "string.xml",
|
|
100
|
+
regex: "'",
|
|
101
|
+
push: [
|
|
102
|
+
{ token: "string.xml", regex: "'", next: "pop" },
|
|
103
|
+
{ defaultToken: "string.xml" }
|
|
104
|
+
]
|
|
105
|
+
}, {
|
|
106
|
+
token: "string.xml",
|
|
107
|
+
regex: '"',
|
|
108
|
+
push: [
|
|
109
|
+
{ token: "string.xml", regex: '"', next: "pop" },
|
|
110
|
+
{ defaultToken: "string.xml" }
|
|
111
|
+
]
|
|
112
|
+
}],
|
|
113
|
+
attributes: [{
|
|
114
|
+
token: "entity.other.attribute-name.xml",
|
|
115
|
+
regex: tagRegex
|
|
116
|
+
}, {
|
|
117
|
+
token: "keyword.operator.attribute-equals.xml",
|
|
118
|
+
regex: "="
|
|
119
|
+
}, {
|
|
120
|
+
include: "tag_whitespace"
|
|
121
|
+
}, {
|
|
122
|
+
include: "attribute_value"
|
|
123
|
+
}],
|
|
124
|
+
attribute_value: [{
|
|
125
|
+
token: "string.attribute-value.xml",
|
|
126
|
+
regex: "'",
|
|
127
|
+
push: [
|
|
128
|
+
{ token: "string.attribute-value.xml", regex: "'", next: "pop" },
|
|
129
|
+
{ include: "attr_reference" },
|
|
130
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
131
|
+
]
|
|
132
|
+
}, {
|
|
133
|
+
token: "string.attribute-value.xml",
|
|
134
|
+
regex: '"',
|
|
135
|
+
push: [
|
|
136
|
+
{ token: "string.attribute-value.xml", regex: '"', next: "pop" },
|
|
137
|
+
{ include: "attr_reference" },
|
|
138
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
139
|
+
]
|
|
140
|
+
}]
|
|
141
|
+
};
|
|
142
|
+
if (this.constructor === XmlHighlightRules)
|
|
143
|
+
this.normalizeRules();
|
|
144
|
+
};
|
|
145
|
+
(function () {
|
|
146
|
+
this.embedTagRules = function (HighlightRules, prefix, tag) {
|
|
147
|
+
this.$rules.tag.unshift({
|
|
148
|
+
token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
|
149
|
+
regex: "(<)(" + tag + "(?=\\s|>|$))",
|
|
150
|
+
next: [
|
|
151
|
+
{ include: "attributes" },
|
|
152
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
this.$rules[tag + "-end"] = [
|
|
156
|
+
{ include: "attributes" },
|
|
157
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
|
|
158
|
+
onMatch: function (value, currentState, stack) {
|
|
159
|
+
stack.splice(0);
|
|
160
|
+
return this.token;
|
|
161
|
+
} }
|
|
162
|
+
];
|
|
163
|
+
this.embedRules(HighlightRules, prefix, [{
|
|
164
|
+
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
|
165
|
+
regex: "(</)(" + tag + "(?=\\s|>|$))",
|
|
166
|
+
next: tag + "-end"
|
|
167
|
+
}, {
|
|
168
|
+
token: "string.cdata.xml",
|
|
169
|
+
regex: "<\\!\\[CDATA\\["
|
|
170
|
+
}, {
|
|
171
|
+
token: "string.cdata.xml",
|
|
172
|
+
regex: "\\]\\]>"
|
|
173
|
+
}]);
|
|
174
|
+
};
|
|
175
|
+
}).call(TextHighlightRules.prototype);
|
|
176
|
+
oop.inherits(XmlHighlightRules, TextHighlightRules);
|
|
177
|
+
exports.XmlHighlightRules = XmlHighlightRules;
|
|
178
|
+
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
|
|
182
|
+
var oop = require("../../lib/oop");
|
|
183
|
+
var Behaviour = require("../behaviour").Behaviour;
|
|
184
|
+
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
185
|
+
function is(token, type) {
|
|
186
|
+
return token && token.type.lastIndexOf(type + ".xml") > -1;
|
|
187
|
+
}
|
|
188
|
+
var XmlBehaviour = function () {
|
|
189
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
|
190
|
+
if (text == '"' || text == "'") {
|
|
191
|
+
var quote = text;
|
|
192
|
+
var selected = session.doc.getTextRange(editor.getSelectionRange());
|
|
193
|
+
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
|
194
|
+
return {
|
|
195
|
+
text: quote + selected + quote,
|
|
196
|
+
selection: false
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
var cursor = editor.getCursorPosition();
|
|
200
|
+
var line = session.doc.getLine(cursor.row);
|
|
201
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
|
202
|
+
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
|
203
|
+
var token = iterator.getCurrentToken();
|
|
204
|
+
if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
|
|
205
|
+
return {
|
|
206
|
+
text: "",
|
|
207
|
+
selection: [1, 1]
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (!token)
|
|
211
|
+
token = iterator.stepBackward();
|
|
212
|
+
if (!token)
|
|
213
|
+
return;
|
|
214
|
+
while (is(token, "tag-whitespace") || is(token, "whitespace")) {
|
|
215
|
+
token = iterator.stepBackward();
|
|
216
|
+
}
|
|
217
|
+
var rightSpace = !rightChar || rightChar.match(/\s/);
|
|
218
|
+
if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
|
|
219
|
+
return {
|
|
220
|
+
text: quote + quote,
|
|
221
|
+
selection: [1, 1]
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
|
227
|
+
var selected = session.doc.getTextRange(range);
|
|
228
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
|
229
|
+
var line = session.doc.getLine(range.start.row);
|
|
230
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
|
231
|
+
if (rightChar == selected) {
|
|
232
|
+
range.end.column++;
|
|
233
|
+
return range;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
|
238
|
+
if (text == '>') {
|
|
239
|
+
var position = editor.getSelectionRange().start;
|
|
240
|
+
var iterator = new TokenIterator(session, position.row, position.column);
|
|
241
|
+
var token = iterator.getCurrentToken() || iterator.stepBackward();
|
|
242
|
+
if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
|
|
243
|
+
return;
|
|
244
|
+
if (is(token, "reference.attribute-value"))
|
|
245
|
+
return;
|
|
246
|
+
if (is(token, "attribute-value")) {
|
|
247
|
+
var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
|
|
248
|
+
if (position.column < tokenEndColumn)
|
|
249
|
+
return;
|
|
250
|
+
if (position.column == tokenEndColumn) {
|
|
251
|
+
var nextToken = iterator.stepForward();
|
|
252
|
+
if (nextToken && is(nextToken, "attribute-value"))
|
|
253
|
+
return;
|
|
254
|
+
iterator.stepBackward();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
|
|
258
|
+
return;
|
|
259
|
+
while (!is(token, "tag-name")) {
|
|
260
|
+
token = iterator.stepBackward();
|
|
261
|
+
if (token.value == "<") {
|
|
262
|
+
token = iterator.stepForward();
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
var tokenRow = iterator.getCurrentTokenRow();
|
|
267
|
+
var tokenColumn = iterator.getCurrentTokenColumn();
|
|
268
|
+
if (is(iterator.stepBackward(), "end-tag-open"))
|
|
269
|
+
return;
|
|
270
|
+
var element = token.value;
|
|
271
|
+
if (tokenRow == position.row)
|
|
272
|
+
element = element.substring(0, position.column - tokenColumn);
|
|
273
|
+
if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
|
|
274
|
+
return;
|
|
275
|
+
return {
|
|
276
|
+
text: ">" + "</" + element + ">",
|
|
277
|
+
selection: [1, 1]
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
this.add("autoindent", "insertion", function (state, action, editor, session, text) {
|
|
282
|
+
if (text == "\n") {
|
|
283
|
+
var cursor = editor.getCursorPosition();
|
|
284
|
+
var line = session.getLine(cursor.row);
|
|
285
|
+
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
|
286
|
+
var token = iterator.getCurrentToken();
|
|
287
|
+
if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
|
|
288
|
+
if (token.value == "/>")
|
|
289
|
+
return;
|
|
290
|
+
while (token && token.type.indexOf("tag-name") === -1) {
|
|
291
|
+
token = iterator.stepBackward();
|
|
292
|
+
}
|
|
293
|
+
if (!token) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
var tag = token.value;
|
|
297
|
+
var row = iterator.getCurrentTokenRow();
|
|
298
|
+
token = iterator.stepBackward();
|
|
299
|
+
if (!token || token.type.indexOf("end-tag") !== -1) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
|
|
303
|
+
var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
|
304
|
+
var line = session.getLine(row);
|
|
305
|
+
var nextIndent = this.$getIndent(line);
|
|
306
|
+
var indent = nextIndent + session.getTabString();
|
|
307
|
+
if (nextToken && nextToken.value === "</") {
|
|
308
|
+
return {
|
|
309
|
+
text: "\n" + indent + "\n" + nextIndent,
|
|
310
|
+
selection: [1, indent.length, 1, indent.length]
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
return {
|
|
315
|
+
text: "\n" + indent
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
oop.inherits(XmlBehaviour, Behaviour);
|
|
324
|
+
exports.XmlBehaviour = XmlBehaviour;
|
|
325
|
+
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
|
|
329
|
+
var oop = require("../../lib/oop");
|
|
330
|
+
var Range = require("../../range").Range;
|
|
331
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
332
|
+
var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
|
|
333
|
+
BaseFoldMode.call(this);
|
|
334
|
+
this.voidElements = voidElements || {};
|
|
335
|
+
this.optionalEndTags = oop.mixin({}, this.voidElements);
|
|
336
|
+
if (optionalEndTags)
|
|
337
|
+
oop.mixin(this.optionalEndTags, optionalEndTags);
|
|
338
|
+
};
|
|
339
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
|
340
|
+
var Tag = function () {
|
|
341
|
+
this.tagName = "";
|
|
342
|
+
this.closing = false;
|
|
343
|
+
this.selfClosing = false;
|
|
344
|
+
this.start = { row: 0, column: 0 };
|
|
345
|
+
this.end = { row: 0, column: 0 };
|
|
346
|
+
};
|
|
347
|
+
function is(token, type) {
|
|
348
|
+
return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
|
|
349
|
+
}
|
|
350
|
+
(function () {
|
|
351
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
352
|
+
var tag = this._getFirstTagInLine(session, row);
|
|
353
|
+
if (!tag)
|
|
354
|
+
return this.getCommentFoldWidget(session, row);
|
|
355
|
+
if (tag.closing || (!tag.tagName && tag.selfClosing))
|
|
356
|
+
return foldStyle === "markbeginend" ? "end" : "";
|
|
357
|
+
if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
|
|
358
|
+
return "";
|
|
359
|
+
if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
|
|
360
|
+
return "";
|
|
361
|
+
return "start";
|
|
362
|
+
};
|
|
363
|
+
this.getCommentFoldWidget = function (session, row) {
|
|
364
|
+
if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
|
|
365
|
+
return "start";
|
|
366
|
+
return "";
|
|
367
|
+
};
|
|
368
|
+
this._getFirstTagInLine = function (session, row) {
|
|
369
|
+
var tokens = session.getTokens(row);
|
|
370
|
+
var tag = new Tag();
|
|
371
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
372
|
+
var token = tokens[i];
|
|
373
|
+
if (is(token, "tag-open")) {
|
|
374
|
+
tag.end.column = tag.start.column + token.value.length;
|
|
375
|
+
tag.closing = is(token, "end-tag-open");
|
|
376
|
+
token = tokens[++i];
|
|
377
|
+
if (!token)
|
|
378
|
+
return null;
|
|
379
|
+
tag.tagName = token.value;
|
|
380
|
+
if (token.value === "") { //skip empty tag name token for fragment
|
|
381
|
+
token = tokens[++i];
|
|
382
|
+
if (!token)
|
|
383
|
+
return null;
|
|
384
|
+
tag.tagName = token.value;
|
|
385
|
+
}
|
|
386
|
+
tag.end.column += token.value.length;
|
|
387
|
+
for (i++; i < tokens.length; i++) {
|
|
388
|
+
token = tokens[i];
|
|
389
|
+
tag.end.column += token.value.length;
|
|
390
|
+
if (is(token, "tag-close")) {
|
|
391
|
+
tag.selfClosing = token.value == '/>';
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return tag;
|
|
396
|
+
}
|
|
397
|
+
else if (is(token, "tag-close")) {
|
|
398
|
+
tag.selfClosing = token.value == '/>';
|
|
399
|
+
return tag;
|
|
400
|
+
}
|
|
401
|
+
tag.start.column += token.value.length;
|
|
402
|
+
}
|
|
403
|
+
return null;
|
|
404
|
+
};
|
|
405
|
+
this._findEndTagInLine = function (session, row, tagName, startColumn) {
|
|
406
|
+
var tokens = session.getTokens(row);
|
|
407
|
+
var column = 0;
|
|
408
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
409
|
+
var token = tokens[i];
|
|
410
|
+
column += token.value.length;
|
|
411
|
+
if (column < startColumn - 1)
|
|
412
|
+
continue;
|
|
413
|
+
if (is(token, "end-tag-open")) {
|
|
414
|
+
token = tokens[i + 1];
|
|
415
|
+
if (is(token, "tag-name") && token.value === "") {
|
|
416
|
+
token = tokens[i + 2];
|
|
417
|
+
}
|
|
418
|
+
if (token && token.value == tagName)
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return false;
|
|
423
|
+
};
|
|
424
|
+
this.getFoldWidgetRange = function (session, foldStyle, row) {
|
|
425
|
+
var firstTag = this._getFirstTagInLine(session, row);
|
|
426
|
+
if (!firstTag) {
|
|
427
|
+
return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
|
|
428
|
+
}
|
|
429
|
+
var tags = session.getMatchingTags({ row: row, column: 0 });
|
|
430
|
+
if (tags) {
|
|
431
|
+
return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
}).call(FoldMode.prototype);
|
|
435
|
+
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict";
|
|
439
|
+
var oop = require("../lib/oop");
|
|
440
|
+
var lang = require("../lib/lang");
|
|
441
|
+
var TextMode = require("./text").Mode;
|
|
442
|
+
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
|
443
|
+
var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
|
|
444
|
+
var XmlFoldMode = require("./folding/xml").FoldMode;
|
|
445
|
+
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
446
|
+
var Mode = function () {
|
|
447
|
+
this.HighlightRules = XmlHighlightRules;
|
|
448
|
+
this.$behaviour = new XmlBehaviour();
|
|
449
|
+
this.foldingRules = new XmlFoldMode();
|
|
450
|
+
};
|
|
451
|
+
oop.inherits(Mode, TextMode);
|
|
452
|
+
(function () {
|
|
453
|
+
this.voidElements = lang.arrayToMap([]);
|
|
454
|
+
this.blockComment = { start: "<!--", end: "-->" };
|
|
455
|
+
this.createWorker = function (session) {
|
|
456
|
+
var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
|
|
457
|
+
worker.attachToDocument(session.getDocument());
|
|
458
|
+
worker.on("error", function (e) {
|
|
459
|
+
session.setAnnotations(e.data);
|
|
460
|
+
});
|
|
461
|
+
worker.on("terminate", function () {
|
|
462
|
+
session.clearAnnotations();
|
|
463
|
+
});
|
|
464
|
+
return worker;
|
|
465
|
+
};
|
|
466
|
+
this.$id = "ace/mode/xml";
|
|
467
|
+
}).call(Mode.prototype);
|
|
468
|
+
exports.Mode = Mode;
|
|
469
|
+
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
|
|
473
|
+
var oop = require("../lib/oop");
|
|
474
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
475
|
+
var JsDocCommentHighlightRules = function () {
|
|
476
|
+
this.$rules = {
|
|
477
|
+
"start": [
|
|
478
|
+
{
|
|
479
|
+
token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
|
|
480
|
+
regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
|
|
481
|
+
push: [
|
|
482
|
+
{
|
|
483
|
+
token: "lparen.doc",
|
|
484
|
+
regex: "{",
|
|
485
|
+
push: [
|
|
486
|
+
{
|
|
487
|
+
include: "doc-syntax"
|
|
488
|
+
}, {
|
|
489
|
+
token: "rparen.doc",
|
|
490
|
+
regex: "}|(?=$)",
|
|
491
|
+
next: "pop"
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
}, {
|
|
495
|
+
token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
|
|
496
|
+
regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
|
|
497
|
+
next: "pop"
|
|
498
|
+
}, {
|
|
499
|
+
token: "rparen.doc",
|
|
500
|
+
regex: "}|(?=$)",
|
|
501
|
+
next: "pop"
|
|
502
|
+
}, {
|
|
503
|
+
include: "doc-syntax"
|
|
504
|
+
}, {
|
|
505
|
+
defaultToken: "text.doc"
|
|
506
|
+
}
|
|
507
|
+
]
|
|
508
|
+
}, {
|
|
509
|
+
token: ["comment.doc.tag", "text.doc", "lparen.doc"],
|
|
510
|
+
regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
|
|
511
|
+
+ "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
|
|
512
|
+
push: [
|
|
513
|
+
{
|
|
514
|
+
token: "lparen.doc",
|
|
515
|
+
regex: "{",
|
|
516
|
+
push: [
|
|
517
|
+
{
|
|
518
|
+
include: "doc-syntax"
|
|
519
|
+
}, {
|
|
520
|
+
token: "rparen.doc",
|
|
521
|
+
regex: "}|(?=$)",
|
|
522
|
+
next: "pop"
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
}, {
|
|
526
|
+
token: "rparen.doc",
|
|
527
|
+
regex: "}|(?=$)",
|
|
528
|
+
next: "pop"
|
|
529
|
+
}, {
|
|
530
|
+
include: "doc-syntax"
|
|
531
|
+
}, {
|
|
532
|
+
defaultToken: "text.doc"
|
|
533
|
+
}
|
|
534
|
+
]
|
|
535
|
+
}, {
|
|
536
|
+
token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
|
|
537
|
+
regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
|
|
538
|
+
+ "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
|
|
539
|
+
+ "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
|
|
540
|
+
+ "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
|
|
541
|
+
}, {
|
|
542
|
+
token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
|
|
543
|
+
regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
|
|
544
|
+
}, {
|
|
545
|
+
token: "comment.doc.tag",
|
|
546
|
+
regex: "@access\\s+(?:private|public|protected)"
|
|
547
|
+
}, {
|
|
548
|
+
token: "comment.doc.tag",
|
|
549
|
+
regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
|
|
550
|
+
}, {
|
|
551
|
+
token: "comment.doc.tag",
|
|
552
|
+
regex: "@\\w+(?=\\s|$)"
|
|
553
|
+
},
|
|
554
|
+
JsDocCommentHighlightRules.getTagRule(),
|
|
555
|
+
{
|
|
556
|
+
defaultToken: "comment.doc.body",
|
|
557
|
+
caseInsensitive: true
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
"doc-syntax": [{
|
|
561
|
+
token: "operator.doc",
|
|
562
|
+
regex: /[|:]/
|
|
563
|
+
}, {
|
|
564
|
+
token: "paren.doc",
|
|
565
|
+
regex: /[\[\]]/
|
|
566
|
+
}]
|
|
567
|
+
};
|
|
568
|
+
this.normalizeRules();
|
|
569
|
+
};
|
|
570
|
+
oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
|
|
571
|
+
JsDocCommentHighlightRules.getTagRule = function (start) {
|
|
572
|
+
return {
|
|
573
|
+
token: "comment.doc.tag.storage.type",
|
|
574
|
+
regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
JsDocCommentHighlightRules.getStartRule = function (start) {
|
|
578
|
+
return {
|
|
579
|
+
token: "comment.doc", // doc comment
|
|
580
|
+
regex: /\/\*\*(?!\/)/,
|
|
581
|
+
next: start
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
JsDocCommentHighlightRules.getEndRule = function (start) {
|
|
585
|
+
return {
|
|
586
|
+
token: "comment.doc", // closing comment
|
|
587
|
+
regex: "\\*\\/",
|
|
588
|
+
next: start
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
|
|
592
|
+
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
|
|
596
|
+
var oop = require("../lib/oop");
|
|
597
|
+
var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
|
|
598
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
599
|
+
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
|
|
600
|
+
var JavaScriptHighlightRules = function (options) {
|
|
601
|
+
var keywords = {
|
|
602
|
+
"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
|
|
603
|
+
"Namespace|QName|XML|XMLList|" + // E4X
|
|
604
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
|
605
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
|
606
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
|
607
|
+
"SyntaxError|TypeError|URIError|" +
|
|
608
|
+
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
|
609
|
+
"isNaN|parseFloat|parseInt|" +
|
|
610
|
+
"JSON|Math|" + // Other
|
|
611
|
+
"this|arguments|prototype|window|document", // Pseudo
|
|
612
|
+
"keyword": "const|yield|import|get|set|async|await|" +
|
|
613
|
+
"break|case|catch|continue|default|delete|do|else|finally|for|" +
|
|
614
|
+
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
|
615
|
+
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
|
616
|
+
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
|
|
617
|
+
"storage.type": "const|let|var|function",
|
|
618
|
+
"constant.language": "null|Infinity|NaN|undefined",
|
|
619
|
+
"support.function": "alert",
|
|
620
|
+
"constant.language.boolean": "true|false"
|
|
621
|
+
};
|
|
622
|
+
var keywordMapper = this.createKeywordMapper(keywords, "identifier");
|
|
623
|
+
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
|
|
624
|
+
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
|
625
|
+
"u[0-9a-fA-F]{4}|" + // unicode
|
|
626
|
+
"u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
|
|
627
|
+
"[0-2][0-7]{0,2}|" + // oct
|
|
628
|
+
"3[0-7][0-7]?|" + // oct
|
|
629
|
+
"[4-7][0-7]?|" + //oct
|
|
630
|
+
".)";
|
|
631
|
+
var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
|
|
632
|
+
var functionCallStartRule = {
|
|
633
|
+
token: ["identifier", "text", "paren.lparen"],
|
|
634
|
+
regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
|
|
635
|
+
};
|
|
636
|
+
this.$rules = {
|
|
637
|
+
"no_regex": [
|
|
638
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
|
639
|
+
comments("no_regex"),
|
|
640
|
+
functionCallStartRule,
|
|
641
|
+
{
|
|
642
|
+
token: "string",
|
|
643
|
+
regex: "'(?=.)",
|
|
644
|
+
next: "qstring"
|
|
645
|
+
}, {
|
|
646
|
+
token: "string",
|
|
647
|
+
regex: '"(?=.)',
|
|
648
|
+
next: "qqstring"
|
|
649
|
+
}, {
|
|
650
|
+
token: "constant.numeric", // hexadecimal, octal and binary
|
|
651
|
+
regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
|
|
652
|
+
}, {
|
|
653
|
+
token: "constant.numeric", // decimal integers and floats
|
|
654
|
+
regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
|
|
655
|
+
}, {
|
|
656
|
+
token: [
|
|
657
|
+
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
|
|
658
|
+
"text", "storage.type", "text", "paren.lparen"
|
|
659
|
+
],
|
|
660
|
+
regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
|
|
661
|
+
next: "function_arguments"
|
|
662
|
+
}, {
|
|
663
|
+
token: [
|
|
664
|
+
"storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
|
|
665
|
+
],
|
|
666
|
+
regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
|
|
667
|
+
next: "function_arguments"
|
|
668
|
+
}, {
|
|
669
|
+
token: [
|
|
670
|
+
"entity.name.function", "text", "punctuation.operator",
|
|
671
|
+
"text", "storage.type", "text", "storage.type", "text", "paren.lparen"
|
|
672
|
+
],
|
|
673
|
+
regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
|
|
674
|
+
next: "function_arguments"
|
|
675
|
+
}, {
|
|
676
|
+
token: [
|
|
677
|
+
"text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
|
|
678
|
+
],
|
|
679
|
+
regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
|
|
680
|
+
next: "function_arguments"
|
|
681
|
+
}, {
|
|
682
|
+
token: "keyword",
|
|
683
|
+
regex: "from(?=\\s*('|\"))"
|
|
684
|
+
}, {
|
|
685
|
+
token: "keyword",
|
|
686
|
+
regex: "(?:" + kwBeforeRe + ")\\b",
|
|
687
|
+
next: "start"
|
|
688
|
+
}, {
|
|
689
|
+
token: "support.constant",
|
|
690
|
+
regex: /that\b/
|
|
691
|
+
}, {
|
|
692
|
+
token: ["storage.type", "punctuation.operator", "support.function.firebug"],
|
|
693
|
+
regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
|
|
694
|
+
}, {
|
|
695
|
+
token: keywordMapper,
|
|
696
|
+
regex: identifierRe
|
|
697
|
+
}, {
|
|
698
|
+
token: "punctuation.operator",
|
|
699
|
+
regex: /[.](?![.])/,
|
|
700
|
+
next: "property"
|
|
701
|
+
}, {
|
|
702
|
+
token: "storage.type",
|
|
703
|
+
regex: /=>/,
|
|
704
|
+
next: "start"
|
|
705
|
+
}, {
|
|
706
|
+
token: "keyword.operator",
|
|
707
|
+
regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
|
|
708
|
+
next: "start"
|
|
709
|
+
}, {
|
|
710
|
+
token: "punctuation.operator",
|
|
711
|
+
regex: /[?:,;.]/,
|
|
712
|
+
next: "start"
|
|
713
|
+
}, {
|
|
714
|
+
token: "paren.lparen",
|
|
715
|
+
regex: /[\[({]/,
|
|
716
|
+
next: "start"
|
|
717
|
+
}, {
|
|
718
|
+
token: "paren.rparen",
|
|
719
|
+
regex: /[\])}]/
|
|
720
|
+
}, {
|
|
721
|
+
token: "comment",
|
|
722
|
+
regex: /^#!.*$/
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
property: [{
|
|
726
|
+
token: "text",
|
|
727
|
+
regex: "\\s+"
|
|
728
|
+
}, {
|
|
729
|
+
token: "keyword.operator",
|
|
730
|
+
regex: /=/
|
|
731
|
+
}, {
|
|
732
|
+
token: [
|
|
733
|
+
"storage.type", "text", "storage.type", "text", "paren.lparen"
|
|
734
|
+
],
|
|
735
|
+
regex: anonymousFunctionRe + "(\\s*)(\\()",
|
|
736
|
+
next: "function_arguments"
|
|
737
|
+
}, {
|
|
738
|
+
token: [
|
|
739
|
+
"storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
|
|
740
|
+
],
|
|
741
|
+
regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
|
|
742
|
+
next: "function_arguments"
|
|
743
|
+
}, {
|
|
744
|
+
token: "punctuation.operator",
|
|
745
|
+
regex: /[.](?![.])/
|
|
746
|
+
}, {
|
|
747
|
+
token: "support.function",
|
|
748
|
+
regex: "prototype"
|
|
749
|
+
}, {
|
|
750
|
+
token: "support.function",
|
|
751
|
+
regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
|
|
752
|
+
}, {
|
|
753
|
+
token: "support.function.dom",
|
|
754
|
+
regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
|
|
755
|
+
}, {
|
|
756
|
+
token: "support.constant",
|
|
757
|
+
regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
|
|
758
|
+
}, {
|
|
759
|
+
token: "identifier",
|
|
760
|
+
regex: identifierRe
|
|
761
|
+
}, {
|
|
762
|
+
regex: "",
|
|
763
|
+
token: "empty",
|
|
764
|
+
next: "no_regex"
|
|
765
|
+
}
|
|
766
|
+
],
|
|
767
|
+
"start": [
|
|
768
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
|
769
|
+
comments("start"),
|
|
770
|
+
{
|
|
771
|
+
token: "string.regexp",
|
|
772
|
+
regex: "\\/",
|
|
773
|
+
next: "regex"
|
|
774
|
+
}, {
|
|
775
|
+
token: "text",
|
|
776
|
+
regex: "\\s+|^$",
|
|
777
|
+
next: "start"
|
|
778
|
+
}, {
|
|
779
|
+
token: "empty",
|
|
780
|
+
regex: "",
|
|
781
|
+
next: "no_regex"
|
|
782
|
+
}
|
|
783
|
+
],
|
|
784
|
+
"regex": [
|
|
785
|
+
{
|
|
786
|
+
token: "regexp.keyword.operator",
|
|
787
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
|
788
|
+
}, {
|
|
789
|
+
token: "string.regexp",
|
|
790
|
+
regex: "/[sxngimy]*",
|
|
791
|
+
next: "no_regex"
|
|
792
|
+
}, {
|
|
793
|
+
token: "invalid",
|
|
794
|
+
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
|
795
|
+
}, {
|
|
796
|
+
token: "constant.language.escape",
|
|
797
|
+
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
|
|
798
|
+
}, {
|
|
799
|
+
token: "constant.language.delimiter",
|
|
800
|
+
regex: /\|/
|
|
801
|
+
}, {
|
|
802
|
+
token: "constant.language.escape",
|
|
803
|
+
regex: /\[\^?/,
|
|
804
|
+
next: "regex_character_class"
|
|
805
|
+
}, {
|
|
806
|
+
token: "empty",
|
|
807
|
+
regex: "$",
|
|
808
|
+
next: "no_regex"
|
|
809
|
+
}, {
|
|
810
|
+
defaultToken: "string.regexp"
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
"regex_character_class": [
|
|
814
|
+
{
|
|
815
|
+
token: "regexp.charclass.keyword.operator",
|
|
816
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
|
817
|
+
}, {
|
|
818
|
+
token: "constant.language.escape",
|
|
819
|
+
regex: "]",
|
|
820
|
+
next: "regex"
|
|
821
|
+
}, {
|
|
822
|
+
token: "constant.language.escape",
|
|
823
|
+
regex: "-"
|
|
824
|
+
}, {
|
|
825
|
+
token: "empty",
|
|
826
|
+
regex: "$",
|
|
827
|
+
next: "no_regex"
|
|
828
|
+
}, {
|
|
829
|
+
defaultToken: "string.regexp.charachterclass"
|
|
830
|
+
}
|
|
831
|
+
],
|
|
832
|
+
"default_parameter": [
|
|
833
|
+
{
|
|
834
|
+
token: "string",
|
|
835
|
+
regex: "'(?=.)",
|
|
836
|
+
push: [
|
|
837
|
+
{
|
|
838
|
+
token: "string",
|
|
839
|
+
regex: "'|$",
|
|
840
|
+
next: "pop"
|
|
841
|
+
}, {
|
|
842
|
+
include: "qstring"
|
|
843
|
+
}
|
|
844
|
+
]
|
|
845
|
+
}, {
|
|
846
|
+
token: "string",
|
|
847
|
+
regex: '"(?=.)',
|
|
848
|
+
push: [
|
|
849
|
+
{
|
|
850
|
+
token: "string",
|
|
851
|
+
regex: '"|$',
|
|
852
|
+
next: "pop"
|
|
853
|
+
}, {
|
|
854
|
+
include: "qqstring"
|
|
855
|
+
}
|
|
856
|
+
]
|
|
857
|
+
}, {
|
|
858
|
+
token: "constant.language",
|
|
859
|
+
regex: "null|Infinity|NaN|undefined"
|
|
860
|
+
}, {
|
|
861
|
+
token: "constant.numeric", // hexadecimal, octal and binary
|
|
862
|
+
regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
|
|
863
|
+
}, {
|
|
864
|
+
token: "constant.numeric", // decimal integers and floats
|
|
865
|
+
regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
|
|
866
|
+
}, {
|
|
867
|
+
token: "punctuation.operator",
|
|
868
|
+
regex: ",",
|
|
869
|
+
next: "function_arguments"
|
|
870
|
+
}, {
|
|
871
|
+
token: "text",
|
|
872
|
+
regex: "\\s+"
|
|
873
|
+
}, {
|
|
874
|
+
token: "punctuation.operator",
|
|
875
|
+
regex: "$"
|
|
876
|
+
}, {
|
|
877
|
+
token: "empty",
|
|
878
|
+
regex: "",
|
|
879
|
+
next: "no_regex"
|
|
880
|
+
}
|
|
881
|
+
],
|
|
882
|
+
"function_arguments": [
|
|
883
|
+
comments("function_arguments"),
|
|
884
|
+
{
|
|
885
|
+
token: "variable.parameter",
|
|
886
|
+
regex: identifierRe
|
|
887
|
+
}, {
|
|
888
|
+
token: "punctuation.operator",
|
|
889
|
+
regex: ","
|
|
890
|
+
}, {
|
|
891
|
+
token: "text",
|
|
892
|
+
regex: "\\s+"
|
|
893
|
+
}, {
|
|
894
|
+
token: "punctuation.operator",
|
|
895
|
+
regex: "$"
|
|
896
|
+
}, {
|
|
897
|
+
token: "empty",
|
|
898
|
+
regex: "",
|
|
899
|
+
next: "no_regex"
|
|
900
|
+
}
|
|
901
|
+
],
|
|
902
|
+
"qqstring": [
|
|
903
|
+
{
|
|
904
|
+
token: "constant.language.escape",
|
|
905
|
+
regex: escapedRe
|
|
906
|
+
}, {
|
|
907
|
+
token: "string",
|
|
908
|
+
regex: "\\\\$",
|
|
909
|
+
consumeLineEnd: true
|
|
910
|
+
}, {
|
|
911
|
+
token: "string",
|
|
912
|
+
regex: '"|$',
|
|
913
|
+
next: "no_regex"
|
|
914
|
+
}, {
|
|
915
|
+
defaultToken: "string"
|
|
916
|
+
}
|
|
917
|
+
],
|
|
918
|
+
"qstring": [
|
|
919
|
+
{
|
|
920
|
+
token: "constant.language.escape",
|
|
921
|
+
regex: escapedRe
|
|
922
|
+
}, {
|
|
923
|
+
token: "string",
|
|
924
|
+
regex: "\\\\$",
|
|
925
|
+
consumeLineEnd: true
|
|
926
|
+
}, {
|
|
927
|
+
token: "string",
|
|
928
|
+
regex: "'|$",
|
|
929
|
+
next: "no_regex"
|
|
930
|
+
}, {
|
|
931
|
+
defaultToken: "string"
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
};
|
|
935
|
+
if (!options || !options.noES6) {
|
|
936
|
+
this.$rules.no_regex.unshift({
|
|
937
|
+
regex: "[{}]", onMatch: function (val, state, stack) {
|
|
938
|
+
this.next = val == "{" ? this.nextState : "";
|
|
939
|
+
if (val == "{" && stack.length) {
|
|
940
|
+
stack.unshift("start", state);
|
|
941
|
+
}
|
|
942
|
+
else if (val == "}" && stack.length) {
|
|
943
|
+
stack.shift();
|
|
944
|
+
this.next = stack.shift();
|
|
945
|
+
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
|
|
946
|
+
return "paren.quasi.end";
|
|
947
|
+
}
|
|
948
|
+
return val == "{" ? "paren.lparen" : "paren.rparen";
|
|
949
|
+
},
|
|
950
|
+
nextState: "start"
|
|
951
|
+
}, {
|
|
952
|
+
token: "string.quasi.start",
|
|
953
|
+
regex: /`/,
|
|
954
|
+
push: [{
|
|
955
|
+
token: "constant.language.escape",
|
|
956
|
+
regex: escapedRe
|
|
957
|
+
}, {
|
|
958
|
+
token: "paren.quasi.start",
|
|
959
|
+
regex: /\${/,
|
|
960
|
+
push: "start"
|
|
961
|
+
}, {
|
|
962
|
+
token: "string.quasi.end",
|
|
963
|
+
regex: /`/,
|
|
964
|
+
next: "pop"
|
|
965
|
+
}, {
|
|
966
|
+
defaultToken: "string.quasi"
|
|
967
|
+
}]
|
|
968
|
+
}, {
|
|
969
|
+
token: ["variable.parameter", "text"],
|
|
970
|
+
regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
|
|
971
|
+
}, {
|
|
972
|
+
token: "paren.lparen",
|
|
973
|
+
regex: "(\\()(?=[^\\(]+\\s*=>)",
|
|
974
|
+
next: "function_arguments"
|
|
975
|
+
}, {
|
|
976
|
+
token: "variable.language",
|
|
977
|
+
regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
|
|
978
|
+
});
|
|
979
|
+
this.$rules["function_arguments"].unshift({
|
|
980
|
+
token: "keyword.operator",
|
|
981
|
+
regex: "=",
|
|
982
|
+
next: "default_parameter"
|
|
983
|
+
}, {
|
|
984
|
+
token: "keyword.operator",
|
|
985
|
+
regex: "\\.{3}"
|
|
986
|
+
});
|
|
987
|
+
this.$rules["property"].unshift({
|
|
988
|
+
token: "support.function",
|
|
989
|
+
regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
|
|
990
|
+
+ "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
|
|
991
|
+
}, {
|
|
992
|
+
token: "constant.language",
|
|
993
|
+
regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
|
|
994
|
+
});
|
|
995
|
+
if (!options || options.jsx != false)
|
|
996
|
+
JSX.call(this);
|
|
997
|
+
}
|
|
998
|
+
this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
|
|
999
|
+
this.normalizeRules();
|
|
1000
|
+
};
|
|
1001
|
+
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
|
1002
|
+
function JSX() {
|
|
1003
|
+
var tagRegex = identifierRe.replace("\\d", "\\d\\-");
|
|
1004
|
+
var jsxTag = {
|
|
1005
|
+
onMatch: function (val, state, stack) {
|
|
1006
|
+
var offset = val.charAt(1) == "/" ? 2 : 1;
|
|
1007
|
+
if (offset == 1) {
|
|
1008
|
+
if (state != this.nextState)
|
|
1009
|
+
stack.unshift(this.next, this.nextState, 0);
|
|
1010
|
+
else
|
|
1011
|
+
stack.unshift(this.next);
|
|
1012
|
+
stack[2]++;
|
|
1013
|
+
}
|
|
1014
|
+
else if (offset == 2) {
|
|
1015
|
+
if (state == this.nextState) {
|
|
1016
|
+
stack[1]--;
|
|
1017
|
+
if (!stack[1] || stack[1] < 0) {
|
|
1018
|
+
stack.shift();
|
|
1019
|
+
stack.shift();
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return [{
|
|
1024
|
+
type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
|
|
1025
|
+
value: val.slice(0, offset)
|
|
1026
|
+
}, {
|
|
1027
|
+
type: "meta.tag.tag-name.xml",
|
|
1028
|
+
value: val.substr(offset)
|
|
1029
|
+
}];
|
|
1030
|
+
},
|
|
1031
|
+
regex: "</?(?:" + tagRegex + "|(?=>))",
|
|
1032
|
+
next: "jsxAttributes",
|
|
1033
|
+
nextState: "jsx"
|
|
1034
|
+
};
|
|
1035
|
+
this.$rules.start.unshift(jsxTag);
|
|
1036
|
+
var jsxJsRule = {
|
|
1037
|
+
regex: "{",
|
|
1038
|
+
token: "paren.quasi.start",
|
|
1039
|
+
push: "start"
|
|
1040
|
+
};
|
|
1041
|
+
this.$rules.jsx = [
|
|
1042
|
+
jsxJsRule,
|
|
1043
|
+
jsxTag,
|
|
1044
|
+
{ include: "reference" }, { defaultToken: "string.xml" }
|
|
1045
|
+
];
|
|
1046
|
+
this.$rules.jsxAttributes = [{
|
|
1047
|
+
token: "meta.tag.punctuation.tag-close.xml",
|
|
1048
|
+
regex: "/?>",
|
|
1049
|
+
onMatch: function (value, currentState, stack) {
|
|
1050
|
+
if (currentState == stack[0])
|
|
1051
|
+
stack.shift();
|
|
1052
|
+
if (value.length == 2) {
|
|
1053
|
+
if (stack[0] == this.nextState)
|
|
1054
|
+
stack[1]--;
|
|
1055
|
+
if (!stack[1] || stack[1] < 0) {
|
|
1056
|
+
stack.splice(0, 2);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
this.next = stack[0] || "start";
|
|
1060
|
+
return [{ type: this.token, value: value }];
|
|
1061
|
+
},
|
|
1062
|
+
nextState: "jsx"
|
|
1063
|
+
},
|
|
1064
|
+
jsxJsRule,
|
|
1065
|
+
comments("jsxAttributes"),
|
|
1066
|
+
{
|
|
1067
|
+
token: "entity.other.attribute-name.xml",
|
|
1068
|
+
regex: tagRegex
|
|
1069
|
+
}, {
|
|
1070
|
+
token: "keyword.operator.attribute-equals.xml",
|
|
1071
|
+
regex: "="
|
|
1072
|
+
}, {
|
|
1073
|
+
token: "text.tag-whitespace.xml",
|
|
1074
|
+
regex: "\\s+"
|
|
1075
|
+
}, {
|
|
1076
|
+
token: "string.attribute-value.xml",
|
|
1077
|
+
regex: "'",
|
|
1078
|
+
stateName: "jsx_attr_q",
|
|
1079
|
+
push: [
|
|
1080
|
+
{ token: "string.attribute-value.xml", regex: "'", next: "pop" },
|
|
1081
|
+
{ include: "reference" },
|
|
1082
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
1083
|
+
]
|
|
1084
|
+
}, {
|
|
1085
|
+
token: "string.attribute-value.xml",
|
|
1086
|
+
regex: '"',
|
|
1087
|
+
stateName: "jsx_attr_qq",
|
|
1088
|
+
push: [
|
|
1089
|
+
{ token: "string.attribute-value.xml", regex: '"', next: "pop" },
|
|
1090
|
+
{ include: "reference" },
|
|
1091
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
1092
|
+
]
|
|
1093
|
+
},
|
|
1094
|
+
jsxTag
|
|
1095
|
+
];
|
|
1096
|
+
this.$rules.reference = [{
|
|
1097
|
+
token: "constant.language.escape.reference.xml",
|
|
1098
|
+
regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
1099
|
+
}];
|
|
1100
|
+
}
|
|
1101
|
+
function comments(next) {
|
|
1102
|
+
return [
|
|
1103
|
+
{
|
|
1104
|
+
token: "comment", // multi line comment
|
|
1105
|
+
regex: /\/\*/,
|
|
1106
|
+
next: [
|
|
1107
|
+
DocCommentHighlightRules.getTagRule(),
|
|
1108
|
+
{ token: "comment", regex: "\\*\\/", next: next || "pop" },
|
|
1109
|
+
{ defaultToken: "comment", caseInsensitive: true }
|
|
1110
|
+
]
|
|
1111
|
+
}, {
|
|
1112
|
+
token: "comment",
|
|
1113
|
+
regex: "\\/\\/",
|
|
1114
|
+
next: [
|
|
1115
|
+
DocCommentHighlightRules.getTagRule(),
|
|
1116
|
+
{ token: "comment", regex: "$|^", next: next || "pop" },
|
|
1117
|
+
{ defaultToken: "comment", caseInsensitive: true }
|
|
1118
|
+
]
|
|
1119
|
+
}
|
|
1120
|
+
];
|
|
1121
|
+
}
|
|
1122
|
+
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
|
1123
|
+
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
|
|
1127
|
+
var Range = require("../range").Range;
|
|
1128
|
+
var MatchingBraceOutdent = function () { };
|
|
1129
|
+
(function () {
|
|
1130
|
+
this.checkOutdent = function (line, input) {
|
|
1131
|
+
if (!/^\s+$/.test(line))
|
|
1132
|
+
return false;
|
|
1133
|
+
return /^\s*\}/.test(input);
|
|
1134
|
+
};
|
|
1135
|
+
this.autoOutdent = function (doc, row) {
|
|
1136
|
+
var line = doc.getLine(row);
|
|
1137
|
+
var match = line.match(/^(\s*\})/);
|
|
1138
|
+
if (!match)
|
|
1139
|
+
return 0;
|
|
1140
|
+
var column = match[1].length;
|
|
1141
|
+
var openBracePos = doc.findMatchingBracket({ row: row, column: column });
|
|
1142
|
+
if (!openBracePos || openBracePos.row == row)
|
|
1143
|
+
return 0;
|
|
1144
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
|
1145
|
+
doc.replace(new Range(row, 0, row, column - 1), indent);
|
|
1146
|
+
};
|
|
1147
|
+
this.$getIndent = function (line) {
|
|
1148
|
+
return line.match(/^\s*/)[0];
|
|
1149
|
+
};
|
|
1150
|
+
}).call(MatchingBraceOutdent.prototype);
|
|
1151
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
|
1152
|
+
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
|
|
1156
|
+
var oop = require("../../lib/oop");
|
|
1157
|
+
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
1158
|
+
var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
|
|
1159
|
+
var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
|
|
1160
|
+
var JavaScriptBehaviour = function () {
|
|
1161
|
+
var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
|
|
1162
|
+
this.addBehaviours(xmlBehaviours);
|
|
1163
|
+
this.inherit(CstyleBehaviour);
|
|
1164
|
+
this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
|
|
1165
|
+
if (text == '>') {
|
|
1166
|
+
var position = editor.getSelectionRange().start;
|
|
1167
|
+
var iterator = new TokenIterator(session, position.row, position.column);
|
|
1168
|
+
var token = iterator.getCurrentToken() || iterator.stepBackward();
|
|
1169
|
+
if (!token)
|
|
1170
|
+
return;
|
|
1171
|
+
if (token.value == '<') {
|
|
1172
|
+
return {
|
|
1173
|
+
text: "></>",
|
|
1174
|
+
selection: [1, 1]
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
};
|
|
1180
|
+
oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
|
|
1181
|
+
exports.JavaScriptBehaviour = JavaScriptBehaviour;
|
|
1182
|
+
|
|
1183
|
+
});
|
|
1184
|
+
|
|
1185
|
+
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
|
|
1186
|
+
var oop = require("../../lib/oop");
|
|
1187
|
+
var Range = require("../../range").Range;
|
|
1188
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
1189
|
+
var FoldMode = exports.FoldMode = function (commentRegex) {
|
|
1190
|
+
if (commentRegex) {
|
|
1191
|
+
this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
|
|
1192
|
+
this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
|
1196
|
+
(function () {
|
|
1197
|
+
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
|
1198
|
+
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
|
1199
|
+
this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
|
|
1200
|
+
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
|
1201
|
+
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
|
1202
|
+
this._getFoldWidgetBase = this.getFoldWidget;
|
|
1203
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
1204
|
+
var line = session.getLine(row);
|
|
1205
|
+
if (this.singleLineBlockCommentRe.test(line)) {
|
|
1206
|
+
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
|
1207
|
+
return "";
|
|
1208
|
+
}
|
|
1209
|
+
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
|
1210
|
+
if (!fw && this.startRegionRe.test(line))
|
|
1211
|
+
return "start"; // lineCommentRegionStart
|
|
1212
|
+
return fw;
|
|
1213
|
+
};
|
|
1214
|
+
this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
|
|
1215
|
+
var line = session.getLine(row);
|
|
1216
|
+
if (this.startRegionRe.test(line))
|
|
1217
|
+
return this.getCommentRegionBlock(session, line, row);
|
|
1218
|
+
var match = line.match(this.foldingStartMarker);
|
|
1219
|
+
if (match) {
|
|
1220
|
+
var i = match.index;
|
|
1221
|
+
if (match[1])
|
|
1222
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
|
1223
|
+
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
|
1224
|
+
if (range && !range.isMultiLine()) {
|
|
1225
|
+
if (forceMultiline) {
|
|
1226
|
+
range = this.getSectionRange(session, row);
|
|
1227
|
+
}
|
|
1228
|
+
else if (foldStyle != "all")
|
|
1229
|
+
range = null;
|
|
1230
|
+
}
|
|
1231
|
+
return range;
|
|
1232
|
+
}
|
|
1233
|
+
if (foldStyle === "markbegin")
|
|
1234
|
+
return;
|
|
1235
|
+
var match = line.match(this.foldingStopMarker);
|
|
1236
|
+
if (match) {
|
|
1237
|
+
var i = match.index + match[0].length;
|
|
1238
|
+
if (match[1])
|
|
1239
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
|
1240
|
+
return session.getCommentFoldRange(row, i, -1);
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
this.getSectionRange = function (session, row) {
|
|
1244
|
+
var line = session.getLine(row);
|
|
1245
|
+
var startIndent = line.search(/\S/);
|
|
1246
|
+
var startRow = row;
|
|
1247
|
+
var startColumn = line.length;
|
|
1248
|
+
row = row + 1;
|
|
1249
|
+
var endRow = row;
|
|
1250
|
+
var maxRow = session.getLength();
|
|
1251
|
+
while (++row < maxRow) {
|
|
1252
|
+
line = session.getLine(row);
|
|
1253
|
+
var indent = line.search(/\S/);
|
|
1254
|
+
if (indent === -1)
|
|
1255
|
+
continue;
|
|
1256
|
+
if (startIndent > indent)
|
|
1257
|
+
break;
|
|
1258
|
+
var subRange = this.getFoldWidgetRange(session, "all", row);
|
|
1259
|
+
if (subRange) {
|
|
1260
|
+
if (subRange.start.row <= startRow) {
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
else if (subRange.isMultiLine()) {
|
|
1264
|
+
row = subRange.end.row;
|
|
1265
|
+
}
|
|
1266
|
+
else if (startIndent == indent) {
|
|
1267
|
+
break;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
endRow = row;
|
|
1271
|
+
}
|
|
1272
|
+
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
|
1273
|
+
};
|
|
1274
|
+
this.getCommentRegionBlock = function (session, line, row) {
|
|
1275
|
+
var startColumn = line.search(/\s*$/);
|
|
1276
|
+
var maxRow = session.getLength();
|
|
1277
|
+
var startRow = row;
|
|
1278
|
+
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
|
1279
|
+
var depth = 1;
|
|
1280
|
+
while (++row < maxRow) {
|
|
1281
|
+
line = session.getLine(row);
|
|
1282
|
+
var m = re.exec(line);
|
|
1283
|
+
if (!m)
|
|
1284
|
+
continue;
|
|
1285
|
+
if (m[1])
|
|
1286
|
+
depth--;
|
|
1287
|
+
else
|
|
1288
|
+
depth++;
|
|
1289
|
+
if (!depth)
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
var endRow = row;
|
|
1293
|
+
if (endRow > startRow) {
|
|
1294
|
+
return new Range(startRow, startColumn, endRow, line.length);
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
}).call(FoldMode.prototype);
|
|
1298
|
+
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
|
|
1302
|
+
var oop = require("../../lib/oop");
|
|
1303
|
+
var XmlFoldMode = require("./xml").FoldMode;
|
|
1304
|
+
var CFoldMode = require("./cstyle").FoldMode;
|
|
1305
|
+
var FoldMode = exports.FoldMode = function (commentRegex) {
|
|
1306
|
+
if (commentRegex) {
|
|
1307
|
+
this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
|
|
1308
|
+
this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
|
|
1309
|
+
}
|
|
1310
|
+
this.xmlFoldMode = new XmlFoldMode();
|
|
1311
|
+
};
|
|
1312
|
+
oop.inherits(FoldMode, CFoldMode);
|
|
1313
|
+
(function () {
|
|
1314
|
+
this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
|
|
1315
|
+
this.getFoldWidgetBase = this.getFoldWidget;
|
|
1316
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
1317
|
+
var fw = this.getFoldWidgetBase(session, foldStyle, row);
|
|
1318
|
+
if (!fw) {
|
|
1319
|
+
return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
|
|
1320
|
+
}
|
|
1321
|
+
return fw;
|
|
1322
|
+
};
|
|
1323
|
+
this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
|
|
1324
|
+
var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
|
|
1325
|
+
if (range)
|
|
1326
|
+
return range;
|
|
1327
|
+
return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
|
|
1328
|
+
};
|
|
1329
|
+
}).call(FoldMode.prototype);
|
|
1330
|
+
|
|
1331
|
+
});
|
|
1332
|
+
|
|
1333
|
+
ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
|
|
1334
|
+
var oop = require("../lib/oop");
|
|
1335
|
+
var TextMode = require("./text").Mode;
|
|
1336
|
+
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
|
1337
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
|
1338
|
+
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
1339
|
+
var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
|
|
1340
|
+
var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
|
|
1341
|
+
var Mode = function () {
|
|
1342
|
+
this.HighlightRules = JavaScriptHighlightRules;
|
|
1343
|
+
this.$outdent = new MatchingBraceOutdent();
|
|
1344
|
+
this.$behaviour = new JavaScriptBehaviour();
|
|
1345
|
+
this.foldingRules = new JavaScriptFoldMode();
|
|
1346
|
+
};
|
|
1347
|
+
oop.inherits(Mode, TextMode);
|
|
1348
|
+
(function () {
|
|
1349
|
+
this.lineCommentStart = "//";
|
|
1350
|
+
this.blockComment = { start: "/*", end: "*/" };
|
|
1351
|
+
this.$quotes = { '"': '"', "'": "'", "`": "`" };
|
|
1352
|
+
this.$pairQuotesAfter = {
|
|
1353
|
+
"`": /\w/
|
|
1354
|
+
};
|
|
1355
|
+
this.getNextLineIndent = function (state, line, tab) {
|
|
1356
|
+
var indent = this.$getIndent(line);
|
|
1357
|
+
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
|
1358
|
+
var tokens = tokenizedLine.tokens;
|
|
1359
|
+
var endState = tokenizedLine.state;
|
|
1360
|
+
if (tokens.length && tokens[tokens.length - 1].type == "comment") {
|
|
1361
|
+
return indent;
|
|
1362
|
+
}
|
|
1363
|
+
if (state == "start" || state == "no_regex") {
|
|
1364
|
+
var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
|
|
1365
|
+
if (match) {
|
|
1366
|
+
indent += tab;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
else if (state == "doc-start") {
|
|
1370
|
+
if (endState == "start" || endState == "no_regex") {
|
|
1371
|
+
return "";
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
return indent;
|
|
1375
|
+
};
|
|
1376
|
+
this.checkOutdent = function (state, line, input) {
|
|
1377
|
+
return this.$outdent.checkOutdent(line, input);
|
|
1378
|
+
};
|
|
1379
|
+
this.autoOutdent = function (state, doc, row) {
|
|
1380
|
+
this.$outdent.autoOutdent(doc, row);
|
|
1381
|
+
};
|
|
1382
|
+
this.createWorker = function (session) {
|
|
1383
|
+
var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
|
|
1384
|
+
worker.attachToDocument(session.getDocument());
|
|
1385
|
+
worker.on("annotate", function (results) {
|
|
1386
|
+
session.setAnnotations(results.data);
|
|
1387
|
+
});
|
|
1388
|
+
worker.on("terminate", function () {
|
|
1389
|
+
session.clearAnnotations();
|
|
1390
|
+
});
|
|
1391
|
+
return worker;
|
|
1392
|
+
};
|
|
1393
|
+
this.$id = "ace/mode/javascript";
|
|
1394
|
+
this.snippetFileId = "ace/snippets/javascript";
|
|
1395
|
+
}).call(Mode.prototype);
|
|
1396
|
+
exports.Mode = Mode;
|
|
1397
|
+
|
|
1398
|
+
});
|
|
1399
|
+
|
|
1400
|
+
ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
|
|
1401
|
+
var oop = require("../lib/oop");
|
|
1402
|
+
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
|
1403
|
+
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
|
1404
|
+
var SvgHighlightRules = function () {
|
|
1405
|
+
XmlHighlightRules.call(this);
|
|
1406
|
+
this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
|
|
1407
|
+
this.normalizeRules();
|
|
1408
|
+
};
|
|
1409
|
+
oop.inherits(SvgHighlightRules, XmlHighlightRules);
|
|
1410
|
+
exports.SvgHighlightRules = SvgHighlightRules;
|
|
1411
|
+
|
|
1412
|
+
});
|
|
1413
|
+
|
|
1414
|
+
ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
|
|
1415
|
+
var oop = require("../../lib/oop");
|
|
1416
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
1417
|
+
var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
|
|
1418
|
+
this.defaultMode = defaultMode;
|
|
1419
|
+
this.subModes = subModes;
|
|
1420
|
+
};
|
|
1421
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
|
1422
|
+
(function () {
|
|
1423
|
+
this.$getMode = function (state) {
|
|
1424
|
+
if (typeof state != "string")
|
|
1425
|
+
state = state[0];
|
|
1426
|
+
for (var key in this.subModes) {
|
|
1427
|
+
if (state.indexOf(key) === 0)
|
|
1428
|
+
return this.subModes[key];
|
|
1429
|
+
}
|
|
1430
|
+
return null;
|
|
1431
|
+
};
|
|
1432
|
+
this.$tryMode = function (state, session, foldStyle, row) {
|
|
1433
|
+
var mode = this.$getMode(state);
|
|
1434
|
+
return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
|
|
1435
|
+
};
|
|
1436
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
1437
|
+
return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
|
|
1438
|
+
this.$tryMode(session.getState(row), session, foldStyle, row) ||
|
|
1439
|
+
this.defaultMode.getFoldWidget(session, foldStyle, row));
|
|
1440
|
+
};
|
|
1441
|
+
this.getFoldWidgetRange = function (session, foldStyle, row) {
|
|
1442
|
+
var mode = this.$getMode(session.getState(row - 1));
|
|
1443
|
+
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
|
|
1444
|
+
mode = this.$getMode(session.getState(row));
|
|
1445
|
+
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
|
|
1446
|
+
mode = this.defaultMode;
|
|
1447
|
+
return mode.getFoldWidgetRange(session, foldStyle, row);
|
|
1448
|
+
};
|
|
1449
|
+
}).call(FoldMode.prototype);
|
|
1450
|
+
|
|
1451
|
+
});
|
|
1452
|
+
|
|
1453
|
+
ace.define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
|
|
1454
|
+
var oop = require("../lib/oop");
|
|
1455
|
+
var XmlMode = require("./xml").Mode;
|
|
1456
|
+
var JavaScriptMode = require("./javascript").Mode;
|
|
1457
|
+
var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
|
|
1458
|
+
var MixedFoldMode = require("./folding/mixed").FoldMode;
|
|
1459
|
+
var XmlFoldMode = require("./folding/xml").FoldMode;
|
|
1460
|
+
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
|
1461
|
+
var Mode = function () {
|
|
1462
|
+
XmlMode.call(this);
|
|
1463
|
+
this.HighlightRules = SvgHighlightRules;
|
|
1464
|
+
this.createModeDelegates({
|
|
1465
|
+
"js-": JavaScriptMode
|
|
1466
|
+
});
|
|
1467
|
+
this.foldingRules = new MixedFoldMode(new XmlFoldMode(), {
|
|
1468
|
+
"js-": new CStyleFoldMode()
|
|
1469
|
+
});
|
|
1470
|
+
};
|
|
1471
|
+
oop.inherits(Mode, XmlMode);
|
|
1472
|
+
(function () {
|
|
1473
|
+
this.getNextLineIndent = function (state, line, tab) {
|
|
1474
|
+
return this.$getIndent(line);
|
|
1475
|
+
};
|
|
1476
|
+
this.$id = "ace/mode/svg";
|
|
1477
|
+
}).call(Mode.prototype);
|
|
1478
|
+
exports.Mode = Mode;
|
|
1479
|
+
|
|
1480
|
+
}); (function() {
|
|
1481
|
+
ace.require(["ace/mode/svg"], function(m) {
|
|
1482
|
+
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
1483
|
+
module.exports = m;
|
|
1484
|
+
}
|
|
1485
|
+
});
|
|
1486
|
+
})();
|
|
1487
|
+
|