rn-shiki 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- package/babel.config.js +20 -17
- package/lib/commonjs/components/syntax/SyntaxHighlighter.js +1 -78
- package/lib/commonjs/components/syntax/SyntaxHighlighter.js.map +1 -1
- package/lib/commonjs/components/syntax/SyntaxLine.js +1 -35
- package/lib/commonjs/components/syntax/SyntaxLine.js.map +1 -1
- package/lib/commonjs/components/syntax/index.js +1 -20
- package/lib/commonjs/components/syntax/index.js.map +1 -1
- package/lib/commonjs/hooks/useSyntaxHighlighter.js +1 -63
- package/lib/commonjs/hooks/useSyntaxHighlighter.js.map +1 -1
- package/lib/commonjs/index.js +1 -36
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/syntax/highlighter/index.js +1 -37
- package/lib/commonjs/syntax/highlighter/index.js.map +1 -1
- package/lib/commonjs/syntax/index.js +1 -18
- package/lib/commonjs/syntax/index.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/shiki.d.js +1 -5
- package/lib/commonjs/types/shiki.js +1 -5
- package/lib/commonjs/utils/index.js +1 -16
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/string.js +1 -27
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/vendor/shiki/core/core.d.js +1 -1
- package/lib/commonjs/vendor/shiki/core/core.js +9 -8758
- package/lib/commonjs/vendor/shiki/core/core.js.map +1 -1
- package/lib/commonjs/vendor/shiki/core/engine-javascript.d.js +1 -1
- package/lib/commonjs/vendor/shiki/core/engine-javascript.js +8 -1515
- package/lib/commonjs/vendor/shiki/core/engine-javascript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/index.d.js +1 -19
- package/lib/commonjs/vendor/shiki/index.d.js.map +1 -1
- package/lib/commonjs/vendor/shiki/index.js +1 -9
- package/lib/commonjs/vendor/shiki/index.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/abap.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/abap.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/abap.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/actionscript-3.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/actionscript-3.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/actionscript-3.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ada.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ada.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ada.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/adoc.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/adoc.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/adoc.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-expression.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-expression.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-expression.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-html.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-html.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-html.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-inline-style.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-inline-style.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-inline-style.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-inline-template.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-inline-template.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-inline-template.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-let-declaration.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-let-declaration.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-let-declaration.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-template-blocks.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-template-blocks.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-template-blocks.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-template.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-template.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-template.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/angular-ts.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/angular-ts.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/angular-ts.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/apache.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/apache.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/apache.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/apex.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/apex.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/apex.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/apl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/apl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/apl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/applescript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/applescript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/applescript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ara.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ara.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ara.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/asciidoc.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/asciidoc.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/asciidoc.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/asm.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/asm.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/asm.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/astro.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/astro.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/astro.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/awk.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/awk.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/awk.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ballerina.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ballerina.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ballerina.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/bash.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/bash.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/bash.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/bat.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/bat.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/bat.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/batch.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/batch.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/batch.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/be.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/be.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/be.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/beancount.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/beancount.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/beancount.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/berry.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/berry.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/berry.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/bibtex.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/bibtex.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/bibtex.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/bicep.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/bicep.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/bicep.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/blade.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/blade.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/blade.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/c.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/c.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/c.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cadence.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cadence.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cadence.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cdc.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cdc.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/cdc.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/clarity.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/clarity.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/clarity.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/clj.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/clj.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/clj.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/clojure.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/clojure.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/clojure.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/closure-templates.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/closure-templates.js +1 -50
- package/lib/commonjs/vendor/shiki/langs/closure-templates.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cmake.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cmake.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cmake.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cmd.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cmd.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/cmd.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cobol.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cobol.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cobol.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/codeowners.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/codeowners.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/codeowners.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/codeql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/codeql.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/codeql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/coffee.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/coffee.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/coffee.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/coffeescript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/coffeescript.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/coffeescript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/common-lisp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/common-lisp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/common-lisp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/console.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/console.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/console.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/coq.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/coq.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/coq.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cpp-macro.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cpp-macro.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cpp-macro.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cpp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cpp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cpp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cql.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/cql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/crystal.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/crystal.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/crystal.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cs.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cs.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/cs.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/csharp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/csharp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/csharp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/css.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/css.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/css.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/csv.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/csv.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/csv.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cue.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cue.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cue.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/cypher.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/cypher.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/cypher.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/d.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/d.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/d.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/dart.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/dart.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/dart.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/dax.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/dax.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/dax.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/desktop.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/desktop.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/desktop.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/diff.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/diff.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/diff.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/docker.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/docker.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/docker.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/dockerfile.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/dockerfile.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/dockerfile.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/dotenv.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/dotenv.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/dotenv.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/dream-maker.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/dream-maker.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/dream-maker.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/edge.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/edge.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/edge.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/elisp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/elisp.js +1 -3
- package/lib/commonjs/vendor/shiki/langs/elisp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/elixir.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/elixir.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/elixir.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/elm.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/elm.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/elm.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/emacs-lisp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/emacs-lisp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/emacs-lisp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/erb.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/erb.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/erb.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/erl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/erl.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/erl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/erlang.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/erlang.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/erlang.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/es-tag-css.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/es-tag-css.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/es-tag-css.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/es-tag-glsl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/es-tag-glsl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/es-tag-glsl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/es-tag-html.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/es-tag-html.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/es-tag-html.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/es-tag-sql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/es-tag-sql.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/es-tag-sql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/es-tag-xml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/es-tag-xml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/es-tag-xml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/f.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f03.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f03.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/f03.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f08.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f08.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/f08.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f18.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f18.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/f18.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f77.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f77.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/f77.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f90.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f90.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/f90.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/f95.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/f95.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/f95.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fennel.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fennel.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/fennel.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fish.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fish.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/fish.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fluent.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fluent.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/fluent.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/for.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/for.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/for.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fortran-fixed-form.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fortran-fixed-form.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/fortran-fixed-form.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fortran-free-form.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fortran-free-form.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/fortran-free-form.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fs.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fs.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/fs.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fsharp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fsharp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/fsharp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/fsl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/fsl.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/fsl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ftl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ftl.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/ftl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gdresource.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gdresource.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/gdresource.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gdscript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gdscript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/gdscript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gdshader.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gdshader.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/gdshader.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/genie.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/genie.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/genie.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gherkin.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gherkin.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/gherkin.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/git-commit.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/git-commit.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/git-commit.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/git-rebase.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/git-rebase.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/git-rebase.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gjs.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gjs.js +1 -7
- package/lib/commonjs/vendor/shiki/langs/gjs.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gleam.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gleam.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/gleam.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/glimmer-js.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/glimmer-js.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/glimmer-js.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/glimmer-ts.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/glimmer-ts.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/glimmer-ts.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/glsl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/glsl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/glsl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gnuplot.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gnuplot.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/gnuplot.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/go.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/go.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/go.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gql.js +1 -7
- package/lib/commonjs/vendor/shiki/langs/gql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/graphql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/graphql.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/graphql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/groovy.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/groovy.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/groovy.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/gts.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/gts.js +1 -7
- package/lib/commonjs/vendor/shiki/langs/gts.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hack.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hack.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/hack.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/haml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/haml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/haml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/handlebars.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/handlebars.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/handlebars.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/haskell.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/haskell.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/haskell.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/haxe.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/haxe.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/haxe.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hbs.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hbs.js +1 -54
- package/lib/commonjs/vendor/shiki/langs/hbs.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hcl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hcl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/hcl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hjson.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hjson.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/hjson.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hlsl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hlsl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/hlsl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hs.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hs.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/hs.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/html-derivative.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/html-derivative.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/html-derivative.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/html.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/html.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/html.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/http.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/http.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/http.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hxml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hxml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/hxml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/hy.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/hy.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/hy.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/imba.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/imba.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/imba.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ini.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ini.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ini.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jade.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jade.js +1 -50
- package/lib/commonjs/vendor/shiki/langs/jade.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/java.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/java.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/java.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/javascript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/javascript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/javascript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jinja-html.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jinja-html.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jinja-html.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jinja.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jinja.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jinja.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jison.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jison.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jison.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jl.js +1 -12
- package/lib/commonjs/vendor/shiki/langs/jl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/js.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/js.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/js.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/json.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/json.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/json.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/json5.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/json5.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/json5.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jsonc.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jsonc.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jsonc.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jsonl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jsonl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jsonl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jsonnet.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jsonnet.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jsonnet.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jssm.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jssm.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jssm.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/jsx.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/jsx.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/jsx.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/julia.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/julia.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/julia.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/kotlin.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/kotlin.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/kotlin.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/kql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/kql.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/kql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/kt.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/kt.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/kt.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/kts.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/kts.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/kts.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/kusto.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/kusto.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/kusto.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/latex.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/latex.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/latex.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/lean.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/lean.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/lean.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/lean4.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/lean4.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/lean4.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/less.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/less.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/less.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/liquid.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/liquid.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/liquid.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/lisp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/lisp.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/lisp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/lit.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/lit.js +1 -17
- package/lib/commonjs/vendor/shiki/langs/lit.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/log.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/log.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/log.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/logo.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/logo.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/logo.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/lua.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/lua.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/lua.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/luau.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/luau.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/luau.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/make.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/make.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/make.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/makefile.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/makefile.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/makefile.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/markdown-vue.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/markdown-vue.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/markdown-vue.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/markdown.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/markdown.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/markdown.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/marko.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/marko.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/marko.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/matlab.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/matlab.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/matlab.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/md.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/md.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/md.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mdc.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mdc.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/mdc.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mdx.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mdx.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/mdx.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mediawiki.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mediawiki.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/mediawiki.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mermaid.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mermaid.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/mermaid.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mips.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mips.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/mips.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mipsasm.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mipsasm.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/mipsasm.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mmd.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mmd.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/mmd.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/mojo.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/mojo.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/mojo.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/move.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/move.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/move.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nar.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nar.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/nar.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/narrat.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/narrat.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/narrat.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nextflow.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nextflow.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/nextflow.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nf.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nf.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/nf.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nginx.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nginx.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/nginx.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nim.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nim.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/nim.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nix.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nix.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/nix.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nu.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nu.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/nu.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/nushell.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/nushell.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/nushell.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/objc.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/objc.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/objc.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/objective-c.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/objective-c.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/objective-c.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/objective-cpp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/objective-cpp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/objective-cpp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ocaml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ocaml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ocaml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/pascal.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/pascal.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/pascal.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/perl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/perl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/perl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/perl6.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/perl6.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/perl6.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/php.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/php.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/php.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/plsql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/plsql.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/plsql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/po.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/po.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/po.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/postcss.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/postcss.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/postcss.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/pot.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/pot.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/pot.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/potx.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/potx.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/potx.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/powerquery.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/powerquery.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/powerquery.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/powershell.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/powershell.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/powershell.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/prisma.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/prisma.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/prisma.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/prolog.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/prolog.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/prolog.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/properties.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/properties.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/properties.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/proto.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/proto.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/proto.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/protobuf.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/protobuf.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/protobuf.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ps.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ps.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/ps.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ps1.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ps1.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/ps1.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/pug.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/pug.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/pug.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/puppet.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/puppet.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/puppet.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/purescript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/purescript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/purescript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/py.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/py.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/py.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/python.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/python.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/python.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ql.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/ql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/qml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/qml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/qml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/qmldir.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/qmldir.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/qmldir.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/qss.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/qss.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/qss.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/r.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/r.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/r.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/racket.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/racket.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/racket.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/raku.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/raku.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/raku.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/razor.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/razor.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/razor.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/rb.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/rb.js +1 -12
- package/lib/commonjs/vendor/shiki/langs/rb.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/reg.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/reg.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/reg.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/regex.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/regex.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/regex.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/regexp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/regexp.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/regexp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/rel.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/rel.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/rel.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/riscv.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/riscv.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/riscv.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/rs.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/rs.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/rs.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/rst.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/rst.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/rst.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ruby.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ruby.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ruby.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/rust.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/rust.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/rust.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/sas.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/sas.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/sas.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/sass.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/sass.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/sass.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/scala.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/scala.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/scala.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/scheme.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/scheme.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/scheme.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/scss.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/scss.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/scss.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/sh.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/sh.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/sh.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/shader.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/shader.js +1 -42
- package/lib/commonjs/vendor/shiki/langs/shader.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/shaderlab.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/shaderlab.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/shaderlab.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/shell.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/shell.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/shell.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/shellscript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/shellscript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/shellscript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/shellsession.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/shellsession.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/shellsession.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/smalltalk.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/smalltalk.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/smalltalk.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/solidity.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/solidity.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/solidity.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/soy.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/soy.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/soy.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/sparql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/sparql.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/sparql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/spl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/spl.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/spl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/splunk.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/splunk.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/splunk.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/sql.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/sql.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/sql.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ssh-config.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ssh-config.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ssh-config.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/stata.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/stata.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/stata.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/styl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/styl.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/styl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/stylus.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/stylus.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/stylus.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/svelte.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/svelte.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/svelte.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/swift.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/swift.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/swift.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/system-verilog.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/system-verilog.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/system-verilog.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/systemd.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/systemd.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/systemd.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tasl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tasl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/tasl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tcl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tcl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/tcl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/templ.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/templ.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/templ.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/terraform.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/terraform.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/terraform.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tex.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tex.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/tex.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tf.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tf.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/tf.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tfvars.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tfvars.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/tfvars.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/toml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/toml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/toml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ts-tags.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ts-tags.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/ts-tags.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/ts.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/ts.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/ts.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tsp.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tsp.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/tsp.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tsv.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tsv.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/tsv.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/tsx.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/tsx.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/tsx.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/turtle.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/turtle.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/turtle.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/twig.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/twig.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/twig.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/typ.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/typ.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/typ.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/typescript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/typescript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/typescript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/typespec.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/typespec.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/typespec.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/typst.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/typst.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/typst.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/v.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/v.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/v.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vala.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vala.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vala.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vb.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vb.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vb.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/verilog.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/verilog.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/verilog.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vhdl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vhdl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vhdl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vim.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vim.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/vim.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/viml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/viml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/viml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vimscript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vimscript.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/vimscript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vue-directives.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vue-directives.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vue-directives.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vue-html.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vue-html.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vue-html.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vue-interpolations.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vue-interpolations.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vue-interpolations.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vue-sfc-style-variable-injection.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vue-sfc-style-variable-injection.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vue-sfc-style-variable-injection.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vue.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vue.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vue.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vy.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vy.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/vy.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/vyper.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/vyper.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/vyper.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wasm.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wasm.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/wasm.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wenyan.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wenyan.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/wenyan.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wgsl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wgsl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/wgsl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wiki.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wiki.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/wiki.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wikitext.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wikitext.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/wikitext.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wl.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/wl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/wolfram.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/wolfram.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/wolfram.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/xml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/xml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/xml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/xsl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/xsl.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/xsl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/yaml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/yaml.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/yaml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/yml.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/yml.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/yml.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/zenscript.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/zenscript.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/zenscript.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/zig.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/zig.js +1 -6
- package/lib/commonjs/vendor/shiki/langs/zig.js.map +1 -1
- package/lib/commonjs/vendor/shiki/langs/zsh.d.js +1 -5
- package/lib/commonjs/vendor/shiki/langs/zsh.js +1 -38
- package/lib/commonjs/vendor/shiki/langs/zsh.js.map +1 -1
- package/lib/commonjs/vendor/shiki/manifest.json +365 -365
- package/lib/commonjs/vendor/shiki/themes/andromeeda.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/andromeeda.js +1 -222
- package/lib/commonjs/vendor/shiki/themes/andromeeda.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/aurora-x.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/aurora-x.js +1 -429
- package/lib/commonjs/vendor/shiki/themes/aurora-x.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/ayu-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/ayu-dark.js +1 -573
- package/lib/commonjs/vendor/shiki/themes/ayu-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/catppuccin-frappe.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/catppuccin-frappe.js +1 -1552
- package/lib/commonjs/vendor/shiki/themes/catppuccin-frappe.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/catppuccin-latte.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/catppuccin-latte.js +1 -1552
- package/lib/commonjs/vendor/shiki/themes/catppuccin-latte.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/catppuccin-macchiato.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/catppuccin-macchiato.js +1 -1552
- package/lib/commonjs/vendor/shiki/themes/catppuccin-macchiato.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/catppuccin-mocha.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/catppuccin-mocha.js +1 -1552
- package/lib/commonjs/vendor/shiki/themes/catppuccin-mocha.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/dark-plus.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/dark-plus.js +1 -372
- package/lib/commonjs/vendor/shiki/themes/dark-plus.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/dracula-soft.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/dracula-soft.js +1 -658
- package/lib/commonjs/vendor/shiki/themes/dracula-soft.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/dracula.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/dracula.js +1 -658
- package/lib/commonjs/vendor/shiki/themes/dracula.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/everforest-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/everforest-dark.js +1 -1885
- package/lib/commonjs/vendor/shiki/themes/everforest-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/everforest-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/everforest-light.js +1 -1885
- package/lib/commonjs/vendor/shiki/themes/everforest-light.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-dark-default.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-dark-default.js +1 -517
- package/lib/commonjs/vendor/shiki/themes/github-dark-default.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-dark-dimmed.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-dark-dimmed.js +1 -517
- package/lib/commonjs/vendor/shiki/themes/github-dark-dimmed.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-dark-high-contrast.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-dark-high-contrast.js +1 -521
- package/lib/commonjs/vendor/shiki/themes/github-dark-high-contrast.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-dark.js +1 -440
- package/lib/commonjs/vendor/shiki/themes/github-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-light-default.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-light-default.js +1 -513
- package/lib/commonjs/vendor/shiki/themes/github-light-default.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-light-high-contrast.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-light-high-contrast.js +1 -516
- package/lib/commonjs/vendor/shiki/themes/github-light-high-contrast.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/github-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/github-light.js +1 -436
- package/lib/commonjs/vendor/shiki/themes/github-light.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/houston.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/houston.js +1 -1502
- package/lib/commonjs/vendor/shiki/themes/houston.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/kanagawa-dragon.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/kanagawa-dragon.js +1 -577
- package/lib/commonjs/vendor/shiki/themes/kanagawa-dragon.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/kanagawa-lotus.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/kanagawa-lotus.js +1 -577
- package/lib/commonjs/vendor/shiki/themes/kanagawa-lotus.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/kanagawa-wave.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/kanagawa-wave.js +1 -577
- package/lib/commonjs/vendor/shiki/themes/kanagawa-wave.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/laserwave.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/laserwave.js +1 -190
- package/lib/commonjs/vendor/shiki/themes/laserwave.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/light-plus.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/light-plus.js +1 -372
- package/lib/commonjs/vendor/shiki/themes/light-plus.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/material-theme-darker.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/material-theme-darker.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/material-theme-darker.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/material-theme-lighter.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/material-theme-lighter.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/material-theme-lighter.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/material-theme-ocean.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/material-theme-ocean.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/material-theme-ocean.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/material-theme-palenight.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/material-theme-palenight.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/material-theme-palenight.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/material-theme.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/material-theme.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/material-theme.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/min-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/min-dark.js +1 -214
- package/lib/commonjs/vendor/shiki/themes/min-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/min-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/min-light.js +1 -230
- package/lib/commonjs/vendor/shiki/themes/min-light.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/monokai.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/monokai.js +1 -382
- package/lib/commonjs/vendor/shiki/themes/monokai.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/night-owl.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/night-owl.js +1 -1224
- package/lib/commonjs/vendor/shiki/themes/night-owl.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/nord.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/nord.js +1 -1027
- package/lib/commonjs/vendor/shiki/themes/nord.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/one-dark-pro.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/one-dark-pro.js +1 -1564
- package/lib/commonjs/vendor/shiki/themes/one-dark-pro.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/one-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/one-light.js +1 -1151
- package/lib/commonjs/vendor/shiki/themes/one-light.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/plastic.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/plastic.js +1 -267
- package/lib/commonjs/vendor/shiki/themes/plastic.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/poimandres.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/poimandres.js +1 -977
- package/lib/commonjs/vendor/shiki/themes/poimandres.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/red.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/red.js +1 -296
- package/lib/commonjs/vendor/shiki/themes/red.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/rose-pine-dawn.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/rose-pine-dawn.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/rose-pine-dawn.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/rose-pine-moon.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/rose-pine-moon.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/rose-pine-moon.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/rose-pine.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/rose-pine.js +1 -648
- package/lib/commonjs/vendor/shiki/themes/rose-pine.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/slack-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/slack-dark.js +1 -394
- package/lib/commonjs/vendor/shiki/themes/slack-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/slack-ochin.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/slack-ochin.js +1 -394
- package/lib/commonjs/vendor/shiki/themes/slack-ochin.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/snazzy-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/snazzy-light.js +1 -945
- package/lib/commonjs/vendor/shiki/themes/snazzy-light.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/solarized-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/solarized-dark.js +1 -313
- package/lib/commonjs/vendor/shiki/themes/solarized-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/solarized-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/solarized-light.js +1 -305
- package/lib/commonjs/vendor/shiki/themes/solarized-light.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/synthwave-84.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/synthwave-84.js +1 -35
- package/lib/commonjs/vendor/shiki/themes/synthwave-84.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/tokyo-night.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/tokyo-night.js +1 -951
- package/lib/commonjs/vendor/shiki/themes/tokyo-night.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/vesper.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/vesper.js +1 -380
- package/lib/commonjs/vendor/shiki/themes/vesper.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/vitesse-black.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/vitesse-black.js +1 -504
- package/lib/commonjs/vendor/shiki/themes/vitesse-black.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/vitesse-dark.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/vitesse-dark.js +1 -504
- package/lib/commonjs/vendor/shiki/themes/vitesse-dark.js.map +1 -1
- package/lib/commonjs/vendor/shiki/themes/vitesse-light.d.js +1 -5
- package/lib/commonjs/vendor/shiki/themes/vitesse-light.js +1 -502
- package/lib/commonjs/vendor/shiki/themes/vitesse-light.js.map +1 -1
- package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts.map +1 -1
- package/lib/typescript/syntax/highlighter/index.d.ts +1 -1
- package/lib/typescript/syntax/highlighter/index.d.ts.map +1 -1
- package/package.json +12 -2
- package/src/vendor/shiki/index.d.ts +10 -1
- package/src/vendor/shiki/index.js +14 -3
- package/src/vendor/shiki/manifest.json +365 -365
- package/.babelrc +0 -13
- package/eslint.config.mjs +0 -6
- package/scripts/build.js +0 -259
- package/tsconfig.json +0 -26
@@ -1,211 +1,4 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
var __defProp = Object.defineProperty;
|
7
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
10
|
-
var __export = (target, all) => {
|
11
|
-
for (var name in all) __defProp(target, name, {
|
12
|
-
get: all[name],
|
13
|
-
enumerable: true
|
14
|
-
});
|
15
|
-
};
|
16
|
-
var __copyProps = (to, from, except, desc) => {
|
17
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
18
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
19
|
-
get: () => from[key],
|
20
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
21
|
-
});
|
22
|
-
}
|
23
|
-
return to;
|
24
|
-
};
|
25
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
26
|
-
value: true
|
27
|
-
}), mod);
|
28
|
-
|
29
|
-
// node_modules/shiki/dist/engine-javascript.mjs
|
30
|
-
var engine_javascript_exports = {};
|
31
|
-
__export(engine_javascript_exports, {
|
32
|
-
JavaScriptScanner: () => JavaScriptScanner,
|
33
|
-
createJavaScriptRegexEngine: () => createJavaScriptRegexEngine,
|
34
|
-
defaultJavaScriptRegexConstructor: () => defaultJavaScriptRegexConstructor
|
35
|
-
});
|
36
|
-
module.exports = __toCommonJS(engine_javascript_exports);
|
37
|
-
|
38
|
-
// node_modules/regex/dist/regex.mjs
|
39
|
-
var Context = Object.freeze({
|
40
|
-
DEFAULT: "DEFAULT",
|
41
|
-
CHAR_CLASS: "CHAR_CLASS"
|
42
|
-
});
|
43
|
-
function replaceUnescaped(expression, needle, replacement, context) {
|
44
|
-
const re = new RegExp(String.raw`${needle}|(?<$skip>\[\^?|\\?.)`, "gsu");
|
45
|
-
const negated = [false];
|
46
|
-
let numCharClassesOpen = 0;
|
47
|
-
let result = "";
|
48
|
-
for (const match of expression.matchAll(re)) {
|
49
|
-
const {
|
50
|
-
0: m,
|
51
|
-
groups: {
|
52
|
-
$skip
|
53
|
-
}
|
54
|
-
} = match;
|
55
|
-
if (!$skip && (!context || context === Context.DEFAULT === !numCharClassesOpen)) {
|
56
|
-
if (replacement instanceof Function) {
|
57
|
-
result += replacement(match, {
|
58
|
-
context: numCharClassesOpen ? Context.CHAR_CLASS : Context.DEFAULT,
|
59
|
-
negated: negated[negated.length - 1]
|
60
|
-
});
|
61
|
-
} else {
|
62
|
-
result += replacement;
|
63
|
-
}
|
64
|
-
continue;
|
65
|
-
}
|
66
|
-
if (m[0] === "[") {
|
67
|
-
numCharClassesOpen++;
|
68
|
-
negated.push(m[1] === "^");
|
69
|
-
} else if (m === "]" && numCharClassesOpen) {
|
70
|
-
numCharClassesOpen--;
|
71
|
-
negated.pop();
|
72
|
-
}
|
73
|
-
result += m;
|
74
|
-
}
|
75
|
-
return result;
|
76
|
-
}
|
77
|
-
function forEachUnescaped(expression, needle, callback, context) {
|
78
|
-
replaceUnescaped(expression, needle, callback, context);
|
79
|
-
}
|
80
|
-
function execUnescaped(expression, needle, pos = 0, context) {
|
81
|
-
if (!new RegExp(needle, "su").test(expression)) {
|
82
|
-
return null;
|
83
|
-
}
|
84
|
-
const re = new RegExp(`${needle}|(?<$skip>\\\\?.)`, "gsu");
|
85
|
-
re.lastIndex = pos;
|
86
|
-
let numCharClassesOpen = 0;
|
87
|
-
let match;
|
88
|
-
while (match = re.exec(expression)) {
|
89
|
-
const {
|
90
|
-
0: m,
|
91
|
-
groups: {
|
92
|
-
$skip
|
93
|
-
}
|
94
|
-
} = match;
|
95
|
-
if (!$skip && (!context || context === Context.DEFAULT === !numCharClassesOpen)) {
|
96
|
-
return match;
|
97
|
-
}
|
98
|
-
if (m === "[") {
|
99
|
-
numCharClassesOpen++;
|
100
|
-
} else if (m === "]" && numCharClassesOpen) {
|
101
|
-
numCharClassesOpen--;
|
102
|
-
}
|
103
|
-
if (re.lastIndex == match.index) {
|
104
|
-
re.lastIndex++;
|
105
|
-
}
|
106
|
-
}
|
107
|
-
return null;
|
108
|
-
}
|
109
|
-
function hasUnescaped(expression, needle, context) {
|
110
|
-
return !!execUnescaped(expression, needle, 0, context);
|
111
|
-
}
|
112
|
-
function getGroupContents(expression, contentsStartPos) {
|
113
|
-
const token5 = /\\?./gsu;
|
114
|
-
token5.lastIndex = contentsStartPos;
|
115
|
-
let contentsEndPos = expression.length;
|
116
|
-
let numCharClassesOpen = 0;
|
117
|
-
let numGroupsOpen = 1;
|
118
|
-
let match;
|
119
|
-
while (match = token5.exec(expression)) {
|
120
|
-
const [m] = match;
|
121
|
-
if (m === "[") {
|
122
|
-
numCharClassesOpen++;
|
123
|
-
} else if (!numCharClassesOpen) {
|
124
|
-
if (m === "(") {
|
125
|
-
numGroupsOpen++;
|
126
|
-
} else if (m === ")") {
|
127
|
-
numGroupsOpen--;
|
128
|
-
if (!numGroupsOpen) {
|
129
|
-
contentsEndPos = match.index;
|
130
|
-
break;
|
131
|
-
}
|
132
|
-
}
|
133
|
-
} else if (m === "]") {
|
134
|
-
numCharClassesOpen--;
|
135
|
-
}
|
136
|
-
}
|
137
|
-
return expression.slice(contentsStartPos, contentsEndPos);
|
138
|
-
}
|
139
|
-
var Pattern = class {
|
140
|
-
#value;
|
141
|
-
/** @param {string} value */
|
142
|
-
constructor(value) {
|
143
|
-
this.#value = value;
|
144
|
-
}
|
145
|
-
/** @returns {string} */
|
146
|
-
toString() {
|
147
|
-
return String(this.#value);
|
148
|
-
}
|
149
|
-
};
|
150
|
-
function pattern(first, ...substitutions) {
|
151
|
-
if (Array.isArray(first?.raw)) {
|
152
|
-
return new Pattern(
|
153
|
-
// Intersperse raw template strings and substitutions
|
154
|
-
first.raw.flatMap((raw, i) => i < first.raw.length - 1 ? [raw, substitutions[i]] : raw).join(""));
|
155
|
-
} else if (!substitutions.length) {
|
156
|
-
return new Pattern(first === void 0 ? "" : first);
|
157
|
-
}
|
158
|
-
throw new Error(`Unexpected arguments: ${JSON.stringify([first, ...substitutions])}`);
|
159
|
-
}
|
160
|
-
var RegexContext = {
|
161
|
-
DEFAULT: "DEFAULT",
|
162
|
-
CHAR_CLASS: "CHAR_CLASS",
|
163
|
-
ENCLOSED_P: "ENCLOSED_P",
|
164
|
-
ENCLOSED_U: "ENCLOSED_U",
|
165
|
-
GROUP_NAME: "GROUP_NAME",
|
166
|
-
INTERVAL_QUANTIFIER: "INTERVAL_QUANTIFIER",
|
167
|
-
INVALID_INCOMPLETE_TOKEN: "INVALID_INCOMPLETE_TOKEN"
|
168
|
-
};
|
169
|
-
var CharClassContext = {
|
170
|
-
DEFAULT: "DEFAULT",
|
171
|
-
ENCLOSED_P: "ENCLOSED_P",
|
172
|
-
ENCLOSED_Q: "ENCLOSED_Q",
|
173
|
-
ENCLOSED_U: "ENCLOSED_U",
|
174
|
-
INVALID_INCOMPLETE_TOKEN: "INVALID_INCOMPLETE_TOKEN",
|
175
|
-
RANGE: "RANGE"
|
176
|
-
};
|
177
|
-
var enclosedTokenRegexContexts = /* @__PURE__ */new Set([RegexContext.ENCLOSED_P, RegexContext.ENCLOSED_U]);
|
178
|
-
var enclosedTokenCharClassContexts = /* @__PURE__ */new Set([CharClassContext.ENCLOSED_P, CharClassContext.ENCLOSED_Q, CharClassContext.ENCLOSED_U]);
|
179
|
-
var patternModsSupported = (() => {
|
180
|
-
try {
|
181
|
-
new RegExp("(?i:)");
|
182
|
-
} catch (e) {
|
183
|
-
return false;
|
184
|
-
}
|
185
|
-
return true;
|
186
|
-
})();
|
187
|
-
var flagVSupported = (() => {
|
188
|
-
try {
|
189
|
-
new RegExp("", "v");
|
190
|
-
} catch (e) {
|
191
|
-
return false;
|
192
|
-
}
|
193
|
-
return true;
|
194
|
-
})();
|
195
|
-
var doublePunctuatorChars = "&!#$%*+,.:;<=>?@^`~";
|
196
|
-
var emulationGroupMarker = "$E$";
|
197
|
-
var namedCapturingDelim = String.raw`\(\?<(?![=!])(?<captureName>[^>]+)>`;
|
198
|
-
var capturingDelim = String.raw`\((?!\?)(?!(?<=\(\?\()DEFINE\))|${namedCapturingDelim}`;
|
199
|
-
var noncapturingDelim = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
200
|
-
function sandboxLoneDoublePunctuatorChar(str) {
|
201
|
-
return str.replace(new RegExp(`^([${doublePunctuatorChars}])(?!\\1)`), (m, _, pos) => {
|
202
|
-
return `\\${m}${pos + 1 === str.length ? "" : m}`;
|
203
|
-
});
|
204
|
-
}
|
205
|
-
function sandboxUnsafeNulls(str, context) {
|
206
|
-
return replaceUnescaped(str, String.raw`\\0(?!\d)`, "\\x00", context);
|
207
|
-
}
|
208
|
-
var contextToken = new RegExp(String.raw`
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _wrapNativeSuper2=_interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _classPrivateFieldLooseBase2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldLooseBase"));var _classPrivateFieldLooseKey2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldLooseKey"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _value;function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}Object.defineProperty(exports,"__esModule",{value:true});var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=function __export(target,all){for(var name in all)__defProp(target,name,{get:all[name],enumerable:true});};var __copyProps=function __copyProps(to,from,except,desc){if(from&&typeof from==="object"||typeof from==="function"){var _loop=function _loop(key){if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:function get(){return from[key];},enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});};for(var key of __getOwnPropNames(from)){_loop(key);}}return to;};var __toCommonJS=function __toCommonJS(mod){return __copyProps(__defProp({},"__esModule",{value:true}),mod);};var engine_javascript_exports={};__export(engine_javascript_exports,{JavaScriptScanner:function JavaScriptScanner(){return _JavaScriptScanner;},createJavaScriptRegexEngine:function createJavaScriptRegexEngine(){return _createJavaScriptRegexEngine;},defaultJavaScriptRegexConstructor:function defaultJavaScriptRegexConstructor(){return _defaultJavaScriptRegexConstructor;}});module.exports=__toCommonJS(engine_javascript_exports);var Context=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function replaceUnescaped(expression,needle,replacement,context){var re=new RegExp(String.raw`${needle}|(?<$skip>\[\^?|\\?.)`,"gsu");var negated=[false];var numCharClassesOpen=0;var result="";for(var match of expression.matchAll(re)){var m=match[0],$skip=match.groups.$skip;if(!$skip&&(!context||context===Context.DEFAULT===!numCharClassesOpen)){if(replacement instanceof Function){result+=replacement(match,{context:numCharClassesOpen?Context.CHAR_CLASS:Context.DEFAULT,negated:negated[negated.length-1]});}else{result+=replacement;}continue;}if(m[0]==="["){numCharClassesOpen++;negated.push(m[1]==="^");}else if(m==="]"&&numCharClassesOpen){numCharClassesOpen--;negated.pop();}result+=m;}return result;}function forEachUnescaped(expression,needle,callback,context){replaceUnescaped(expression,needle,callback,context);}function execUnescaped(expression,needle){var pos=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var context=arguments.length>3?arguments[3]:undefined;if(!new RegExp(needle,"su").test(expression)){return null;}var re=new RegExp(`${needle}|(?<$skip>\\\\?.)`,"gsu");re.lastIndex=pos;var numCharClassesOpen=0;var match;while(match=re.exec(expression)){var _match=match,m=_match[0],$skip=_match.groups.$skip;if(!$skip&&(!context||context===Context.DEFAULT===!numCharClassesOpen)){return match;}if(m==="["){numCharClassesOpen++;}else if(m==="]"&&numCharClassesOpen){numCharClassesOpen--;}if(re.lastIndex==match.index){re.lastIndex++;}}return null;}function hasUnescaped(expression,needle,context){return!!execUnescaped(expression,needle,0,context);}function getGroupContents(expression,contentsStartPos){var token5=/\\?(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/gs;token5.lastIndex=contentsStartPos;var contentsEndPos=expression.length;var numCharClassesOpen=0;var numGroupsOpen=1;var match;while(match=token5.exec(expression)){var _match2=match,_match3=(0,_slicedToArray2.default)(_match2,1),m=_match3[0];if(m==="["){numCharClassesOpen++;}else if(!numCharClassesOpen){if(m==="("){numGroupsOpen++;}else if(m===")"){numGroupsOpen--;if(!numGroupsOpen){contentsEndPos=match.index;break;}}}else if(m==="]"){numCharClassesOpen--;}}return expression.slice(contentsStartPos,contentsEndPos);}var Pattern=(_value=(0,_classPrivateFieldLooseKey2.default)("value"),function(){function Pattern(value){(0,_classCallCheck2.default)(this,Pattern);Object.defineProperty(this,_value,{writable:true,value:void 0});(0,_classPrivateFieldLooseBase2.default)(this,_value)[_value]=value;}return(0,_createClass2.default)(Pattern,[{key:"toString",value:function toString(){return String((0,_classPrivateFieldLooseBase2.default)(this,_value)[_value]);}}]);}());function pattern(first){for(var _len=arguments.length,substitutions=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){substitutions[_key-1]=arguments[_key];}if(Array.isArray(first==null?void 0:first.raw)){return new Pattern(first.raw.flatMap(function(raw,i){return i<first.raw.length-1?[raw,substitutions[i]]:raw;}).join(""));}else if(!substitutions.length){return new Pattern(first===void 0?"":first);}throw new Error(`Unexpected arguments: ${JSON.stringify([first].concat(substitutions))}`);}var RegexContext={DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS",ENCLOSED_P:"ENCLOSED_P",ENCLOSED_U:"ENCLOSED_U",GROUP_NAME:"GROUP_NAME",INTERVAL_QUANTIFIER:"INTERVAL_QUANTIFIER",INVALID_INCOMPLETE_TOKEN:"INVALID_INCOMPLETE_TOKEN"};var CharClassContext={DEFAULT:"DEFAULT",ENCLOSED_P:"ENCLOSED_P",ENCLOSED_Q:"ENCLOSED_Q",ENCLOSED_U:"ENCLOSED_U",INVALID_INCOMPLETE_TOKEN:"INVALID_INCOMPLETE_TOKEN",RANGE:"RANGE"};var enclosedTokenRegexContexts=new Set([RegexContext.ENCLOSED_P,RegexContext.ENCLOSED_U]);var enclosedTokenCharClassContexts=new Set([CharClassContext.ENCLOSED_P,CharClassContext.ENCLOSED_Q,CharClassContext.ENCLOSED_U]);var patternModsSupported=function(){try{new RegExp("(?i:)");}catch(e){return false;}return true;}();var flagVSupported=function(){try{new RegExp("","v");}catch(e){return false;}return true;}();var doublePunctuatorChars="&!#$%*+,.:;<=>?@^`~";var emulationGroupMarker="$E$";var namedCapturingDelim=String.raw`\(\?<(?![=!])(?<captureName>[^>]+)>`;var capturingDelim=String.raw`\((?!\?)(?!(?<=\(\?\()DEFINE\))|${namedCapturingDelim}`;var noncapturingDelim=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function sandboxLoneDoublePunctuatorChar(str){return str.replace(new RegExp(`^([${doublePunctuatorChars}])(?!\\1)`),function(m,_,pos){return`\\${m}${pos+1===str.length?"":m}`;});}function sandboxUnsafeNulls(str,context){return replaceUnescaped(str,String.raw`\\0(?!\d)`,"\\x00",context);}var contextToken=new RegExp(String.raw`
|
209
2
|
(?<groupN>\(\?<(?![=!])|\\[gk]<)
|
210
3
|
| (?<enclosedPU>\\[pPu]\{)
|
211
4
|
| (?<enclosedQ>\\q\{)
|
@@ -218,85 +11,7 @@ var contextToken = new RegExp(String.raw`
|
|
218
11
|
)
|
219
12
|
| --
|
220
13
|
| \\?.
|
221
|
-
`.replace(/\s+/g, ""), "
|
222
|
-
function getEndContextForIncompleteExpression(incompleteExpression, {
|
223
|
-
regexContext = RegexContext.DEFAULT,
|
224
|
-
charClassContext = CharClassContext.DEFAULT,
|
225
|
-
charClassDepth = 0,
|
226
|
-
lastPos = 0
|
227
|
-
} = {}) {
|
228
|
-
contextToken.lastIndex = lastPos;
|
229
|
-
let match;
|
230
|
-
while (match = contextToken.exec(incompleteExpression)) {
|
231
|
-
const {
|
232
|
-
0: m,
|
233
|
-
groups: {
|
234
|
-
groupN,
|
235
|
-
enclosedPU,
|
236
|
-
enclosedQ,
|
237
|
-
intervalQ,
|
238
|
-
incompleteT
|
239
|
-
}
|
240
|
-
} = match;
|
241
|
-
if (m === "[") {
|
242
|
-
charClassDepth++;
|
243
|
-
regexContext = RegexContext.CHAR_CLASS;
|
244
|
-
charClassContext = CharClassContext.DEFAULT;
|
245
|
-
} else if (m === "]" && regexContext === RegexContext.CHAR_CLASS) {
|
246
|
-
if (charClassDepth) {
|
247
|
-
charClassDepth--;
|
248
|
-
}
|
249
|
-
if (!charClassDepth) {
|
250
|
-
regexContext = RegexContext.DEFAULT;
|
251
|
-
}
|
252
|
-
charClassContext = CharClassContext.DEFAULT;
|
253
|
-
} else if (regexContext === RegexContext.CHAR_CLASS) {
|
254
|
-
if (incompleteT) {
|
255
|
-
charClassContext = CharClassContext.INVALID_INCOMPLETE_TOKEN;
|
256
|
-
} else if (m === "-") {
|
257
|
-
charClassContext = CharClassContext.RANGE;
|
258
|
-
} else if (enclosedPU) {
|
259
|
-
charClassContext = m[1] === "u" ? CharClassContext.ENCLOSED_U : CharClassContext.ENCLOSED_P;
|
260
|
-
} else if (enclosedQ) {
|
261
|
-
charClassContext = CharClassContext.ENCLOSED_Q;
|
262
|
-
} else if (m === "}" && enclosedTokenCharClassContexts.has(charClassContext) ||
|
263
|
-
// Don't continue in these contexts since we've advanced another token
|
264
|
-
charClassContext === CharClassContext.INVALID_INCOMPLETE_TOKEN || charClassContext === CharClassContext.RANGE) {
|
265
|
-
charClassContext = CharClassContext.DEFAULT;
|
266
|
-
}
|
267
|
-
} else {
|
268
|
-
if (incompleteT) {
|
269
|
-
regexContext = RegexContext.INVALID_INCOMPLETE_TOKEN;
|
270
|
-
} else if (groupN) {
|
271
|
-
regexContext = RegexContext.GROUP_NAME;
|
272
|
-
} else if (enclosedPU) {
|
273
|
-
regexContext = m[1] === "u" ? RegexContext.ENCLOSED_U : RegexContext.ENCLOSED_P;
|
274
|
-
} else if (intervalQ) {
|
275
|
-
regexContext = RegexContext.INTERVAL_QUANTIFIER;
|
276
|
-
} else if (m === ">" && regexContext === RegexContext.GROUP_NAME || m === "}" && (regexContext === RegexContext.INTERVAL_QUANTIFIER || enclosedTokenRegexContexts.has(regexContext)) ||
|
277
|
-
// Don't continue in this context since we've advanced another token
|
278
|
-
regexContext === RegexContext.INVALID_INCOMPLETE_TOKEN) {
|
279
|
-
regexContext = RegexContext.DEFAULT;
|
280
|
-
}
|
281
|
-
}
|
282
|
-
}
|
283
|
-
return {
|
284
|
-
regexContext,
|
285
|
-
charClassContext,
|
286
|
-
charClassDepth,
|
287
|
-
lastPos: incompleteExpression.length
|
288
|
-
};
|
289
|
-
}
|
290
|
-
function countCaptures(expression) {
|
291
|
-
let num = 0;
|
292
|
-
forEachUnescaped(expression, capturingDelim, () => num++, Context.DEFAULT);
|
293
|
-
return num;
|
294
|
-
}
|
295
|
-
function spliceStr(str, pos, oldValue, newValue) {
|
296
|
-
return str.slice(0, pos) + newValue + str.slice(pos + oldValue.length);
|
297
|
-
}
|
298
|
-
var stringPropertyNames = ["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"].join("|");
|
299
|
-
var charClassUnionToken = new RegExp(String.raw`
|
14
|
+
`.replace(/\s+/g,""),"gsu");function getEndContextForIncompleteExpression(incompleteExpression){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref$regexContext=_ref.regexContext,regexContext=_ref$regexContext===void 0?RegexContext.DEFAULT:_ref$regexContext,_ref$charClassContext=_ref.charClassContext,charClassContext=_ref$charClassContext===void 0?CharClassContext.DEFAULT:_ref$charClassContext,_ref$charClassDepth=_ref.charClassDepth,charClassDepth=_ref$charClassDepth===void 0?0:_ref$charClassDepth,_ref$lastPos=_ref.lastPos,lastPos=_ref$lastPos===void 0?0:_ref$lastPos;contextToken.lastIndex=lastPos;var match;while(match=contextToken.exec(incompleteExpression)){var _match4=match,m=_match4[0],_match4$groups=_match4.groups,groupN=_match4$groups.groupN,enclosedPU=_match4$groups.enclosedPU,enclosedQ=_match4$groups.enclosedQ,intervalQ=_match4$groups.intervalQ,incompleteT=_match4$groups.incompleteT;if(m==="["){charClassDepth++;regexContext=RegexContext.CHAR_CLASS;charClassContext=CharClassContext.DEFAULT;}else if(m==="]"&®exContext===RegexContext.CHAR_CLASS){if(charClassDepth){charClassDepth--;}if(!charClassDepth){regexContext=RegexContext.DEFAULT;}charClassContext=CharClassContext.DEFAULT;}else if(regexContext===RegexContext.CHAR_CLASS){if(incompleteT){charClassContext=CharClassContext.INVALID_INCOMPLETE_TOKEN;}else if(m==="-"){charClassContext=CharClassContext.RANGE;}else if(enclosedPU){charClassContext=m[1]==="u"?CharClassContext.ENCLOSED_U:CharClassContext.ENCLOSED_P;}else if(enclosedQ){charClassContext=CharClassContext.ENCLOSED_Q;}else if(m==="}"&&enclosedTokenCharClassContexts.has(charClassContext)||charClassContext===CharClassContext.INVALID_INCOMPLETE_TOKEN||charClassContext===CharClassContext.RANGE){charClassContext=CharClassContext.DEFAULT;}}else{if(incompleteT){regexContext=RegexContext.INVALID_INCOMPLETE_TOKEN;}else if(groupN){regexContext=RegexContext.GROUP_NAME;}else if(enclosedPU){regexContext=m[1]==="u"?RegexContext.ENCLOSED_U:RegexContext.ENCLOSED_P;}else if(intervalQ){regexContext=RegexContext.INTERVAL_QUANTIFIER;}else if(m===">"&®exContext===RegexContext.GROUP_NAME||m==="}"&&(regexContext===RegexContext.INTERVAL_QUANTIFIER||enclosedTokenRegexContexts.has(regexContext))||regexContext===RegexContext.INVALID_INCOMPLETE_TOKEN){regexContext=RegexContext.DEFAULT;}}}return{regexContext:regexContext,charClassContext:charClassContext,charClassDepth:charClassDepth,lastPos:incompleteExpression.length};}function countCaptures(expression){var num=0;forEachUnescaped(expression,capturingDelim,function(){return num++;},Context.DEFAULT);return num;}function spliceStr(str,pos,oldValue,newValue){return str.slice(0,pos)+newValue+str.slice(pos+oldValue.length);}var stringPropertyNames=["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"].join("|");var charClassUnionToken=new RegExp(String.raw`
|
300
15
|
\\(?: c[A-Za-z]
|
301
16
|
| p\{(?<pStrProp>${stringPropertyNames})\}
|
302
17
|
| [pP]\{[^\}]+\}
|
@@ -308,82 +23,12 @@ var charClassUnionToken = new RegExp(String.raw`
|
|
308
23
|
| --
|
309
24
|
| &&
|
310
25
|
| .
|
311
|
-
`.replace(/\s+/g,
|
312
|
-
function preprocess(template, substitutions, preprocessor, options) {
|
313
|
-
let newTemplate = {
|
314
|
-
raw: []
|
315
|
-
};
|
316
|
-
let newSubstitutions = [];
|
317
|
-
let runningContext;
|
318
|
-
template.raw.forEach((raw, i) => {
|
319
|
-
const result = preprocessor(raw, {
|
320
|
-
...runningContext,
|
321
|
-
lastPos: 0
|
322
|
-
}, options);
|
323
|
-
newTemplate.raw.push(result.transformed);
|
324
|
-
runningContext = result.runningContext;
|
325
|
-
if (i < template.raw.length - 1) {
|
326
|
-
const substitution = substitutions[i];
|
327
|
-
if (substitution instanceof Pattern) {
|
328
|
-
const result2 = preprocessor(substitution, {
|
329
|
-
...runningContext,
|
330
|
-
lastPos: 0
|
331
|
-
}, options);
|
332
|
-
newSubstitutions.push(pattern(result2.transformed));
|
333
|
-
runningContext = result2.runningContext;
|
334
|
-
} else {
|
335
|
-
newSubstitutions.push(substitution);
|
336
|
-
}
|
337
|
-
}
|
338
|
-
});
|
339
|
-
return {
|
340
|
-
template: newTemplate,
|
341
|
-
substitutions: newSubstitutions
|
342
|
-
};
|
343
|
-
}
|
344
|
-
var token = new RegExp(String.raw`
|
26
|
+
`.replace(/\s+/g,""),"gsu");function preprocess(template,substitutions,preprocessor,options){var newTemplate={raw:[]};var newSubstitutions=[];var runningContext;template.raw.forEach(function(raw,i){var result=preprocessor(raw,Object.assign({},runningContext,{lastPos:0}),options);newTemplate.raw.push(result.transformed);runningContext=result.runningContext;if(i<template.raw.length-1){var substitution=substitutions[i];if(substitution instanceof Pattern){var result2=preprocessor(substitution,Object.assign({},runningContext,{lastPos:0}),options);newSubstitutions.push(pattern(result2.transformed));runningContext=result2.runningContext;}else{newSubstitutions.push(substitution);}}});return{template:newTemplate,substitutions:newSubstitutions};}var token=new RegExp(String.raw`
|
345
27
|
${noncapturingDelim}
|
346
28
|
| \(\?<
|
347
29
|
| (?<backrefNum>\\[1-9]\d*)
|
348
30
|
| \\?.
|
349
|
-
`.replace(/\s+/g, ""), "
|
350
|
-
function flagNPreprocessor(value, runningContext) {
|
351
|
-
value = String(value);
|
352
|
-
let expression = "";
|
353
|
-
let transformed = "";
|
354
|
-
for (const {
|
355
|
-
0: m,
|
356
|
-
groups: {
|
357
|
-
backrefNum
|
358
|
-
}
|
359
|
-
} of value.matchAll(token)) {
|
360
|
-
expression += m;
|
361
|
-
runningContext = getEndContextForIncompleteExpression(expression, runningContext);
|
362
|
-
const {
|
363
|
-
regexContext
|
364
|
-
} = runningContext;
|
365
|
-
if (regexContext === RegexContext.DEFAULT) {
|
366
|
-
if (m === "(") {
|
367
|
-
transformed += "(?:";
|
368
|
-
} else if (backrefNum) {
|
369
|
-
throw new Error(`Invalid decimal escape "${m}" with implicit flag n; replace with named backreference`);
|
370
|
-
} else {
|
371
|
-
transformed += m;
|
372
|
-
}
|
373
|
-
} else {
|
374
|
-
transformed += m;
|
375
|
-
}
|
376
|
-
}
|
377
|
-
return {
|
378
|
-
transformed,
|
379
|
-
runningContext
|
380
|
-
};
|
381
|
-
}
|
382
|
-
var ws = /^\s$/;
|
383
|
-
var escapedWsOrHash = /^\\[\s#]$/;
|
384
|
-
var charClassWs = /^[ \t]$/;
|
385
|
-
var escapedCharClassWs = /^\\[ \t]$/;
|
386
|
-
var token2 = new RegExp(String.raw`
|
31
|
+
`.replace(/\s+/g,""),"gsu");function flagNPreprocessor(value,runningContext){value=String(value);var expression="";var transformed="";for(var _ref2 of value.matchAll(token)){var m=_ref2[0];var backrefNum=_ref2.groups.backrefNum;expression+=m;runningContext=getEndContextForIncompleteExpression(expression,runningContext);var _runningContext=runningContext,regexContext=_runningContext.regexContext;if(regexContext===RegexContext.DEFAULT){if(m==="("){transformed+="(?:";}else if(backrefNum){throw new Error(`Invalid decimal escape "${m}" with implicit flag n; replace with named backreference`);}else{transformed+=m;}}else{transformed+=m;}}return{transformed:transformed,runningContext:runningContext};}var ws=/^\s$/;var escapedWsOrHash=/^\\[\s#]$/;var charClassWs=/^[ \t]$/;var escapedCharClassWs=/^\\[ \t]$/;var token2=new RegExp(String.raw`
|
387
32
|
\\(?: [gk]<
|
388
33
|
| [pPu]\{
|
389
34
|
| c[A-Za-z]
|
@@ -397,194 +42,7 @@ var token2 = new RegExp(String.raw`
|
|
397
42
|
| (?<dp>[${doublePunctuatorChars}])\k<dp>
|
398
43
|
| --
|
399
44
|
| \\?.
|
400
|
-
`.replace(/\s+/g, ""), "gsu");
|
401
|
-
function flagXPreprocessor(value, runningContext, options) {
|
402
|
-
value = String(value);
|
403
|
-
let ignoringWs = false;
|
404
|
-
let ignoringCharClassWs = false;
|
405
|
-
let ignoringComment = false;
|
406
|
-
let expression = "";
|
407
|
-
let transformed = "";
|
408
|
-
let lastSignificantToken = "";
|
409
|
-
let lastSignificantCharClassContext = "";
|
410
|
-
let separatorNeeded = false;
|
411
|
-
const update = (str, {
|
412
|
-
prefix = true,
|
413
|
-
postfix = false
|
414
|
-
} = {}) => {
|
415
|
-
str = (separatorNeeded && prefix ? "(?:)" : "") + str + (postfix ? "(?:)" : "");
|
416
|
-
separatorNeeded = false;
|
417
|
-
return str;
|
418
|
-
};
|
419
|
-
for (const {
|
420
|
-
0: m,
|
421
|
-
index
|
422
|
-
} of value.matchAll(token2)) {
|
423
|
-
if (ignoringComment) {
|
424
|
-
if (m === "\n") {
|
425
|
-
ignoringComment = false;
|
426
|
-
separatorNeeded = true;
|
427
|
-
}
|
428
|
-
continue;
|
429
|
-
}
|
430
|
-
if (ignoringWs) {
|
431
|
-
if (ws.test(m)) {
|
432
|
-
continue;
|
433
|
-
}
|
434
|
-
ignoringWs = false;
|
435
|
-
separatorNeeded = true;
|
436
|
-
} else if (ignoringCharClassWs) {
|
437
|
-
if (charClassWs.test(m)) {
|
438
|
-
continue;
|
439
|
-
}
|
440
|
-
ignoringCharClassWs = false;
|
441
|
-
}
|
442
|
-
expression += m;
|
443
|
-
runningContext = getEndContextForIncompleteExpression(expression, runningContext);
|
444
|
-
const {
|
445
|
-
regexContext,
|
446
|
-
charClassContext
|
447
|
-
} = runningContext;
|
448
|
-
if (
|
449
|
-
// `--` is matched in one step, so boundary chars aren't `-` unless separated by whitespace
|
450
|
-
m === "-" && regexContext === RegexContext.CHAR_CLASS && lastSignificantCharClassContext === CharClassContext.RANGE && (options.flags.includes("v") || options.unicodeSetsPlugin)) {
|
451
|
-
throw new Error("Invalid unescaped hyphen as the end value for a range");
|
452
|
-
}
|
453
|
-
if (
|
454
|
-
// `??` is matched in one step by the double punctuator token
|
455
|
-
regexContext === RegexContext.DEFAULT && /^(?:[?*+]|\?\?)$/.test(m) || regexContext === RegexContext.INTERVAL_QUANTIFIER && m === "{") {
|
456
|
-
transformed += update(m, {
|
457
|
-
prefix: false,
|
458
|
-
postfix: lastSignificantToken === "(" && m === "?"
|
459
|
-
});
|
460
|
-
} else if (regexContext === RegexContext.DEFAULT) {
|
461
|
-
if (ws.test(m)) {
|
462
|
-
ignoringWs = true;
|
463
|
-
} else if (m.startsWith("#")) {
|
464
|
-
ignoringComment = true;
|
465
|
-
} else if (escapedWsOrHash.test(m)) {
|
466
|
-
transformed += update(m[1], {
|
467
|
-
prefix: false
|
468
|
-
});
|
469
|
-
} else {
|
470
|
-
transformed += update(m);
|
471
|
-
}
|
472
|
-
} else if (regexContext === RegexContext.CHAR_CLASS && m !== "[" && m !== "[^") {
|
473
|
-
if (charClassWs.test(m) && (charClassContext === CharClassContext.DEFAULT || charClassContext === CharClassContext.ENCLOSED_Q || charClassContext === CharClassContext.RANGE)) {
|
474
|
-
ignoringCharClassWs = true;
|
475
|
-
} else if (charClassContext === CharClassContext.INVALID_INCOMPLETE_TOKEN) {
|
476
|
-
throw new Error(`Invalid incomplete token in character class: "${m}"`);
|
477
|
-
} else if (escapedCharClassWs.test(m) && (charClassContext === CharClassContext.DEFAULT || charClassContext === CharClassContext.ENCLOSED_Q)) {
|
478
|
-
transformed += update(m[1], {
|
479
|
-
prefix: false
|
480
|
-
});
|
481
|
-
} else if (charClassContext === CharClassContext.DEFAULT) {
|
482
|
-
const nextChar = value[index + 1] ?? "";
|
483
|
-
let updated = sandboxUnsafeNulls(m);
|
484
|
-
if (charClassWs.test(nextChar) || m === "^") {
|
485
|
-
updated = sandboxLoneDoublePunctuatorChar(updated);
|
486
|
-
}
|
487
|
-
transformed += update(updated);
|
488
|
-
} else {
|
489
|
-
transformed += update(m);
|
490
|
-
}
|
491
|
-
} else {
|
492
|
-
transformed += update(m);
|
493
|
-
}
|
494
|
-
if (!(ignoringWs || ignoringCharClassWs || ignoringComment)) {
|
495
|
-
lastSignificantToken = m;
|
496
|
-
lastSignificantCharClassContext = charClassContext;
|
497
|
-
}
|
498
|
-
}
|
499
|
-
return {
|
500
|
-
transformed,
|
501
|
-
runningContext
|
502
|
-
};
|
503
|
-
}
|
504
|
-
function cleanPlugin(expression) {
|
505
|
-
const sep = String.raw`\(\?:\)`;
|
506
|
-
expression = replaceUnescaped(expression, `(?:${sep}){2,}`, "(?:)", Context.DEFAULT);
|
507
|
-
const marker = emulationGroupMarker.replace(/\$/g, "\\$");
|
508
|
-
expression = replaceUnescaped(expression, String.raw`(?:${sep}(?=[)|.[$\\]|\((?!DEFINE)|$)|(?<=[()|.\]^>]|\\[bBdDfnrsStvwW]|\(\?(?:[:=!]|<[=!])|^)${sep}(?![?*+{]))(?!${marker})`, "", Context.DEFAULT);
|
509
|
-
return expression;
|
510
|
-
}
|
511
|
-
var atomicPluginToken = new RegExp(String.raw`(?<noncapturingStart>${noncapturingDelim})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
|
512
|
-
function atomicPlugin(expression, data) {
|
513
|
-
if (!/\(\?>/.test(expression)) {
|
514
|
-
return expression;
|
515
|
-
}
|
516
|
-
const aGDelim = "(?>";
|
517
|
-
const emulatedAGDelim = `(?:(?=(${data.useEmulationGroups ? emulationGroupMarker : ""}`;
|
518
|
-
const captureNumMap = [0];
|
519
|
-
let numCapturesBeforeAG = 0;
|
520
|
-
let numAGs = 0;
|
521
|
-
let aGPos = NaN;
|
522
|
-
let hasProcessedAG;
|
523
|
-
do {
|
524
|
-
hasProcessedAG = false;
|
525
|
-
let numCharClassesOpen = 0;
|
526
|
-
let numGroupsOpenInAG = 0;
|
527
|
-
let inAG = false;
|
528
|
-
let match;
|
529
|
-
atomicPluginToken.lastIndex = Number.isNaN(aGPos) ? 0 : aGPos + emulatedAGDelim.length;
|
530
|
-
while (match = atomicPluginToken.exec(expression)) {
|
531
|
-
const {
|
532
|
-
0: m,
|
533
|
-
index,
|
534
|
-
groups: {
|
535
|
-
capturingStart,
|
536
|
-
noncapturingStart
|
537
|
-
}
|
538
|
-
} = match;
|
539
|
-
if (m === "[") {
|
540
|
-
numCharClassesOpen++;
|
541
|
-
} else if (!numCharClassesOpen) {
|
542
|
-
if (m === aGDelim && !inAG) {
|
543
|
-
aGPos = index;
|
544
|
-
inAG = true;
|
545
|
-
} else if (inAG && noncapturingStart) {
|
546
|
-
numGroupsOpenInAG++;
|
547
|
-
} else if (capturingStart) {
|
548
|
-
if (inAG) {
|
549
|
-
numGroupsOpenInAG++;
|
550
|
-
} else {
|
551
|
-
numCapturesBeforeAG++;
|
552
|
-
captureNumMap.push(numCapturesBeforeAG + numAGs);
|
553
|
-
}
|
554
|
-
} else if (m === ")" && inAG) {
|
555
|
-
if (!numGroupsOpenInAG) {
|
556
|
-
numAGs++;
|
557
|
-
expression = `${expression.slice(0, aGPos)}${emulatedAGDelim}${expression.slice(aGPos + aGDelim.length, index)}))<$$${numAGs + numCapturesBeforeAG}>)${expression.slice(index + 1)}`;
|
558
|
-
hasProcessedAG = true;
|
559
|
-
break;
|
560
|
-
}
|
561
|
-
numGroupsOpenInAG--;
|
562
|
-
}
|
563
|
-
} else if (m === "]") {
|
564
|
-
numCharClassesOpen--;
|
565
|
-
}
|
566
|
-
}
|
567
|
-
} while (hasProcessedAG);
|
568
|
-
expression = replaceUnescaped(expression, String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`, ({
|
569
|
-
0: m,
|
570
|
-
groups: {
|
571
|
-
backrefNum,
|
572
|
-
wrappedBackrefNum
|
573
|
-
}
|
574
|
-
}) => {
|
575
|
-
if (backrefNum) {
|
576
|
-
const bNum = +backrefNum;
|
577
|
-
if (bNum > captureNumMap.length - 1) {
|
578
|
-
throw new Error(`Backref "${m}" greater than number of captures`);
|
579
|
-
}
|
580
|
-
return `\\${captureNumMap[bNum]}`;
|
581
|
-
}
|
582
|
-
return `\\${wrappedBackrefNum}`;
|
583
|
-
}, Context.DEFAULT);
|
584
|
-
return expression;
|
585
|
-
}
|
586
|
-
var baseQuantifier = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`;
|
587
|
-
var possessivePluginToken = new RegExp(String.raw`
|
45
|
+
`.replace(/\s+/g,""),"gsu");function flagXPreprocessor(value,runningContext,options){value=String(value);var ignoringWs=false;var ignoringCharClassWs=false;var ignoringComment=false;var expression="";var transformed="";var lastSignificantToken="";var lastSignificantCharClassContext="";var separatorNeeded=false;var update=function update(str){var _ref3=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref3$prefix=_ref3.prefix,prefix=_ref3$prefix===void 0?true:_ref3$prefix,_ref3$postfix=_ref3.postfix,postfix=_ref3$postfix===void 0?false:_ref3$postfix;str=(separatorNeeded&&prefix?"(?:)":"")+str+(postfix?"(?:)":"");separatorNeeded=false;return str;};for(var _ref4 of value.matchAll(token2)){var m=_ref4[0];var index=_ref4.index;if(ignoringComment){if(m==="\n"){ignoringComment=false;separatorNeeded=true;}continue;}if(ignoringWs){if(ws.test(m)){continue;}ignoringWs=false;separatorNeeded=true;}else if(ignoringCharClassWs){if(charClassWs.test(m)){continue;}ignoringCharClassWs=false;}expression+=m;runningContext=getEndContextForIncompleteExpression(expression,runningContext);var _runningContext2=runningContext,regexContext=_runningContext2.regexContext,charClassContext=_runningContext2.charClassContext;if(m==="-"&®exContext===RegexContext.CHAR_CLASS&&lastSignificantCharClassContext===CharClassContext.RANGE&&(options.flags.includes("v")||options.unicodeSetsPlugin)){throw new Error("Invalid unescaped hyphen as the end value for a range");}if(regexContext===RegexContext.DEFAULT&&/^(?:[?*+]|\?\?)$/.test(m)||regexContext===RegexContext.INTERVAL_QUANTIFIER&&m==="{"){transformed+=update(m,{prefix:false,postfix:lastSignificantToken==="("&&m==="?"});}else if(regexContext===RegexContext.DEFAULT){if(ws.test(m)){ignoringWs=true;}else if(m.startsWith("#")){ignoringComment=true;}else if(escapedWsOrHash.test(m)){transformed+=update(m[1],{prefix:false});}else{transformed+=update(m);}}else if(regexContext===RegexContext.CHAR_CLASS&&m!=="["&&m!=="[^"){if(charClassWs.test(m)&&(charClassContext===CharClassContext.DEFAULT||charClassContext===CharClassContext.ENCLOSED_Q||charClassContext===CharClassContext.RANGE)){ignoringCharClassWs=true;}else if(charClassContext===CharClassContext.INVALID_INCOMPLETE_TOKEN){throw new Error(`Invalid incomplete token in character class: "${m}"`);}else if(escapedCharClassWs.test(m)&&(charClassContext===CharClassContext.DEFAULT||charClassContext===CharClassContext.ENCLOSED_Q)){transformed+=update(m[1],{prefix:false});}else if(charClassContext===CharClassContext.DEFAULT){var _value2;var nextChar=(_value2=value[index+1])!=null?_value2:"";var updated=sandboxUnsafeNulls(m);if(charClassWs.test(nextChar)||m==="^"){updated=sandboxLoneDoublePunctuatorChar(updated);}transformed+=update(updated);}else{transformed+=update(m);}}else{transformed+=update(m);}if(!(ignoringWs||ignoringCharClassWs||ignoringComment)){lastSignificantToken=m;lastSignificantCharClassContext=charClassContext;}}return{transformed:transformed,runningContext:runningContext};}function cleanPlugin(expression){var sep=String.raw`\(\?:\)`;expression=replaceUnescaped(expression,`(?:${sep}){2,}`,"(?:)",Context.DEFAULT);var marker=emulationGroupMarker.replace(/\$/g,"\\$");expression=replaceUnescaped(expression,String.raw`(?:${sep}(?=[)|.[$\\]|\((?!DEFINE)|$)|(?<=[()|.\]^>]|\\[bBdDfnrsStvwW]|\(\?(?:[:=!]|<[=!])|^)${sep}(?![?*+{]))(?!${marker})`,"",Context.DEFAULT);return expression;}var atomicPluginToken=new RegExp(String.raw`(?<noncapturingStart>${noncapturingDelim})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function atomicPlugin(expression,data){if(!/\(\?>/.test(expression)){return expression;}var aGDelim="(?>";var emulatedAGDelim=`(?:(?=(${data.useEmulationGroups?emulationGroupMarker:""}`;var captureNumMap=[0];var numCapturesBeforeAG=0;var numAGs=0;var aGPos=NaN;var hasProcessedAG;do{hasProcessedAG=false;var numCharClassesOpen=0;var numGroupsOpenInAG=0;var inAG=false;var match=void 0;atomicPluginToken.lastIndex=Number.isNaN(aGPos)?0:aGPos+emulatedAGDelim.length;while(match=atomicPluginToken.exec(expression)){var _match5=match,m=_match5[0],index=_match5.index,_match5$groups=_match5.groups,capturingStart=_match5$groups.capturingStart,noncapturingStart=_match5$groups.noncapturingStart;if(m==="["){numCharClassesOpen++;}else if(!numCharClassesOpen){if(m===aGDelim&&!inAG){aGPos=index;inAG=true;}else if(inAG&&noncapturingStart){numGroupsOpenInAG++;}else if(capturingStart){if(inAG){numGroupsOpenInAG++;}else{numCapturesBeforeAG++;captureNumMap.push(numCapturesBeforeAG+numAGs);}}else if(m===")"&&inAG){if(!numGroupsOpenInAG){numAGs++;expression=`${expression.slice(0,aGPos)}${emulatedAGDelim}${expression.slice(aGPos+aGDelim.length,index)}))<$$${numAGs+numCapturesBeforeAG}>)${expression.slice(index+1)}`;hasProcessedAG=true;break;}numGroupsOpenInAG--;}}else if(m==="]"){numCharClassesOpen--;}}}while(hasProcessedAG);expression=replaceUnescaped(expression,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,function(_ref5){var m=_ref5[0],_ref5$groups=_ref5.groups,backrefNum=_ref5$groups.backrefNum,wrappedBackrefNum=_ref5$groups.wrappedBackrefNum;if(backrefNum){var bNum=+backrefNum;if(bNum>captureNumMap.length-1){throw new Error(`Backref "${m}" greater than number of captures`);}return`\\${captureNumMap[bNum]}`;}return`\\${wrappedBackrefNum}`;},Context.DEFAULT);return expression;}var baseQuantifier=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`;var possessivePluginToken=new RegExp(String.raw`
|
588
46
|
\\(?: \d+
|
589
47
|
| c[A-Za-z]
|
590
48
|
| [gk]<[^>]+>
|
@@ -599,323 +57,13 @@ var possessivePluginToken = new RegExp(String.raw`
|
|
599
57
|
))?
|
600
58
|
| (?<qBase>${baseQuantifier})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
601
59
|
| \\?.
|
602
|
-
`.replace(/\s+/g, ""), "
|
603
|
-
function possessivePlugin(expression) {
|
604
|
-
if (!new RegExp(`${baseQuantifier}\\+`).test(expression)) {
|
605
|
-
return expression;
|
606
|
-
}
|
607
|
-
const openGroupIndices = [];
|
608
|
-
let lastGroupIndex = null;
|
609
|
-
let lastCharClassIndex = null;
|
610
|
-
let lastToken = "";
|
611
|
-
let numCharClassesOpen = 0;
|
612
|
-
let match;
|
613
|
-
possessivePluginToken.lastIndex = 0;
|
614
|
-
while (match = possessivePluginToken.exec(expression)) {
|
615
|
-
const {
|
616
|
-
0: m,
|
617
|
-
index,
|
618
|
-
groups: {
|
619
|
-
qBase,
|
620
|
-
qMod,
|
621
|
-
invalidQ
|
622
|
-
}
|
623
|
-
} = match;
|
624
|
-
if (m === "[") {
|
625
|
-
if (!numCharClassesOpen) {
|
626
|
-
lastCharClassIndex = index;
|
627
|
-
}
|
628
|
-
numCharClassesOpen++;
|
629
|
-
} else if (m === "]") {
|
630
|
-
if (numCharClassesOpen) {
|
631
|
-
numCharClassesOpen--;
|
632
|
-
} else {
|
633
|
-
lastCharClassIndex = null;
|
634
|
-
}
|
635
|
-
} else if (!numCharClassesOpen) {
|
636
|
-
if (qMod === "+" && lastToken && !lastToken.startsWith("(")) {
|
637
|
-
if (invalidQ) {
|
638
|
-
throw new Error(`Invalid quantifier "${m}"`);
|
639
|
-
}
|
640
|
-
let charsAdded = -1;
|
641
|
-
if (/^\{\d+\}$/.test(qBase)) {
|
642
|
-
expression = spliceStr(expression, index + qBase.length, qMod, "");
|
643
|
-
} else {
|
644
|
-
if (lastToken === ")" || lastToken === "]") {
|
645
|
-
const nodeIndex = lastToken === ")" ? lastGroupIndex : lastCharClassIndex;
|
646
|
-
if (nodeIndex === null) {
|
647
|
-
throw new Error(`Invalid unmatched "${lastToken}"`);
|
648
|
-
}
|
649
|
-
expression = `${expression.slice(0, nodeIndex)}(?>${expression.slice(nodeIndex, index)}${qBase})${expression.slice(index + m.length)}`;
|
650
|
-
} else {
|
651
|
-
expression = `${expression.slice(0, index - lastToken.length)}(?>${lastToken}${qBase})${expression.slice(index + m.length)}`;
|
652
|
-
}
|
653
|
-
charsAdded += 4;
|
654
|
-
}
|
655
|
-
possessivePluginToken.lastIndex += charsAdded;
|
656
|
-
} else if (m[0] === "(") {
|
657
|
-
openGroupIndices.push(index);
|
658
|
-
} else if (m === ")") {
|
659
|
-
lastGroupIndex = openGroupIndices.length ? openGroupIndices.pop() : null;
|
660
|
-
}
|
661
|
-
}
|
662
|
-
lastToken = m;
|
663
|
-
}
|
664
|
-
return expression;
|
665
|
-
}
|
666
|
-
function subroutinesPlugin(expression, data) {
|
667
|
-
const namedGroups = getNamedCapturingGroups(expression, {
|
668
|
-
includeContents: true
|
669
|
-
});
|
670
|
-
const transformed = processSubroutines(expression, namedGroups, data.useEmulationGroups);
|
671
|
-
return processDefinitionGroup(transformed, namedGroups);
|
672
|
-
}
|
673
|
-
var subroutinePattern = String.raw`\\g<(?<subroutineName>[^>&]+)>`;
|
674
|
-
var token3 = new RegExp(String.raw`
|
60
|
+
`.replace(/\s+/g,""),"gsu");function possessivePlugin(expression){if(!new RegExp(`${baseQuantifier}\\+`).test(expression)){return expression;}var openGroupIndices=[];var lastGroupIndex=null;var lastCharClassIndex=null;var lastToken="";var numCharClassesOpen=0;var match;possessivePluginToken.lastIndex=0;while(match=possessivePluginToken.exec(expression)){var _match6=match,m=_match6[0],index=_match6.index,_match6$groups=_match6.groups,qBase=_match6$groups.qBase,qMod=_match6$groups.qMod,invalidQ=_match6$groups.invalidQ;if(m==="["){if(!numCharClassesOpen){lastCharClassIndex=index;}numCharClassesOpen++;}else if(m==="]"){if(numCharClassesOpen){numCharClassesOpen--;}else{lastCharClassIndex=null;}}else if(!numCharClassesOpen){if(qMod==="+"&&lastToken&&!lastToken.startsWith("(")){if(invalidQ){throw new Error(`Invalid quantifier "${m}"`);}var charsAdded=-1;if(/^\{\d+\}$/.test(qBase)){expression=spliceStr(expression,index+qBase.length,qMod,"");}else{if(lastToken===")"||lastToken==="]"){var nodeIndex=lastToken===")"?lastGroupIndex:lastCharClassIndex;if(nodeIndex===null){throw new Error(`Invalid unmatched "${lastToken}"`);}expression=`${expression.slice(0,nodeIndex)}(?>${expression.slice(nodeIndex,index)}${qBase})${expression.slice(index+m.length)}`;}else{expression=`${expression.slice(0,index-lastToken.length)}(?>${lastToken}${qBase})${expression.slice(index+m.length)}`;}charsAdded+=4;}possessivePluginToken.lastIndex+=charsAdded;}else if(m[0]==="("){openGroupIndices.push(index);}else if(m===")"){lastGroupIndex=openGroupIndices.length?openGroupIndices.pop():null;}}lastToken=m;}return expression;}function subroutinesPlugin(expression,data){var namedGroups=getNamedCapturingGroups(expression,{includeContents:true});var transformed=processSubroutines(expression,namedGroups,data.useEmulationGroups);return processDefinitionGroup(transformed,namedGroups);}var subroutinePattern=String.raw`\\g<(?<subroutineName>[^>&]+)>`;var token3=new RegExp(String.raw`
|
675
61
|
${subroutinePattern}
|
676
62
|
| (?<capturingStart>${capturingDelim})
|
677
63
|
| \\(?<backrefNum>[1-9]\d*)
|
678
64
|
| \\k<(?<backrefName>[^>]+)>
|
679
65
|
| \\?.
|
680
|
-
`.replace(/\s+/g, ""), "gsu");
|
681
|
-
function processSubroutines(expression, namedGroups, useEmulationGroups) {
|
682
|
-
if (!/\\g</.test(expression)) {
|
683
|
-
return expression;
|
684
|
-
}
|
685
|
-
const hasBackrefs = hasUnescaped(expression, "\\\\(?:[1-9]|k<[^>]+>)", Context.DEFAULT);
|
686
|
-
const subroutineWrapper = hasBackrefs ? `(${useEmulationGroups ? emulationGroupMarker : ""}` : "(?:";
|
687
|
-
const openSubroutines = /* @__PURE__ */new Map();
|
688
|
-
const openSubroutinesStack = [];
|
689
|
-
const captureNumMap = [0];
|
690
|
-
let numCapturesPassedOutsideSubroutines = 0;
|
691
|
-
let numCapturesPassedInsideSubroutines = 0;
|
692
|
-
let numCapturesPassedInsideThisSubroutine = 0;
|
693
|
-
let numSubroutineCapturesTrackedInRemap = 0;
|
694
|
-
let numCharClassesOpen = 0;
|
695
|
-
let result = expression;
|
696
|
-
let match;
|
697
|
-
token3.lastIndex = 0;
|
698
|
-
while (match = token3.exec(result)) {
|
699
|
-
const {
|
700
|
-
0: m,
|
701
|
-
index,
|
702
|
-
groups: {
|
703
|
-
subroutineName,
|
704
|
-
capturingStart,
|
705
|
-
backrefNum,
|
706
|
-
backrefName
|
707
|
-
}
|
708
|
-
} = match;
|
709
|
-
if (m === "[") {
|
710
|
-
numCharClassesOpen++;
|
711
|
-
} else if (!numCharClassesOpen) {
|
712
|
-
if (subroutineName) {
|
713
|
-
if (!namedGroups.has(subroutineName)) {
|
714
|
-
throw new Error(`Invalid named capture referenced by subroutine ${m}`);
|
715
|
-
}
|
716
|
-
if (openSubroutines.has(subroutineName)) {
|
717
|
-
throw new Error(`Subroutine ${m} followed a recursive reference`);
|
718
|
-
}
|
719
|
-
const contents = namedGroups.get(subroutineName).contents;
|
720
|
-
const subroutineValue = `${subroutineWrapper}${contents})`;
|
721
|
-
if (hasBackrefs) {
|
722
|
-
numCapturesPassedInsideThisSubroutine = 0;
|
723
|
-
numCapturesPassedInsideSubroutines++;
|
724
|
-
}
|
725
|
-
openSubroutines.set(subroutineName, {
|
726
|
-
// Incrementally decremented to track when we've left the group
|
727
|
-
unclosedGroupCount: countOpenParens(subroutineValue)
|
728
|
-
});
|
729
|
-
openSubroutinesStack.push(subroutineName);
|
730
|
-
result = spliceStr(result, index, m, subroutineValue);
|
731
|
-
token3.lastIndex -= m.length - subroutineWrapper.length;
|
732
|
-
} else if (capturingStart) {
|
733
|
-
if (openSubroutines.size) {
|
734
|
-
if (hasBackrefs) {
|
735
|
-
numCapturesPassedInsideThisSubroutine++;
|
736
|
-
numCapturesPassedInsideSubroutines++;
|
737
|
-
}
|
738
|
-
if (m !== "(") {
|
739
|
-
result = spliceStr(result, index, m, subroutineWrapper);
|
740
|
-
token3.lastIndex -= m.length - subroutineWrapper.length;
|
741
|
-
}
|
742
|
-
} else if (hasBackrefs) {
|
743
|
-
captureNumMap.push(lastOf(captureNumMap) + 1 + numCapturesPassedInsideSubroutines - numSubroutineCapturesTrackedInRemap);
|
744
|
-
numSubroutineCapturesTrackedInRemap = numCapturesPassedInsideSubroutines;
|
745
|
-
numCapturesPassedOutsideSubroutines++;
|
746
|
-
}
|
747
|
-
} else if ((backrefNum || backrefName) && openSubroutines.size) {
|
748
|
-
const num = backrefNum ? +backrefNum : namedGroups.get(backrefName)?.groupNum;
|
749
|
-
let isGroupFromThisSubroutine = false;
|
750
|
-
for (const s of openSubroutinesStack) {
|
751
|
-
const group = namedGroups.get(s);
|
752
|
-
if (num >= group.groupNum && num <= group.groupNum + group.numCaptures) {
|
753
|
-
isGroupFromThisSubroutine = true;
|
754
|
-
break;
|
755
|
-
}
|
756
|
-
}
|
757
|
-
if (isGroupFromThisSubroutine) {
|
758
|
-
const group = namedGroups.get(lastOf(openSubroutinesStack));
|
759
|
-
const subroutineNum = numCapturesPassedOutsideSubroutines + numCapturesPassedInsideSubroutines - numCapturesPassedInsideThisSubroutine;
|
760
|
-
const metadata = `\\k<$$b${num}s${subroutineNum}r${group.groupNum}c${group.numCaptures}>`;
|
761
|
-
result = spliceStr(result, index, m, metadata);
|
762
|
-
token3.lastIndex += metadata.length - m.length;
|
763
|
-
}
|
764
|
-
} else if (m === ")") {
|
765
|
-
if (openSubroutines.size) {
|
766
|
-
const subroutine = openSubroutines.get(lastOf(openSubroutinesStack));
|
767
|
-
subroutine.unclosedGroupCount--;
|
768
|
-
if (!subroutine.unclosedGroupCount) {
|
769
|
-
openSubroutines.delete(openSubroutinesStack.pop());
|
770
|
-
}
|
771
|
-
}
|
772
|
-
}
|
773
|
-
} else if (m === "]") {
|
774
|
-
numCharClassesOpen--;
|
775
|
-
}
|
776
|
-
}
|
777
|
-
if (hasBackrefs) {
|
778
|
-
result = replaceUnescaped(result, String.raw`\\(?:(?<bNum>[1-9]\d*)|k<\$\$b(?<bNumSub>\d+)s(?<subNum>\d+)r(?<refNum>\d+)c(?<refCaps>\d+)>)`, ({
|
779
|
-
0: m,
|
780
|
-
groups: {
|
781
|
-
bNum,
|
782
|
-
bNumSub,
|
783
|
-
subNum,
|
784
|
-
refNum,
|
785
|
-
refCaps
|
786
|
-
}
|
787
|
-
}) => {
|
788
|
-
if (bNum) {
|
789
|
-
const backrefNum = +bNum;
|
790
|
-
if (backrefNum > captureNumMap.length - 1) {
|
791
|
-
throw new Error(`Backref "${m}" greater than number of captures`);
|
792
|
-
}
|
793
|
-
return `\\${captureNumMap[backrefNum]}`;
|
794
|
-
}
|
795
|
-
const backrefNumInSubroutine = +bNumSub;
|
796
|
-
const subroutineGroupNum = +subNum;
|
797
|
-
const refGroupNum = +refNum;
|
798
|
-
const numCapturesInRef = +refCaps;
|
799
|
-
if (backrefNumInSubroutine < refGroupNum || backrefNumInSubroutine > refGroupNum + numCapturesInRef) {
|
800
|
-
return `\\${captureNumMap[backrefNumInSubroutine]}`;
|
801
|
-
}
|
802
|
-
return `\\${subroutineGroupNum - refGroupNum + backrefNumInSubroutine}`;
|
803
|
-
}, Context.DEFAULT);
|
804
|
-
}
|
805
|
-
return result;
|
806
|
-
}
|
807
|
-
var defineGroupToken = new RegExp(String.raw`${namedCapturingDelim}|\(\?:\)|(?<invalid>\\?.)`, "gsu");
|
808
|
-
function processDefinitionGroup(expression, namedGroups) {
|
809
|
-
const defineMatch = execUnescaped(expression, String.raw`\(\?\(DEFINE\)`, 0, Context.DEFAULT);
|
810
|
-
if (!defineMatch) {
|
811
|
-
return expression;
|
812
|
-
}
|
813
|
-
const defineGroup = getGroup(expression, defineMatch);
|
814
|
-
if (defineGroup.afterPos < expression.length) {
|
815
|
-
throw new Error("DEFINE group allowed only at the end of a regex");
|
816
|
-
} else if (defineGroup.afterPos > expression.length) {
|
817
|
-
throw new Error("DEFINE group is unclosed");
|
818
|
-
}
|
819
|
-
let match;
|
820
|
-
defineGroupToken.lastIndex = 0;
|
821
|
-
while (match = defineGroupToken.exec(defineGroup.contents)) {
|
822
|
-
const {
|
823
|
-
captureName,
|
824
|
-
invalid
|
825
|
-
} = match.groups;
|
826
|
-
if (captureName) {
|
827
|
-
const group = getGroup(defineGroup.contents, match);
|
828
|
-
let duplicateName;
|
829
|
-
if (!namedGroups.get(captureName).isUnique) {
|
830
|
-
duplicateName = captureName;
|
831
|
-
} else {
|
832
|
-
const nestedNamedGroups = getNamedCapturingGroups(group.contents);
|
833
|
-
for (const name of nestedNamedGroups.keys()) {
|
834
|
-
if (!namedGroups.get(name).isUnique) {
|
835
|
-
duplicateName = name;
|
836
|
-
break;
|
837
|
-
}
|
838
|
-
}
|
839
|
-
}
|
840
|
-
if (duplicateName) {
|
841
|
-
throw new Error(`Duplicate group name "${duplicateName}" within DEFINE`);
|
842
|
-
}
|
843
|
-
defineGroupToken.lastIndex = group.afterPos;
|
844
|
-
} else if (invalid) {
|
845
|
-
throw new Error(`DEFINE group includes unsupported syntax at top level`);
|
846
|
-
}
|
847
|
-
}
|
848
|
-
return expression.slice(0, defineMatch.index);
|
849
|
-
}
|
850
|
-
function countOpenParens(expression) {
|
851
|
-
let num = 0;
|
852
|
-
forEachUnescaped(expression, "\\(", () => num++, Context.DEFAULT);
|
853
|
-
return num;
|
854
|
-
}
|
855
|
-
function getCaptureNum(expression, groupName) {
|
856
|
-
let num = 0;
|
857
|
-
let pos = 0;
|
858
|
-
let match;
|
859
|
-
while (match = execUnescaped(expression, capturingDelim, pos, Context.DEFAULT)) {
|
860
|
-
const {
|
861
|
-
0: m,
|
862
|
-
index,
|
863
|
-
groups: {
|
864
|
-
captureName
|
865
|
-
}
|
866
|
-
} = match;
|
867
|
-
num++;
|
868
|
-
if (captureName === groupName) {
|
869
|
-
break;
|
870
|
-
}
|
871
|
-
pos = index + m.length;
|
872
|
-
}
|
873
|
-
return num;
|
874
|
-
}
|
875
|
-
function getGroup(expression, delimMatch) {
|
876
|
-
const contentsStart = delimMatch.index + delimMatch[0].length;
|
877
|
-
const contents = getGroupContents(expression, contentsStart);
|
878
|
-
const afterPos = contentsStart + contents.length + 1;
|
879
|
-
return {
|
880
|
-
contents,
|
881
|
-
afterPos
|
882
|
-
};
|
883
|
-
}
|
884
|
-
function getNamedCapturingGroups(expression, {
|
885
|
-
includeContents
|
886
|
-
} = {}) {
|
887
|
-
const namedGroups = /* @__PURE__ */new Map();
|
888
|
-
forEachUnescaped(expression, namedCapturingDelim, ({
|
889
|
-
0: m,
|
890
|
-
index,
|
891
|
-
groups: {
|
892
|
-
captureName
|
893
|
-
}
|
894
|
-
}) => {
|
895
|
-
if (namedGroups.has(captureName)) {
|
896
|
-
namedGroups.get(captureName).isUnique = false;
|
897
|
-
} else {
|
898
|
-
const group = {
|
899
|
-
isUnique: true
|
900
|
-
};
|
901
|
-
if (includeContents) {
|
902
|
-
const contents = getGroupContents(expression, index + m.length);
|
903
|
-
Object.assign(group, {
|
904
|
-
contents,
|
905
|
-
groupNum: getCaptureNum(expression, captureName),
|
906
|
-
numCaptures: countCaptures(contents)
|
907
|
-
});
|
908
|
-
}
|
909
|
-
namedGroups.set(captureName, group);
|
910
|
-
}
|
911
|
-
}, Context.DEFAULT);
|
912
|
-
return namedGroups;
|
913
|
-
}
|
914
|
-
function lastOf(arr) {
|
915
|
-
return arr[arr.length - 1];
|
916
|
-
}
|
917
|
-
var incompatibleEscapeChars = "&!#%,:;<=>@`~";
|
918
|
-
var token4 = new RegExp(String.raw`
|
66
|
+
`.replace(/\s+/g,""),"gsu");function processSubroutines(expression,namedGroups,useEmulationGroups){if(!/\\g</.test(expression)){return expression;}var hasBackrefs=hasUnescaped(expression,"\\\\(?:[1-9]|k<[^>]+>)",Context.DEFAULT);var subroutineWrapper=hasBackrefs?`(${useEmulationGroups?emulationGroupMarker:""}`:"(?:";var openSubroutines=new Map();var openSubroutinesStack=[];var captureNumMap=[0];var numCapturesPassedOutsideSubroutines=0;var numCapturesPassedInsideSubroutines=0;var numCapturesPassedInsideThisSubroutine=0;var numSubroutineCapturesTrackedInRemap=0;var numCharClassesOpen=0;var result=expression;var match;token3.lastIndex=0;while(match=token3.exec(result)){var _match7=match,m=_match7[0],index=_match7.index,_match7$groups=_match7.groups,subroutineName=_match7$groups.subroutineName,capturingStart=_match7$groups.capturingStart,backrefNum=_match7$groups.backrefNum,backrefName=_match7$groups.backrefName;if(m==="["){numCharClassesOpen++;}else if(!numCharClassesOpen){if(subroutineName){if(!namedGroups.has(subroutineName)){throw new Error(`Invalid named capture referenced by subroutine ${m}`);}if(openSubroutines.has(subroutineName)){throw new Error(`Subroutine ${m} followed a recursive reference`);}var contents=namedGroups.get(subroutineName).contents;var subroutineValue=`${subroutineWrapper}${contents})`;if(hasBackrefs){numCapturesPassedInsideThisSubroutine=0;numCapturesPassedInsideSubroutines++;}openSubroutines.set(subroutineName,{unclosedGroupCount:countOpenParens(subroutineValue)});openSubroutinesStack.push(subroutineName);result=spliceStr(result,index,m,subroutineValue);token3.lastIndex-=m.length-subroutineWrapper.length;}else if(capturingStart){if(openSubroutines.size){if(hasBackrefs){numCapturesPassedInsideThisSubroutine++;numCapturesPassedInsideSubroutines++;}if(m!=="("){result=spliceStr(result,index,m,subroutineWrapper);token3.lastIndex-=m.length-subroutineWrapper.length;}}else if(hasBackrefs){captureNumMap.push(lastOf(captureNumMap)+1+numCapturesPassedInsideSubroutines-numSubroutineCapturesTrackedInRemap);numSubroutineCapturesTrackedInRemap=numCapturesPassedInsideSubroutines;numCapturesPassedOutsideSubroutines++;}}else if((backrefNum||backrefName)&&openSubroutines.size){var _namedGroups$get;var num=backrefNum?+backrefNum:(_namedGroups$get=namedGroups.get(backrefName))==null?void 0:_namedGroups$get.groupNum;var isGroupFromThisSubroutine=false;for(var s of openSubroutinesStack){var group=namedGroups.get(s);if(num>=group.groupNum&&num<=group.groupNum+group.numCaptures){isGroupFromThisSubroutine=true;break;}}if(isGroupFromThisSubroutine){var _group=namedGroups.get(lastOf(openSubroutinesStack));var subroutineNum=numCapturesPassedOutsideSubroutines+numCapturesPassedInsideSubroutines-numCapturesPassedInsideThisSubroutine;var metadata=`\\k<$$b${num}s${subroutineNum}r${_group.groupNum}c${_group.numCaptures}>`;result=spliceStr(result,index,m,metadata);token3.lastIndex+=metadata.length-m.length;}}else if(m===")"){if(openSubroutines.size){var subroutine=openSubroutines.get(lastOf(openSubroutinesStack));subroutine.unclosedGroupCount--;if(!subroutine.unclosedGroupCount){openSubroutines.delete(openSubroutinesStack.pop());}}}}else if(m==="]"){numCharClassesOpen--;}}if(hasBackrefs){result=replaceUnescaped(result,String.raw`\\(?:(?<bNum>[1-9]\d*)|k<\$\$b(?<bNumSub>\d+)s(?<subNum>\d+)r(?<refNum>\d+)c(?<refCaps>\d+)>)`,function(_ref6){var m=_ref6[0],_ref6$groups=_ref6.groups,bNum=_ref6$groups.bNum,bNumSub=_ref6$groups.bNumSub,subNum=_ref6$groups.subNum,refNum=_ref6$groups.refNum,refCaps=_ref6$groups.refCaps;if(bNum){var _backrefNum=+bNum;if(_backrefNum>captureNumMap.length-1){throw new Error(`Backref "${m}" greater than number of captures`);}return`\\${captureNumMap[_backrefNum]}`;}var backrefNumInSubroutine=+bNumSub;var subroutineGroupNum=+subNum;var refGroupNum=+refNum;var numCapturesInRef=+refCaps;if(backrefNumInSubroutine<refGroupNum||backrefNumInSubroutine>refGroupNum+numCapturesInRef){return`\\${captureNumMap[backrefNumInSubroutine]}`;}return`\\${subroutineGroupNum-refGroupNum+backrefNumInSubroutine}`;},Context.DEFAULT);}return result;}var defineGroupToken=new RegExp(String.raw`${namedCapturingDelim}|\(\?:\)|(?<invalid>\\?.)`,"gsu");function processDefinitionGroup(expression,namedGroups){var defineMatch=execUnescaped(expression,String.raw`\(\?\(DEFINE\)`,0,Context.DEFAULT);if(!defineMatch){return expression;}var defineGroup=getGroup(expression,defineMatch);if(defineGroup.afterPos<expression.length){throw new Error("DEFINE group allowed only at the end of a regex");}else if(defineGroup.afterPos>expression.length){throw new Error("DEFINE group is unclosed");}var match;defineGroupToken.lastIndex=0;while(match=defineGroupToken.exec(defineGroup.contents)){var _match$groups=match.groups,captureName=_match$groups.captureName,invalid=_match$groups.invalid;if(captureName){var group=getGroup(defineGroup.contents,match);var duplicateName=void 0;if(!namedGroups.get(captureName).isUnique){duplicateName=captureName;}else{var nestedNamedGroups=getNamedCapturingGroups(group.contents);for(var name of nestedNamedGroups.keys()){if(!namedGroups.get(name).isUnique){duplicateName=name;break;}}}if(duplicateName){throw new Error(`Duplicate group name "${duplicateName}" within DEFINE`);}defineGroupToken.lastIndex=group.afterPos;}else if(invalid){throw new Error(`DEFINE group includes unsupported syntax at top level`);}}return expression.slice(0,defineMatch.index);}function countOpenParens(expression){var num=0;forEachUnescaped(expression,"\\(",function(){return num++;},Context.DEFAULT);return num;}function getCaptureNum(expression,groupName){var num=0;var pos=0;var match;while(match=execUnescaped(expression,capturingDelim,pos,Context.DEFAULT)){var _match8=match,m=_match8[0],index=_match8.index,captureName=_match8.groups.captureName;num++;if(captureName===groupName){break;}pos=index+m.length;}return num;}function getGroup(expression,delimMatch){var contentsStart=delimMatch.index+delimMatch[0].length;var contents=getGroupContents(expression,contentsStart);var afterPos=contentsStart+contents.length+1;return{contents:contents,afterPos:afterPos};}function getNamedCapturingGroups(expression){var _ref7=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},includeContents=_ref7.includeContents;var namedGroups=new Map();forEachUnescaped(expression,namedCapturingDelim,function(_ref8){var m=_ref8[0],index=_ref8.index,captureName=_ref8.groups.captureName;if(namedGroups.has(captureName)){namedGroups.get(captureName).isUnique=false;}else{var group={isUnique:true};if(includeContents){var contents=getGroupContents(expression,index+m.length);Object.assign(group,{contents:contents,groupNum:getCaptureNum(expression,captureName),numCaptures:countCaptures(contents)});}namedGroups.set(captureName,group);}},Context.DEFAULT);return namedGroups;}function lastOf(arr){return arr[arr.length-1];}var incompatibleEscapeChars="&!#%,:;<=>@`~";var token4=new RegExp(String.raw`
|
919
67
|
\[\^?-?
|
920
68
|
| --?\]
|
921
69
|
| (?<dp>[${doublePunctuatorChars}])\k<dp>
|
@@ -923,660 +71,5 @@ var token4 = new RegExp(String.raw`
|
|
923
71
|
| \\(?<vOnlyEscape>[${incompatibleEscapeChars}])
|
924
72
|
| \\[pPu]\{[^}]+\}
|
925
73
|
| \\?.
|
926
|
-
`.replace(/\s+/g, ""), "gsu");
|
927
|
-
function backcompatPlugin(expression) {
|
928
|
-
const unescapedLiteralHyphenMsg = 'Invalid unescaped "-" in character class';
|
929
|
-
let inCharClass = false;
|
930
|
-
let result = "";
|
931
|
-
for (const {
|
932
|
-
0: m,
|
933
|
-
groups: {
|
934
|
-
dp,
|
935
|
-
vOnlyEscape
|
936
|
-
}
|
937
|
-
} of expression.matchAll(token4)) {
|
938
|
-
if (m[0] === "[") {
|
939
|
-
if (inCharClass) {
|
940
|
-
throw new Error("Invalid nested character class when flag v not supported; possibly from interpolation");
|
941
|
-
}
|
942
|
-
if (m.endsWith("-")) {
|
943
|
-
throw new Error(unescapedLiteralHyphenMsg);
|
944
|
-
}
|
945
|
-
inCharClass = true;
|
946
|
-
} else if (m.endsWith("]")) {
|
947
|
-
if (m[0] === "-") {
|
948
|
-
throw new Error(unescapedLiteralHyphenMsg);
|
949
|
-
}
|
950
|
-
inCharClass = false;
|
951
|
-
} else if (inCharClass) {
|
952
|
-
if (m === "&&" || m === "--") {
|
953
|
-
throw new Error(`Invalid set operator "${m}" when flag v not supported`);
|
954
|
-
} else if (dp) {
|
955
|
-
throw new Error(`Invalid double punctuator "${m}", reserved by flag v`);
|
956
|
-
} else if ("(){}/|".includes(m)) {
|
957
|
-
throw new Error(`Invalid unescaped "${m}" in character class`);
|
958
|
-
} else if (vOnlyEscape) {
|
959
|
-
result += vOnlyEscape;
|
960
|
-
continue;
|
961
|
-
}
|
962
|
-
}
|
963
|
-
result += m;
|
964
|
-
}
|
965
|
-
return result;
|
966
|
-
}
|
967
|
-
function rewrite(expression = "", options = {}) {
|
968
|
-
const opts = getOptions(options);
|
969
|
-
if (opts.subclass) {
|
970
|
-
throw new Error("Cannot use option subclass");
|
971
|
-
}
|
972
|
-
return {
|
973
|
-
expression: handlePlugins(handlePreprocessors({
|
974
|
-
raw: [expression]
|
975
|
-
}, [], opts).template.raw[0], opts),
|
976
|
-
flags: opts.flags
|
977
|
-
};
|
978
|
-
}
|
979
|
-
function getOptions(options) {
|
980
|
-
const opts = {
|
981
|
-
flags: "",
|
982
|
-
subclass: false,
|
983
|
-
plugins: [],
|
984
|
-
unicodeSetsPlugin: backcompatPlugin,
|
985
|
-
disable: {
|
986
|
-
/* n, v, x, atomic, subroutines */
|
987
|
-
},
|
988
|
-
force: {
|
989
|
-
/* v */
|
990
|
-
},
|
991
|
-
...options
|
992
|
-
};
|
993
|
-
if (/[nuvx]/.test(opts.flags)) {
|
994
|
-
throw new Error("Implicit flags v/u/x/n cannot be explicitly added");
|
995
|
-
}
|
996
|
-
const useFlagV = opts.force.v || (opts.disable.v ? false : flagVSupported);
|
997
|
-
opts.flags += useFlagV ? "v" : "u";
|
998
|
-
if (useFlagV) {
|
999
|
-
opts.unicodeSetsPlugin = null;
|
1000
|
-
}
|
1001
|
-
return opts;
|
1002
|
-
}
|
1003
|
-
function handlePreprocessors(template, substitutions, options) {
|
1004
|
-
const preprocessors = [];
|
1005
|
-
if (!options.disable.x) {
|
1006
|
-
preprocessors.push(flagXPreprocessor);
|
1007
|
-
}
|
1008
|
-
if (!options.disable.n) {
|
1009
|
-
preprocessors.push(flagNPreprocessor);
|
1010
|
-
}
|
1011
|
-
for (const pp of preprocessors) {
|
1012
|
-
({
|
1013
|
-
template,
|
1014
|
-
substitutions
|
1015
|
-
} = preprocess(template, substitutions, pp, options));
|
1016
|
-
}
|
1017
|
-
return {
|
1018
|
-
template,
|
1019
|
-
substitutions
|
1020
|
-
};
|
1021
|
-
}
|
1022
|
-
function handlePlugins(expression, options) {
|
1023
|
-
const {
|
1024
|
-
flags,
|
1025
|
-
plugins,
|
1026
|
-
unicodeSetsPlugin,
|
1027
|
-
disable,
|
1028
|
-
subclass
|
1029
|
-
} = options;
|
1030
|
-
[...plugins,
|
1031
|
-
// Run first, so provided plugins can output extended syntax
|
1032
|
-
...(disable.subroutines ? [] : [subroutinesPlugin]), ...(disable.atomic ? [] : [possessivePlugin, atomicPlugin]), ...(disable.x ? [] : [cleanPlugin]),
|
1033
|
-
// Run last, so it doesn't have to worry about parsing extended syntax
|
1034
|
-
...(!unicodeSetsPlugin ? [] : [unicodeSetsPlugin])].forEach(p => expression = p(expression, {
|
1035
|
-
flags,
|
1036
|
-
useEmulationGroups: subclass
|
1037
|
-
}));
|
1038
|
-
return expression;
|
1039
|
-
}
|
1040
|
-
|
1041
|
-
// node_modules/oniguruma-to-js/dist/shared/oniguruma-to-js.2969e22d.mjs
|
1042
|
-
var __defProp2 = Object.defineProperty;
|
1043
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, {
|
1044
|
-
enumerable: true,
|
1045
|
-
configurable: true,
|
1046
|
-
writable: true,
|
1047
|
-
value
|
1048
|
-
}) : obj[key] = value;
|
1049
|
-
var __publicField = (obj, key, value) => {
|
1050
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
1051
|
-
return value;
|
1052
|
-
};
|
1053
|
-
var RegExpConversionError = class extends SyntaxError {
|
1054
|
-
constructor(message, options) {
|
1055
|
-
super(message, {
|
1056
|
-
cause: options.cause
|
1057
|
-
});
|
1058
|
-
__publicField(this, "patternOriginal");
|
1059
|
-
__publicField(this, "patternConverted");
|
1060
|
-
__publicField(this, "cursorPosition");
|
1061
|
-
this.patternOriginal = options.pattern;
|
1062
|
-
this.patternConverted = options.converted;
|
1063
|
-
this.cursorPosition = options.cursor;
|
1064
|
-
}
|
1065
|
-
};
|
1066
|
-
var UNNECESSARY_ESCAPE_CHAR_CLASS = new Set("!?:=+$(){}_><# ");
|
1067
|
-
var UNNECESSARY_ESCAPE = new Set("-!:=_>< ");
|
1068
|
-
var TABLE_POSIX = {
|
1069
|
-
alnum: "0-9A-Za-z",
|
1070
|
-
alpha: "A-Za-z",
|
1071
|
-
ascii: "\0-\x7F",
|
1072
|
-
blank: " \\t",
|
1073
|
-
cntrl: "\0-\x7F",
|
1074
|
-
digit: "\\d",
|
1075
|
-
graph: "!-~",
|
1076
|
-
lower: "a-z",
|
1077
|
-
print: " -~",
|
1078
|
-
punct: "!-/:-@[-`{-~",
|
1079
|
-
space: "\\s",
|
1080
|
-
upper: "A-Z",
|
1081
|
-
xdigit: "0-9A-Fa-f",
|
1082
|
-
word: "\\w"
|
1083
|
-
};
|
1084
|
-
var TABLE_SLASH_P = {
|
1085
|
-
alnum: "0-9A-Za-z",
|
1086
|
-
alpha: "A-Za-z",
|
1087
|
-
alphabetic: "A-Za-z",
|
1088
|
-
blank: "\\s",
|
1089
|
-
greek: "\\p{Script=Greek}",
|
1090
|
-
print: "\\p{L}\\p{N}\\p{P}\\p{S}\\p{Zs}",
|
1091
|
-
word: "\\w"
|
1092
|
-
};
|
1093
|
-
var KNOWN_FLAGS = /* @__PURE__ */new Set("gimsuyx");
|
1094
|
-
function syntaxLowering(input, options = {}) {
|
1095
|
-
const {
|
1096
|
-
useRegex = false,
|
1097
|
-
preserveFlags = false,
|
1098
|
-
removePossessiveQuantifier = false,
|
1099
|
-
removeAtomicGroup = false,
|
1100
|
-
convertHexDigitsShorthand = false,
|
1101
|
-
convertUnicodeCategory = false,
|
1102
|
-
expandNestedCharacterClass = false
|
1103
|
-
} = options;
|
1104
|
-
let output = "";
|
1105
|
-
const flags = /* @__PURE__ */new Set();
|
1106
|
-
const stack = [];
|
1107
|
-
const freeSpacingLocal = [];
|
1108
|
-
let freeSpacingGlobal = false;
|
1109
|
-
let isInNestedCharClass = false;
|
1110
|
-
let i = 0;
|
1111
|
-
try {
|
1112
|
-
while (i < input.length) {
|
1113
|
-
const char = input[i];
|
1114
|
-
while (freeSpacingLocal.length && freeSpacingLocal[0] > stack.length) {
|
1115
|
-
freeSpacingLocal.shift();
|
1116
|
-
}
|
1117
|
-
const head = stack[0];
|
1118
|
-
const freeSpacing = freeSpacingGlobal || freeSpacingLocal.length;
|
1119
|
-
if (char === "\\") {
|
1120
|
-
if (convertHexDigitsShorthand) {
|
1121
|
-
if (input[i + 1] === "h") {
|
1122
|
-
const body = `0-9A-Fa-f`;
|
1123
|
-
if (head === "[") {
|
1124
|
-
output += body;
|
1125
|
-
} else {
|
1126
|
-
output += `[${body}]`;
|
1127
|
-
}
|
1128
|
-
i += 2;
|
1129
|
-
continue;
|
1130
|
-
}
|
1131
|
-
if (input[i + 1] === "H") {
|
1132
|
-
if (head === "[") {
|
1133
|
-
throw new RegExpConversionError("Expending \\H in character class is not supported", {
|
1134
|
-
pattern: input,
|
1135
|
-
converted: output,
|
1136
|
-
cursor: i
|
1137
|
-
});
|
1138
|
-
} else {
|
1139
|
-
output += `[^0-9A-Fa-f]`;
|
1140
|
-
}
|
1141
|
-
i += 2;
|
1142
|
-
continue;
|
1143
|
-
}
|
1144
|
-
}
|
1145
|
-
if (convertUnicodeCategory && input[i + 1] === "p" && input[i + 2] === "{") {
|
1146
|
-
const end = input.indexOf("}", i + 3);
|
1147
|
-
if (end === -1) {
|
1148
|
-
throw new RegExpConversionError("Unmatched \\p{...}", {
|
1149
|
-
pattern: input,
|
1150
|
-
converted: output,
|
1151
|
-
cursor: i
|
1152
|
-
});
|
1153
|
-
}
|
1154
|
-
const name = input.slice(i + 3, end);
|
1155
|
-
const resolved = TABLE_SLASH_P[name.toLowerCase()];
|
1156
|
-
if (resolved) {
|
1157
|
-
if (head === "[") {
|
1158
|
-
output += resolved;
|
1159
|
-
} else {
|
1160
|
-
output += `[${resolved}]`;
|
1161
|
-
}
|
1162
|
-
i = end + 1;
|
1163
|
-
continue;
|
1164
|
-
}
|
1165
|
-
}
|
1166
|
-
if (head === "[" && UNNECESSARY_ESCAPE_CHAR_CLASS.has(input[i + 1])) {
|
1167
|
-
output += input[i + 1];
|
1168
|
-
i += 2;
|
1169
|
-
continue;
|
1170
|
-
}
|
1171
|
-
if (head !== "[" && UNNECESSARY_ESCAPE.has(input[i + 1])) {
|
1172
|
-
output += input[i + 1];
|
1173
|
-
i += 2;
|
1174
|
-
continue;
|
1175
|
-
}
|
1176
|
-
output += char + input[i + 1];
|
1177
|
-
i += 2;
|
1178
|
-
continue;
|
1179
|
-
}
|
1180
|
-
if (char === "#" && freeSpacing && input[i - 1].match(/\s/) && head !== "[") {
|
1181
|
-
for (let j = i + 1; j <= input.length; j++) {
|
1182
|
-
if (input[j] === "\n" || j === input.length) {
|
1183
|
-
i = j;
|
1184
|
-
break;
|
1185
|
-
}
|
1186
|
-
}
|
1187
|
-
continue;
|
1188
|
-
}
|
1189
|
-
if (char === "(" && head !== "[") {
|
1190
|
-
if (input[i + 1] === "?") {
|
1191
|
-
if (input[i + 2] === "#") {
|
1192
|
-
for (let j = i + 3; j < input.length; j++) {
|
1193
|
-
if (input[j] === ")" && input[j - 1] !== "\\") {
|
1194
|
-
i = j + 1;
|
1195
|
-
break;
|
1196
|
-
}
|
1197
|
-
}
|
1198
|
-
continue;
|
1199
|
-
}
|
1200
|
-
if (removeAtomicGroup && input[i + 2] === ">") {
|
1201
|
-
output += "(?:";
|
1202
|
-
i += 3;
|
1203
|
-
continue;
|
1204
|
-
}
|
1205
|
-
if (KNOWN_FLAGS.has(input[i + 2])) {
|
1206
|
-
let end = i + 3;
|
1207
|
-
for (; end < input.length; end++) {
|
1208
|
-
if (!KNOWN_FLAGS.has(input[end])) break;
|
1209
|
-
}
|
1210
|
-
const flagStr2 = input.slice(i + 2, end);
|
1211
|
-
const hasX = flagStr2.includes("x") && flagStr2[0] !== "-";
|
1212
|
-
let remainFlags = [...flagStr2].filter(x => x !== "x").join("");
|
1213
|
-
if (!preserveFlags) {
|
1214
|
-
if (remainFlags[0] === "-") {
|
1215
|
-
remainFlags = remainFlags.slice(1);
|
1216
|
-
for (const flag of flagStr2) {
|
1217
|
-
flags.delete(flag);
|
1218
|
-
}
|
1219
|
-
} else {
|
1220
|
-
for (const flag of remainFlags) {
|
1221
|
-
flags.add(flag);
|
1222
|
-
}
|
1223
|
-
}
|
1224
|
-
remainFlags = "";
|
1225
|
-
}
|
1226
|
-
if (input[end] === ")") {
|
1227
|
-
i = end + 1;
|
1228
|
-
if (hasX) {
|
1229
|
-
freeSpacingGlobal = true;
|
1230
|
-
}
|
1231
|
-
if (remainFlags.length) {
|
1232
|
-
output += `(?${remainFlags})`;
|
1233
|
-
}
|
1234
|
-
continue;
|
1235
|
-
} else if (input[end] === ":") {
|
1236
|
-
i = end + 1;
|
1237
|
-
stack.unshift(char);
|
1238
|
-
if (hasX) {
|
1239
|
-
freeSpacingLocal.unshift(stack.length);
|
1240
|
-
}
|
1241
|
-
output += `(?${remainFlags}:`;
|
1242
|
-
continue;
|
1243
|
-
}
|
1244
|
-
}
|
1245
|
-
stack.unshift(char);
|
1246
|
-
output += char + input[i + 1] + input[i + 2];
|
1247
|
-
i += 3;
|
1248
|
-
} else {
|
1249
|
-
stack.unshift(char);
|
1250
|
-
output += char;
|
1251
|
-
i += 1;
|
1252
|
-
}
|
1253
|
-
continue;
|
1254
|
-
}
|
1255
|
-
if (char === ")" && head !== "[") {
|
1256
|
-
if (head === "(") stack.shift();
|
1257
|
-
output += char;
|
1258
|
-
i += 1;
|
1259
|
-
continue;
|
1260
|
-
}
|
1261
|
-
if (char === "[") {
|
1262
|
-
if (input[i + 1] === ":") {
|
1263
|
-
let name = "";
|
1264
|
-
let negated = false;
|
1265
|
-
if (input[i + 2] === "^") {
|
1266
|
-
negated = true;
|
1267
|
-
i += 1;
|
1268
|
-
}
|
1269
|
-
for (let j = i + 2; j < input.length; j++) {
|
1270
|
-
if (input[j] === ":") {
|
1271
|
-
i = j + 2;
|
1272
|
-
break;
|
1273
|
-
}
|
1274
|
-
if (!input[j].match(/[a-z]/i)) {
|
1275
|
-
name = "";
|
1276
|
-
break;
|
1277
|
-
}
|
1278
|
-
name += input[j];
|
1279
|
-
}
|
1280
|
-
if (name) {
|
1281
|
-
let resolved = TABLE_POSIX[name];
|
1282
|
-
if (!resolved) {
|
1283
|
-
throw new RegExpConversionError(`Unknown posix class "${name}"`, {
|
1284
|
-
pattern: input,
|
1285
|
-
converted: output,
|
1286
|
-
cursor: i
|
1287
|
-
});
|
1288
|
-
}
|
1289
|
-
if (negated) resolved = `^${resolved}`;
|
1290
|
-
if (head === "[") output += resolved;else output += `[${resolved}]`;
|
1291
|
-
continue;
|
1292
|
-
}
|
1293
|
-
}
|
1294
|
-
if (head !== "[") {
|
1295
|
-
stack.unshift(char);
|
1296
|
-
}
|
1297
|
-
if (head === "[" && expandNestedCharacterClass) {
|
1298
|
-
isInNestedCharClass = true;
|
1299
|
-
i += 1;
|
1300
|
-
if (input[i] === "-") {
|
1301
|
-
output += "\\-";
|
1302
|
-
i += 1;
|
1303
|
-
}
|
1304
|
-
continue;
|
1305
|
-
}
|
1306
|
-
output += char;
|
1307
|
-
i += 1;
|
1308
|
-
continue;
|
1309
|
-
}
|
1310
|
-
if (char === "]") {
|
1311
|
-
if (isInNestedCharClass) {
|
1312
|
-
isInNestedCharClass = false;
|
1313
|
-
i += 1;
|
1314
|
-
continue;
|
1315
|
-
}
|
1316
|
-
if (head === "[") stack.shift();
|
1317
|
-
output += char;
|
1318
|
-
i += 1;
|
1319
|
-
continue;
|
1320
|
-
}
|
1321
|
-
if (removePossessiveQuantifier && char === "+" && head !== "[") {
|
1322
|
-
if ("?+}*".includes(input[i - 1])) {
|
1323
|
-
i += 1;
|
1324
|
-
continue;
|
1325
|
-
}
|
1326
|
-
}
|
1327
|
-
if (char === "*" && head !== "[" && input[i - 1] === "|" && input[i - 2] !== "\\") {
|
1328
|
-
output += "\\";
|
1329
|
-
}
|
1330
|
-
if (!(freeSpacing && head !== "[" && char.match(/\s/))) {
|
1331
|
-
output += char;
|
1332
|
-
}
|
1333
|
-
i += 1;
|
1334
|
-
}
|
1335
|
-
} catch (e) {
|
1336
|
-
if (e instanceof RegExpConversionError) throw e;
|
1337
|
-
throw new RegExpConversionError(`Error lowering regex at position ${i}`, {
|
1338
|
-
pattern: input,
|
1339
|
-
converted: output,
|
1340
|
-
cursor: i,
|
1341
|
-
cause: e
|
1342
|
-
});
|
1343
|
-
}
|
1344
|
-
const flagStr = [...flags].join("");
|
1345
|
-
if (useRegex) {
|
1346
|
-
output = rewrite(output, {
|
1347
|
-
flags: flagStr,
|
1348
|
-
unicodeSetsPlugin: null,
|
1349
|
-
disable: {
|
1350
|
-
n: true,
|
1351
|
-
v: true,
|
1352
|
-
x: true
|
1353
|
-
}
|
1354
|
-
}).expression;
|
1355
|
-
}
|
1356
|
-
return {
|
1357
|
-
pattern: output,
|
1358
|
-
flags: flagStr
|
1359
|
-
};
|
1360
|
-
}
|
1361
|
-
|
1362
|
-
// node_modules/oniguruma-to-js/dist/index.mjs
|
1363
|
-
function construct(pattern2, options = {}) {
|
1364
|
-
const {
|
1365
|
-
original = pattern2,
|
1366
|
-
flags = ["g"]
|
1367
|
-
} = options;
|
1368
|
-
if (pattern2.startsWith("(?x)") || pattern2.includes("(?x:")) {
|
1369
|
-
throw new RegExpConversionError("RegExp Free-spacing mode `(?x)` is not supported, you might want to run syntaxLowering() first", {
|
1370
|
-
pattern: original,
|
1371
|
-
converted: pattern2
|
1372
|
-
});
|
1373
|
-
}
|
1374
|
-
if (pattern2.match(/\[:\w+:\]/)) {
|
1375
|
-
throw new RegExpConversionError("POSIX character classes are not supported, you might want to run syntaxLowering() first", {
|
1376
|
-
pattern: original,
|
1377
|
-
converted: pattern2
|
1378
|
-
});
|
1379
|
-
}
|
1380
|
-
const flagSet = new Set(Array.isArray(flags) ? flags : flags.split(""));
|
1381
|
-
if (pattern2.includes("\\p{")) flagSet.add("u");
|
1382
|
-
pattern2 = pattern2.replace(/\\A/g, "^").replace(/\\Z/g, "(?=\\n?$)").replace(/\\z/g, "$").replace(/\\x\{([^}]*)\}/g, (m, hex) => `\\u${hex.padStart(4, "0")}`).replace(/\(\?(-)?(\w+):/g, (_, neg, flagStr) => {
|
1383
|
-
if (neg) {
|
1384
|
-
for (const flag of flagStr) flagSet.delete(flag);
|
1385
|
-
} else {
|
1386
|
-
for (const flag of flagStr) flagSet.add(flag);
|
1387
|
-
}
|
1388
|
-
return "(?:";
|
1389
|
-
}).replace(/\(\?(-)?(\w+)\)/g, (_, neg, flags2) => {
|
1390
|
-
if (neg) {
|
1391
|
-
for (const flag of flags2) flagSet.delete(flag);
|
1392
|
-
} else {
|
1393
|
-
for (const flag of flags2) flagSet.add(flag);
|
1394
|
-
}
|
1395
|
-
return "";
|
1396
|
-
});
|
1397
|
-
if (options.ignoreContiguousAnchors) {
|
1398
|
-
if (pattern2.includes("\\G")) {
|
1399
|
-
flagSet.add("y");
|
1400
|
-
}
|
1401
|
-
if (pattern2.startsWith("\\G")) {
|
1402
|
-
pattern2 = pattern2.slice(2);
|
1403
|
-
}
|
1404
|
-
pattern2 = pattern2.replace(/\|\\G(\||\))/g, "$1").replace(/(\(|\|)\\G\|/g, "$1").replace(/\\G/g, "");
|
1405
|
-
}
|
1406
|
-
if (flagSet.has("x")) {
|
1407
|
-
throw new RegExpConversionError("JavaScript does not support extended mode (x flag), you might want to run syntaxLowering() first", {
|
1408
|
-
pattern: original,
|
1409
|
-
converted: pattern2
|
1410
|
-
});
|
1411
|
-
}
|
1412
|
-
try {
|
1413
|
-
return new RegExp(pattern2, [...flagSet].join(""));
|
1414
|
-
} catch (e) {
|
1415
|
-
throw new RegExpConversionError(`Failed to construct RegExp`, {
|
1416
|
-
pattern: original,
|
1417
|
-
converted: pattern2,
|
1418
|
-
cause: e
|
1419
|
-
});
|
1420
|
-
}
|
1421
|
-
}
|
1422
|
-
function onigurumaToRegexp(pattern2, options = {}) {
|
1423
|
-
const {
|
1424
|
-
pattern: converted,
|
1425
|
-
flags
|
1426
|
-
} = syntaxLowering(pattern2, {
|
1427
|
-
// removePossessiveQuantifier: false,
|
1428
|
-
// removeAtomicGroup: false,
|
1429
|
-
convertHexDigitsShorthand: true,
|
1430
|
-
convertUnicodeCategory: true,
|
1431
|
-
useRegex: true,
|
1432
|
-
expandNestedCharacterClass: true,
|
1433
|
-
...options
|
1434
|
-
});
|
1435
|
-
return construct(converted, {
|
1436
|
-
original: pattern2,
|
1437
|
-
...options,
|
1438
|
-
flags: [... /* @__PURE__ */new Set([...flags, ...(options.flags || [])])].join("")
|
1439
|
-
});
|
1440
|
-
}
|
1441
|
-
|
1442
|
-
// node_modules/@shikijs/engine-javascript/dist/index.mjs
|
1443
|
-
var replacements = [["(?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])", "(?<square>[^\\[\\]\\\\]|\\\\.|\\[(?:[^\\[\\]\\\\]|\\\\.|\\[(?:[^\\[\\]\\\\]|\\\\.|\\[(?:[^\\[\\]\\\\])*+\\])*+\\])*+\\])"], ["(?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))", "(?<url>(?>[^\\s()]+)|\\((?:(?>[^\\s()]+)|\\((?:(?>[^\\s()]+)|\\((?>[^\\s()]+)*\\))*\\))*\\))"]];
|
1444
|
-
var __defProp3 = Object.defineProperty;
|
1445
|
-
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp3(obj, key, {
|
1446
|
-
enumerable: true,
|
1447
|
-
configurable: true,
|
1448
|
-
writable: true,
|
1449
|
-
value
|
1450
|
-
}) : obj[key] = value;
|
1451
|
-
var __publicField2 = (obj, key, value) => {
|
1452
|
-
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
1453
|
-
return value;
|
1454
|
-
};
|
1455
|
-
var MAX = 4294967295;
|
1456
|
-
function defaultJavaScriptRegexConstructor(pattern2) {
|
1457
|
-
return onigurumaToRegexp(pattern2, {
|
1458
|
-
flags: "dgm",
|
1459
|
-
ignoreContiguousAnchors: true
|
1460
|
-
});
|
1461
|
-
}
|
1462
|
-
var JavaScriptScanner = class {
|
1463
|
-
constructor(patterns, options = {}) {
|
1464
|
-
this.patterns = patterns;
|
1465
|
-
this.options = options;
|
1466
|
-
__publicField2(this, "regexps");
|
1467
|
-
__publicField2(this, "contiguousAnchorSimulation");
|
1468
|
-
const {
|
1469
|
-
forgiving = false,
|
1470
|
-
cache,
|
1471
|
-
simulation = true,
|
1472
|
-
regexConstructor = defaultJavaScriptRegexConstructor
|
1473
|
-
} = options;
|
1474
|
-
this.contiguousAnchorSimulation = Array.from({
|
1475
|
-
length: patterns.length
|
1476
|
-
}, () => false);
|
1477
|
-
this.regexps = patterns.map((p, idx) => {
|
1478
|
-
if (simulation) p = p.replaceAll("(^|\\\uFFFF)", "(^|\\G)");
|
1479
|
-
if (simulation && (p.startsWith("(^|\\G)") || p.startsWith("(\\G|^)"))) this.contiguousAnchorSimulation[idx] = true;
|
1480
|
-
const cached = cache?.get(p);
|
1481
|
-
if (cached) {
|
1482
|
-
if (cached instanceof RegExp) {
|
1483
|
-
return cached;
|
1484
|
-
}
|
1485
|
-
if (forgiving) return null;
|
1486
|
-
throw cached;
|
1487
|
-
}
|
1488
|
-
try {
|
1489
|
-
let pattern2 = p;
|
1490
|
-
if (simulation) {
|
1491
|
-
for (const [from, to] of replacements) {
|
1492
|
-
pattern2 = pattern2.replaceAll(from, to);
|
1493
|
-
}
|
1494
|
-
}
|
1495
|
-
const regex = regexConstructor(pattern2);
|
1496
|
-
cache?.set(p, regex);
|
1497
|
-
return regex;
|
1498
|
-
} catch (e) {
|
1499
|
-
cache?.set(p, e);
|
1500
|
-
if (forgiving) return null;
|
1501
|
-
throw e;
|
1502
|
-
}
|
1503
|
-
});
|
1504
|
-
}
|
1505
|
-
findNextMatchSync(string, startPosition) {
|
1506
|
-
const str = typeof string === "string" ? string : string.content;
|
1507
|
-
const pending = [];
|
1508
|
-
function toResult(index, match, offset = 0) {
|
1509
|
-
return {
|
1510
|
-
index,
|
1511
|
-
captureIndices: match.indices.map(indice => {
|
1512
|
-
if (indice == null) {
|
1513
|
-
return {
|
1514
|
-
end: MAX,
|
1515
|
-
start: MAX,
|
1516
|
-
length: 0
|
1517
|
-
};
|
1518
|
-
}
|
1519
|
-
return {
|
1520
|
-
start: indice[0] + offset,
|
1521
|
-
length: indice[1] - indice[0],
|
1522
|
-
end: indice[1] + offset
|
1523
|
-
};
|
1524
|
-
})
|
1525
|
-
};
|
1526
|
-
}
|
1527
|
-
for (let i = 0; i < this.regexps.length; i++) {
|
1528
|
-
const regexp = this.regexps[i];
|
1529
|
-
if (!regexp) continue;
|
1530
|
-
try {
|
1531
|
-
let offset = 0;
|
1532
|
-
regexp.lastIndex = startPosition;
|
1533
|
-
let match = regexp.exec(str);
|
1534
|
-
if (!match && this.contiguousAnchorSimulation[i]) {
|
1535
|
-
offset = startPosition;
|
1536
|
-
regexp.lastIndex = 0;
|
1537
|
-
match = regexp.exec(str.slice(startPosition));
|
1538
|
-
}
|
1539
|
-
if (!match) continue;
|
1540
|
-
if (match.index === startPosition) {
|
1541
|
-
return toResult(i, match, offset);
|
1542
|
-
}
|
1543
|
-
pending.push([i, match, offset]);
|
1544
|
-
} catch (e) {
|
1545
|
-
if (this.options.forgiving) continue;
|
1546
|
-
throw e;
|
1547
|
-
}
|
1548
|
-
}
|
1549
|
-
if (pending.length) {
|
1550
|
-
const minIndex = Math.min(...pending.map(m => m[1].index));
|
1551
|
-
for (const [i, match, offset] of pending) {
|
1552
|
-
if (match.index === minIndex) {
|
1553
|
-
return toResult(i, match, offset);
|
1554
|
-
}
|
1555
|
-
}
|
1556
|
-
}
|
1557
|
-
return null;
|
1558
|
-
}
|
1559
|
-
};
|
1560
|
-
function createJavaScriptRegexEngine(options = {}) {
|
1561
|
-
const _options = {
|
1562
|
-
cache: /* @__PURE__ */new Map(),
|
1563
|
-
...options
|
1564
|
-
};
|
1565
|
-
return {
|
1566
|
-
createScanner(patterns) {
|
1567
|
-
return new JavaScriptScanner(patterns, _options);
|
1568
|
-
},
|
1569
|
-
createString(s) {
|
1570
|
-
return {
|
1571
|
-
content: s
|
1572
|
-
};
|
1573
|
-
}
|
1574
|
-
};
|
1575
|
-
}
|
1576
|
-
// Annotate the CommonJS export names for ESM import in node:
|
1577
|
-
0 && (module.exports = {
|
1578
|
-
JavaScriptScanner,
|
1579
|
-
createJavaScriptRegexEngine,
|
1580
|
-
defaultJavaScriptRegexConstructor
|
1581
|
-
});
|
74
|
+
`.replace(/\s+/g,""),"gsu");function backcompatPlugin(expression){var unescapedLiteralHyphenMsg='Invalid unescaped "-" in character class';var inCharClass=false;var result="";for(var _ref9 of expression.matchAll(token4)){var m=_ref9[0];var _ref9$groups=_ref9.groups;var dp=_ref9$groups.dp;var vOnlyEscape=_ref9$groups.vOnlyEscape;if(m[0]==="["){if(inCharClass){throw new Error("Invalid nested character class when flag v not supported; possibly from interpolation");}if(m.endsWith("-")){throw new Error(unescapedLiteralHyphenMsg);}inCharClass=true;}else if(m.endsWith("]")){if(m[0]==="-"){throw new Error(unescapedLiteralHyphenMsg);}inCharClass=false;}else if(inCharClass){if(m==="&&"||m==="--"){throw new Error(`Invalid set operator "${m}" when flag v not supported`);}else if(dp){throw new Error(`Invalid double punctuator "${m}", reserved by flag v`);}else if("(){}/|".includes(m)){throw new Error(`Invalid unescaped "${m}" in character class`);}else if(vOnlyEscape){result+=vOnlyEscape;continue;}}result+=m;}return result;}function rewrite(){var expression=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var opts=getOptions(options);if(opts.subclass){throw new Error("Cannot use option subclass");}return{expression:handlePlugins(handlePreprocessors({raw:[expression]},[],opts).template.raw[0],opts),flags:opts.flags};}function getOptions(options){var opts=Object.assign({flags:"",subclass:false,plugins:[],unicodeSetsPlugin:backcompatPlugin,disable:{},force:{}},options);if(/[nuvx]/.test(opts.flags)){throw new Error("Implicit flags v/u/x/n cannot be explicitly added");}var useFlagV=opts.force.v||(opts.disable.v?false:flagVSupported);opts.flags+=useFlagV?"v":"u";if(useFlagV){opts.unicodeSetsPlugin=null;}return opts;}function handlePreprocessors(template,substitutions,options){var preprocessors=[];if(!options.disable.x){preprocessors.push(flagXPreprocessor);}if(!options.disable.n){preprocessors.push(flagNPreprocessor);}for(var pp of preprocessors){var _preprocess=preprocess(template,substitutions,pp,options);template=_preprocess.template;substitutions=_preprocess.substitutions;}return{template:template,substitutions:substitutions};}function handlePlugins(expression,options){var flags=options.flags,plugins=options.plugins,unicodeSetsPlugin=options.unicodeSetsPlugin,disable=options.disable,subclass=options.subclass;[].concat((0,_toConsumableArray2.default)(plugins),(0,_toConsumableArray2.default)(disable.subroutines?[]:[subroutinesPlugin]),(0,_toConsumableArray2.default)(disable.atomic?[]:[possessivePlugin,atomicPlugin]),(0,_toConsumableArray2.default)(disable.x?[]:[cleanPlugin]),(0,_toConsumableArray2.default)(!unicodeSetsPlugin?[]:[unicodeSetsPlugin])).forEach(function(p){return expression=p(expression,{flags:flags,useEmulationGroups:subclass});});return expression;}var __defProp2=Object.defineProperty;var __defNormalProp=function __defNormalProp(obj,key,value){return key in obj?__defProp2(obj,key,{enumerable:true,configurable:true,writable:true,value:value}):obj[key]=value;};var __publicField=function __publicField(obj,key,value){__defNormalProp(obj,typeof key!=="symbol"?key+"":key,value);return value;};var RegExpConversionError=function(_SyntaxError){function RegExpConversionError(message,options){var _this;(0,_classCallCheck2.default)(this,RegExpConversionError);_this=_callSuper(this,RegExpConversionError,[message,{cause:options.cause}]);__publicField(_this,"patternOriginal");__publicField(_this,"patternConverted");__publicField(_this,"cursorPosition");_this.patternOriginal=options.pattern;_this.patternConverted=options.converted;_this.cursorPosition=options.cursor;return _this;}(0,_inherits2.default)(RegExpConversionError,_SyntaxError);return(0,_createClass2.default)(RegExpConversionError);}((0,_wrapNativeSuper2.default)(SyntaxError));var UNNECESSARY_ESCAPE_CHAR_CLASS=new Set("!?:=+$(){}_><# ");var UNNECESSARY_ESCAPE=new Set("-!:=_>< ");var TABLE_POSIX={alnum:"0-9A-Za-z",alpha:"A-Za-z",ascii:"\0-\x7F",blank:" \\t",cntrl:"\0-\x7F",digit:"\\d",graph:"!-~",lower:"a-z",print:" -~",punct:"!-/:-@[-`{-~",space:"\\s",upper:"A-Z",xdigit:"0-9A-Fa-f",word:"\\w"};var TABLE_SLASH_P={alnum:"0-9A-Za-z",alpha:"A-Za-z",alphabetic:"A-Za-z",blank:"\\s",greek:"\\p{Script=Greek}",print:"\\p{L}\\p{N}\\p{P}\\p{S}\\p{Zs}",word:"\\w"};var KNOWN_FLAGS=new Set("gimsuyx");function syntaxLowering(input){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _options$useRegex=options.useRegex,useRegex=_options$useRegex===void 0?false:_options$useRegex,_options$preserveFlag=options.preserveFlags,preserveFlags=_options$preserveFlag===void 0?false:_options$preserveFlag,_options$removePosses=options.removePossessiveQuantifier,removePossessiveQuantifier=_options$removePosses===void 0?false:_options$removePosses,_options$removeAtomic=options.removeAtomicGroup,removeAtomicGroup=_options$removeAtomic===void 0?false:_options$removeAtomic,_options$convertHexDi=options.convertHexDigitsShorthand,convertHexDigitsShorthand=_options$convertHexDi===void 0?false:_options$convertHexDi,_options$convertUnico=options.convertUnicodeCategory,convertUnicodeCategory=_options$convertUnico===void 0?false:_options$convertUnico,_options$expandNested=options.expandNestedCharacterClass,expandNestedCharacterClass=_options$expandNested===void 0?false:_options$expandNested;var output="";var flags=new Set();var stack=[];var freeSpacingLocal=[];var freeSpacingGlobal=false;var isInNestedCharClass=false;var i=0;try{while(i<input.length){var char=input[i];while(freeSpacingLocal.length&&freeSpacingLocal[0]>stack.length){freeSpacingLocal.shift();}var head=stack[0];var freeSpacing=freeSpacingGlobal||freeSpacingLocal.length;if(char==="\\"){if(convertHexDigitsShorthand){if(input[i+1]==="h"){var body=`0-9A-Fa-f`;if(head==="["){output+=body;}else{output+=`[${body}]`;}i+=2;continue;}if(input[i+1]==="H"){if(head==="["){throw new RegExpConversionError("Expending \\H in character class is not supported",{pattern:input,converted:output,cursor:i});}else{output+=`[^0-9A-Fa-f]`;}i+=2;continue;}}if(convertUnicodeCategory&&input[i+1]==="p"&&input[i+2]==="{"){var end=input.indexOf("}",i+3);if(end===-1){throw new RegExpConversionError("Unmatched \\p{...}",{pattern:input,converted:output,cursor:i});}var name=input.slice(i+3,end);var resolved=TABLE_SLASH_P[name.toLowerCase()];if(resolved){if(head==="["){output+=resolved;}else{output+=`[${resolved}]`;}i=end+1;continue;}}if(head==="["&&UNNECESSARY_ESCAPE_CHAR_CLASS.has(input[i+1])){output+=input[i+1];i+=2;continue;}if(head!=="["&&UNNECESSARY_ESCAPE.has(input[i+1])){output+=input[i+1];i+=2;continue;}output+=char+input[i+1];i+=2;continue;}if(char==="#"&&freeSpacing&&input[i-1].match(/\s/)&&head!=="["){for(var j=i+1;j<=input.length;j++){if(input[j]==="\n"||j===input.length){i=j;break;}}continue;}if(char==="("&&head!=="["){if(input[i+1]==="?"){if(input[i+2]==="#"){for(var _j=i+3;_j<input.length;_j++){if(input[_j]===")"&&input[_j-1]!=="\\"){i=_j+1;break;}}continue;}if(removeAtomicGroup&&input[i+2]===">"){output+="(?:";i+=3;continue;}if(KNOWN_FLAGS.has(input[i+2])){var _end=i+3;for(;_end<input.length;_end++){if(!KNOWN_FLAGS.has(input[_end]))break;}var flagStr2=input.slice(i+2,_end);var hasX=flagStr2.includes("x")&&flagStr2[0]!=="-";var remainFlags=(0,_toConsumableArray2.default)(flagStr2).filter(function(x){return x!=="x";}).join("");if(!preserveFlags){if(remainFlags[0]==="-"){remainFlags=remainFlags.slice(1);for(var flag of flagStr2){flags.delete(flag);}}else{for(var _flag of remainFlags){flags.add(_flag);}}remainFlags="";}if(input[_end]===")"){i=_end+1;if(hasX){freeSpacingGlobal=true;}if(remainFlags.length){output+=`(?${remainFlags})`;}continue;}else if(input[_end]===":"){i=_end+1;stack.unshift(char);if(hasX){freeSpacingLocal.unshift(stack.length);}output+=`(?${remainFlags}:`;continue;}}stack.unshift(char);output+=char+input[i+1]+input[i+2];i+=3;}else{stack.unshift(char);output+=char;i+=1;}continue;}if(char===")"&&head!=="["){if(head==="(")stack.shift();output+=char;i+=1;continue;}if(char==="["){if(input[i+1]===":"){var _name="";var negated=false;if(input[i+2]==="^"){negated=true;i+=1;}for(var _j2=i+2;_j2<input.length;_j2++){if(input[_j2]===":"){i=_j2+2;break;}if(!input[_j2].match(/[a-z]/i)){_name="";break;}_name+=input[_j2];}if(_name){var _resolved=TABLE_POSIX[_name];if(!_resolved){throw new RegExpConversionError(`Unknown posix class "${_name}"`,{pattern:input,converted:output,cursor:i});}if(negated)_resolved=`^${_resolved}`;if(head==="[")output+=_resolved;else output+=`[${_resolved}]`;continue;}}if(head!=="["){stack.unshift(char);}if(head==="["&&expandNestedCharacterClass){isInNestedCharClass=true;i+=1;if(input[i]==="-"){output+="\\-";i+=1;}continue;}output+=char;i+=1;continue;}if(char==="]"){if(isInNestedCharClass){isInNestedCharClass=false;i+=1;continue;}if(head==="[")stack.shift();output+=char;i+=1;continue;}if(removePossessiveQuantifier&&char==="+"&&head!=="["){if("?+}*".includes(input[i-1])){i+=1;continue;}}if(char==="*"&&head!=="["&&input[i-1]==="|"&&input[i-2]!=="\\"){output+="\\";}if(!(freeSpacing&&head!=="["&&char.match(/\s/))){output+=char;}i+=1;}}catch(e){if(e instanceof RegExpConversionError)throw e;throw new RegExpConversionError(`Error lowering regex at position ${i}`,{pattern:input,converted:output,cursor:i,cause:e});}var flagStr=(0,_toConsumableArray2.default)(flags).join("");if(useRegex){output=rewrite(output,{flags:flagStr,unicodeSetsPlugin:null,disable:{n:true,v:true,x:true}}).expression;}return{pattern:output,flags:flagStr};}function construct(pattern2){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _options$original=options.original,original=_options$original===void 0?pattern2:_options$original,_options$flags=options.flags,flags=_options$flags===void 0?["g"]:_options$flags;if(pattern2.startsWith("(?x)")||pattern2.includes("(?x:")){throw new RegExpConversionError("RegExp Free-spacing mode `(?x)` is not supported, you might want to run syntaxLowering() first",{pattern:original,converted:pattern2});}if(pattern2.match(/\[:\w+:\]/)){throw new RegExpConversionError("POSIX character classes are not supported, you might want to run syntaxLowering() first",{pattern:original,converted:pattern2});}var flagSet=new Set(Array.isArray(flags)?flags:flags.split(""));if(pattern2.includes("\\p{"))flagSet.add("u");pattern2=pattern2.replace(/\\A/g,"^").replace(/\\Z/g,"(?=\\n?$)").replace(/\\z/g,"$").replace(/\\x\{([^}]*)\}/g,function(m,hex){return`\\u${hex.padStart(4,"0")}`;}).replace(/\(\?(-)?(\w+):/g,function(_,neg,flagStr){if(neg){for(var flag of flagStr)flagSet.delete(flag);}else{for(var _flag2 of flagStr)flagSet.add(_flag2);}return"(?:";}).replace(/\(\?(-)?(\w+)\)/g,function(_,neg,flags2){if(neg){for(var flag of flags2)flagSet.delete(flag);}else{for(var _flag3 of flags2)flagSet.add(_flag3);}return"";});if(options.ignoreContiguousAnchors){if(pattern2.includes("\\G")){flagSet.add("y");}if(pattern2.startsWith("\\G")){pattern2=pattern2.slice(2);}pattern2=pattern2.replace(/\|\\G(\||\))/g,"$1").replace(/(\(|\|)\\G\|/g,"$1").replace(/\\G/g,"");}if(flagSet.has("x")){throw new RegExpConversionError("JavaScript does not support extended mode (x flag), you might want to run syntaxLowering() first",{pattern:original,converted:pattern2});}try{return new RegExp(pattern2,(0,_toConsumableArray2.default)(flagSet).join(""));}catch(e){throw new RegExpConversionError(`Failed to construct RegExp`,{pattern:original,converted:pattern2,cause:e});}}function onigurumaToRegexp(pattern2){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _syntaxLowering=syntaxLowering(pattern2,Object.assign({convertHexDigitsShorthand:true,convertUnicodeCategory:true,useRegex:true,expandNestedCharacterClass:true},options)),converted=_syntaxLowering.pattern,flags=_syntaxLowering.flags;return construct(converted,Object.assign({original:pattern2},options,{flags:(0,_toConsumableArray2.default)(new Set([].concat((0,_toConsumableArray2.default)(flags),(0,_toConsumableArray2.default)(options.flags||[])))).join("")}));}var replacements=[["(?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])","(?<square>[^\\[\\]\\\\]|\\\\.|\\[(?:[^\\[\\]\\\\]|\\\\.|\\[(?:[^\\[\\]\\\\]|\\\\.|\\[(?:[^\\[\\]\\\\])*+\\])*+\\])*+\\])"],["(?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))","(?<url>(?>[^\\s()]+)|\\((?:(?>[^\\s()]+)|\\((?:(?>[^\\s()]+)|\\((?>[^\\s()]+)*\\))*\\))*\\))"]];var __defProp3=Object.defineProperty;var __defNormalProp2=function __defNormalProp2(obj,key,value){return key in obj?__defProp3(obj,key,{enumerable:true,configurable:true,writable:true,value:value}):obj[key]=value;};var __publicField2=function __publicField2(obj,key,value){__defNormalProp2(obj,typeof key!=="symbol"?key+"":key,value);return value;};var MAX=4294967295;function _defaultJavaScriptRegexConstructor(pattern2){return onigurumaToRegexp(pattern2,{flags:"dgm",ignoreContiguousAnchors:true});}var _JavaScriptScanner=function(){function _JavaScriptScanner(patterns){var _this2=this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,_JavaScriptScanner);this.patterns=patterns;this.options=options;__publicField2(this,"regexps");__publicField2(this,"contiguousAnchorSimulation");var _options$forgiving=options.forgiving,forgiving=_options$forgiving===void 0?false:_options$forgiving,cache=options.cache,_options$simulation=options.simulation,simulation=_options$simulation===void 0?true:_options$simulation,_options$regexConstru=options.regexConstructor,regexConstructor=_options$regexConstru===void 0?_defaultJavaScriptRegexConstructor:_options$regexConstru;this.contiguousAnchorSimulation=Array.from({length:patterns.length},function(){return false;});this.regexps=patterns.map(function(p,idx){if(simulation)p=p.replaceAll("(^|\\\uFFFF)","(^|\\G)");if(simulation&&(p.startsWith("(^|\\G)")||p.startsWith("(\\G|^)")))_this2.contiguousAnchorSimulation[idx]=true;var cached=cache==null?void 0:cache.get(p);if(cached){if(cached instanceof RegExp){return cached;}if(forgiving)return null;throw cached;}try{var pattern2=p;if(simulation){for(var _ref10 of replacements){var _ref11=(0,_slicedToArray2.default)(_ref10,2);var from=_ref11[0];var to=_ref11[1];pattern2=pattern2.replaceAll(from,to);}}var regex=regexConstructor(pattern2);cache==null?void 0:cache.set(p,regex);return regex;}catch(e){cache==null?void 0:cache.set(p,e);if(forgiving)return null;throw e;}});}return(0,_createClass2.default)(_JavaScriptScanner,[{key:"findNextMatchSync",value:function findNextMatchSync(string,startPosition){var str=typeof string==="string"?string:string.content;var pending=[];function toResult(index,match){var offset=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return{index:index,captureIndices:match.indices.map(function(indice){if(indice==null){return{end:MAX,start:MAX,length:0};}return{start:indice[0]+offset,length:indice[1]-indice[0],end:indice[1]+offset};})};}for(var i=0;i<this.regexps.length;i++){var regexp=this.regexps[i];if(!regexp)continue;try{var offset=0;regexp.lastIndex=startPosition;var match=regexp.exec(str);if(!match&&this.contiguousAnchorSimulation[i]){offset=startPosition;regexp.lastIndex=0;match=regexp.exec(str.slice(startPosition));}if(!match)continue;if(match.index===startPosition){return toResult(i,match,offset);}pending.push([i,match,offset]);}catch(e){if(this.options.forgiving)continue;throw e;}}if(pending.length){var minIndex=Math.min.apply(Math,(0,_toConsumableArray2.default)(pending.map(function(m){return m[1].index;})));for(var _ref12 of pending){var _ref13=(0,_slicedToArray2.default)(_ref12,3);var _i=_ref13[0];var _match9=_ref13[1];var _offset=_ref13[2];if(_match9.index===minIndex){return toResult(_i,_match9,_offset);}}}return null;}}]);}();function _createJavaScriptRegexEngine(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var _options=Object.assign({cache:new Map()},options);return{createScanner:function createScanner(patterns){return new _JavaScriptScanner(patterns,_options);},createString:function createString(s){return{content:s};}};}0&&(module.exports={JavaScriptScanner:_JavaScriptScanner,createJavaScriptRegexEngine:_createJavaScriptRegexEngine,defaultJavaScriptRegexConstructor:_defaultJavaScriptRegexConstructor});
|
1582
75
|
//# sourceMappingURL=engine-javascript.js.map
|