@tangle-network/sandbox-ui 2.0.16 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/agent-stream-CBZ2fXJ2.d.ts +66 -0
- package/dist/code-view-BlhCS1SD.js +177 -0
- package/dist/globals.css +189 -150
- package/dist/hooks.d.ts +2 -139
- package/dist/hooks.js +2 -1
- package/dist/{index-BtR5Sc3u.d.ts → index-BnaVprN6.d.ts} +3 -66
- package/dist/index-D5Hig-j9.d.ts +155 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -4
- package/dist/{record-1OqtuwjP.js → record-Bqt1kE_Q.js} +1 -1
- package/dist/run/live.d.ts +10 -0
- package/dist/run/live.js +389 -0
- package/dist/run/record.js +1 -1
- package/dist/run.d.ts +2 -1
- package/dist/run.js +3 -2
- package/dist/runtime-viewer/AgentGraphCanvas-B74GN1o6-DC3EH_ss.js +8564 -0
- package/dist/runtime-viewer/abap-CJVxDCih.js +2 -0
- package/dist/runtime-viewer/actionscript-3-DxxSN0a_.js +2 -0
- package/dist/runtime-viewer/ada-Cl3FVDZo.js +2 -0
- package/dist/runtime-viewer/ahk-wK-qmFta.js +2 -0
- package/dist/runtime-viewer/ahk2-H2JA2Yl6.js +2 -0
- package/dist/runtime-viewer/andromeeda--b5O3zh8.js +134 -0
- package/dist/runtime-viewer/andromeeda-Gms6gP4X.js +3 -0
- package/dist/runtime-viewer/angular-html-rj1gmhWN.js +15 -0
- package/dist/runtime-viewer/angular-ts-Bqgem-S1.js +17 -0
- package/dist/runtime-viewer/apache-BUhlrTDV.js +2 -0
- package/dist/runtime-viewer/apex-BB9dj6FH.js +2 -0
- package/dist/runtime-viewer/apl-Bbo6_Uyo.js +15 -0
- package/dist/runtime-viewer/appendItems-Cd9l6s5M.js +709 -0
- package/dist/runtime-viewer/applescript-ADDjRuDN.js +2 -0
- package/dist/runtime-viewer/ara-qq1xXFYH.js +2 -0
- package/dist/runtime-viewer/asciidoc-DM4EX7__.js +2 -0
- package/dist/runtime-viewer/asm-BG-prohY.js +2 -0
- package/dist/runtime-viewer/astro-DLFBJCYZ.js +17 -0
- package/dist/runtime-viewer/aurora-x-9XZt7weA.js +3 -0
- package/dist/runtime-viewer/aurora-x-CUDrP6dl.js +148 -0
- package/dist/runtime-viewer/awk-CLViK1AN.js +2 -0
- package/dist/runtime-viewer/ayu-dark-Cn6mFqgG.js +3 -0
- package/dist/runtime-viewer/ayu-dark-KXkHEKeT.js +124 -0
- package/dist/runtime-viewer/ayu-light-CiMsj1GY.js +124 -0
- package/dist/runtime-viewer/ayu-light-DT1rcejT.js +3 -0
- package/dist/runtime-viewer/ayu-mirage-B9PABb6M.js +3 -0
- package/dist/runtime-viewer/ayu-mirage-D866knu2.js +124 -0
- package/dist/runtime-viewer/ballerina-CEQUp96R.js +2 -0
- package/dist/runtime-viewer/bash-CEf3P1Io.js +1 -0
- package/dist/runtime-viewer/bat-CZr3fv67.js +2 -0
- package/dist/runtime-viewer/beancount-VKRy3bBi.js +2 -0
- package/dist/runtime-viewer/berry-BwT4aLVg.js +2 -0
- package/dist/runtime-viewer/bibtex-CqljWi0V.js +2 -0
- package/dist/runtime-viewer/bicep-B4J9qq-Z.js +2 -0
- package/dist/runtime-viewer/bird2-aEHxasJz.js +2 -0
- package/dist/runtime-viewer/blade-CSrWCe1q.js +19 -0
- package/dist/runtime-viewer/bsl-BihRw6wC.js +4 -0
- package/dist/runtime-viewer/c-DqEbRro5.js +1 -0
- package/dist/runtime-viewer/c-nuWrC4_R.js +4 -0
- package/dist/runtime-viewer/c3-B1ecFreZ.js +2 -0
- package/dist/runtime-viewer/cadence-DRL7VEtm.js +2 -0
- package/dist/runtime-viewer/cairo-Mf356MxB.js +4 -0
- package/dist/runtime-viewer/catppuccin-frappe-CaZDpwbh.js +3 -0
- package/dist/runtime-viewer/catppuccin-frappe-D40A-eC-.js +253 -0
- package/dist/runtime-viewer/catppuccin-latte-BY0gIWQk.js +253 -0
- package/dist/runtime-viewer/catppuccin-latte-Cto1Jf_t.js +3 -0
- package/dist/runtime-viewer/catppuccin-macchiato-BshuwwL_.js +253 -0
- package/dist/runtime-viewer/catppuccin-macchiato-Da4JtJzk.js +3 -0
- package/dist/runtime-viewer/catppuccin-mocha-DDZ3zh14.js +253 -0
- package/dist/runtime-viewer/catppuccin-mocha-VxvWTjH_.js +3 -0
- package/dist/runtime-viewer/chapel-OTK-UUIg.js +4 -0
- package/dist/runtime-viewer/clarity-VQN67-z4.js +2 -0
- package/dist/runtime-viewer/clojure-CO3ptKNj.js +2 -0
- package/dist/runtime-viewer/cmake-Daw-aSZt.js +2 -0
- package/dist/runtime-viewer/cobol-Cf_qPd6-.js +9 -0
- package/dist/runtime-viewer/codeowners-RB6Ky2d_.js +2 -0
- package/dist/runtime-viewer/codeql-DWYIUtYc.js +2 -0
- package/dist/runtime-viewer/coffee-Ddb4DMEu.js +4 -0
- package/dist/runtime-viewer/common-lisp-Z5pdmE3i.js +2 -0
- package/dist/runtime-viewer/constants-BJYchxfN.js +3 -0
- package/dist/runtime-viewer/coq-JC5iWOqp.js +2 -0
- package/dist/runtime-viewer/core-CpUX80b1.js +3279 -0
- package/dist/runtime-viewer/cpp-ClbMDAkS.js +1 -0
- package/dist/runtime-viewer/cpp-DHh405em.js +15 -0
- package/dist/runtime-viewer/crystal-DO6lJkkC.js +17 -0
- package/dist/runtime-viewer/csharp-lEK6y4jq.js +2 -0
- package/dist/runtime-viewer/csharp-rZvb5Mvv.js +1 -0
- package/dist/runtime-viewer/css-CwgM346x.js +1 -0
- package/dist/runtime-viewer/css-D0s2ehNl.js +4 -0
- package/dist/runtime-viewer/csv-DDLVNpF_.js +2 -0
- package/dist/runtime-viewer/cue-D9icO3Iq.js +2 -0
- package/dist/runtime-viewer/cypher-CtaxHT1L.js +2 -0
- package/dist/runtime-viewer/d-D4yE5Vyh.js +2 -0
- package/dist/runtime-viewer/dark-plus-BrGvqa0b.js +132 -0
- package/dist/runtime-viewer/dark-plus-Fqa0GMhm.js +3 -0
- package/dist/runtime-viewer/dart-BQKGVcgZ.js +2 -0
- package/dist/runtime-viewer/dax-B_fglzFE.js +2 -0
- package/dist/runtime-viewer/desktop-D1YOnHEY.js +2 -0
- package/dist/runtime-viewer/diff-CiTjO3HD.js +1 -0
- package/dist/runtime-viewer/diff-Diuv0qGT.js +2 -0
- package/dist/runtime-viewer/docker-DbYJRRXH.js +4 -0
- package/dist/runtime-viewer/dockerfile-BFrtbjpQ.js +1 -0
- package/dist/runtime-viewer/dotenv-FA1qqDb1.js +2 -0
- package/dist/runtime-viewer/dracula-Btj3GSO9.js +3 -0
- package/dist/runtime-viewer/dracula-D8HPTJym.js +152 -0
- package/dist/runtime-viewer/dracula-soft-C8zQlEh_.js +102 -0
- package/dist/runtime-viewer/dracula-soft-D6LcM51i.js +3 -0
- package/dist/runtime-viewer/dream-maker-hpDz6By6.js +2 -0
- package/dist/runtime-viewer/edge-BB4FSmZo.js +11 -0
- package/dist/runtime-viewer/elixir-DuATaRNn.js +4 -0
- package/dist/runtime-viewer/elk.bundled-CqF3Dyp2.js +45979 -0
- package/dist/runtime-viewer/elm-82HhQ2nm.js +4 -0
- package/dist/runtime-viewer/emacs-lisp-C5QNYC99.js +2 -0
- package/dist/runtime-viewer/engine-javascript-0MH9JO7M.js +2372 -0
- package/dist/runtime-viewer/engine-oniguruma-7Bv9BGGj.js +237 -0
- package/dist/runtime-viewer/erb-YvvBNDWy.js +9 -0
- package/dist/runtime-viewer/erlang-X9awClOJ.js +4 -0
- package/dist/runtime-viewer/everforest-dark-CzXjGmbf.js +3 -0
- package/dist/runtime-viewer/everforest-dark-DPX_5Sj-.js +86 -0
- package/dist/runtime-viewer/everforest-light-BMqXq4Th.js +3 -0
- package/dist/runtime-viewer/everforest-light-D1PD4A7K.js +86 -0
- package/dist/runtime-viewer/fennel-f1xl4Q05.js +2 -0
- package/dist/runtime-viewer/fish-99YblEc7.js +2 -0
- package/dist/runtime-viewer/fluent-4LP_8ZRP.js +2 -0
- package/dist/runtime-viewer/formatCSSVariablePrefix-Dw8K8---.js +5 -0
- package/dist/runtime-viewer/fortran-fixed-form-CXgWKejO.js +4 -0
- package/dist/runtime-viewer/fortran-free-form-BJnwWphW.js +2 -0
- package/dist/runtime-viewer/fsharp-lb4HOh0M.js +4 -0
- package/dist/runtime-viewer/gdresource-B4QpWOUk.js +9 -0
- package/dist/runtime-viewer/gdscript-Dc0nUXdB.js +2 -0
- package/dist/runtime-viewer/gdshader-D7XodLZw.js +2 -0
- package/dist/runtime-viewer/genie-ufotYGgo.js +2 -0
- package/dist/runtime-viewer/gherkin-TDn2lJS-.js +2 -0
- package/dist/runtime-viewer/git-commit-Cp1Pt-h7.js +4 -0
- package/dist/runtime-viewer/git-rebase-CXUuGQB4.js +4 -0
- package/dist/runtime-viewer/github-dark-BsaUiyss.js +129 -0
- package/dist/runtime-viewer/github-dark-CzJ4LJRs.js +3 -0
- package/dist/runtime-viewer/github-dark-default-C6vmm66I.js +3 -0
- package/dist/runtime-viewer/github-dark-default-DHpmzBTU.js +75 -0
- package/dist/runtime-viewer/github-dark-dimmed-Bg7ahiYc.js +124 -0
- package/dist/runtime-viewer/github-dark-dimmed-CntRzgqu.js +3 -0
- package/dist/runtime-viewer/github-dark-high-contrast-BP5LnlnO.js +124 -0
- package/dist/runtime-viewer/github-dark-high-contrast-gviVHGeU.js +3 -0
- package/dist/runtime-viewer/github-light-2Z3gmJhd.js +3 -0
- package/dist/runtime-viewer/github-light-BAncjKrl.js +129 -0
- package/dist/runtime-viewer/github-light-default-kDVra9RT.js +124 -0
- package/dist/runtime-viewer/github-light-default-qgi3RC4t.js +3 -0
- package/dist/runtime-viewer/github-light-high-contrast-B2kY0DMu.js +124 -0
- package/dist/runtime-viewer/github-light-high-contrast-T0lGRgzi.js +3 -0
- package/dist/runtime-viewer/gleam-LV2mKtnv.js +2 -0
- package/dist/runtime-viewer/glimmer-js-BX9ckA-I.js +13 -0
- package/dist/runtime-viewer/glimmer-ts-DAfjLnWM.js +13 -0
- package/dist/runtime-viewer/glsl-BStsalM0.js +5 -0
- package/dist/runtime-viewer/gn-ChOGRsKV.js +2 -0
- package/dist/runtime-viewer/gnuplot-Di7UZXvs.js +2 -0
- package/dist/runtime-viewer/go-BrUQhiM2.js +1 -0
- package/dist/runtime-viewer/go-DM5FkVJr.js +2 -0
- package/dist/runtime-viewer/graphql-C8jzeQ3m.js +1 -0
- package/dist/runtime-viewer/graphql-C_WRV-qo.js +14 -0
- package/dist/runtime-viewer/groovy-DNa91fQJ.js +2 -0
- package/dist/runtime-viewer/gruvbox-dark-hard-BK-BcNOC.js +127 -0
- package/dist/runtime-viewer/gruvbox-dark-hard-fgme3GSG.js +3 -0
- package/dist/runtime-viewer/gruvbox-dark-medium-Btvv2ALk.js +127 -0
- package/dist/runtime-viewer/gruvbox-dark-medium-GM28AOs3.js +3 -0
- package/dist/runtime-viewer/gruvbox-dark-soft-D12Dlf7E.js +3 -0
- package/dist/runtime-viewer/gruvbox-dark-soft-ScIRFHp0.js +127 -0
- package/dist/runtime-viewer/gruvbox-light-hard-D0LtL2QG.js +3 -0
- package/dist/runtime-viewer/gruvbox-light-hard-D3d04bym.js +127 -0
- package/dist/runtime-viewer/gruvbox-light-medium-BUM64AiQ.js +127 -0
- package/dist/runtime-viewer/gruvbox-light-medium-Dbiuwhcl.js +3 -0
- package/dist/runtime-viewer/gruvbox-light-soft-BFyUZF8I.js +3 -0
- package/dist/runtime-viewer/gruvbox-light-soft-Deemyp2j.js +127 -0
- package/dist/runtime-viewer/hack-DrxrxETA.js +9 -0
- package/dist/runtime-viewer/haml-DtaFw5Wt.js +10 -0
- package/dist/runtime-viewer/handlebars-DdC6ISBc.js +13 -0
- package/dist/runtime-viewer/haskell-D6RgJWqJ.js +2 -0
- package/dist/runtime-viewer/haxe-CIYKU3E4.js +2 -0
- package/dist/runtime-viewer/hcl-B9zco17t.js +2 -0
- package/dist/runtime-viewer/highlights-Dcx2AVJg.js +1342 -0
- package/dist/runtime-viewer/hjson-sMCeQDUn.js +2 -0
- package/dist/runtime-viewer/hlsl-WeeDt2Wp.js +2 -0
- package/dist/runtime-viewer/horizon-B8n8qcHx.js +84 -0
- package/dist/runtime-viewer/horizon-aRqT-seq.js +3 -0
- package/dist/runtime-viewer/horizon-bright-DACv8zK_.js +84 -0
- package/dist/runtime-viewer/horizon-bright-DEevCdc_.js +3 -0
- package/dist/runtime-viewer/houston-CsNpjGGD.js +194 -0
- package/dist/runtime-viewer/houston-Dg2jxmDJ.js +3 -0
- package/dist/runtime-viewer/html-CPjHaxbO.js +1 -0
- package/dist/runtime-viewer/html-Di2iyAsX.js +10 -0
- package/dist/runtime-viewer/html-derivative-Rauq0RVM.js +4 -0
- package/dist/runtime-viewer/http-CkmWBydm.js +13 -0
- package/dist/runtime-viewer/hurl-BGjXa70x.js +11 -0
- package/dist/runtime-viewer/hxml-Bo5YTIXF.js +4 -0
- package/dist/runtime-viewer/hy-C-tRiv34.js +2 -0
- package/dist/runtime-viewer/imba-v7ELlTL6.js +2 -0
- package/dist/runtime-viewer/ini-DtrnrQj2.js +2 -0
- package/dist/runtime-viewer/java-DVlvG-lL.js +1 -0
- package/dist/runtime-viewer/java-DzBtATHG.js +4 -0
- package/dist/runtime-viewer/javascript--K52AMOb.js +4 -0
- package/dist/runtime-viewer/javascript-soGjNmbd.js +1 -0
- package/dist/runtime-viewer/jinja-CZBKZHkS.js +4 -0
- package/dist/runtime-viewer/jison-Bqt-LhEh.js +4 -0
- package/dist/runtime-viewer/json-DN-CB1kQ.js +4 -0
- package/dist/runtime-viewer/json-D_yoNICS.js +1 -0
- package/dist/runtime-viewer/json5-BdfUTtLp.js +2 -0
- package/dist/runtime-viewer/jsonc-ElU8pfhL.js +1 -0
- package/dist/runtime-viewer/jsonc-IKox2JSV.js +2 -0
- package/dist/runtime-viewer/jsonl-CfuX4G6U.js +2 -0
- package/dist/runtime-viewer/jsonnet-Yq9KcR8E.js +2 -0
- package/dist/runtime-viewer/jssm-BvR7SnkK.js +2 -0
- package/dist/runtime-viewer/jsx-D_XQMdaK.js +4 -0
- package/dist/runtime-viewer/jsx-snoZUiUS.js +1 -0
- package/dist/runtime-viewer/julia-C8lwf2tT.js +15 -0
- package/dist/runtime-viewer/just-CQnb5pIW.js +17 -0
- package/dist/runtime-viewer/kanagawa-dragon-Cx4OB0dC.js +3 -0
- package/dist/runtime-viewer/kanagawa-dragon-OValCvAZ.js +146 -0
- package/dist/runtime-viewer/kanagawa-lotus-C1sYcneT.js +146 -0
- package/dist/runtime-viewer/kanagawa-lotus-TwFRI7_8.js +3 -0
- package/dist/runtime-viewer/kanagawa-wave-BJYCyv2X.js +146 -0
- package/dist/runtime-viewer/kanagawa-wave-BiOn36ux.js +3 -0
- package/dist/runtime-viewer/kdl-D97SquIS.js +2 -0
- package/dist/runtime-viewer/kotlin-EmJjLeRz.js +2 -0
- package/dist/runtime-viewer/kotlin-LwxBtHgj.js +1 -0
- package/dist/runtime-viewer/kusto-DHanPw0g.js +2 -0
- package/dist/runtime-viewer/langs-D4STZqO4.js +1322 -0
- package/dist/runtime-viewer/laserwave-CV_0dg5c.js +71 -0
- package/dist/runtime-viewer/laserwave-PpzazpgI.js +3 -0
- package/dist/runtime-viewer/latest-events-iiWwpIck-BTK0vSlR.js +3657 -0
- package/dist/runtime-viewer/latex-Csew0MLK.js +4 -0
- package/dist/runtime-viewer/lean-E61_xvh-.js +2 -0
- package/dist/runtime-viewer/less-Bis9Y9oi.js +2 -0
- package/dist/runtime-viewer/lib-B7rl8i0A.js +1712 -0
- package/dist/runtime-viewer/light-plus-DOInvhGO.js +133 -0
- package/dist/runtime-viewer/light-plus-DnhX_5eg.js +3 -0
- package/dist/runtime-viewer/liquid-CuxywBoN.js +13 -0
- package/dist/runtime-viewer/llvm-DOIFdCJg.js +2 -0
- package/dist/runtime-viewer/loader-NcDPTN_h.js +79 -0
- package/dist/runtime-viewer/log-Awf6LbyY.js +2 -0
- package/dist/runtime-viewer/logo-Cn9nW1nw.js +2 -0
- package/dist/runtime-viewer/lua-BtojQCeL.js +5 -0
- package/dist/runtime-viewer/luau-DHSqpUrS.js +2 -0
- package/dist/runtime-viewer/make-CJ4tc-MS.js +2 -0
- package/dist/runtime-viewer/markdown-CNVZ8ok-.js +2 -0
- package/dist/runtime-viewer/markdown-Co5Krewy.js +1 -0
- package/dist/runtime-viewer/marko-CRIKirQp.js +13 -0
- package/dist/runtime-viewer/material-theme-D5uz9rje.js +3 -0
- package/dist/runtime-viewer/material-theme-darker-DbzCDLF8.js +92 -0
- package/dist/runtime-viewer/material-theme-darker-Dqalv5VE.js +3 -0
- package/dist/runtime-viewer/material-theme-lighter-CVJ0oH_V.js +3 -0
- package/dist/runtime-viewer/material-theme-lighter-CytgYJOd.js +92 -0
- package/dist/runtime-viewer/material-theme-ocean-BgKy5sU3.js +92 -0
- package/dist/runtime-viewer/material-theme-ocean-CRXu0cdY.js +3 -0
- package/dist/runtime-viewer/material-theme-palenight-C6iiJcUB.js +3 -0
- package/dist/runtime-viewer/material-theme-palenight-DZK7nXDy.js +92 -0
- package/dist/runtime-viewer/material-theme-yF3uaT0h.js +92 -0
- package/dist/runtime-viewer/matlab-Dn3Clolk.js +2 -0
- package/dist/runtime-viewer/mdc-D0bRQBcT.js +11 -0
- package/dist/runtime-viewer/mdx-C5T-IRbL.js +2 -0
- package/dist/runtime-viewer/mdx-DM8tlqVf.js +1 -0
- package/dist/runtime-viewer/mermaid-C4AYlmk3.js +2 -0
- package/dist/runtime-viewer/min-dark-BGA1sv8W.js +3 -0
- package/dist/runtime-viewer/min-dark-C1XOhi4b.js +109 -0
- package/dist/runtime-viewer/min-light-Bi5vyNSJ.js +109 -0
- package/dist/runtime-viewer/min-light-CYXBjZLR.js +3 -0
- package/dist/runtime-viewer/mipsasm-Bwfx99oh.js +2 -0
- package/dist/runtime-viewer/mojo-CRl08dek.js +2 -0
- package/dist/runtime-viewer/monokai-D9Ylqri2.js +149 -0
- package/dist/runtime-viewer/monokai-i6D4lZa3.js +3 -0
- package/dist/runtime-viewer/moonbit-CF1zF40g.js +2 -0
- package/dist/runtime-viewer/move-BP-e5w2W.js +2 -0
- package/dist/runtime-viewer/narrat-CrPIhy6S.js +2 -0
- package/dist/runtime-viewer/nextflow-D_hnf_jC.js +4 -0
- package/dist/runtime-viewer/nextflow-groovy-BLKP0md9.js +2 -0
- package/dist/runtime-viewer/nginx-87WOq-zh.js +4 -0
- package/dist/runtime-viewer/night-owl-BIeenDB2.js +175 -0
- package/dist/runtime-viewer/night-owl-NpADjULE.js +3 -0
- package/dist/runtime-viewer/night-owl-light-CPFD_YWe.js +3 -0
- package/dist/runtime-viewer/night-owl-light-cj7zoq2Q.js +176 -0
- package/dist/runtime-viewer/nim-CDdExumk.js +19 -0
- package/dist/runtime-viewer/nix-D_5rVnnj.js +2 -0
- package/dist/runtime-viewer/nord-DtfXNtHW.js +3 -0
- package/dist/runtime-viewer/nord-LUKuJt-q.js +115 -0
- package/dist/runtime-viewer/nsis-R3iO3ArE.js +2 -0
- package/dist/runtime-viewer/nushell-Ctp5mfhf.js +2 -0
- package/dist/runtime-viewer/objective-c-DPJeQfV6.js +2 -0
- package/dist/runtime-viewer/objective-cpp-1I3jYeMe.js +2 -0
- package/dist/runtime-viewer/ocaml-DOrLjeoA.js +2 -0
- package/dist/runtime-viewer/odin-CyrMbkLb.js +2 -0
- package/dist/runtime-viewer/one-dark-pro-CoHxEOhG.js +3 -0
- package/dist/runtime-viewer/one-dark-pro-DJGEbENq.js +111 -0
- package/dist/runtime-viewer/one-light-CTMiOsB9.js +137 -0
- package/dist/runtime-viewer/one-light-DRcvOwa6.js +3 -0
- package/dist/runtime-viewer/openscad-BdifjW6z.js +2 -0
- package/dist/runtime-viewer/org-DqaIvCPP.js +99 -0
- package/dist/runtime-viewer/pascal-CWF557wL.js +2 -0
- package/dist/runtime-viewer/perl-CNf3SVpk.js +15 -0
- package/dist/runtime-viewer/php-BPw4EY34.js +17 -0
- package/dist/runtime-viewer/php-CftiA0NJ.js +1 -0
- package/dist/runtime-viewer/pierre-dark-Bdb1mzqq.js +153 -0
- package/dist/runtime-viewer/pierre-dark-C6-jOUHM.js +3 -0
- package/dist/runtime-viewer/pierre-dark-protanopia-deuteranopia-DCuPErCj.js +153 -0
- package/dist/runtime-viewer/pierre-dark-protanopia-deuteranopia-duePIMEV.js +3 -0
- package/dist/runtime-viewer/pierre-dark-soft-BAcQZBxz.js +3 -0
- package/dist/runtime-viewer/pierre-dark-soft-BbEG7yMD.js +153 -0
- package/dist/runtime-viewer/pierre-dark-tritanopia-DOpkeqXJ.js +153 -0
- package/dist/runtime-viewer/pierre-dark-tritanopia-D_B2XvmS.js +3 -0
- package/dist/runtime-viewer/pierre-dark-vibrant-Cjjp0Ett.js +3 -0
- package/dist/runtime-viewer/pierre-dark-vibrant-wch72KIm.js +153 -0
- package/dist/runtime-viewer/pierre-light-BOFVfKvu.js +153 -0
- package/dist/runtime-viewer/pierre-light-LcifP5tb.js +3 -0
- package/dist/runtime-viewer/pierre-light-protanopia-deuteranopia-BQUu7m7e.js +153 -0
- package/dist/runtime-viewer/pierre-light-protanopia-deuteranopia-BwLihlmJ.js +3 -0
- package/dist/runtime-viewer/pierre-light-soft-BOBDofkU.js +153 -0
- package/dist/runtime-viewer/pierre-light-soft-X5R_lHC5.js +3 -0
- package/dist/runtime-viewer/pierre-light-tritanopia-DHKQqobW.js +153 -0
- package/dist/runtime-viewer/pierre-light-tritanopia-_xB326N3.js +3 -0
- package/dist/runtime-viewer/pierre-light-vibrant-BQ8t4eUq.js +153 -0
- package/dist/runtime-viewer/pierre-light-vibrant-CpysSVqa.js +3 -0
- package/dist/runtime-viewer/pkl-D57k4LLs.js +2 -0
- package/dist/runtime-viewer/plastic-B9GSmjqY.js +3 -0
- package/dist/runtime-viewer/plastic-BVwrkRXf.js +124 -0
- package/dist/runtime-viewer/plsql-CFYD0AaB.js +2 -0
- package/dist/runtime-viewer/po-3OOmP4Qc.js +2 -0
- package/dist/runtime-viewer/poimandres-BOYLUaPj.js +3 -0
- package/dist/runtime-viewer/poimandres-pq5u2ANt.js +111 -0
- package/dist/runtime-viewer/polar-B5m1_AiD.js +2 -0
- package/dist/runtime-viewer/postcss-DaNMuZdy.js +2 -0
- package/dist/runtime-viewer/powerquery-Ds3ATR9s.js +2 -0
- package/dist/runtime-viewer/powershell-C6Oz4_dd.js +2 -0
- package/dist/runtime-viewer/prisma-RRr5YdGg.js +2 -0
- package/dist/runtime-viewer/prolog-DSStdQTq.js +2 -0
- package/dist/runtime-viewer/proto-Chh6Q5CM.js +2 -0
- package/dist/runtime-viewer/pug-jgpaAltF.js +11 -0
- package/dist/runtime-viewer/puppet-BLsUK3yq.js +2 -0
- package/dist/runtime-viewer/purescript-B02W4seQ.js +2 -0
- package/dist/runtime-viewer/python-BHaXfePs.js +2 -0
- package/dist/runtime-viewer/python-CqjzihlT.js +1 -0
- package/dist/runtime-viewer/qml-LuB2sppG.js +4 -0
- package/dist/runtime-viewer/qmldir-COlmh4fX.js +2 -0
- package/dist/runtime-viewer/qss-DQUGDdeL.js +2 -0
- package/dist/runtime-viewer/r-DLQ-WMyZ.js +4 -0
- package/dist/runtime-viewer/racket-Dh3q-EfD.js +2 -0
- package/dist/runtime-viewer/raku-CdFQrZmh.js +2 -0
- package/dist/runtime-viewer/razor-DyYB-qxm.js +9 -0
- package/dist/runtime-viewer/rbs-jMgpabM7.js +2 -0
- package/dist/runtime-viewer/red-CCCMngeG.js +3 -0
- package/dist/runtime-viewer/red-Dab29wid.js +153 -0
- package/dist/runtime-viewer/reg-BY6GKaZK.js +2 -0
- package/dist/runtime-viewer/regexp-DGXwIvno.js +4 -0
- package/dist/runtime-viewer/rel-DjgjjaPM.js +2 -0
- package/dist/runtime-viewer/riscv-e0swiQQT.js +2 -0
- package/dist/runtime-viewer/rolldown-runtime-CwxnZyOB.js +22 -0
- package/dist/runtime-viewer/ron-Ba9vjMyp.js +2 -0
- package/dist/runtime-viewer/rose-pine-B-dgSkpN.js +3 -0
- package/dist/runtime-viewer/rose-pine-BtbnV2yy.js +123 -0
- package/dist/runtime-viewer/rose-pine-dawn-Bdn8gWo3.js +123 -0
- package/dist/runtime-viewer/rose-pine-dawn-wnKgbnkN.js +3 -0
- package/dist/runtime-viewer/rose-pine-moon-Bo6Tj-LK.js +3 -0
- package/dist/runtime-viewer/rose-pine-moon-f0wTyd2e.js +123 -0
- package/dist/runtime-viewer/rosmsg-33FkgZa7.js +2 -0
- package/dist/runtime-viewer/rst-B4Blahjm.js +21 -0
- package/dist/runtime-viewer/ruby-DYURXRgy.js +1 -0
- package/dist/runtime-viewer/ruby-ZzNzsyR7.js +29 -0
- package/dist/runtime-viewer/rust-CbGaYpW0.js +2 -0
- package/dist/runtime-viewer/rust-DesRWqWI.js +1 -0
- package/dist/runtime-viewer/sandbox-ui-z5RGk327.css +2 -0
- package/dist/runtime-viewer/sas-y9RoKb_L.js +4 -0
- package/dist/runtime-viewer/sass-B4OMkGSD.js +2 -0
- package/dist/runtime-viewer/scala--rETK160.js +2 -0
- package/dist/runtime-viewer/scheme-CvovbBgk.js +2 -0
- package/dist/runtime-viewer/scss-DcI9-N4n.js +1 -0
- package/dist/runtime-viewer/scss-DopO6P6Z.js +5 -0
- package/dist/runtime-viewer/sdbl-BibMD0HR.js +2 -0
- package/dist/runtime-viewer/shaderlab-TCf2V7Bu.js +4 -0
- package/dist/runtime-viewer/shellscript-CMmvhdtO.js +4 -0
- package/dist/runtime-viewer/shellsession-C-hBmRFA.js +4 -0
- package/dist/runtime-viewer/shiki-CKiqbkeh.js +472 -0
- package/dist/runtime-viewer/slack-dark-Cdsw60PX.js +71 -0
- package/dist/runtime-viewer/slack-dark-awEjS_Yb.js +3 -0
- package/dist/runtime-viewer/slack-ochin-BKdp7_AN.js +94 -0
- package/dist/runtime-viewer/slack-ochin-CabfdAmS.js +3 -0
- package/dist/runtime-viewer/smalltalk-DxjZ-YtB.js +2 -0
- package/dist/runtime-viewer/smithy-tPvbDXO4.js +2 -0
- package/dist/runtime-viewer/snazzy-light-BYOmyMID.js +80 -0
- package/dist/runtime-viewer/snazzy-light-DqG5DUoz.js +3 -0
- package/dist/runtime-viewer/solarized-dark-DW7IHQvx.js +3 -0
- package/dist/runtime-viewer/solarized-dark-DbW2e0tz.js +147 -0
- package/dist/runtime-viewer/solarized-light-CAggmb5U.js +147 -0
- package/dist/runtime-viewer/solarized-light-DHtUsXC-.js +3 -0
- package/dist/runtime-viewer/solidity-CzRNc7l4.js +2 -0
- package/dist/runtime-viewer/solidity-DcnQs1tt.js +1 -0
- package/dist/runtime-viewer/soy-Di0gqQmR.js +4 -0
- package/dist/runtime-viewer/sparql-9pWczk0C.js +4 -0
- package/dist/runtime-viewer/splunk-mpquMt_8.js +2 -0
- package/dist/runtime-viewer/sql-BKQgqUK-.js +4 -0
- package/dist/runtime-viewer/sql-CWnPlVS6.js +1 -0
- package/dist/runtime-viewer/ssh-config-DcnVpK-n.js +2 -0
- package/dist/runtime-viewer/stata-D1hxcba5.js +4 -0
- package/dist/runtime-viewer/stream-tokenizer-BWCJrHj9.js +97 -0
- package/dist/runtime-viewer/stylus-Bk8v-7oM.js +2 -0
- package/dist/runtime-viewer/surrealql-D20GSlYu.js +4 -0
- package/dist/runtime-viewer/svelte-C1MdtiIu.js +13 -0
- package/dist/runtime-viewer/swift-1fpvFsbf.js +2 -0
- package/dist/runtime-viewer/swift-DdLix5IB.js +1 -0
- package/dist/runtime-viewer/synthwave-84-DEoLt5E0.js +3 -0
- package/dist/runtime-viewer/synthwave-84-DYyyPr4g.js +397 -0
- package/dist/runtime-viewer/system-verilog-9E6eQ6kG.js +2 -0
- package/dist/runtime-viewer/systemd-CS6cln6J.js +2 -0
- package/dist/runtime-viewer/talonscript-COzgILOx.js +2 -0
- package/dist/runtime-viewer/tasl-CrL-TM3j.js +2 -0
- package/dist/runtime-viewer/tcl-BK--alTs.js +2 -0
- package/dist/runtime-viewer/templ-DKjVFvC3.js +11 -0
- package/dist/runtime-viewer/terraform-BKVT4lTN.js +2 -0
- package/dist/runtime-viewer/tex-BMGJ-FHF.js +5 -0
- package/dist/runtime-viewer/themes-D2drbHm6.js +235 -0
- package/dist/runtime-viewer/tokyo-night-BDW-4G1n.js +3 -0
- package/dist/runtime-viewer/tokyo-night-CnwkSle4.js +140 -0
- package/dist/runtime-viewer/toml-BygInOIB.js +1 -0
- package/dist/runtime-viewer/toml-CXAVGmfI.js +2 -0
- package/dist/runtime-viewer/ts-tags-BMg-6tE-.js +37 -0
- package/dist/runtime-viewer/tsv-r5fpGho9.js +2 -0
- package/dist/runtime-viewer/tsx-CdftCu0x.js +1 -0
- package/dist/runtime-viewer/tsx-sVSKAISV.js +4 -0
- package/dist/runtime-viewer/turtle-BbiQBLu0.js +2 -0
- package/dist/runtime-viewer/twig-09z_6B11.js +17 -0
- package/dist/runtime-viewer/typescript-COKJUNHB.js +4 -0
- package/dist/runtime-viewer/typescript-DCN8T-9u.js +1 -0
- package/dist/runtime-viewer/typespec-CtiCKN_c.js +2 -0
- package/dist/runtime-viewer/typst-D_sC_VAT.js +119 -0
- package/dist/runtime-viewer/unwrapDefault-CNWG9hDr.js +5 -0
- package/dist/runtime-viewer/v-BdhLiTpS.js +2 -0
- package/dist/runtime-viewer/vala-sKTZx7aP.js +2 -0
- package/dist/runtime-viewer/vb-BAyoHiqq.js +2 -0
- package/dist/runtime-viewer/verilog-DrDp-nNs.js +2 -0
- package/dist/runtime-viewer/vesper-BOAJeYxj.js +3 -0
- package/dist/runtime-viewer/vesper-DMgHxe32.js +83 -0
- package/dist/runtime-viewer/vhdl-D4xoRBgL.js +2 -0
- package/dist/runtime-viewer/viml-C41wSeLL.js +2 -0
- package/dist/runtime-viewer/vitesse-black-CxSugKJt.js +3 -0
- package/dist/runtime-viewer/vitesse-black-D8_Gc8uG.js +183 -0
- package/dist/runtime-viewer/vitesse-dark-Dg-H5YXt.js +183 -0
- package/dist/runtime-viewer/vitesse-dark-DvdlNt-O.js +3 -0
- package/dist/runtime-viewer/vitesse-light-BU-cJySG.js +183 -0
- package/dist/runtime-viewer/vitesse-light-q0_0oW1f.js +3 -0
- package/dist/runtime-viewer/vue-BbJX7dLK.js +20 -0
- package/dist/runtime-viewer/vue-html-DvOnaPby.js +4 -0
- package/dist/runtime-viewer/vue-vine-NYLtCzNK.js +17 -0
- package/dist/runtime-viewer/vyper-D4A1KnBn.js +2 -0
- package/dist/runtime-viewer/wasm-CVPYyV9Y.js +2 -0
- package/dist/runtime-viewer/wasm-DrbRUT8q.js +3 -0
- package/dist/runtime-viewer/wenyan-Czq8OMMr.js +2 -0
- package/dist/runtime-viewer/wgsl-C_l-ZpBu.js +2 -0
- package/dist/runtime-viewer/wikitext-B7epQZx2.js +2 -0
- package/dist/runtime-viewer/wit-DswQpcNx.js +2 -0
- package/dist/runtime-viewer/wolfram-CSEjVwta.js +2 -0
- package/dist/runtime-viewer/xml-CBKvpQFb.js +1 -0
- package/dist/runtime-viewer/xml-Ct7jrUZw.js +5 -0
- package/dist/runtime-viewer/xsl-DovPFRzJ.js +4 -0
- package/dist/runtime-viewer/yaml-BfN4AWuy.js +4 -0
- package/dist/runtime-viewer/yaml-DWRq8wls.js +1 -0
- package/dist/runtime-viewer/zenscript-YvYHF5y3.js +2 -0
- package/dist/runtime-viewer/zig-BgXWauKx.js +2 -0
- package/dist/styles.css +192 -150
- package/dist/tailwind.css +156 -150
- package/dist/{run-C8HeXGk3.js → trace-workspace-C8dHRBDV.js} +2 -3
- package/dist/use-document-D6Z9oFLm.js +120 -0
- package/dist/{workbench-BozOdGCX.js → workbench-Z9wbei53.js} +4 -172
- package/dist/workbench.js +2 -1
- package/dist/{workspace-CJnBqCqj.js → workspace-CzikYt_y.js} +5 -364
- package/dist/workspace-files-pane-DB9Nvwh4.js +367 -0
- package/dist/workspace-viewer.js +44403 -0
- package/dist/workspace.js +2 -1
- package/package.json +9 -4
|
@@ -0,0 +1,2372 @@
|
|
|
1
|
+
// node_modules/.pnpm/@shikijs+engine-javascript@4.5.0/node_modules/@shikijs/engine-javascript/dist/string-TLTPtCPs.mjs
|
|
2
|
+
var e = 4294967295;
|
|
3
|
+
function t(e) {
|
|
4
|
+
return !e.sticky && !e.rawOptions?.strategy;
|
|
5
|
+
}
|
|
6
|
+
function n(t, n) {
|
|
7
|
+
return {
|
|
8
|
+
index: t,
|
|
9
|
+
captureIndices: n.map((t) => t == null ? {
|
|
10
|
+
start: e,
|
|
11
|
+
end: e,
|
|
12
|
+
length: 0
|
|
13
|
+
} : {
|
|
14
|
+
start: t[0],
|
|
15
|
+
end: t[1],
|
|
16
|
+
length: t[1] - t[0]
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var r = class {
|
|
21
|
+
patterns;
|
|
22
|
+
options;
|
|
23
|
+
regexps;
|
|
24
|
+
lastSearches;
|
|
25
|
+
constructor(e, n = {}) {
|
|
26
|
+
this.patterns = e, this.options = n;
|
|
27
|
+
let { forgiving: r = !1, cache: i, regexConstructor: a } = n;
|
|
28
|
+
if (!a) throw Error("Option `regexConstructor` is not provided");
|
|
29
|
+
this.regexps = e.map((e) => {
|
|
30
|
+
if (typeof e != "string") return e;
|
|
31
|
+
let t = i?.get(e);
|
|
32
|
+
if (t) {
|
|
33
|
+
if (t instanceof RegExp) return t;
|
|
34
|
+
if (r) return null;
|
|
35
|
+
throw t;
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
let t = a(e);
|
|
39
|
+
return i?.set(e, t), t;
|
|
40
|
+
} catch (t) {
|
|
41
|
+
if (i?.set(e, t), r) return null;
|
|
42
|
+
throw t;
|
|
43
|
+
}
|
|
44
|
+
}), this.lastSearches = this.regexps.map((e) => e && t(e) ? {
|
|
45
|
+
strId: 0,
|
|
46
|
+
searchedFrom: 0,
|
|
47
|
+
matchIndex: -1,
|
|
48
|
+
indices: null
|
|
49
|
+
} : null);
|
|
50
|
+
}
|
|
51
|
+
findNextMatchSync(e, t, r) {
|
|
52
|
+
let i = typeof e == "string" ? e : e.content, a = typeof e == "string" ? 0 : e.id || 0, o = -1, s = 0, c = null;
|
|
53
|
+
for (let e = 0; e < this.regexps.length; e++) {
|
|
54
|
+
let r = this.regexps[e];
|
|
55
|
+
if (r) try {
|
|
56
|
+
let l = a ? this.lastSearches[e] : null, u, d;
|
|
57
|
+
if (l && l.strId === a && l.searchedFrom <= t && (l.matchIndex === -1 || l.matchIndex >= t)) u = l.matchIndex, d = l.indices;
|
|
58
|
+
else {
|
|
59
|
+
r.lastIndex = t;
|
|
60
|
+
let e = r.exec(i);
|
|
61
|
+
u = e ? e.index : -1, d = e ? e.indices : null, l && (l.strId = a, l.searchedFrom = t, l.matchIndex = u, l.indices = d);
|
|
62
|
+
}
|
|
63
|
+
if (u === -1) continue;
|
|
64
|
+
if (u === t) return n(e, d);
|
|
65
|
+
(o === -1 || u < s) && (o = e, s = u, c = d);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
if (this.options.forgiving) continue;
|
|
68
|
+
throw e;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return o === -1 ? null : n(o, c);
|
|
72
|
+
}
|
|
73
|
+
}, i = 0;
|
|
74
|
+
function a(e) {
|
|
75
|
+
return {
|
|
76
|
+
content: e,
|
|
77
|
+
id: ++i
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
// node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/utils.js
|
|
81
|
+
function o(e) {
|
|
82
|
+
if ([...e].length !== 1) throw Error(`Expected "${e}" to be a single code point`);
|
|
83
|
+
return e.codePointAt(0);
|
|
84
|
+
}
|
|
85
|
+
function s(e, t, n) {
|
|
86
|
+
return e.has(t) || e.set(t, n), e.get(t);
|
|
87
|
+
}
|
|
88
|
+
var c = /* @__PURE__ */ new Set([
|
|
89
|
+
"alnum",
|
|
90
|
+
"alpha",
|
|
91
|
+
"ascii",
|
|
92
|
+
"blank",
|
|
93
|
+
"cntrl",
|
|
94
|
+
"digit",
|
|
95
|
+
"graph",
|
|
96
|
+
"lower",
|
|
97
|
+
"print",
|
|
98
|
+
"punct",
|
|
99
|
+
"space",
|
|
100
|
+
"upper",
|
|
101
|
+
"word",
|
|
102
|
+
"xdigit"
|
|
103
|
+
]), l = String.raw;
|
|
104
|
+
function u(e, t) {
|
|
105
|
+
if (e == null) throw Error(t ?? "Value expected");
|
|
106
|
+
return e;
|
|
107
|
+
}
|
|
108
|
+
// node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js
|
|
109
|
+
var d = l`\[\^?`, f = `c.? | C(?:-.?)?|${l`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${l`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${l`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${l`o\{[^\}]*\}?`}|${l`\d{1,3}`}`, p = /[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/, m = new RegExp(l`
|
|
110
|
+
\\ (?:
|
|
111
|
+
${f}
|
|
112
|
+
| [gk]<[^>]*>?
|
|
113
|
+
| [gk]'[^']*'?
|
|
114
|
+
| .
|
|
115
|
+
)
|
|
116
|
+
| \( (?:
|
|
117
|
+
\? (?:
|
|
118
|
+
[:=!>({]
|
|
119
|
+
| <[=!]
|
|
120
|
+
| <[^>]*>
|
|
121
|
+
| '[^']*'
|
|
122
|
+
| ~\|?
|
|
123
|
+
| #(?:[^)\\]|\\.?)*
|
|
124
|
+
| [^:)]*[:)]
|
|
125
|
+
)?
|
|
126
|
+
| \*[^\)]*\)?
|
|
127
|
+
)?
|
|
128
|
+
| (?:${p.source})+
|
|
129
|
+
| ${d}
|
|
130
|
+
| .
|
|
131
|
+
`.replace(/\s+/g, ""), "gsu"), h = new RegExp(l`
|
|
132
|
+
\\ (?:
|
|
133
|
+
${f}
|
|
134
|
+
| .
|
|
135
|
+
)
|
|
136
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
137
|
+
| ${d}
|
|
138
|
+
| &&
|
|
139
|
+
| .
|
|
140
|
+
`.replace(/\s+/g, ""), "gsu");
|
|
141
|
+
function g(e, t = {}) {
|
|
142
|
+
let n = {
|
|
143
|
+
flags: "",
|
|
144
|
+
...t,
|
|
145
|
+
rules: {
|
|
146
|
+
captureGroup: !1,
|
|
147
|
+
singleline: !1,
|
|
148
|
+
...t.rules
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
if (typeof e != "string") throw Error("String expected as pattern");
|
|
152
|
+
let r = Ce(n.flags), i = [r.extended], a = {
|
|
153
|
+
captureGroup: n.rules.captureGroup,
|
|
154
|
+
getCurrentModX() {
|
|
155
|
+
return i.at(-1);
|
|
156
|
+
},
|
|
157
|
+
numOpenGroups: 0,
|
|
158
|
+
popModX() {
|
|
159
|
+
i.pop();
|
|
160
|
+
},
|
|
161
|
+
pushModX(e) {
|
|
162
|
+
i.push(e);
|
|
163
|
+
},
|
|
164
|
+
replaceCurrentModX(e) {
|
|
165
|
+
i[i.length - 1] = e;
|
|
166
|
+
},
|
|
167
|
+
singleline: n.rules.singleline
|
|
168
|
+
}, o = [], s;
|
|
169
|
+
for (m.lastIndex = 0; s = m.exec(e);) {
|
|
170
|
+
let t = _(a, e, s[0], m.lastIndex);
|
|
171
|
+
t.tokens ? o.push(...t.tokens) : t.token && o.push(t.token), t.lastIndex !== void 0 && (m.lastIndex = t.lastIndex);
|
|
172
|
+
}
|
|
173
|
+
let c = [], l = 0;
|
|
174
|
+
o.filter((e) => e.type === "GroupOpen").forEach((e) => {
|
|
175
|
+
e.kind === "capturing" ? e.number = ++l : e.raw === "(" && c.push(e);
|
|
176
|
+
}), l || c.forEach((e, t) => {
|
|
177
|
+
e.kind = "capturing", e.number = t + 1;
|
|
178
|
+
});
|
|
179
|
+
let u = l || c.length;
|
|
180
|
+
return {
|
|
181
|
+
tokens: o.map((e) => e.type === "EscapedNumber" ? Te(e, u) : e).flat(),
|
|
182
|
+
flags: r
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function _(e, t, n, r) {
|
|
186
|
+
let [i, a] = n;
|
|
187
|
+
if (n === "[" || n === "[^") {
|
|
188
|
+
let e = v(t, n, r);
|
|
189
|
+
return {
|
|
190
|
+
tokens: e.tokens,
|
|
191
|
+
lastIndex: e.lastIndex
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
if (i === "\\") {
|
|
195
|
+
if ("AbBGyYzZ".includes(a)) return { token: ne(n, n) };
|
|
196
|
+
if (/^\\g[<']/.test(n)) {
|
|
197
|
+
if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw Error(`Invalid group name "${n}"`);
|
|
198
|
+
return { token: pe(n) };
|
|
199
|
+
}
|
|
200
|
+
if (/^\\k[<']/.test(n)) {
|
|
201
|
+
if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw Error(`Invalid group name "${n}"`);
|
|
202
|
+
return { token: re(n) };
|
|
203
|
+
}
|
|
204
|
+
if (a === "K") return { token: ce("keep", n) };
|
|
205
|
+
if (a === "N" || a === "R") return { token: x("newline", n, { negate: a === "N" }) };
|
|
206
|
+
if (a === "O") return { token: x("any", n) };
|
|
207
|
+
if (a === "X") return { token: x("text_segment", n) };
|
|
208
|
+
let e = y(n, { inCharClass: !1 });
|
|
209
|
+
return Array.isArray(e) ? { tokens: e } : { token: e };
|
|
210
|
+
}
|
|
211
|
+
if (i === "(") {
|
|
212
|
+
if (a === "*") return { token: ve(n) };
|
|
213
|
+
if (n === "(?{") throw Error(`Unsupported callout "${n}"`);
|
|
214
|
+
if (n.startsWith("(?#")) {
|
|
215
|
+
if (t[r] !== ")") throw Error("Unclosed comment group \"(?#\"");
|
|
216
|
+
return { lastIndex: r + 1 };
|
|
217
|
+
}
|
|
218
|
+
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: _e(n, e) };
|
|
219
|
+
if (e.pushModX(e.getCurrentModX()), e.numOpenGroups++, n === "(" && !e.captureGroup || n === "(?:") return { token: S("group", n) };
|
|
220
|
+
if (n === "(?>") return { token: S("atomic", n) };
|
|
221
|
+
if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: S(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
|
|
222
|
+
if (n === "(" && e.captureGroup || n.startsWith("(?<") && n.endsWith(">") || n.startsWith("(?'") && n.endsWith("'")) return { token: S("capturing", n, { ...n !== "(" && { name: n.slice(3, -1) } }) };
|
|
223
|
+
if (n.startsWith("(?~")) {
|
|
224
|
+
if (n === "(?~|") throw Error(`Unsupported absence function kind "${n}"`);
|
|
225
|
+
return { token: S("absence_repeater", n) };
|
|
226
|
+
}
|
|
227
|
+
throw Error(n === "(?(" ? `Unsupported conditional "${n}"` : `Invalid or unsupported group option "${n}"`);
|
|
228
|
+
}
|
|
229
|
+
if (n === ")") {
|
|
230
|
+
if (e.popModX(), e.numOpenGroups--, e.numOpenGroups < 0) throw Error("Unmatched \")\"");
|
|
231
|
+
return { token: ue(n) };
|
|
232
|
+
}
|
|
233
|
+
if (e.getCurrentModX()) {
|
|
234
|
+
if (n === "#") {
|
|
235
|
+
let e = t.indexOf("\n", r);
|
|
236
|
+
return { lastIndex: e === -1 ? t.length : e };
|
|
237
|
+
}
|
|
238
|
+
if (/^\s$/.test(n)) {
|
|
239
|
+
let e = /\s+/y;
|
|
240
|
+
return e.lastIndex = r, { lastIndex: e.exec(t) ? e.lastIndex : r };
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return n === "." ? { token: x("dot", n) } : n === "^" || n === "$" ? { token: ne(e.singleline ? {
|
|
244
|
+
"^": l`\A`,
|
|
245
|
+
$: l`\Z`
|
|
246
|
+
}[n] : n, n) } : n === "|" ? { token: te(n) } : p.test(n) ? { tokens: Ee(n) } : { token: b(o(n), n) };
|
|
247
|
+
}
|
|
248
|
+
function v(e, t, n) {
|
|
249
|
+
let r = [se(t[1] === "^", t)], i = 1, a;
|
|
250
|
+
for (h.lastIndex = n; a = h.exec(e);) {
|
|
251
|
+
let e = a[0];
|
|
252
|
+
if (e[0] === "[" && e[1] !== ":") i++, r.push(se(e[1] === "^", e));
|
|
253
|
+
else if (e === "]") {
|
|
254
|
+
if (r.at(-1).type === "CharacterClassOpen") r.push(b(93, e));
|
|
255
|
+
else if (i--, r.push(ie(e)), !i) break;
|
|
256
|
+
} else {
|
|
257
|
+
let t = ee(e);
|
|
258
|
+
Array.isArray(t) ? r.push(...t) : r.push(t);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
tokens: r,
|
|
263
|
+
lastIndex: h.lastIndex || e.length
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function ee(e) {
|
|
267
|
+
if (e[0] === "\\") return y(e, { inCharClass: !0 });
|
|
268
|
+
if (e[0] === "[") {
|
|
269
|
+
let t = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);
|
|
270
|
+
if (!t || !c.has(t.groups.name)) throw Error(`Invalid POSIX class "${e}"`);
|
|
271
|
+
return x("posix", e, {
|
|
272
|
+
value: t.groups.name,
|
|
273
|
+
negate: !!t.groups.negate
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
return e === "-" ? ae(e) : e === "&&" ? oe(e) : b(o(e), e);
|
|
277
|
+
}
|
|
278
|
+
function y(e, { inCharClass: t }) {
|
|
279
|
+
let n = e[1];
|
|
280
|
+
if (n === "c" || n === "C") return ge(e);
|
|
281
|
+
if ("dDhHsSwW".includes(n)) return be(e);
|
|
282
|
+
if (e.startsWith(l`\o{`)) throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);
|
|
283
|
+
if (/^\\[pP]\{/.test(e)) {
|
|
284
|
+
if (e.length === 3) throw Error(`Incomplete or invalid Unicode property "${e}"`);
|
|
285
|
+
return xe(e);
|
|
286
|
+
}
|
|
287
|
+
if (/^\\x[89A-Fa-f]\p{AHex}/u.test(e)) try {
|
|
288
|
+
let t = e.split(/\\x/).slice(1).map((e) => parseInt(e, 16)), n = new TextDecoder("utf-8", {
|
|
289
|
+
ignoreBOM: !0,
|
|
290
|
+
fatal: !0
|
|
291
|
+
}).decode(new Uint8Array(t)), r = new TextEncoder();
|
|
292
|
+
return [...n].map((e) => {
|
|
293
|
+
let t = [...r.encode(e)].map((e) => `\\x${e.toString(16)}`).join("");
|
|
294
|
+
return b(o(e), t);
|
|
295
|
+
});
|
|
296
|
+
} catch {
|
|
297
|
+
throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`);
|
|
298
|
+
}
|
|
299
|
+
if (n === "u" || n === "x") return b(we(e), e);
|
|
300
|
+
if (he.has(n)) return b(he.get(n), e);
|
|
301
|
+
if (/\d/.test(n)) return le(t, e);
|
|
302
|
+
if (e === "\\") throw Error(l`Incomplete escape "\"`);
|
|
303
|
+
if (n === "M") throw Error(`Unsupported meta "${e}"`);
|
|
304
|
+
if ([...e].length === 2) return b(e.codePointAt(1), e);
|
|
305
|
+
throw Error(`Unexpected escape "${e}"`);
|
|
306
|
+
}
|
|
307
|
+
function te(e) {
|
|
308
|
+
return {
|
|
309
|
+
type: "Alternator",
|
|
310
|
+
raw: e
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function ne(e, t) {
|
|
314
|
+
return {
|
|
315
|
+
type: "Assertion",
|
|
316
|
+
kind: e,
|
|
317
|
+
raw: t
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
function re(e) {
|
|
321
|
+
return {
|
|
322
|
+
type: "Backreference",
|
|
323
|
+
raw: e
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function b(e, t) {
|
|
327
|
+
return {
|
|
328
|
+
type: "Character",
|
|
329
|
+
value: e,
|
|
330
|
+
raw: t
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
function ie(e) {
|
|
334
|
+
return {
|
|
335
|
+
type: "CharacterClassClose",
|
|
336
|
+
raw: e
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
function ae(e) {
|
|
340
|
+
return {
|
|
341
|
+
type: "CharacterClassHyphen",
|
|
342
|
+
raw: e
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function oe(e) {
|
|
346
|
+
return {
|
|
347
|
+
type: "CharacterClassIntersector",
|
|
348
|
+
raw: e
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function se(e, t) {
|
|
352
|
+
return {
|
|
353
|
+
type: "CharacterClassOpen",
|
|
354
|
+
negate: e,
|
|
355
|
+
raw: t
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function x(e, t, n = {}) {
|
|
359
|
+
return {
|
|
360
|
+
type: "CharacterSet",
|
|
361
|
+
kind: e,
|
|
362
|
+
...n,
|
|
363
|
+
raw: t
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function ce(e, t, n = {}) {
|
|
367
|
+
return e === "keep" ? {
|
|
368
|
+
type: "Directive",
|
|
369
|
+
kind: e,
|
|
370
|
+
raw: t
|
|
371
|
+
} : {
|
|
372
|
+
type: "Directive",
|
|
373
|
+
kind: e,
|
|
374
|
+
flags: u(n.flags),
|
|
375
|
+
raw: t
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
function le(e, t) {
|
|
379
|
+
return {
|
|
380
|
+
type: "EscapedNumber",
|
|
381
|
+
inCharClass: e,
|
|
382
|
+
raw: t
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
function ue(e) {
|
|
386
|
+
return {
|
|
387
|
+
type: "GroupClose",
|
|
388
|
+
raw: e
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function S(e, t, n = {}) {
|
|
392
|
+
return {
|
|
393
|
+
type: "GroupOpen",
|
|
394
|
+
kind: e,
|
|
395
|
+
...n,
|
|
396
|
+
raw: t
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function de(e, t, n, r) {
|
|
400
|
+
return {
|
|
401
|
+
type: "NamedCallout",
|
|
402
|
+
kind: e,
|
|
403
|
+
tag: t,
|
|
404
|
+
arguments: n,
|
|
405
|
+
raw: r
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
function fe(e, t, n, r) {
|
|
409
|
+
return {
|
|
410
|
+
type: "Quantifier",
|
|
411
|
+
kind: e,
|
|
412
|
+
min: t,
|
|
413
|
+
max: n,
|
|
414
|
+
raw: r
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function pe(e) {
|
|
418
|
+
return {
|
|
419
|
+
type: "Subroutine",
|
|
420
|
+
raw: e
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
var me = /* @__PURE__ */ new Set([
|
|
424
|
+
"COUNT",
|
|
425
|
+
"CMP",
|
|
426
|
+
"ERROR",
|
|
427
|
+
"FAIL",
|
|
428
|
+
"MAX",
|
|
429
|
+
"MISMATCH",
|
|
430
|
+
"SKIP",
|
|
431
|
+
"TOTAL_COUNT"
|
|
432
|
+
]), he = /* @__PURE__ */ new Map([
|
|
433
|
+
["a", 7],
|
|
434
|
+
["b", 8],
|
|
435
|
+
["e", 27],
|
|
436
|
+
["f", 12],
|
|
437
|
+
["n", 10],
|
|
438
|
+
["r", 13],
|
|
439
|
+
["t", 9],
|
|
440
|
+
["v", 11]
|
|
441
|
+
]);
|
|
442
|
+
function ge(e) {
|
|
443
|
+
let t = e[1] === "c" ? e[2] : e[3];
|
|
444
|
+
if (!t || !/[A-Za-z]/.test(t)) throw Error(`Unsupported control character "${e}"`);
|
|
445
|
+
return b(o(t.toUpperCase()) - 64, e);
|
|
446
|
+
}
|
|
447
|
+
function _e(e, t) {
|
|
448
|
+
let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;
|
|
449
|
+
r ??= "";
|
|
450
|
+
let i = (t.getCurrentModX() || n.includes("x")) && !r.includes("x"), a = Se(n), o = Se(r), s = {};
|
|
451
|
+
if (a && (s.enable = a), o && (s.disable = o), e.endsWith(")")) return t.replaceCurrentModX(i), ce("flags", e, { flags: s });
|
|
452
|
+
if (e.endsWith(":")) return t.pushModX(i), t.numOpenGroups++, S("group", e, { ...(a || o) && { flags: s } });
|
|
453
|
+
throw Error(`Unexpected flag modifier "${e}"`);
|
|
454
|
+
}
|
|
455
|
+
function ve(e) {
|
|
456
|
+
let t = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);
|
|
457
|
+
if (!t) throw Error(`Incomplete or invalid named callout "${e}"`);
|
|
458
|
+
let { name: n, tag: r, args: i } = t.groups;
|
|
459
|
+
if (!n) throw Error(`Invalid named callout "${e}"`);
|
|
460
|
+
if (r === "") throw Error(`Named callout tag with empty value not allowed "${e}"`);
|
|
461
|
+
let a = i ? i.split(",").filter((e) => e !== "").map((e) => /^[+-]?\d+$/.test(e) ? +e : e) : [], [o, s, c] = a, l = me.has(n) ? n.toLowerCase() : "custom";
|
|
462
|
+
switch (l) {
|
|
463
|
+
case "fail":
|
|
464
|
+
case "mismatch":
|
|
465
|
+
case "skip":
|
|
466
|
+
if (a.length > 0) throw Error(`Named callout arguments not allowed "${a}"`);
|
|
467
|
+
break;
|
|
468
|
+
case "error":
|
|
469
|
+
if (a.length > 1) throw Error(`Named callout allows only one argument "${a}"`);
|
|
470
|
+
if (typeof o == "string") throw Error(`Named callout argument must be a number "${o}"`);
|
|
471
|
+
break;
|
|
472
|
+
case "max":
|
|
473
|
+
if (!a.length || a.length > 2) throw Error(`Named callout must have one or two arguments "${a}"`);
|
|
474
|
+
if (typeof o == "string" && !/^[A-Za-z_]\w*$/.test(o)) throw Error(`Named callout argument one must be a tag or number "${o}"`);
|
|
475
|
+
if (a.length === 2 && (typeof s == "number" || !/^[<>X]$/.test(s))) throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);
|
|
476
|
+
break;
|
|
477
|
+
case "count":
|
|
478
|
+
case "total_count":
|
|
479
|
+
if (a.length > 1) throw Error(`Named callout allows only one argument "${a}"`);
|
|
480
|
+
if (a.length === 1 && (typeof o == "number" || !/^[<>X]$/.test(o))) throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);
|
|
481
|
+
break;
|
|
482
|
+
case "cmp":
|
|
483
|
+
if (a.length !== 3) throw Error(`Named callout must have three arguments "${a}"`);
|
|
484
|
+
if (typeof o == "string" && !/^[A-Za-z_]\w*$/.test(o)) throw Error(`Named callout argument one must be a tag or number "${o}"`);
|
|
485
|
+
if (typeof s == "number" || !/^(?:[<>!=]=|[<>])$/.test(s)) throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);
|
|
486
|
+
if (typeof c == "string" && !/^[A-Za-z_]\w*$/.test(c)) throw Error(`Named callout argument three must be a tag or number "${c}"`);
|
|
487
|
+
break;
|
|
488
|
+
case "custom": throw Error(`Undefined callout name "${n}"`);
|
|
489
|
+
default: throw Error(`Unexpected named callout kind "${l}"`);
|
|
490
|
+
}
|
|
491
|
+
return de(l, r ?? null, i?.split(",") ?? null, e);
|
|
492
|
+
}
|
|
493
|
+
function ye(e) {
|
|
494
|
+
let t = null, n, r;
|
|
495
|
+
if (e[0] === "{") {
|
|
496
|
+
let { minStr: i, maxStr: a } = /^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups, o = 1e5;
|
|
497
|
+
if (+i > o || a && +a > o) throw Error("Quantifier value unsupported in Oniguruma");
|
|
498
|
+
if (n = +i, r = a === void 0 ? +i : a === "" ? 1 / 0 : +a, n > r && (t = "possessive", [n, r] = [r, n]), e.endsWith("?")) {
|
|
499
|
+
if (t === "possessive") throw Error("Unsupported possessive interval quantifier chain with \"?\"");
|
|
500
|
+
t = "lazy";
|
|
501
|
+
} else t ||= "greedy";
|
|
502
|
+
} else n = +(e[0] === "+"), r = e[0] === "?" ? 1 : 1 / 0, t = e[1] === "+" ? "possessive" : e[1] === "?" ? "lazy" : "greedy";
|
|
503
|
+
return fe(t, n, r, e);
|
|
504
|
+
}
|
|
505
|
+
function be(e) {
|
|
506
|
+
let t = e[1].toLowerCase();
|
|
507
|
+
return x({
|
|
508
|
+
d: "digit",
|
|
509
|
+
h: "hex",
|
|
510
|
+
s: "space",
|
|
511
|
+
w: "word"
|
|
512
|
+
}[t], e, { negate: e[1] !== t });
|
|
513
|
+
}
|
|
514
|
+
function xe(e) {
|
|
515
|
+
let { p: t, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;
|
|
516
|
+
return x("property", e, {
|
|
517
|
+
value: r,
|
|
518
|
+
negate: t === "P" && !n || t === "p" && !!n
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
function Se(e) {
|
|
522
|
+
let t = {};
|
|
523
|
+
return e.includes("i") && (t.ignoreCase = !0), e.includes("m") && (t.dotAll = !0), e.includes("x") && (t.extended = !0), Object.keys(t).length ? t : null;
|
|
524
|
+
}
|
|
525
|
+
function Ce(e) {
|
|
526
|
+
let t = {
|
|
527
|
+
ignoreCase: !1,
|
|
528
|
+
dotAll: !1,
|
|
529
|
+
extended: !1,
|
|
530
|
+
digitIsAscii: !1,
|
|
531
|
+
posixIsAscii: !1,
|
|
532
|
+
spaceIsAscii: !1,
|
|
533
|
+
wordIsAscii: !1,
|
|
534
|
+
textSegmentMode: null
|
|
535
|
+
};
|
|
536
|
+
for (let n = 0; n < e.length; n++) {
|
|
537
|
+
let r = e[n];
|
|
538
|
+
if (!"imxDPSWy".includes(r)) throw Error(`Invalid flag "${r}"`);
|
|
539
|
+
if (r === "y") {
|
|
540
|
+
if (!/^y{[gw]}/.test(e.slice(n))) throw Error("Invalid or unspecified flag \"y\" mode");
|
|
541
|
+
t.textSegmentMode = e[n + 2] === "g" ? "grapheme" : "word", n += 3;
|
|
542
|
+
} else t[{
|
|
543
|
+
i: "ignoreCase",
|
|
544
|
+
m: "dotAll",
|
|
545
|
+
x: "extended",
|
|
546
|
+
D: "digitIsAscii",
|
|
547
|
+
P: "posixIsAscii",
|
|
548
|
+
S: "spaceIsAscii",
|
|
549
|
+
W: "wordIsAscii"
|
|
550
|
+
}[r]] = !0;
|
|
551
|
+
}
|
|
552
|
+
return t;
|
|
553
|
+
}
|
|
554
|
+
function we(e) {
|
|
555
|
+
if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e)) throw Error(`Incomplete or invalid escape "${e}"`);
|
|
556
|
+
let t = e[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex : e.slice(2);
|
|
557
|
+
return parseInt(t, 16);
|
|
558
|
+
}
|
|
559
|
+
function Te(e, t) {
|
|
560
|
+
let { raw: n, inCharClass: r } = e, i = n.slice(1);
|
|
561
|
+
if (!r && (i !== "0" && i.length === 1 || i[0] !== "0" && +i <= t)) return [re(n)];
|
|
562
|
+
let a = [], s = i.match(/^[0-7]+|\d/g);
|
|
563
|
+
for (let e = 0; e < s.length; e++) {
|
|
564
|
+
let t = s[e], r;
|
|
565
|
+
if (e === 0 && t !== "8" && t !== "9") {
|
|
566
|
+
if (r = parseInt(t, 8), r > 127) throw Error(l`Octal encoded byte above 177 unsupported "${n}"`);
|
|
567
|
+
} else r = o(t);
|
|
568
|
+
a.push(b(r, (e === 0 ? "\\" : "") + t));
|
|
569
|
+
}
|
|
570
|
+
return a;
|
|
571
|
+
}
|
|
572
|
+
function Ee(e) {
|
|
573
|
+
let t = [], n = new RegExp(p, "gy"), r;
|
|
574
|
+
for (; r = n.exec(e);) {
|
|
575
|
+
let e = r[0];
|
|
576
|
+
if (e[0] === "{") {
|
|
577
|
+
let r = /^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);
|
|
578
|
+
if (r) {
|
|
579
|
+
let { min: i, max: a } = r.groups;
|
|
580
|
+
if (+i > +a && e.endsWith("?")) {
|
|
581
|
+
n.lastIndex--, t.push(ye(e.slice(0, -1)));
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
t.push(ye(e));
|
|
587
|
+
}
|
|
588
|
+
return t;
|
|
589
|
+
}
|
|
590
|
+
// node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/parser/node-utils.js
|
|
591
|
+
function De(e, t) {
|
|
592
|
+
if (!Array.isArray(e.body)) throw Error("Expected node with body array");
|
|
593
|
+
if (e.body.length !== 1) return !1;
|
|
594
|
+
let n = e.body[0];
|
|
595
|
+
return !t || Object.keys(t).every((e) => t[e] === n[e]);
|
|
596
|
+
}
|
|
597
|
+
function Oe(e) {
|
|
598
|
+
return ke.has(e.type);
|
|
599
|
+
}
|
|
600
|
+
var ke = /* @__PURE__ */ new Set([
|
|
601
|
+
"AbsenceFunction",
|
|
602
|
+
"Backreference",
|
|
603
|
+
"CapturingGroup",
|
|
604
|
+
"Character",
|
|
605
|
+
"CharacterClass",
|
|
606
|
+
"CharacterSet",
|
|
607
|
+
"Group",
|
|
608
|
+
"Quantifier",
|
|
609
|
+
"Subroutine"
|
|
610
|
+
]);
|
|
611
|
+
// node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/parser/parse.js
|
|
612
|
+
function Ae(e, t = {}) {
|
|
613
|
+
let n = {
|
|
614
|
+
flags: "",
|
|
615
|
+
normalizeUnknownPropertyNames: !1,
|
|
616
|
+
skipBackrefValidation: !1,
|
|
617
|
+
skipLookbehindValidation: !1,
|
|
618
|
+
skipPropertyNameValidation: !1,
|
|
619
|
+
unicodePropertyMap: null,
|
|
620
|
+
...t,
|
|
621
|
+
rules: {
|
|
622
|
+
captureGroup: !1,
|
|
623
|
+
singleline: !1,
|
|
624
|
+
...t.rules
|
|
625
|
+
}
|
|
626
|
+
}, r = g(e, {
|
|
627
|
+
flags: n.flags,
|
|
628
|
+
rules: {
|
|
629
|
+
captureGroup: n.rules.captureGroup,
|
|
630
|
+
singleline: n.rules.singleline
|
|
631
|
+
}
|
|
632
|
+
}), i = (e, t) => {
|
|
633
|
+
let n = r.tokens[a.nextIndex];
|
|
634
|
+
switch (a.parent = e, a.nextIndex++, n.type) {
|
|
635
|
+
case "Alternator": return C();
|
|
636
|
+
case "Assertion": return je(n);
|
|
637
|
+
case "Backreference": return Me(n, a);
|
|
638
|
+
case "Character": return w(n.value, { useLastValid: !!t.isCheckingRangeEnd });
|
|
639
|
+
case "CharacterClassHyphen": return Ne(n, a, t);
|
|
640
|
+
case "CharacterClassOpen": return Pe(n, a, t);
|
|
641
|
+
case "CharacterSet": return Fe(n, a);
|
|
642
|
+
case "Directive": return We(n.kind, { flags: n.flags });
|
|
643
|
+
case "GroupOpen": return Ie(n, a, t);
|
|
644
|
+
case "NamedCallout": return Ke(n.kind, n.tag, n.arguments);
|
|
645
|
+
case "Quantifier": return Le(n, a);
|
|
646
|
+
case "Subroutine": return Re(n, a);
|
|
647
|
+
default: throw Error(`Unexpected token type "${n.type}"`);
|
|
648
|
+
}
|
|
649
|
+
}, a = {
|
|
650
|
+
capturingGroups: [],
|
|
651
|
+
hasNumberedRef: !1,
|
|
652
|
+
namedGroupsByName: /* @__PURE__ */ new Map(),
|
|
653
|
+
nextIndex: 0,
|
|
654
|
+
normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames,
|
|
655
|
+
parent: null,
|
|
656
|
+
skipBackrefValidation: n.skipBackrefValidation,
|
|
657
|
+
skipLookbehindValidation: n.skipLookbehindValidation,
|
|
658
|
+
skipPropertyNameValidation: n.skipPropertyNameValidation,
|
|
659
|
+
subroutines: [],
|
|
660
|
+
tokens: r.tokens,
|
|
661
|
+
unicodePropertyMap: n.unicodePropertyMap,
|
|
662
|
+
walk: i
|
|
663
|
+
}, o = Ye(Ge(r.flags)), s = o.body[0];
|
|
664
|
+
for (; a.nextIndex < r.tokens.length;) {
|
|
665
|
+
let e = i(s, {});
|
|
666
|
+
e.type === "Alternative" ? (o.body.push(e), s = e) : s.body.push(e);
|
|
667
|
+
}
|
|
668
|
+
let { capturingGroups: c, hasNumberedRef: u, namedGroupsByName: d, subroutines: f } = a;
|
|
669
|
+
if (u && d.size && !n.rules.captureGroup) throw Error("Numbered backref/subroutine not allowed when using named capture");
|
|
670
|
+
for (let { ref: e } of f) if (typeof e == "number") {
|
|
671
|
+
if (e > c.length) throw Error("Subroutine uses a group number that's not defined");
|
|
672
|
+
e && (c[e - 1].isSubroutined = !0);
|
|
673
|
+
} else if (d.has(e)) {
|
|
674
|
+
if (d.get(e).length > 1) throw Error(l`Subroutine uses a duplicate group name "\g<${e}>"`);
|
|
675
|
+
d.get(e)[0].isSubroutined = !0;
|
|
676
|
+
} else throw Error(l`Subroutine uses a group name that's not defined "\g<${e}>"`);
|
|
677
|
+
return o;
|
|
678
|
+
}
|
|
679
|
+
function je({ kind: e }) {
|
|
680
|
+
return Be(u({
|
|
681
|
+
"^": "line_start",
|
|
682
|
+
$: "line_end",
|
|
683
|
+
"\\A": "string_start",
|
|
684
|
+
"\\b": "word_boundary",
|
|
685
|
+
"\\B": "word_boundary",
|
|
686
|
+
"\\G": "search_start",
|
|
687
|
+
"\\y": "text_segment_boundary",
|
|
688
|
+
"\\Y": "text_segment_boundary",
|
|
689
|
+
"\\z": "string_end",
|
|
690
|
+
"\\Z": "string_end_newline"
|
|
691
|
+
}[e], `Unexpected assertion kind "${e}"`), { negate: e === l`\B` || e === l`\Y` });
|
|
692
|
+
}
|
|
693
|
+
function Me({ raw: e }, t) {
|
|
694
|
+
let n = /^\\k[<']/.test(e), r = n ? e.slice(3, -1) : e.slice(1), i = (n, r = !1) => {
|
|
695
|
+
let i = t.capturingGroups.length, a = !1;
|
|
696
|
+
if (n > i) {
|
|
697
|
+
if (t.skipBackrefValidation) a = !0;
|
|
698
|
+
else throw Error(`Not enough capturing groups defined to the left "${e}"`);
|
|
699
|
+
}
|
|
700
|
+
return t.hasNumberedRef = !0, Ve(r ? i + 1 - n : n, { orphan: a });
|
|
701
|
+
};
|
|
702
|
+
if (n) {
|
|
703
|
+
let n = /^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);
|
|
704
|
+
if (n) return i(+n.groups.num, !!n.groups.sign);
|
|
705
|
+
if (/[-+]/.test(r)) throw Error(`Invalid backref name "${e}"`);
|
|
706
|
+
if (!t.namedGroupsByName.has(r)) throw Error(`Group name not defined to the left "${e}"`);
|
|
707
|
+
return Ve(r);
|
|
708
|
+
}
|
|
709
|
+
return i(+r);
|
|
710
|
+
}
|
|
711
|
+
function Ne(e, t, n) {
|
|
712
|
+
let { tokens: r, walk: i } = t, a = t.parent, s = a.body.at(-1), c = r[t.nextIndex];
|
|
713
|
+
if (!n.isCheckingRangeEnd && s && s.type !== "CharacterClass" && s.type !== "CharacterClassRange" && c && c.type !== "CharacterClassOpen" && c.type !== "CharacterClassClose" && c.type !== "CharacterClassIntersector") {
|
|
714
|
+
let e = i(a, {
|
|
715
|
+
...n,
|
|
716
|
+
isCheckingRangeEnd: !0
|
|
717
|
+
});
|
|
718
|
+
if (s.type === "Character" && e.type === "Character") return a.body.pop(), Ue(s, e);
|
|
719
|
+
throw Error("Invalid character class range");
|
|
720
|
+
}
|
|
721
|
+
return w(o("-"));
|
|
722
|
+
}
|
|
723
|
+
function Pe({ negate: e }, t, n) {
|
|
724
|
+
let { tokens: r, walk: i } = t, a = [T()], o = r[t.nextIndex], s = rt(o);
|
|
725
|
+
for (; s.type !== "CharacterClassClose";) {
|
|
726
|
+
if (s.type === "CharacterClassIntersector") a.push(T()), t.nextIndex++;
|
|
727
|
+
else {
|
|
728
|
+
let e = a.at(-1);
|
|
729
|
+
e.body.push(i(e, n));
|
|
730
|
+
}
|
|
731
|
+
s = rt(r[t.nextIndex], o);
|
|
732
|
+
}
|
|
733
|
+
let c = T({ negate: e });
|
|
734
|
+
return a.length === 1 ? c.body = a[0].body : (c.kind = "intersection", c.body = a.map((e) => e.body.length === 1 ? e.body[0] : e)), t.nextIndex++, c;
|
|
735
|
+
}
|
|
736
|
+
function Fe({ kind: e, negate: t, value: n }, r) {
|
|
737
|
+
let { normalizeUnknownPropertyNames: i, skipPropertyNameValidation: a, unicodePropertyMap: o } = r;
|
|
738
|
+
if (e === "property") {
|
|
739
|
+
let r = j(n);
|
|
740
|
+
if (c.has(r) && !o?.has(r)) e = "posix", n = r;
|
|
741
|
+
else return k(n, {
|
|
742
|
+
negate: t,
|
|
743
|
+
normalizeUnknownPropertyNames: i,
|
|
744
|
+
skipPropertyNameValidation: a,
|
|
745
|
+
unicodePropertyMap: o
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
return e === "posix" ? qe(n, { negate: t }) : E(e, { negate: t });
|
|
749
|
+
}
|
|
750
|
+
function Ie(e, t, n) {
|
|
751
|
+
let { tokens: r, capturingGroups: i, namedGroupsByName: a, skipLookbehindValidation: o, walk: c } = t, l = Ze(e), u = l.type === "AbsenceFunction", d = et(l), f = d && l.negate;
|
|
752
|
+
if (l.type === "CapturingGroup" && (i.push(l), l.name && s(a, l.name, []).push(l)), u && n.isInAbsenceFunction) throw Error("Nested absence function not supported by Oniguruma");
|
|
753
|
+
let p = it(r[t.nextIndex]);
|
|
754
|
+
for (; p.type !== "GroupClose";) {
|
|
755
|
+
if (p.type === "Alternator") l.body.push(C()), t.nextIndex++;
|
|
756
|
+
else {
|
|
757
|
+
let e = l.body.at(-1), t = c(e, {
|
|
758
|
+
...n,
|
|
759
|
+
isInAbsenceFunction: n.isInAbsenceFunction || u,
|
|
760
|
+
isInLookbehind: n.isInLookbehind || d,
|
|
761
|
+
isInNegLookbehind: n.isInNegLookbehind || f
|
|
762
|
+
});
|
|
763
|
+
if (e.body.push(t), (d || n.isInLookbehind) && !o) {
|
|
764
|
+
let e = "Lookbehind includes a pattern not allowed by Oniguruma";
|
|
765
|
+
if (f || n.isInNegLookbehind) {
|
|
766
|
+
if ($e(t) || t.type === "CapturingGroup") throw Error(e);
|
|
767
|
+
} else if ($e(t) || et(t) && t.negate) throw Error(e);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
p = it(r[t.nextIndex]);
|
|
771
|
+
}
|
|
772
|
+
return t.nextIndex++, l;
|
|
773
|
+
}
|
|
774
|
+
function Le({ kind: e, min: t, max: n }, r) {
|
|
775
|
+
let i = r.parent, a = i.body.at(-1);
|
|
776
|
+
if (!a || !Oe(a)) throw Error("Quantifier requires a repeatable token");
|
|
777
|
+
let o = Je(e, t, n, a);
|
|
778
|
+
return i.body.pop(), o;
|
|
779
|
+
}
|
|
780
|
+
function Re({ raw: e }, t) {
|
|
781
|
+
let { capturingGroups: n, subroutines: r } = t, i = e.slice(3, -1), a = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);
|
|
782
|
+
if (a) {
|
|
783
|
+
let e = +a.groups.num, r = n.length;
|
|
784
|
+
if (t.hasNumberedRef = !0, i = {
|
|
785
|
+
"": e,
|
|
786
|
+
"+": r + e,
|
|
787
|
+
"-": r + 1 - e
|
|
788
|
+
}[a.groups.sign], i < 1) throw Error("Invalid subroutine number");
|
|
789
|
+
} else i === "0" && (i = 0);
|
|
790
|
+
let o = Xe(i);
|
|
791
|
+
return r.push(o), o;
|
|
792
|
+
}
|
|
793
|
+
function ze(e, t) {
|
|
794
|
+
if (e !== "repeater") throw Error(`Unexpected absence function kind "${e}"`);
|
|
795
|
+
return {
|
|
796
|
+
type: "AbsenceFunction",
|
|
797
|
+
kind: e,
|
|
798
|
+
body: A(t?.body)
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
function C(e) {
|
|
802
|
+
return {
|
|
803
|
+
type: "Alternative",
|
|
804
|
+
body: Qe(e?.body)
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function Be(e, t) {
|
|
808
|
+
let n = {
|
|
809
|
+
type: "Assertion",
|
|
810
|
+
kind: e
|
|
811
|
+
};
|
|
812
|
+
return (e === "word_boundary" || e === "text_segment_boundary") && (n.negate = !!t?.negate), n;
|
|
813
|
+
}
|
|
814
|
+
function Ve(e, t) {
|
|
815
|
+
let n = !!t?.orphan;
|
|
816
|
+
return {
|
|
817
|
+
type: "Backreference",
|
|
818
|
+
ref: e,
|
|
819
|
+
...n && { orphan: n }
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
function He(e, t) {
|
|
823
|
+
let n = {
|
|
824
|
+
name: void 0,
|
|
825
|
+
isSubroutined: !1,
|
|
826
|
+
...t
|
|
827
|
+
};
|
|
828
|
+
if (n.name !== void 0 && !tt(n.name)) throw Error(`Group name "${n.name}" invalid in Oniguruma`);
|
|
829
|
+
return {
|
|
830
|
+
type: "CapturingGroup",
|
|
831
|
+
number: e,
|
|
832
|
+
...n.name && { name: n.name },
|
|
833
|
+
...n.isSubroutined && { isSubroutined: n.isSubroutined },
|
|
834
|
+
body: A(t?.body)
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
function w(e, t) {
|
|
838
|
+
let n = {
|
|
839
|
+
useLastValid: !1,
|
|
840
|
+
...t
|
|
841
|
+
};
|
|
842
|
+
if (e > 1114111) {
|
|
843
|
+
let t = e.toString(16);
|
|
844
|
+
if (n.useLastValid) e = 1114111;
|
|
845
|
+
else throw Error(e > 1310719 ? `Invalid code point out of range "\\x{${t}}"` : `Invalid code point out of range in JS "\\x{${t}}"`);
|
|
846
|
+
}
|
|
847
|
+
return {
|
|
848
|
+
type: "Character",
|
|
849
|
+
value: e
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
function T(e) {
|
|
853
|
+
let t = {
|
|
854
|
+
kind: "union",
|
|
855
|
+
negate: !1,
|
|
856
|
+
...e
|
|
857
|
+
};
|
|
858
|
+
return {
|
|
859
|
+
type: "CharacterClass",
|
|
860
|
+
kind: t.kind,
|
|
861
|
+
negate: t.negate,
|
|
862
|
+
body: Qe(e?.body)
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
function Ue(e, t) {
|
|
866
|
+
if (t.value < e.value) throw Error("Character class range out of order");
|
|
867
|
+
return {
|
|
868
|
+
type: "CharacterClassRange",
|
|
869
|
+
min: e,
|
|
870
|
+
max: t
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
function E(e, t) {
|
|
874
|
+
let n = !!t?.negate, r = {
|
|
875
|
+
type: "CharacterSet",
|
|
876
|
+
kind: e
|
|
877
|
+
};
|
|
878
|
+
return (e === "digit" || e === "hex" || e === "newline" || e === "space" || e === "word") && (r.negate = n), (e === "text_segment" || e === "newline" && !n) && (r.variableLength = !0), r;
|
|
879
|
+
}
|
|
880
|
+
function We(e, t = {}) {
|
|
881
|
+
if (e === "keep") return {
|
|
882
|
+
type: "Directive",
|
|
883
|
+
kind: e
|
|
884
|
+
};
|
|
885
|
+
if (e === "flags") return {
|
|
886
|
+
type: "Directive",
|
|
887
|
+
kind: e,
|
|
888
|
+
flags: u(t.flags)
|
|
889
|
+
};
|
|
890
|
+
throw Error(`Unexpected directive kind "${e}"`);
|
|
891
|
+
}
|
|
892
|
+
function Ge(e) {
|
|
893
|
+
return {
|
|
894
|
+
type: "Flags",
|
|
895
|
+
...e
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
function D(e) {
|
|
899
|
+
let t = e?.atomic, n = e?.flags;
|
|
900
|
+
if (t && n) throw Error("Atomic group cannot have flags");
|
|
901
|
+
return {
|
|
902
|
+
type: "Group",
|
|
903
|
+
...t && { atomic: t },
|
|
904
|
+
...n && { flags: n },
|
|
905
|
+
body: A(e?.body)
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
function O(e) {
|
|
909
|
+
let t = {
|
|
910
|
+
behind: !1,
|
|
911
|
+
negate: !1,
|
|
912
|
+
...e
|
|
913
|
+
};
|
|
914
|
+
return {
|
|
915
|
+
type: "LookaroundAssertion",
|
|
916
|
+
kind: t.behind ? "lookbehind" : "lookahead",
|
|
917
|
+
negate: t.negate,
|
|
918
|
+
body: A(e?.body)
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function Ke(e, t, n) {
|
|
922
|
+
return {
|
|
923
|
+
type: "NamedCallout",
|
|
924
|
+
kind: e,
|
|
925
|
+
tag: t,
|
|
926
|
+
arguments: n
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
function qe(e, t) {
|
|
930
|
+
let n = !!t?.negate;
|
|
931
|
+
if (!c.has(e)) throw Error(`Invalid POSIX class "${e}"`);
|
|
932
|
+
return {
|
|
933
|
+
type: "CharacterSet",
|
|
934
|
+
kind: "posix",
|
|
935
|
+
value: e,
|
|
936
|
+
negate: n
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
function Je(e, t, n, r) {
|
|
940
|
+
if (t > n) throw Error("Invalid reversed quantifier range");
|
|
941
|
+
return {
|
|
942
|
+
type: "Quantifier",
|
|
943
|
+
kind: e,
|
|
944
|
+
min: t,
|
|
945
|
+
max: n,
|
|
946
|
+
body: r
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
function Ye(e, t) {
|
|
950
|
+
return {
|
|
951
|
+
type: "Regex",
|
|
952
|
+
body: A(t?.body),
|
|
953
|
+
flags: e
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
function Xe(e) {
|
|
957
|
+
return {
|
|
958
|
+
type: "Subroutine",
|
|
959
|
+
ref: e
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
function k(e, t) {
|
|
963
|
+
let n = {
|
|
964
|
+
negate: !1,
|
|
965
|
+
normalizeUnknownPropertyNames: !1,
|
|
966
|
+
skipPropertyNameValidation: !1,
|
|
967
|
+
unicodePropertyMap: null,
|
|
968
|
+
...t
|
|
969
|
+
}, r = n.unicodePropertyMap?.get(j(e));
|
|
970
|
+
if (!r) {
|
|
971
|
+
if (n.normalizeUnknownPropertyNames) r = nt(e);
|
|
972
|
+
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw Error(l`Invalid Unicode property "\p{${e}}"`);
|
|
973
|
+
}
|
|
974
|
+
return {
|
|
975
|
+
type: "CharacterSet",
|
|
976
|
+
kind: "property",
|
|
977
|
+
value: r ?? e,
|
|
978
|
+
negate: n.negate
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
function Ze({ flags: e, kind: t, name: n, negate: r, number: i }) {
|
|
982
|
+
switch (t) {
|
|
983
|
+
case "absence_repeater": return ze("repeater");
|
|
984
|
+
case "atomic": return D({ atomic: !0 });
|
|
985
|
+
case "capturing": return He(i, { name: n });
|
|
986
|
+
case "group": return D({ flags: e });
|
|
987
|
+
case "lookahead":
|
|
988
|
+
case "lookbehind": return O({
|
|
989
|
+
behind: t === "lookbehind",
|
|
990
|
+
negate: r
|
|
991
|
+
});
|
|
992
|
+
default: throw Error(`Unexpected group kind "${t}"`);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
function A(e) {
|
|
996
|
+
if (e === void 0) e = [C()];
|
|
997
|
+
else if (!Array.isArray(e) || !e.length || !e.every((e) => e.type === "Alternative")) throw Error("Invalid body; expected array of one or more Alternative nodes");
|
|
998
|
+
return e;
|
|
999
|
+
}
|
|
1000
|
+
function Qe(e) {
|
|
1001
|
+
if (e === void 0) e = [];
|
|
1002
|
+
else if (!Array.isArray(e) || !e.every((e) => !!e.type)) throw Error("Invalid body; expected array of nodes");
|
|
1003
|
+
return e;
|
|
1004
|
+
}
|
|
1005
|
+
function $e(e) {
|
|
1006
|
+
return e.type === "LookaroundAssertion" && e.kind === "lookahead";
|
|
1007
|
+
}
|
|
1008
|
+
function et(e) {
|
|
1009
|
+
return e.type === "LookaroundAssertion" && e.kind === "lookbehind";
|
|
1010
|
+
}
|
|
1011
|
+
function tt(e) {
|
|
1012
|
+
return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(e);
|
|
1013
|
+
}
|
|
1014
|
+
function nt(e) {
|
|
1015
|
+
return e.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
|
|
1016
|
+
}
|
|
1017
|
+
function j(e) {
|
|
1018
|
+
return e.replace(/[- _]+/g, "").toLowerCase();
|
|
1019
|
+
}
|
|
1020
|
+
function rt(e, t) {
|
|
1021
|
+
let n = t;
|
|
1022
|
+
return u(e, `Unclosed character class${n?.type === "Character" && n.value === 93 && n.raw === "]" ? " (started with \"]\")" : ""}`);
|
|
1023
|
+
}
|
|
1024
|
+
function it(e) {
|
|
1025
|
+
return u(e, "Unclosed group");
|
|
1026
|
+
}
|
|
1027
|
+
// node_modules/.pnpm/oniguruma-parser@0.12.2/node_modules/oniguruma-parser/dist/traverser/traverse.js
|
|
1028
|
+
function M(e, t, n = null) {
|
|
1029
|
+
function r(e, t) {
|
|
1030
|
+
for (let n = 0; n < e.length; n++) {
|
|
1031
|
+
let r = i(e[n], t, n, e);
|
|
1032
|
+
n = Math.max(-1, n + r);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
function i(a, o = null, s = null, c = null) {
|
|
1036
|
+
let l = 0, d = !1, f = {
|
|
1037
|
+
node: a,
|
|
1038
|
+
parent: o,
|
|
1039
|
+
key: s,
|
|
1040
|
+
container: c,
|
|
1041
|
+
root: e,
|
|
1042
|
+
remove() {
|
|
1043
|
+
N(c).splice(Math.max(0, P(s) + l), 1), l--, d = !0;
|
|
1044
|
+
},
|
|
1045
|
+
removeAllNextSiblings() {
|
|
1046
|
+
return N(c).splice(P(s) + 1);
|
|
1047
|
+
},
|
|
1048
|
+
removeAllPrevSiblings() {
|
|
1049
|
+
let e = P(s) + l;
|
|
1050
|
+
return l -= e, N(c).splice(0, Math.max(0, e));
|
|
1051
|
+
},
|
|
1052
|
+
replaceWith(e, t = {}) {
|
|
1053
|
+
let n = !!t.traverse;
|
|
1054
|
+
c ? c[Math.max(0, P(s) + l)] = e : u(o, "Can't replace root node")[s] = e, n && i(e, o, s, c), d = !0;
|
|
1055
|
+
},
|
|
1056
|
+
replaceWithMultiple(e, t = {}) {
|
|
1057
|
+
let n = !!t.traverse;
|
|
1058
|
+
if (N(c).splice(Math.max(0, P(s) + l), 1, ...e), l += e.length - 1, n) {
|
|
1059
|
+
let t = 0;
|
|
1060
|
+
for (let n = 0; n < e.length; n++) t += i(e[n], o, P(s) + n + t, c);
|
|
1061
|
+
}
|
|
1062
|
+
d = !0;
|
|
1063
|
+
},
|
|
1064
|
+
skip() {
|
|
1065
|
+
d = !0;
|
|
1066
|
+
}
|
|
1067
|
+
}, { type: p } = a, m = t["*"], h = t[p], g = typeof m == "function" ? m : m?.enter, _ = typeof h == "function" ? h : h?.enter;
|
|
1068
|
+
if (g?.(f, n), _?.(f, n), !d) switch (p) {
|
|
1069
|
+
case "AbsenceFunction":
|
|
1070
|
+
case "Alternative":
|
|
1071
|
+
case "CapturingGroup":
|
|
1072
|
+
case "CharacterClass":
|
|
1073
|
+
case "Group":
|
|
1074
|
+
case "LookaroundAssertion":
|
|
1075
|
+
r(a.body, a);
|
|
1076
|
+
break;
|
|
1077
|
+
case "Assertion":
|
|
1078
|
+
case "Backreference":
|
|
1079
|
+
case "Character":
|
|
1080
|
+
case "CharacterSet":
|
|
1081
|
+
case "Directive":
|
|
1082
|
+
case "Flags":
|
|
1083
|
+
case "NamedCallout":
|
|
1084
|
+
case "Subroutine": break;
|
|
1085
|
+
case "CharacterClassRange":
|
|
1086
|
+
i(a.min, a, "min"), i(a.max, a, "max");
|
|
1087
|
+
break;
|
|
1088
|
+
case "Quantifier":
|
|
1089
|
+
i(a.body, a, "body");
|
|
1090
|
+
break;
|
|
1091
|
+
case "Regex":
|
|
1092
|
+
r(a.body, a), i(a.flags, a, "flags");
|
|
1093
|
+
break;
|
|
1094
|
+
default: throw Error(`Unexpected node type "${p}"`);
|
|
1095
|
+
}
|
|
1096
|
+
return h?.exit?.(f, n), m?.exit?.(f, n), l;
|
|
1097
|
+
}
|
|
1098
|
+
return i(e), e;
|
|
1099
|
+
}
|
|
1100
|
+
function N(e) {
|
|
1101
|
+
if (!Array.isArray(e)) throw Error("Container expected");
|
|
1102
|
+
return e;
|
|
1103
|
+
}
|
|
1104
|
+
function P(e) {
|
|
1105
|
+
if (typeof e != "number") throw Error("Numeric key expected");
|
|
1106
|
+
return e;
|
|
1107
|
+
}
|
|
1108
|
+
// node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.js
|
|
1109
|
+
var at = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
|
1110
|
+
function ot(e, t) {
|
|
1111
|
+
for (let n = 0; n < e.length; n++) e[n] >= t && e[n]++;
|
|
1112
|
+
}
|
|
1113
|
+
function st(e, t, n, r) {
|
|
1114
|
+
return e.slice(0, t) + r + e.slice(t + n.length);
|
|
1115
|
+
}
|
|
1116
|
+
// node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.js
|
|
1117
|
+
var F = Object.freeze({
|
|
1118
|
+
DEFAULT: "DEFAULT",
|
|
1119
|
+
CHAR_CLASS: "CHAR_CLASS"
|
|
1120
|
+
});
|
|
1121
|
+
function ct(e, t, n, r) {
|
|
1122
|
+
let i = new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`, "gsu"), a = [!1], o = 0, s = "";
|
|
1123
|
+
for (let t of e.matchAll(i)) {
|
|
1124
|
+
let { 0: e, groups: { $skip: i } } = t;
|
|
1125
|
+
!i && (!r || r === F.DEFAULT == !o) ? n instanceof Function ? s += n(t, {
|
|
1126
|
+
context: o ? F.CHAR_CLASS : F.DEFAULT,
|
|
1127
|
+
negated: a[a.length - 1]
|
|
1128
|
+
}) : s += n : (e[0] === "[" ? (o++, a.push(e[1] === "^")) : e === "]" && o && (o--, a.pop()), s += e);
|
|
1129
|
+
}
|
|
1130
|
+
return s;
|
|
1131
|
+
}
|
|
1132
|
+
function lt(e, t, n, r) {
|
|
1133
|
+
ct(e, t, n, r);
|
|
1134
|
+
}
|
|
1135
|
+
function ut(e, t, n = 0, r) {
|
|
1136
|
+
if (!new RegExp(t, "su").test(e)) return null;
|
|
1137
|
+
let i = RegExp(`${t}|(?<$skip>\\\\?.)`, "gsu");
|
|
1138
|
+
i.lastIndex = n;
|
|
1139
|
+
let a = 0, o;
|
|
1140
|
+
for (; o = i.exec(e);) {
|
|
1141
|
+
let { 0: e, groups: { $skip: t } } = o;
|
|
1142
|
+
if (!t && (!r || r === F.DEFAULT == !a)) return o;
|
|
1143
|
+
e === "[" ? a++ : e === "]" && a && a--, i.lastIndex == o.index && i.lastIndex++;
|
|
1144
|
+
}
|
|
1145
|
+
return null;
|
|
1146
|
+
}
|
|
1147
|
+
function I(e, t, n) {
|
|
1148
|
+
return !!ut(e, t, 0, n);
|
|
1149
|
+
}
|
|
1150
|
+
function dt(e, t) {
|
|
1151
|
+
let n = /\\?./gsu;
|
|
1152
|
+
n.lastIndex = t;
|
|
1153
|
+
let r = e.length, i = 0, a = 1, o;
|
|
1154
|
+
for (; o = n.exec(e);) {
|
|
1155
|
+
let [e] = o;
|
|
1156
|
+
if (e === "[") i++;
|
|
1157
|
+
else if (i) e === "]" && i--;
|
|
1158
|
+
else if (e === "(") a++;
|
|
1159
|
+
else if (e === ")" && (a--, !a)) {
|
|
1160
|
+
r = o.index;
|
|
1161
|
+
break;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
return e.slice(t, r);
|
|
1165
|
+
}
|
|
1166
|
+
// node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.js
|
|
1167
|
+
var ft = new RegExp(String.raw`(?<noncapturingStart>${at})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
|
|
1168
|
+
function pt(e, t) {
|
|
1169
|
+
let n = t?.hiddenCaptures ?? [], r = t?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
1170
|
+
if (!/\(\?>/.test(e)) return {
|
|
1171
|
+
pattern: e,
|
|
1172
|
+
captureTransfers: r,
|
|
1173
|
+
hiddenCaptures: n
|
|
1174
|
+
};
|
|
1175
|
+
let i = [0], a = [], o = 0, s = 0, c = NaN, l;
|
|
1176
|
+
do {
|
|
1177
|
+
l = !1;
|
|
1178
|
+
let t = 0, u = 0, d = !1, f;
|
|
1179
|
+
for (ft.lastIndex = Number.isNaN(c) ? 0 : c + 7; f = ft.exec(e);) {
|
|
1180
|
+
let { 0: p, index: m, groups: { capturingStart: h, noncapturingStart: g } } = f;
|
|
1181
|
+
if (p === "[") t++;
|
|
1182
|
+
else if (t) p === "]" && t--;
|
|
1183
|
+
else if (p === "(?>" && !d) c = m, d = !0;
|
|
1184
|
+
else if (d && g) u++;
|
|
1185
|
+
else if (h) d ? u++ : (o++, i.push(o + s));
|
|
1186
|
+
else if (p === ")" && d) {
|
|
1187
|
+
if (!u) {
|
|
1188
|
+
s++;
|
|
1189
|
+
let t = o + s;
|
|
1190
|
+
if (e = `${e.slice(0, c)}(?:(?=(${e.slice(c + 3, m)}))<$$${t}>)${e.slice(m + 1)}`, l = !0, a.push(t), ot(n, t), r.size) {
|
|
1191
|
+
let e = /* @__PURE__ */ new Map();
|
|
1192
|
+
r.forEach((n, r) => {
|
|
1193
|
+
e.set(r >= t ? r + 1 : r, n.map((e) => e >= t ? e + 1 : e));
|
|
1194
|
+
}), r = e;
|
|
1195
|
+
}
|
|
1196
|
+
break;
|
|
1197
|
+
}
|
|
1198
|
+
u--;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
} while (l);
|
|
1202
|
+
return n.push(...a), e = ct(e, String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`, ({ 0: e, groups: { backrefNum: t, wrappedBackrefNum: n } }) => {
|
|
1203
|
+
if (t) {
|
|
1204
|
+
let n = +t;
|
|
1205
|
+
if (n > i.length - 1) throw Error(`Backref "${e}" greater than number of captures`);
|
|
1206
|
+
return `\\${i[n]}`;
|
|
1207
|
+
}
|
|
1208
|
+
return `\\${n}`;
|
|
1209
|
+
}, F.DEFAULT), {
|
|
1210
|
+
pattern: e,
|
|
1211
|
+
captureTransfers: r,
|
|
1212
|
+
hiddenCaptures: n
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
var mt = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, ht = new RegExp(String.raw`
|
|
1216
|
+
\\(?: \d+
|
|
1217
|
+
| c[A-Za-z]
|
|
1218
|
+
| [gk]<[^>]+>
|
|
1219
|
+
| [pPu]\{[^\}]+\}
|
|
1220
|
+
| u[A-Fa-f\d]{4}
|
|
1221
|
+
| x[A-Fa-f\d]{2}
|
|
1222
|
+
)
|
|
1223
|
+
| \((?: \? (?: [:=!>]
|
|
1224
|
+
| <(?:[=!]|[^>]+>)
|
|
1225
|
+
| [A-Za-z\-]+:
|
|
1226
|
+
| \(DEFINE\)
|
|
1227
|
+
))?
|
|
1228
|
+
| (?<qBase>${mt})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
1229
|
+
| \\?.
|
|
1230
|
+
`.replace(/\s+/g, ""), "gsu");
|
|
1231
|
+
function gt(e) {
|
|
1232
|
+
if (!RegExp(`${mt}\\+`).test(e)) return { pattern: e };
|
|
1233
|
+
let t = [], n = null, r = null, i = "", a = 0, o;
|
|
1234
|
+
for (ht.lastIndex = 0; o = ht.exec(e);) {
|
|
1235
|
+
let { 0: s, index: c, groups: { qBase: l, qMod: u, invalidQ: d } } = o;
|
|
1236
|
+
if (s === "[") a || (r = c), a++;
|
|
1237
|
+
else if (s === "]") a ? a-- : r = null;
|
|
1238
|
+
else if (!a) {
|
|
1239
|
+
if (u === "+" && i && !i.startsWith("(")) {
|
|
1240
|
+
if (d) throw Error(`Invalid quantifier "${s}"`);
|
|
1241
|
+
let t = -1;
|
|
1242
|
+
if (/^\{\d+\}$/.test(l)) e = st(e, c + l.length, u, "");
|
|
1243
|
+
else {
|
|
1244
|
+
if (i === ")" || i === "]") {
|
|
1245
|
+
let t = i === ")" ? n : r;
|
|
1246
|
+
if (t === null) throw Error(`Invalid unmatched "${i}"`);
|
|
1247
|
+
e = `${e.slice(0, t)}(?>${e.slice(t, c)}${l})${e.slice(c + s.length)}`;
|
|
1248
|
+
} else e = `${e.slice(0, c - i.length)}(?>${i}${l})${e.slice(c + s.length)}`;
|
|
1249
|
+
t += 4;
|
|
1250
|
+
}
|
|
1251
|
+
ht.lastIndex += t;
|
|
1252
|
+
} else s[0] === "(" ? t.push(c) : s === ")" && (n = t.length ? t.pop() : null);
|
|
1253
|
+
}
|
|
1254
|
+
i = s;
|
|
1255
|
+
}
|
|
1256
|
+
return { pattern: e };
|
|
1257
|
+
}
|
|
1258
|
+
// node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.js
|
|
1259
|
+
var L = String.raw, R = L`\(\?R=(?<rDepth>[^\)]+)\)|${L`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`, z = L`\(\?<(?![=!])(?<captureName>[^>]+)>`, _t = L`${z}|(?<unnamed>\()(?!\?)`, B = new RegExp(L`${z}|${R}|\(\?|\\?.`, "gsu"), V = "Cannot use multiple overlapping recursions";
|
|
1260
|
+
function vt(e, t) {
|
|
1261
|
+
let { hiddenCaptures: n, mode: r } = {
|
|
1262
|
+
hiddenCaptures: [],
|
|
1263
|
+
mode: "plugin",
|
|
1264
|
+
...t
|
|
1265
|
+
}, i = t?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
1266
|
+
if (!new RegExp(R, "su").test(e)) return {
|
|
1267
|
+
pattern: e,
|
|
1268
|
+
captureTransfers: i,
|
|
1269
|
+
hiddenCaptures: n
|
|
1270
|
+
};
|
|
1271
|
+
if (r === "plugin" && I(e, L`\(\?\(DEFINE\)`, F.DEFAULT)) throw Error("DEFINE groups cannot be used with recursion");
|
|
1272
|
+
let a = [], o = I(e, L`\\[1-9]`, F.DEFAULT), s = /* @__PURE__ */ new Map(), c = [], l = !1, u = 0, d = 0, f;
|
|
1273
|
+
for (B.lastIndex = 0; f = B.exec(e);) {
|
|
1274
|
+
let { 0: t, groups: { captureName: p, rDepth: m, gRNameOrNum: h, gRDepth: g } } = f;
|
|
1275
|
+
if (t === "[") u++;
|
|
1276
|
+
else if (u) t === "]" && u--;
|
|
1277
|
+
else {
|
|
1278
|
+
if (m) {
|
|
1279
|
+
if (yt(m), l) throw Error(V);
|
|
1280
|
+
if (o) throw Error(`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`);
|
|
1281
|
+
let t = e.slice(0, f.index), s = e.slice(B.lastIndex);
|
|
1282
|
+
if (I(s, R, F.DEFAULT)) throw Error(V);
|
|
1283
|
+
let c = m - 1;
|
|
1284
|
+
e = bt(t, s, c, !1, n, a, d), i = Ct(i, t, c, a.length, 0, d);
|
|
1285
|
+
break;
|
|
1286
|
+
}
|
|
1287
|
+
if (h) {
|
|
1288
|
+
yt(g);
|
|
1289
|
+
let u = !1;
|
|
1290
|
+
for (let e of c) if (e.name === h || e.num === +h) {
|
|
1291
|
+
if (u = !0, e.hasRecursedWithin) throw Error(V);
|
|
1292
|
+
break;
|
|
1293
|
+
}
|
|
1294
|
+
if (!u) throw Error(L`Recursive \g cannot be used outside the referenced group "${r === "external" ? h : L`\g<${h}&R=${g}>`}"`);
|
|
1295
|
+
let p = s.get(h), m = dt(e, p);
|
|
1296
|
+
if (o && I(m, L`${z}|\((?!\?)`, F.DEFAULT)) throw Error(`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`);
|
|
1297
|
+
let _ = e.slice(p, f.index), v = m.slice(_.length + t.length), ee = a.length, y = g - 1, te = bt(_, v, y, !0, n, a, d);
|
|
1298
|
+
i = Ct(i, _, y, a.length - ee, ee, d), e = `${e.slice(0, p)}${te}${e.slice(p + m.length)}`, B.lastIndex += te.length - t.length - _.length - v.length, c.forEach((e) => e.hasRecursedWithin = !0), l = !0;
|
|
1299
|
+
} else if (p) d++, s.set(String(d), B.lastIndex), s.set(p, B.lastIndex), c.push({
|
|
1300
|
+
num: d,
|
|
1301
|
+
name: p
|
|
1302
|
+
});
|
|
1303
|
+
else if (t[0] === "(") {
|
|
1304
|
+
let e = t === "(";
|
|
1305
|
+
e && (d++, s.set(String(d), B.lastIndex)), c.push(e ? { num: d } : {});
|
|
1306
|
+
} else t === ")" && c.pop();
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
return n.push(...a), {
|
|
1310
|
+
pattern: e,
|
|
1311
|
+
captureTransfers: i,
|
|
1312
|
+
hiddenCaptures: n
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
function yt(e) {
|
|
1316
|
+
let t = `Max depth must be integer between 2 and 100; used ${e}`;
|
|
1317
|
+
if (!/^[1-9]\d*$/.test(e) || (e = +e, e < 2 || e > 100)) throw Error(t);
|
|
1318
|
+
}
|
|
1319
|
+
function bt(e, t, n, r, i, a, o) {
|
|
1320
|
+
let s = /* @__PURE__ */ new Set();
|
|
1321
|
+
r && lt(e + t, z, ({ groups: { captureName: e } }) => {
|
|
1322
|
+
s.add(e);
|
|
1323
|
+
}, F.DEFAULT);
|
|
1324
|
+
let c = [
|
|
1325
|
+
n,
|
|
1326
|
+
r ? s : null,
|
|
1327
|
+
i,
|
|
1328
|
+
a,
|
|
1329
|
+
o
|
|
1330
|
+
];
|
|
1331
|
+
return `${e}${xt(`(?:${e}`, "forward", ...c)}(?:)${xt(`${t})`, "backward", ...c)}${t}`;
|
|
1332
|
+
}
|
|
1333
|
+
function xt(e, t, n, r, i, a, o) {
|
|
1334
|
+
let s = (e) => t === "forward" ? e + 2 : n - e + 2 - 1, c = "";
|
|
1335
|
+
for (let t = 0; t < n; t++) {
|
|
1336
|
+
let n = s(t);
|
|
1337
|
+
c += ct(e, L`${_t}|\\k<(?<backref>[^>]+)>`, ({ 0: e, groups: { captureName: t, unnamed: s, backref: c } }) => {
|
|
1338
|
+
if (c && r && !r.has(c)) return e;
|
|
1339
|
+
let l = `_$${n}`;
|
|
1340
|
+
if (s || t) {
|
|
1341
|
+
let n = o + a.length + 1;
|
|
1342
|
+
return a.push(n), St(i, n), s ? e : `(?<${t}${l}>`;
|
|
1343
|
+
}
|
|
1344
|
+
return L`\k<${c}${l}>`;
|
|
1345
|
+
}, F.DEFAULT);
|
|
1346
|
+
}
|
|
1347
|
+
return c;
|
|
1348
|
+
}
|
|
1349
|
+
function St(e, t) {
|
|
1350
|
+
for (let n = 0; n < e.length; n++) e[n] >= t && e[n]++;
|
|
1351
|
+
}
|
|
1352
|
+
function Ct(e, t, n, r, i, a) {
|
|
1353
|
+
if (e.size && r) {
|
|
1354
|
+
let o = 0;
|
|
1355
|
+
lt(t, _t, () => o++, F.DEFAULT);
|
|
1356
|
+
let s = a - o + i, c = /* @__PURE__ */ new Map();
|
|
1357
|
+
return e.forEach((e, t) => {
|
|
1358
|
+
let i = (r - o * n) / n, a = o * n, l = t > s + o ? t + r : t, u = [];
|
|
1359
|
+
for (let t of e) if (t <= s) u.push(t);
|
|
1360
|
+
else if (t > s + o + i) u.push(t + r);
|
|
1361
|
+
else if (t <= s + o) for (let e = 0; e <= n; e++) u.push(t + o * e);
|
|
1362
|
+
else for (let e = 0; e <= n; e++) u.push(t + a + i * e);
|
|
1363
|
+
c.set(l, u);
|
|
1364
|
+
}), c;
|
|
1365
|
+
}
|
|
1366
|
+
return e;
|
|
1367
|
+
}
|
|
1368
|
+
// node_modules/.pnpm/oniguruma-to-es@4.3.6/node_modules/oniguruma-to-es/dist/esm/index.js
|
|
1369
|
+
var H = String.fromCodePoint, U = String.raw, W = {}, G = globalThis.RegExp;
|
|
1370
|
+
W.flagGroups = (() => {
|
|
1371
|
+
try {
|
|
1372
|
+
new G("(?i:)");
|
|
1373
|
+
} catch {
|
|
1374
|
+
return !1;
|
|
1375
|
+
}
|
|
1376
|
+
return !0;
|
|
1377
|
+
})(), W.unicodeSets = (() => {
|
|
1378
|
+
try {
|
|
1379
|
+
new G("[[]]", "v");
|
|
1380
|
+
} catch {
|
|
1381
|
+
return !1;
|
|
1382
|
+
}
|
|
1383
|
+
return !0;
|
|
1384
|
+
})(), W.bugFlagVLiteralHyphenIsRange = W.unicodeSets ? (() => {
|
|
1385
|
+
try {
|
|
1386
|
+
new G(U`[\d\-a]`, "v");
|
|
1387
|
+
} catch {
|
|
1388
|
+
return !0;
|
|
1389
|
+
}
|
|
1390
|
+
return !1;
|
|
1391
|
+
})() : !1, W.bugNestedClassIgnoresNegation = W.unicodeSets && new G("[[^a]]", "v").test("a");
|
|
1392
|
+
function K(e, { enable: t, disable: n }) {
|
|
1393
|
+
return {
|
|
1394
|
+
dotAll: !n?.dotAll && !!(t?.dotAll || e.dotAll),
|
|
1395
|
+
ignoreCase: !n?.ignoreCase && !!(t?.ignoreCase || e.ignoreCase)
|
|
1396
|
+
};
|
|
1397
|
+
}
|
|
1398
|
+
function q(e, t, n) {
|
|
1399
|
+
return e.has(t) || e.set(t, n), e.get(t);
|
|
1400
|
+
}
|
|
1401
|
+
function wt(e, t) {
|
|
1402
|
+
return Et[e] >= Et[t];
|
|
1403
|
+
}
|
|
1404
|
+
function Tt(e, t) {
|
|
1405
|
+
if (e == null) throw Error(t ?? "Value expected");
|
|
1406
|
+
return e;
|
|
1407
|
+
}
|
|
1408
|
+
var Et = {
|
|
1409
|
+
ES2025: 2025,
|
|
1410
|
+
ES2024: 2024,
|
|
1411
|
+
ES2018: 2018
|
|
1412
|
+
}, Dt = {
|
|
1413
|
+
auto: "auto",
|
|
1414
|
+
ES2025: "ES2025",
|
|
1415
|
+
ES2024: "ES2024",
|
|
1416
|
+
ES2018: "ES2018"
|
|
1417
|
+
};
|
|
1418
|
+
function Ot(e = {}) {
|
|
1419
|
+
if ({}.toString.call(e) !== "[object Object]") throw Error("Unexpected options");
|
|
1420
|
+
if (e.target !== void 0 && !Dt[e.target]) throw Error(`Unexpected target "${e.target}"`);
|
|
1421
|
+
let t = {
|
|
1422
|
+
accuracy: "default",
|
|
1423
|
+
avoidSubclass: !1,
|
|
1424
|
+
flags: "",
|
|
1425
|
+
global: !1,
|
|
1426
|
+
hasIndices: !1,
|
|
1427
|
+
lazyCompileLength: Infinity,
|
|
1428
|
+
target: "auto",
|
|
1429
|
+
verbose: !1,
|
|
1430
|
+
...e,
|
|
1431
|
+
rules: {
|
|
1432
|
+
allowOrphanBackrefs: !1,
|
|
1433
|
+
asciiWordBoundaries: !1,
|
|
1434
|
+
captureGroup: !1,
|
|
1435
|
+
recursionLimit: 20,
|
|
1436
|
+
singleline: !1,
|
|
1437
|
+
...e.rules
|
|
1438
|
+
}
|
|
1439
|
+
};
|
|
1440
|
+
return t.target === "auto" && (t.target = W.flagGroups ? "ES2025" : W.unicodeSets ? "ES2024" : "ES2018"), t;
|
|
1441
|
+
}
|
|
1442
|
+
var kt = "[ -\r ]", At = /* @__PURE__ */ new Set([H(304), H(305)]), J = U`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
1443
|
+
function jt(e) {
|
|
1444
|
+
if (At.has(e)) return [e];
|
|
1445
|
+
let t = /* @__PURE__ */ new Set(), n = e.toLowerCase(), r = n.toUpperCase(), i = Ft.get(n), a = Nt.get(n), o = Pt.get(n);
|
|
1446
|
+
return [...r].length === 1 && t.add(r), o && t.add(o), i && t.add(i), t.add(n), a && t.add(a), [...t];
|
|
1447
|
+
}
|
|
1448
|
+
var Mt = /* @__PURE__ */ new Map("C Other\nCc Control cntrl\nCf Format\nCn Unassigned\nCo Private_Use\nCs Surrogate\nL Letter\nLC Cased_Letter\nLl Lowercase_Letter\nLm Modifier_Letter\nLo Other_Letter\nLt Titlecase_Letter\nLu Uppercase_Letter\nM Mark Combining_Mark\nMc Spacing_Mark\nMe Enclosing_Mark\nMn Nonspacing_Mark\nN Number\nNd Decimal_Number digit\nNl Letter_Number\nNo Other_Number\nP Punctuation punct\nPc Connector_Punctuation\nPd Dash_Punctuation\nPe Close_Punctuation\nPf Final_Punctuation\nPi Initial_Punctuation\nPo Other_Punctuation\nPs Open_Punctuation\nS Symbol\nSc Currency_Symbol\nSk Modifier_Symbol\nSm Math_Symbol\nSo Other_Symbol\nZ Separator\nZl Line_Separator\nZp Paragraph_Separator\nZs Space_Separator\nASCII\nASCII_Hex_Digit AHex\nAlphabetic Alpha\nAny\nAssigned\nBidi_Control Bidi_C\nBidi_Mirrored Bidi_M\nCase_Ignorable CI\nCased\nChanges_When_Casefolded CWCF\nChanges_When_Casemapped CWCM\nChanges_When_Lowercased CWL\nChanges_When_NFKC_Casefolded CWKCF\nChanges_When_Titlecased CWT\nChanges_When_Uppercased CWU\nDash\nDefault_Ignorable_Code_Point DI\nDeprecated Dep\nDiacritic Dia\nEmoji\nEmoji_Component EComp\nEmoji_Modifier EMod\nEmoji_Modifier_Base EBase\nEmoji_Presentation EPres\nExtended_Pictographic ExtPict\nExtender Ext\nGrapheme_Base Gr_Base\nGrapheme_Extend Gr_Ext\nHex_Digit Hex\nIDS_Binary_Operator IDSB\nIDS_Trinary_Operator IDST\nID_Continue IDC\nID_Start IDS\nIdeographic Ideo\nJoin_Control Join_C\nLogical_Order_Exception LOE\nLowercase Lower\nMath\nNoncharacter_Code_Point NChar\nPattern_Syntax Pat_Syn\nPattern_White_Space Pat_WS\nQuotation_Mark QMark\nRadical\nRegional_Indicator RI\nSentence_Terminal STerm\nSoft_Dotted SD\nTerminal_Punctuation Term\nUnified_Ideograph UIdeo\nUppercase Upper\nVariation_Selector VS\nWhite_Space space\nXID_Continue XIDC\nXID_Start XIDS".split(/\s/).map((e) => [j(e), e])), Nt = /* @__PURE__ */ new Map([["s", H(383)], [H(383), "s"]]), Pt = /* @__PURE__ */ new Map([
|
|
1449
|
+
[H(223), H(7838)],
|
|
1450
|
+
[H(107), H(8490)],
|
|
1451
|
+
[H(229), H(8491)],
|
|
1452
|
+
[H(969), H(8486)]
|
|
1453
|
+
]), Ft = new Map([
|
|
1454
|
+
Y(453),
|
|
1455
|
+
Y(456),
|
|
1456
|
+
Y(459),
|
|
1457
|
+
Y(498),
|
|
1458
|
+
...Rt(8072, 8079),
|
|
1459
|
+
...Rt(8088, 8095),
|
|
1460
|
+
...Rt(8104, 8111),
|
|
1461
|
+
Y(8124),
|
|
1462
|
+
Y(8140),
|
|
1463
|
+
Y(8188)
|
|
1464
|
+
]), It = /* @__PURE__ */ new Map([
|
|
1465
|
+
["alnum", U`[\p{Alpha}\p{Nd}]`],
|
|
1466
|
+
["alpha", U`\p{Alpha}`],
|
|
1467
|
+
["ascii", U`\p{ASCII}`],
|
|
1468
|
+
["blank", U`[\p{Zs}\t]`],
|
|
1469
|
+
["cntrl", U`\p{Cc}`],
|
|
1470
|
+
["digit", U`\p{Nd}`],
|
|
1471
|
+
["graph", U`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],
|
|
1472
|
+
["lower", U`\p{Lower}`],
|
|
1473
|
+
["print", U`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],
|
|
1474
|
+
["punct", U`[\p{P}\p{S}]`],
|
|
1475
|
+
["space", U`\p{space}`],
|
|
1476
|
+
["upper", U`\p{Upper}`],
|
|
1477
|
+
["word", U`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
1478
|
+
["xdigit", U`\p{AHex}`]
|
|
1479
|
+
]);
|
|
1480
|
+
function Lt(e, t) {
|
|
1481
|
+
let n = [];
|
|
1482
|
+
for (let r = e; r <= t; r++) n.push(r);
|
|
1483
|
+
return n;
|
|
1484
|
+
}
|
|
1485
|
+
function Y(e) {
|
|
1486
|
+
let t = H(e);
|
|
1487
|
+
return [t.toLowerCase(), t];
|
|
1488
|
+
}
|
|
1489
|
+
function Rt(e, t) {
|
|
1490
|
+
return Lt(e, t).map((e) => Y(e));
|
|
1491
|
+
}
|
|
1492
|
+
var zt = /* @__PURE__ */ new Set([
|
|
1493
|
+
"Lower",
|
|
1494
|
+
"Lowercase",
|
|
1495
|
+
"Upper",
|
|
1496
|
+
"Uppercase",
|
|
1497
|
+
"Ll",
|
|
1498
|
+
"Lowercase_Letter",
|
|
1499
|
+
"Lt",
|
|
1500
|
+
"Titlecase_Letter",
|
|
1501
|
+
"Lu",
|
|
1502
|
+
"Uppercase_Letter"
|
|
1503
|
+
]);
|
|
1504
|
+
function Bt(e, t) {
|
|
1505
|
+
let n = {
|
|
1506
|
+
accuracy: "default",
|
|
1507
|
+
asciiWordBoundaries: !1,
|
|
1508
|
+
avoidSubclass: !1,
|
|
1509
|
+
bestEffortTarget: "ES2025",
|
|
1510
|
+
...t
|
|
1511
|
+
};
|
|
1512
|
+
Wt(e);
|
|
1513
|
+
let r = {
|
|
1514
|
+
accuracy: n.accuracy,
|
|
1515
|
+
asciiWordBoundaries: n.asciiWordBoundaries,
|
|
1516
|
+
avoidSubclass: n.avoidSubclass,
|
|
1517
|
+
flagDirectivesByAlt: /* @__PURE__ */ new Map(),
|
|
1518
|
+
jsGroupNameMap: /* @__PURE__ */ new Map(),
|
|
1519
|
+
minTargetEs2024: wt(n.bestEffortTarget, "ES2024"),
|
|
1520
|
+
passedLookbehind: !1,
|
|
1521
|
+
strategy: null,
|
|
1522
|
+
subroutineRefMap: /* @__PURE__ */ new Map(),
|
|
1523
|
+
supportedGNodes: /* @__PURE__ */ new Set(),
|
|
1524
|
+
digitIsAscii: e.flags.digitIsAscii,
|
|
1525
|
+
spaceIsAscii: e.flags.spaceIsAscii,
|
|
1526
|
+
wordIsAscii: e.flags.wordIsAscii
|
|
1527
|
+
};
|
|
1528
|
+
M(e, Vt, r);
|
|
1529
|
+
let i = {
|
|
1530
|
+
dotAll: e.flags.dotAll,
|
|
1531
|
+
ignoreCase: e.flags.ignoreCase
|
|
1532
|
+
}, a = {
|
|
1533
|
+
currentFlags: i,
|
|
1534
|
+
prevFlags: null,
|
|
1535
|
+
globalFlags: i,
|
|
1536
|
+
groupOriginByCopy: /* @__PURE__ */ new Map(),
|
|
1537
|
+
groupsByName: /* @__PURE__ */ new Map(),
|
|
1538
|
+
multiplexCapturesToLeftByRef: /* @__PURE__ */ new Map(),
|
|
1539
|
+
openRefs: /* @__PURE__ */ new Map(),
|
|
1540
|
+
reffedNodesByReferencer: /* @__PURE__ */ new Map(),
|
|
1541
|
+
subroutineRefMap: r.subroutineRefMap
|
|
1542
|
+
};
|
|
1543
|
+
return M(e, Ht, a), M(e, Ut, {
|
|
1544
|
+
groupsByName: a.groupsByName,
|
|
1545
|
+
highestOrphanBackref: 0,
|
|
1546
|
+
numCapturesToLeft: 0,
|
|
1547
|
+
reffedNodesByReferencer: a.reffedNodesByReferencer
|
|
1548
|
+
}), e._originMap = a.groupOriginByCopy, e._strategy = r.strategy, e;
|
|
1549
|
+
}
|
|
1550
|
+
var Vt = {
|
|
1551
|
+
AbsenceFunction({ node: e, parent: t, replaceWith: n }) {
|
|
1552
|
+
let { body: r, kind: i } = e;
|
|
1553
|
+
if (i === "repeater") {
|
|
1554
|
+
let e = D();
|
|
1555
|
+
e.body[0].body.push(O({
|
|
1556
|
+
negate: !0,
|
|
1557
|
+
body: r
|
|
1558
|
+
}), k("Any"));
|
|
1559
|
+
let i = D();
|
|
1560
|
+
i.body[0].body.push(Je("greedy", 0, Infinity, e)), n(Q(i, t), { traverse: !0 });
|
|
1561
|
+
} else throw Error("Unsupported absence function \"(?~|\"");
|
|
1562
|
+
},
|
|
1563
|
+
Alternative: {
|
|
1564
|
+
enter({ node: e, parent: t, key: n }, { flagDirectivesByAlt: r }) {
|
|
1565
|
+
let i = e.body.filter((e) => e.kind === "flags");
|
|
1566
|
+
for (let e = n + 1; e < t.body.length; e++) {
|
|
1567
|
+
let n = t.body[e];
|
|
1568
|
+
q(r, n, []).push(...i);
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
exit({ node: e }, { flagDirectivesByAlt: t }) {
|
|
1572
|
+
if (t.get(e)?.length) {
|
|
1573
|
+
let n = Zt(t.get(e));
|
|
1574
|
+
if (n) {
|
|
1575
|
+
let t = D({ flags: n });
|
|
1576
|
+
t.body[0].body = e.body, e.body = [Q(t, e)];
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1581
|
+
Assertion({ node: e, parent: t, key: n, container: r, root: i, remove: a, replaceWith: o }, s) {
|
|
1582
|
+
let { kind: c, negate: l } = e, { asciiWordBoundaries: u, avoidSubclass: d, supportedGNodes: f, wordIsAscii: p } = s;
|
|
1583
|
+
if (c === "text_segment_boundary") throw Error(`Unsupported text segment boundary "\\${l ? "Y" : "y"}"`);
|
|
1584
|
+
if (c === "line_end") o(Q(O({ body: [C({ body: [Be("string_end")] }), C({ body: [w(10)] })] }), t));
|
|
1585
|
+
else if (c === "line_start") o(Q(X(U`(?<=\A|\n(?!\z))`, { skipLookbehindValidation: !0 }), t));
|
|
1586
|
+
else if (c === "search_start") {
|
|
1587
|
+
if (f.has(e)) i.flags.sticky = !0, a();
|
|
1588
|
+
else {
|
|
1589
|
+
let e = r[n - 1];
|
|
1590
|
+
if (e && rn(e)) o(Q(O({ negate: !0 }), t));
|
|
1591
|
+
else if (d) throw Error(U`Uses "\G" in a way that requires a subclass`);
|
|
1592
|
+
else o(Z(Be("string_start"), t)), s.strategy = "clip_search";
|
|
1593
|
+
}
|
|
1594
|
+
} else if (c !== "string_end" && c !== "string_start") {
|
|
1595
|
+
if (c === "string_end_newline") o(Q(X(U`(?=\n?\z)`), t));
|
|
1596
|
+
else if (c === "word_boundary") {
|
|
1597
|
+
if (!p && !u) {
|
|
1598
|
+
let e = `(?:(?<=${J})(?!${J})|(?<!${J})(?=${J}))`, n = `(?:(?<=${J})(?=${J})|(?<!${J})(?!${J}))`;
|
|
1599
|
+
o(Q(X(l ? n : e), t));
|
|
1600
|
+
}
|
|
1601
|
+
} else throw Error(`Unexpected assertion kind "${c}"`);
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
Backreference({ node: e }, { jsGroupNameMap: t }) {
|
|
1605
|
+
let { ref: n } = e;
|
|
1606
|
+
typeof n == "string" && !on(n) && (n = Xt(n, t), e.ref = n);
|
|
1607
|
+
},
|
|
1608
|
+
CapturingGroup({ node: e }, { jsGroupNameMap: t, subroutineRefMap: n }) {
|
|
1609
|
+
let { name: r } = e;
|
|
1610
|
+
r && !on(r) && (r = Xt(r, t), e.name = r), n.set(e.number, e), r && n.set(r, e);
|
|
1611
|
+
},
|
|
1612
|
+
CharacterClassRange({ node: e, parent: t, replaceWith: n }) {
|
|
1613
|
+
t.kind === "intersection" && n(Q(T({ body: [e] }), t), { traverse: !0 });
|
|
1614
|
+
},
|
|
1615
|
+
CharacterSet({ node: e, parent: t, replaceWith: n }, { accuracy: r, minTargetEs2024: i, digitIsAscii: a, spaceIsAscii: o, wordIsAscii: s }) {
|
|
1616
|
+
let { kind: c, negate: l, value: u } = e;
|
|
1617
|
+
if (a && (c === "digit" || u === "digit")) n(Z(E("digit", { negate: l }), t));
|
|
1618
|
+
else if (o && (c === "space" || u === "space")) n(Q(sn(X(kt), l), t));
|
|
1619
|
+
else if (s && (c === "word" || u === "word")) n(Z(E("word", { negate: l }), t));
|
|
1620
|
+
else if (c === "any") n(Z(k("Any"), t));
|
|
1621
|
+
else if (c === "digit") n(Z(k("Nd", { negate: l }), t));
|
|
1622
|
+
else if (c !== "dot") {
|
|
1623
|
+
if (c === "text_segment") {
|
|
1624
|
+
if (r === "strict") throw Error(U`Use of "\X" requires non-strict accuracy`);
|
|
1625
|
+
let e = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?", a = U`\p{RI}{2}|${e}(?:\u200D${e})*`;
|
|
1626
|
+
n(Q(X(U`(?>\r\n|${i ? U`\p{RGI_Emoji}` : a}|\P{M}\p{M}*)`, { skipPropertyNameValidation: !0 }), t));
|
|
1627
|
+
} else if (c === "hex") n(Z(k("AHex", { negate: l }), t));
|
|
1628
|
+
else if (c === "newline") n(Q(X(l ? "[^\n]" : "(?>\r\n?|[\n\v\f
\u2028\u2029])"), t));
|
|
1629
|
+
else if (c === "posix") {
|
|
1630
|
+
if (!i && (u === "graph" || u === "print")) {
|
|
1631
|
+
if (r === "strict") throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);
|
|
1632
|
+
let e = {
|
|
1633
|
+
graph: "!-~",
|
|
1634
|
+
print: " -~"
|
|
1635
|
+
}[u];
|
|
1636
|
+
l && (e = `\0-${H(e.codePointAt(0) - 1)}${H(e.codePointAt(2) + 1)}-\u{10FFFF}`), n(Q(X(`[${e}]`), t));
|
|
1637
|
+
} else n(Q(sn(X(It.get(u)), l), t));
|
|
1638
|
+
} else if (c === "property") Mt.has(j(u)) || (e.key = "sc");
|
|
1639
|
+
else if (c === "space") n(Z(k("space", { negate: l }), t));
|
|
1640
|
+
else if (c === "word") n(Q(sn(X(J), l), t));
|
|
1641
|
+
else throw Error(`Unexpected character set kind "${c}"`);
|
|
1642
|
+
}
|
|
1643
|
+
},
|
|
1644
|
+
Directive({ node: e, parent: t, root: n, remove: r, replaceWith: i, removeAllPrevSiblings: a, removeAllNextSiblings: o }) {
|
|
1645
|
+
let { kind: s, flags: c } = e;
|
|
1646
|
+
if (s === "flags") {
|
|
1647
|
+
if (!c.enable && !c.disable) r();
|
|
1648
|
+
else {
|
|
1649
|
+
let e = D({ flags: c });
|
|
1650
|
+
e.body[0].body = o(), i(Q(e, t), { traverse: !0 });
|
|
1651
|
+
}
|
|
1652
|
+
} else if (s === "keep") {
|
|
1653
|
+
let e = n.body[0], r = n.body.length === 1 && De(e, { type: "Group" }) && e.body[0].body.length === 1 ? e.body[0] : n;
|
|
1654
|
+
if (t.parent !== r || r.body.length > 1) throw Error(U`Uses "\K" in a way that's unsupported`);
|
|
1655
|
+
let o = O({ behind: !0 });
|
|
1656
|
+
o.body[0].body = a(), i(Q(o, t));
|
|
1657
|
+
} else throw Error(`Unexpected directive kind "${s}"`);
|
|
1658
|
+
},
|
|
1659
|
+
Flags({ node: e, parent: t }) {
|
|
1660
|
+
if (e.posixIsAscii) throw Error("Unsupported flag \"P\"");
|
|
1661
|
+
if (e.textSegmentMode === "word") throw Error("Unsupported flag \"y{w}\"");
|
|
1662
|
+
[
|
|
1663
|
+
"digitIsAscii",
|
|
1664
|
+
"extended",
|
|
1665
|
+
"posixIsAscii",
|
|
1666
|
+
"spaceIsAscii",
|
|
1667
|
+
"wordIsAscii",
|
|
1668
|
+
"textSegmentMode"
|
|
1669
|
+
].forEach((t) => delete e[t]), Object.assign(e, {
|
|
1670
|
+
global: !1,
|
|
1671
|
+
hasIndices: !1,
|
|
1672
|
+
multiline: !1,
|
|
1673
|
+
sticky: e.sticky ?? !1
|
|
1674
|
+
}), t.options = {
|
|
1675
|
+
disable: {
|
|
1676
|
+
x: !0,
|
|
1677
|
+
n: !0
|
|
1678
|
+
},
|
|
1679
|
+
force: { v: !0 }
|
|
1680
|
+
};
|
|
1681
|
+
},
|
|
1682
|
+
Group({ node: e }) {
|
|
1683
|
+
if (!e.flags) return;
|
|
1684
|
+
let { enable: t, disable: n } = e.flags;
|
|
1685
|
+
t?.extended && delete t.extended, n?.extended && delete n.extended, t?.dotAll && n?.dotAll && delete t.dotAll, t?.ignoreCase && n?.ignoreCase && delete t.ignoreCase, t && !Object.keys(t).length && delete e.flags.enable, n && !Object.keys(n).length && delete e.flags.disable, !e.flags.enable && !e.flags.disable && delete e.flags;
|
|
1686
|
+
},
|
|
1687
|
+
LookaroundAssertion({ node: e }, t) {
|
|
1688
|
+
let { kind: n } = e;
|
|
1689
|
+
n === "lookbehind" && (t.passedLookbehind = !0);
|
|
1690
|
+
},
|
|
1691
|
+
NamedCallout({ node: e, parent: t, replaceWith: n }) {
|
|
1692
|
+
let { kind: r } = e;
|
|
1693
|
+
if (r === "fail") n(Q(O({ negate: !0 }), t));
|
|
1694
|
+
else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`);
|
|
1695
|
+
},
|
|
1696
|
+
Quantifier({ node: e }) {
|
|
1697
|
+
if (e.body.type === "Quantifier") {
|
|
1698
|
+
let t = D();
|
|
1699
|
+
t.body[0].body.push(e.body), e.body = Q(t, e);
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1702
|
+
Regex: {
|
|
1703
|
+
enter({ node: e }, { supportedGNodes: t }) {
|
|
1704
|
+
let n = [], r = !1, i = !1;
|
|
1705
|
+
for (let t of e.body) if (t.body.length === 1 && t.body[0].kind === "search_start") t.body.pop();
|
|
1706
|
+
else {
|
|
1707
|
+
let e = en(t.body);
|
|
1708
|
+
e ? (r = !0, Array.isArray(e) ? n.push(...e) : n.push(e)) : i = !0;
|
|
1709
|
+
}
|
|
1710
|
+
r && !i && n.forEach((e) => t.add(e));
|
|
1711
|
+
},
|
|
1712
|
+
exit(e, { accuracy: t, passedLookbehind: n, strategy: r }) {
|
|
1713
|
+
if (t === "strict" && n && r) throw Error(U`Uses "\G" in a way that requires non-strict accuracy`);
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1716
|
+
Subroutine({ node: e }, { jsGroupNameMap: t }) {
|
|
1717
|
+
let { ref: n } = e;
|
|
1718
|
+
typeof n == "string" && !on(n) && (n = Xt(n, t), e.ref = n);
|
|
1719
|
+
}
|
|
1720
|
+
}, Ht = {
|
|
1721
|
+
Backreference({ node: e }, { multiplexCapturesToLeftByRef: t, reffedNodesByReferencer: n }) {
|
|
1722
|
+
let { orphan: r, ref: i } = e;
|
|
1723
|
+
r || n.set(e, [...t.get(i).map(({ node: e }) => e)]);
|
|
1724
|
+
},
|
|
1725
|
+
CapturingGroup: {
|
|
1726
|
+
enter({ node: e, parent: t, replaceWith: n, skip: r }, { groupOriginByCopy: i, groupsByName: a, multiplexCapturesToLeftByRef: o, openRefs: s, reffedNodesByReferencer: c }) {
|
|
1727
|
+
let l = i.get(e);
|
|
1728
|
+
if (l && s.has(e.number)) {
|
|
1729
|
+
let r = Z(Jt(e.number), t);
|
|
1730
|
+
c.set(r, s.get(e.number)), n(r);
|
|
1731
|
+
return;
|
|
1732
|
+
}
|
|
1733
|
+
s.set(e.number, e), o.set(e.number, []), e.name && q(o, e.name, []);
|
|
1734
|
+
let u = o.get(e.name ?? e.number);
|
|
1735
|
+
for (let t = 0; t < u.length; t++) {
|
|
1736
|
+
let n = u[t];
|
|
1737
|
+
if (l === n.node || l && l === n.origin || e === n.origin) {
|
|
1738
|
+
u.splice(t, 1);
|
|
1739
|
+
break;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
if (o.get(e.number).push({
|
|
1743
|
+
node: e,
|
|
1744
|
+
origin: l
|
|
1745
|
+
}), e.name && o.get(e.name).push({
|
|
1746
|
+
node: e,
|
|
1747
|
+
origin: l
|
|
1748
|
+
}), e.name) {
|
|
1749
|
+
let t = q(a, e.name, /* @__PURE__ */ new Map()), n = !1;
|
|
1750
|
+
if (l) n = !0;
|
|
1751
|
+
else for (let e of t.values()) if (!e.hasDuplicateNameToRemove) {
|
|
1752
|
+
n = !0;
|
|
1753
|
+
break;
|
|
1754
|
+
}
|
|
1755
|
+
a.get(e.name).set(e, {
|
|
1756
|
+
node: e,
|
|
1757
|
+
hasDuplicateNameToRemove: n
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
exit({ node: e }, { openRefs: t }) {
|
|
1762
|
+
t.get(e.number) === e && t.delete(e.number);
|
|
1763
|
+
}
|
|
1764
|
+
},
|
|
1765
|
+
Group: {
|
|
1766
|
+
enter({ node: e }, t) {
|
|
1767
|
+
t.prevFlags = t.currentFlags, e.flags && (t.currentFlags = K(t.currentFlags, e.flags));
|
|
1768
|
+
},
|
|
1769
|
+
exit(e, t) {
|
|
1770
|
+
t.currentFlags = t.prevFlags;
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
Subroutine({ node: e, parent: t, replaceWith: n }, r) {
|
|
1774
|
+
let { isRecursive: i, ref: a } = e;
|
|
1775
|
+
if (i) {
|
|
1776
|
+
let n = t;
|
|
1777
|
+
for (; (n = n.parent) && (n.type !== "CapturingGroup" || n.name !== a && n.number !== a););
|
|
1778
|
+
r.reffedNodesByReferencer.set(e, n);
|
|
1779
|
+
return;
|
|
1780
|
+
}
|
|
1781
|
+
let o = r.subroutineRefMap.get(a), s = a === 0, c = s ? Jt(0) : qt(o, r.groupOriginByCopy, null), l = c;
|
|
1782
|
+
if (!s) {
|
|
1783
|
+
let e = Zt(Yt(o, (e) => e.type === "Group" && !!e.flags)), t = e ? K(r.globalFlags, e) : r.globalFlags;
|
|
1784
|
+
Gt(t, r.currentFlags) || (l = D({ flags: Qt(t) }), l.body[0].body.push(c));
|
|
1785
|
+
}
|
|
1786
|
+
n(Q(l, t), { traverse: !s });
|
|
1787
|
+
}
|
|
1788
|
+
}, Ut = {
|
|
1789
|
+
Backreference({ node: e, parent: t, replaceWith: n }, r) {
|
|
1790
|
+
if (e.orphan) {
|
|
1791
|
+
r.highestOrphanBackref = Math.max(r.highestOrphanBackref, e.ref);
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
let i = r.reffedNodesByReferencer.get(e).filter((t) => Kt(t, e));
|
|
1795
|
+
i.length ? i.length > 1 ? n(Q(D({
|
|
1796
|
+
atomic: !0,
|
|
1797
|
+
body: i.reverse().map((e) => C({ body: [Ve(e.number)] }))
|
|
1798
|
+
}), t)) : e.ref = i[0].number : n(Q(O({ negate: !0 }), t));
|
|
1799
|
+
},
|
|
1800
|
+
CapturingGroup({ node: e }, t) {
|
|
1801
|
+
e.number = ++t.numCapturesToLeft, e.name && t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove && delete e.name;
|
|
1802
|
+
},
|
|
1803
|
+
Regex: { exit({ node: e }, t) {
|
|
1804
|
+
let n = Math.max(t.highestOrphanBackref - t.numCapturesToLeft, 0);
|
|
1805
|
+
for (let t = 0; t < n; t++) {
|
|
1806
|
+
let t = He();
|
|
1807
|
+
e.body.at(-1).body.push(t);
|
|
1808
|
+
}
|
|
1809
|
+
} },
|
|
1810
|
+
Subroutine({ node: e }, t) {
|
|
1811
|
+
e.isRecursive && e.ref !== 0 && (e.ref = t.reffedNodesByReferencer.get(e).number);
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
function Wt(e) {
|
|
1815
|
+
M(e, { "*"({ node: e, parent: t }) {
|
|
1816
|
+
e.parent = t;
|
|
1817
|
+
} });
|
|
1818
|
+
}
|
|
1819
|
+
function Gt(e, t) {
|
|
1820
|
+
return e.dotAll === t.dotAll && e.ignoreCase === t.ignoreCase;
|
|
1821
|
+
}
|
|
1822
|
+
function Kt(e, t) {
|
|
1823
|
+
let n = t;
|
|
1824
|
+
do {
|
|
1825
|
+
if (n.type === "Regex") return !1;
|
|
1826
|
+
if (n.type === "Alternative") continue;
|
|
1827
|
+
if (n === e) return !1;
|
|
1828
|
+
let t = $t(n.parent);
|
|
1829
|
+
for (let r of t) {
|
|
1830
|
+
if (r === n) break;
|
|
1831
|
+
if (r === e || tn(r, e)) return !0;
|
|
1832
|
+
}
|
|
1833
|
+
} while (n = n.parent);
|
|
1834
|
+
throw Error("Unexpected path");
|
|
1835
|
+
}
|
|
1836
|
+
function qt(e, t, n, r) {
|
|
1837
|
+
let i = Array.isArray(e) ? [] : {};
|
|
1838
|
+
for (let [a, o] of Object.entries(e)) a === "parent" ? i.parent = Array.isArray(n) ? r : n : o && typeof o == "object" ? i[a] = qt(o, t, i, n) : (a === "type" && o === "CapturingGroup" && t.set(i, t.get(e) ?? e), i[a] = o);
|
|
1839
|
+
return i;
|
|
1840
|
+
}
|
|
1841
|
+
function Jt(e) {
|
|
1842
|
+
let t = Xe(e);
|
|
1843
|
+
return t.isRecursive = !0, t;
|
|
1844
|
+
}
|
|
1845
|
+
function Yt(e, t) {
|
|
1846
|
+
let n = [];
|
|
1847
|
+
for (; e = e.parent;) (!t || t(e)) && n.push(e);
|
|
1848
|
+
return n;
|
|
1849
|
+
}
|
|
1850
|
+
function Xt(e, t) {
|
|
1851
|
+
if (t.has(e)) return t.get(e);
|
|
1852
|
+
let n = `$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu, "_")}`;
|
|
1853
|
+
return t.set(e, n), n;
|
|
1854
|
+
}
|
|
1855
|
+
function Zt(e) {
|
|
1856
|
+
let t = ["dotAll", "ignoreCase"], n = {
|
|
1857
|
+
enable: {},
|
|
1858
|
+
disable: {}
|
|
1859
|
+
};
|
|
1860
|
+
return e.forEach(({ flags: e }) => {
|
|
1861
|
+
t.forEach((t) => {
|
|
1862
|
+
e.enable?.[t] && (delete n.disable[t], n.enable[t] = !0), e.disable?.[t] && (n.disable[t] = !0);
|
|
1863
|
+
});
|
|
1864
|
+
}), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
|
|
1865
|
+
}
|
|
1866
|
+
function Qt({ dotAll: e, ignoreCase: t }) {
|
|
1867
|
+
let n = {};
|
|
1868
|
+
return (e || t) && (n.enable = {}, e && (n.enable.dotAll = !0), t && (n.enable.ignoreCase = !0)), e && t || (n.disable = {}, !e && (n.disable.dotAll = !0), !t && (n.disable.ignoreCase = !0)), n;
|
|
1869
|
+
}
|
|
1870
|
+
function $t(e) {
|
|
1871
|
+
if (!e) throw Error("Node expected");
|
|
1872
|
+
let { body: t } = e;
|
|
1873
|
+
return Array.isArray(t) ? t : t ? [t] : null;
|
|
1874
|
+
}
|
|
1875
|
+
function en(e) {
|
|
1876
|
+
let t = e.find((e) => e.kind === "search_start" || an(e, { negate: !1 }) || !nn(e));
|
|
1877
|
+
if (!t) return null;
|
|
1878
|
+
if (t.kind === "search_start") return t;
|
|
1879
|
+
if (t.type === "LookaroundAssertion") return t.body[0].body[0];
|
|
1880
|
+
if (t.type === "CapturingGroup" || t.type === "Group") {
|
|
1881
|
+
let e = [];
|
|
1882
|
+
for (let n of t.body) {
|
|
1883
|
+
let t = en(n.body);
|
|
1884
|
+
if (!t) return null;
|
|
1885
|
+
Array.isArray(t) ? e.push(...t) : e.push(t);
|
|
1886
|
+
}
|
|
1887
|
+
return e;
|
|
1888
|
+
}
|
|
1889
|
+
return null;
|
|
1890
|
+
}
|
|
1891
|
+
function tn(e, t) {
|
|
1892
|
+
let n = $t(e) ?? [];
|
|
1893
|
+
for (let e of n) if (e === t || tn(e, t)) return !0;
|
|
1894
|
+
return !1;
|
|
1895
|
+
}
|
|
1896
|
+
function nn({ type: e }) {
|
|
1897
|
+
return e === "Assertion" || e === "Directive" || e === "LookaroundAssertion";
|
|
1898
|
+
}
|
|
1899
|
+
function rn(e) {
|
|
1900
|
+
let t = [
|
|
1901
|
+
"Character",
|
|
1902
|
+
"CharacterClass",
|
|
1903
|
+
"CharacterSet"
|
|
1904
|
+
];
|
|
1905
|
+
return t.includes(e.type) || e.type === "Quantifier" && e.min && t.includes(e.body.type);
|
|
1906
|
+
}
|
|
1907
|
+
function an(e, t) {
|
|
1908
|
+
let n = {
|
|
1909
|
+
negate: null,
|
|
1910
|
+
...t
|
|
1911
|
+
};
|
|
1912
|
+
return e.type === "LookaroundAssertion" && (n.negate === null || e.negate === n.negate) && e.body.length === 1 && De(e.body[0], {
|
|
1913
|
+
type: "Assertion",
|
|
1914
|
+
kind: "search_start"
|
|
1915
|
+
});
|
|
1916
|
+
}
|
|
1917
|
+
function on(e) {
|
|
1918
|
+
return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e);
|
|
1919
|
+
}
|
|
1920
|
+
function X(e, t) {
|
|
1921
|
+
let n = Ae(e, {
|
|
1922
|
+
...t,
|
|
1923
|
+
unicodePropertyMap: Mt
|
|
1924
|
+
}).body;
|
|
1925
|
+
return n.length > 1 || n[0].body.length > 1 ? D({ body: n }) : n[0].body[0];
|
|
1926
|
+
}
|
|
1927
|
+
function sn(e, t) {
|
|
1928
|
+
return e.negate = t, e;
|
|
1929
|
+
}
|
|
1930
|
+
function Z(e, t) {
|
|
1931
|
+
return e.parent = t, e;
|
|
1932
|
+
}
|
|
1933
|
+
function Q(e, t) {
|
|
1934
|
+
return Wt(e), e.parent = t, e;
|
|
1935
|
+
}
|
|
1936
|
+
function cn(e, t) {
|
|
1937
|
+
let n = Ot(t), r = wt(n.target, "ES2024"), i = wt(n.target, "ES2025"), a = n.rules.recursionLimit;
|
|
1938
|
+
if (!Number.isInteger(a) || a < 2 || a > 20) throw Error("Invalid recursionLimit; use 2-20");
|
|
1939
|
+
let o = null, s = null;
|
|
1940
|
+
if (!i) {
|
|
1941
|
+
let t = [e.flags.ignoreCase];
|
|
1942
|
+
M(e, ln, {
|
|
1943
|
+
getCurrentModI: () => t.at(-1),
|
|
1944
|
+
popModI() {
|
|
1945
|
+
t.pop();
|
|
1946
|
+
},
|
|
1947
|
+
pushModI(e) {
|
|
1948
|
+
t.push(e);
|
|
1949
|
+
},
|
|
1950
|
+
setHasCasedChar() {
|
|
1951
|
+
t.at(-1) ? o = !0 : s = !0;
|
|
1952
|
+
}
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
let c = {
|
|
1956
|
+
dotAll: e.flags.dotAll,
|
|
1957
|
+
ignoreCase: !(!e.flags.ignoreCase && !o || s)
|
|
1958
|
+
}, l = e, u = {
|
|
1959
|
+
accuracy: n.accuracy,
|
|
1960
|
+
appliedGlobalFlags: c,
|
|
1961
|
+
captureMap: /* @__PURE__ */ new Map(),
|
|
1962
|
+
currentFlags: {
|
|
1963
|
+
dotAll: e.flags.dotAll,
|
|
1964
|
+
ignoreCase: e.flags.ignoreCase
|
|
1965
|
+
},
|
|
1966
|
+
inCharClass: !1,
|
|
1967
|
+
lastNode: l,
|
|
1968
|
+
originMap: e._originMap,
|
|
1969
|
+
recursionLimit: a,
|
|
1970
|
+
useAppliedIgnoreCase: !!(!i && o && s),
|
|
1971
|
+
useFlagMods: i,
|
|
1972
|
+
useFlagV: r,
|
|
1973
|
+
verbose: n.verbose
|
|
1974
|
+
};
|
|
1975
|
+
function d(e) {
|
|
1976
|
+
return u.lastNode = l, l = e, Tt(un[e.type], `Unexpected node type "${e.type}"`)(e, u, d);
|
|
1977
|
+
}
|
|
1978
|
+
let f = {
|
|
1979
|
+
pattern: e.body.map(d).join("|"),
|
|
1980
|
+
flags: d(e.flags),
|
|
1981
|
+
options: { ...e.options }
|
|
1982
|
+
};
|
|
1983
|
+
return r || (delete f.options.force.v, f.options.disable.v = !0, f.options.unicodeSetsPlugin = null), f._captureTransfers = /* @__PURE__ */ new Map(), f._hiddenCaptures = [], u.captureMap.forEach((e, t) => {
|
|
1984
|
+
e.hidden && f._hiddenCaptures.push(t), e.transferTo && q(f._captureTransfers, e.transferTo, []).push(t);
|
|
1985
|
+
}), f;
|
|
1986
|
+
}
|
|
1987
|
+
var ln = {
|
|
1988
|
+
"*": {
|
|
1989
|
+
enter({ node: e }, t) {
|
|
1990
|
+
if (xn(e)) {
|
|
1991
|
+
let n = t.getCurrentModI();
|
|
1992
|
+
t.pushModI(e.flags ? K({ ignoreCase: n }, e.flags).ignoreCase : n);
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1995
|
+
exit({ node: e }, t) {
|
|
1996
|
+
xn(e) && t.popModI();
|
|
1997
|
+
}
|
|
1998
|
+
},
|
|
1999
|
+
Backreference(e, t) {
|
|
2000
|
+
t.setHasCasedChar();
|
|
2001
|
+
},
|
|
2002
|
+
Character({ node: e }, t) {
|
|
2003
|
+
gn(H(e.value)) && t.setHasCasedChar();
|
|
2004
|
+
},
|
|
2005
|
+
CharacterClassRange({ node: e, skip: t }, n) {
|
|
2006
|
+
t(), _n(e, { firstOnly: !0 }).length && n.setHasCasedChar();
|
|
2007
|
+
},
|
|
2008
|
+
CharacterSet({ node: e }, t) {
|
|
2009
|
+
e.kind === "property" && zt.has(e.value) && t.setHasCasedChar();
|
|
2010
|
+
}
|
|
2011
|
+
}, un = {
|
|
2012
|
+
Alternative({ body: e }, t, n) {
|
|
2013
|
+
return e.map(n).join("");
|
|
2014
|
+
},
|
|
2015
|
+
Assertion({ kind: e, negate: t }) {
|
|
2016
|
+
if (e === "string_end") return "$";
|
|
2017
|
+
if (e === "string_start") return "^";
|
|
2018
|
+
if (e === "word_boundary") return t ? U`\B` : U`\b`;
|
|
2019
|
+
throw Error(`Unexpected assertion kind "${e}"`);
|
|
2020
|
+
},
|
|
2021
|
+
Backreference({ ref: e }, t) {
|
|
2022
|
+
if (typeof e != "number") throw Error("Unexpected named backref in transformed AST");
|
|
2023
|
+
if (!t.useFlagMods && t.accuracy === "strict" && t.currentFlags.ignoreCase && !t.captureMap.get(e).ignoreCase) throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");
|
|
2024
|
+
return "\\" + e;
|
|
2025
|
+
},
|
|
2026
|
+
CapturingGroup(e, t, n) {
|
|
2027
|
+
let { body: r, name: i, number: a } = e, o = { ignoreCase: t.currentFlags.ignoreCase }, s = t.originMap.get(e);
|
|
2028
|
+
return s && (o.hidden = !0, a > s.number && (o.transferTo = s.number)), t.captureMap.set(a, o), `(${i ? `?<${i}>` : ""}${r.map(n).join("|")})`;
|
|
2029
|
+
},
|
|
2030
|
+
Character({ value: e }, t) {
|
|
2031
|
+
let n = H(e), r = $(e, {
|
|
2032
|
+
escDigit: t.lastNode.type === "Backreference",
|
|
2033
|
+
inCharClass: t.inCharClass,
|
|
2034
|
+
useFlagV: t.useFlagV
|
|
2035
|
+
});
|
|
2036
|
+
if (r !== n) return r;
|
|
2037
|
+
if (t.useAppliedIgnoreCase && t.currentFlags.ignoreCase && gn(n)) {
|
|
2038
|
+
let e = jt(n);
|
|
2039
|
+
return t.inCharClass ? e.join("") : e.length > 1 ? `[${e.join("")}]` : e[0];
|
|
2040
|
+
}
|
|
2041
|
+
return n;
|
|
2042
|
+
},
|
|
2043
|
+
CharacterClass(e, t, n) {
|
|
2044
|
+
let { kind: r, negate: i, parent: a } = e, { body: o } = e;
|
|
2045
|
+
if (r === "intersection" && !t.useFlagV) throw Error("Use of character class intersection requires min target ES2024");
|
|
2046
|
+
W.bugFlagVLiteralHyphenIsRange && t.useFlagV && o.some(Cn) && (o = [w(45), ...o.filter((e) => !Cn(e))]);
|
|
2047
|
+
let s = () => `[${i ? "^" : ""}${o.map(n).join(r === "intersection" ? "&&" : "")}]`;
|
|
2048
|
+
if (!t.inCharClass) {
|
|
2049
|
+
if ((!t.useFlagV || W.bugNestedClassIgnoresNegation) && !i) {
|
|
2050
|
+
let t = o.filter((e) => e.type === "CharacterClass" && e.kind === "union" && e.negate);
|
|
2051
|
+
if (t.length) {
|
|
2052
|
+
let r = D(), i = r.body[0];
|
|
2053
|
+
return r.parent = a, i.parent = r, o = o.filter((e) => !t.includes(e)), e.body = o, o.length ? (e.parent = i, i.body.push(e)) : r.body.pop(), t.forEach((e) => {
|
|
2054
|
+
let t = C({ body: [e] });
|
|
2055
|
+
e.parent = t, t.parent = r, r.body.push(t);
|
|
2056
|
+
}), n(r);
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
t.inCharClass = !0;
|
|
2060
|
+
let r = s();
|
|
2061
|
+
return t.inCharClass = !1, r;
|
|
2062
|
+
}
|
|
2063
|
+
let c = o[0];
|
|
2064
|
+
if (r === "union" && !i && c && ((!t.useFlagV || !t.verbose) && a.kind === "union" && !(W.bugFlagVLiteralHyphenIsRange && t.useFlagV) || !t.verbose && a.kind === "intersection" && o.length === 1 && c.type !== "CharacterClassRange")) return o.map(n).join("");
|
|
2065
|
+
if (!t.useFlagV && a.type === "CharacterClass") throw Error("Uses nested character class in a way that requires min target ES2024");
|
|
2066
|
+
return s();
|
|
2067
|
+
},
|
|
2068
|
+
CharacterClassRange(e, t) {
|
|
2069
|
+
let n = e.min.value, r = e.max.value, i = {
|
|
2070
|
+
escDigit: !1,
|
|
2071
|
+
inCharClass: !0,
|
|
2072
|
+
useFlagV: t.useFlagV
|
|
2073
|
+
}, a = $(n, i), o = $(r, i), s = /* @__PURE__ */ new Set();
|
|
2074
|
+
return t.useAppliedIgnoreCase && t.currentFlags.ignoreCase && vn(_n(e)).forEach((e) => {
|
|
2075
|
+
s.add(Array.isArray(e) ? `${$(e[0], i)}-${$(e[1], i)}` : $(e, i));
|
|
2076
|
+
}), `${a}-${o}${[...s].join("")}`;
|
|
2077
|
+
},
|
|
2078
|
+
CharacterSet({ kind: e, negate: t, value: n, key: r }, i) {
|
|
2079
|
+
if (e === "dot") return i.currentFlags.dotAll ? i.appliedGlobalFlags.dotAll || i.useFlagMods ? "." : "[^]" : U`[^\n]`;
|
|
2080
|
+
if (e === "digit") return t ? U`\D` : U`\d`;
|
|
2081
|
+
if (e === "property") {
|
|
2082
|
+
if (i.useAppliedIgnoreCase && i.currentFlags.ignoreCase && zt.has(n)) throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);
|
|
2083
|
+
return `${t ? U`\P` : U`\p`}{${r ? `${r}=` : ""}${n}}`;
|
|
2084
|
+
}
|
|
2085
|
+
if (e === "word") return t ? U`\W` : U`\w`;
|
|
2086
|
+
throw Error(`Unexpected character set kind "${e}"`);
|
|
2087
|
+
},
|
|
2088
|
+
Flags(e, t) {
|
|
2089
|
+
return (t.appliedGlobalFlags.ignoreCase ? "i" : "") + (e.dotAll ? "s" : "") + (e.sticky ? "y" : "");
|
|
2090
|
+
},
|
|
2091
|
+
Group({ atomic: e, body: t, flags: n, parent: r }, i, a) {
|
|
2092
|
+
let o = i.currentFlags;
|
|
2093
|
+
n && (i.currentFlags = K(o, n));
|
|
2094
|
+
let s = t.map(a).join("|"), c = !i.verbose && t.length === 1 && r.type !== "Quantifier" && !e && (!i.useFlagMods || !n) ? s : `(?${yn(e, n, i.useFlagMods)}${s})`;
|
|
2095
|
+
return i.currentFlags = o, c;
|
|
2096
|
+
},
|
|
2097
|
+
LookaroundAssertion({ body: e, kind: t, negate: n }, r, i) {
|
|
2098
|
+
return `(?${`${t === "lookahead" ? "" : "<"}${n ? "!" : "="}`}${e.map(i).join("|")})`;
|
|
2099
|
+
},
|
|
2100
|
+
Quantifier(e, t, n) {
|
|
2101
|
+
return n(e.body) + bn(e);
|
|
2102
|
+
},
|
|
2103
|
+
Subroutine({ isRecursive: e, ref: t }, n) {
|
|
2104
|
+
if (!e) throw Error("Unexpected non-recursive subroutine in transformed AST");
|
|
2105
|
+
let r = n.recursionLimit;
|
|
2106
|
+
return t === 0 ? `(?R=${r})` : U`\g<${t}&R=${r}>`;
|
|
2107
|
+
}
|
|
2108
|
+
}, dn = /* @__PURE__ */ new Set([
|
|
2109
|
+
"$",
|
|
2110
|
+
"(",
|
|
2111
|
+
")",
|
|
2112
|
+
"*",
|
|
2113
|
+
"+",
|
|
2114
|
+
".",
|
|
2115
|
+
"?",
|
|
2116
|
+
"[",
|
|
2117
|
+
"\\",
|
|
2118
|
+
"]",
|
|
2119
|
+
"^",
|
|
2120
|
+
"{",
|
|
2121
|
+
"|",
|
|
2122
|
+
"}"
|
|
2123
|
+
]), fn = /* @__PURE__ */ new Set([
|
|
2124
|
+
"-",
|
|
2125
|
+
"\\",
|
|
2126
|
+
"]",
|
|
2127
|
+
"^",
|
|
2128
|
+
"["
|
|
2129
|
+
]), pn = /* @__PURE__ */ new Set(/* @__PURE__ */ "()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split("")), mn = /* @__PURE__ */ new Map([
|
|
2130
|
+
[9, U`\t`],
|
|
2131
|
+
[10, U`\n`],
|
|
2132
|
+
[11, U`\v`],
|
|
2133
|
+
[12, U`\f`],
|
|
2134
|
+
[13, U`\r`],
|
|
2135
|
+
[8232, U`\u2028`],
|
|
2136
|
+
[8233, U`\u2029`],
|
|
2137
|
+
[65279, U`\uFEFF`]
|
|
2138
|
+
]), hn = /^\p{Cased}$/u;
|
|
2139
|
+
function gn(e) {
|
|
2140
|
+
return hn.test(e);
|
|
2141
|
+
}
|
|
2142
|
+
function _n(e, t) {
|
|
2143
|
+
let n = !!t?.firstOnly, r = e.min.value, i = e.max.value, a = [];
|
|
2144
|
+
if (r < 65 && (i === 65535 || i >= 131071) || r === 65536 && i >= 131071) return a;
|
|
2145
|
+
for (let e = r; e <= i; e++) {
|
|
2146
|
+
let t = H(e);
|
|
2147
|
+
if (!gn(t)) continue;
|
|
2148
|
+
let o = jt(t).filter((e) => {
|
|
2149
|
+
let t = e.codePointAt(0);
|
|
2150
|
+
return t < r || t > i;
|
|
2151
|
+
});
|
|
2152
|
+
if (o.length && (a.push(...o), n)) break;
|
|
2153
|
+
}
|
|
2154
|
+
return a;
|
|
2155
|
+
}
|
|
2156
|
+
function $(e, { escDigit: t, inCharClass: n, useFlagV: r }) {
|
|
2157
|
+
if (mn.has(e)) return mn.get(e);
|
|
2158
|
+
if (e < 32 || e > 126 && e < 160 || e > 262143 || t && Sn(e)) return e > 255 ? `\\u{${e.toString(16).toUpperCase()}}` : `\\x${e.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
2159
|
+
let i = n ? r ? pn : fn : dn, a = H(e);
|
|
2160
|
+
return (i.has(a) ? "\\" : "") + a;
|
|
2161
|
+
}
|
|
2162
|
+
function vn(e) {
|
|
2163
|
+
let t = e.map((e) => e.codePointAt(0)).sort((e, t) => e - t), n = [], r = null;
|
|
2164
|
+
for (let e = 0; e < t.length; e++) t[e + 1] === t[e] + 1 ? r ??= t[e] : r === null ? n.push(t[e]) : (n.push([r, t[e]]), r = null);
|
|
2165
|
+
return n;
|
|
2166
|
+
}
|
|
2167
|
+
function yn(e, t, n) {
|
|
2168
|
+
if (e) return ">";
|
|
2169
|
+
let r = "";
|
|
2170
|
+
if (t && n) {
|
|
2171
|
+
let { enable: e, disable: n } = t;
|
|
2172
|
+
r = (e?.ignoreCase ? "i" : "") + (e?.dotAll ? "s" : "") + (n ? "-" : "") + (n?.ignoreCase ? "i" : "") + (n?.dotAll ? "s" : "");
|
|
2173
|
+
}
|
|
2174
|
+
return `${r}:`;
|
|
2175
|
+
}
|
|
2176
|
+
function bn({ kind: e, max: t, min: n }) {
|
|
2177
|
+
let r;
|
|
2178
|
+
return r = !n && t === 1 ? "?" : !n && t === Infinity ? "*" : n === 1 && t === Infinity ? "+" : n === t ? `{${n}}` : `{${n},${t === Infinity ? "" : t}}`, r + {
|
|
2179
|
+
greedy: "",
|
|
2180
|
+
lazy: "?",
|
|
2181
|
+
possessive: "+"
|
|
2182
|
+
}[e];
|
|
2183
|
+
}
|
|
2184
|
+
function xn({ type: e }) {
|
|
2185
|
+
return e === "CapturingGroup" || e === "Group" || e === "LookaroundAssertion";
|
|
2186
|
+
}
|
|
2187
|
+
function Sn(e) {
|
|
2188
|
+
return e > 47 && e < 58;
|
|
2189
|
+
}
|
|
2190
|
+
function Cn({ type: e, value: t }) {
|
|
2191
|
+
return e === "Character" && t === 45;
|
|
2192
|
+
}
|
|
2193
|
+
var wn = class e extends RegExp {
|
|
2194
|
+
#e = /* @__PURE__ */ new Map();
|
|
2195
|
+
#t = null;
|
|
2196
|
+
#n;
|
|
2197
|
+
#r = null;
|
|
2198
|
+
#i = null;
|
|
2199
|
+
rawOptions = {};
|
|
2200
|
+
get source() {
|
|
2201
|
+
return this.#n || "(?:)";
|
|
2202
|
+
}
|
|
2203
|
+
constructor(t, n, r) {
|
|
2204
|
+
let i = !!r?.lazyCompile;
|
|
2205
|
+
if (t instanceof RegExp) {
|
|
2206
|
+
if (r) throw Error("Cannot provide options when copying a regexp");
|
|
2207
|
+
let i = t;
|
|
2208
|
+
super(i, n), this.#n = i.source, i instanceof e && (this.#e = i.#e, this.#r = i.#r, this.#i = i.#i, this.rawOptions = i.rawOptions);
|
|
2209
|
+
} else {
|
|
2210
|
+
let e = {
|
|
2211
|
+
hiddenCaptures: [],
|
|
2212
|
+
strategy: null,
|
|
2213
|
+
transfers: [],
|
|
2214
|
+
...r
|
|
2215
|
+
};
|
|
2216
|
+
super(i ? "" : t, n), this.#n = t, this.#e = En(e.hiddenCaptures, e.transfers), this.#i = e.strategy, this.rawOptions = r ?? {};
|
|
2217
|
+
}
|
|
2218
|
+
i || (this.#t = this);
|
|
2219
|
+
}
|
|
2220
|
+
exec(t) {
|
|
2221
|
+
if (!this.#t) {
|
|
2222
|
+
let { lazyCompile: t, ...n } = this.rawOptions;
|
|
2223
|
+
this.#t = new e(this.#n, this.flags, n);
|
|
2224
|
+
}
|
|
2225
|
+
let n = this.global || this.sticky, r = this.lastIndex;
|
|
2226
|
+
if (this.#i === "clip_search" && n && r) {
|
|
2227
|
+
this.lastIndex = 0;
|
|
2228
|
+
let e = this.#a(t.slice(r));
|
|
2229
|
+
return e && (Tn(e, r, t, this.hasIndices), this.lastIndex += r), e;
|
|
2230
|
+
}
|
|
2231
|
+
return this.#a(t);
|
|
2232
|
+
}
|
|
2233
|
+
#a(e) {
|
|
2234
|
+
this.#t.lastIndex = this.lastIndex;
|
|
2235
|
+
let t = super.exec.call(this.#t, e);
|
|
2236
|
+
if (this.lastIndex = this.#t.lastIndex, !t || !this.#e.size) return t;
|
|
2237
|
+
let n = [...t];
|
|
2238
|
+
t.length = 1;
|
|
2239
|
+
let r;
|
|
2240
|
+
this.hasIndices && (r = [...t.indices], t.indices.length = 1);
|
|
2241
|
+
let i = [0];
|
|
2242
|
+
for (let e = 1; e < n.length; e++) {
|
|
2243
|
+
let { hidden: a, transferTo: o } = this.#e.get(e) ?? {};
|
|
2244
|
+
if (a ? i.push(null) : (i.push(t.length), t.push(n[e]), this.hasIndices && t.indices.push(r[e])), o && n[e] !== void 0) {
|
|
2245
|
+
let a = i[o];
|
|
2246
|
+
if (!a) throw Error(`Invalid capture transfer to "${a}"`);
|
|
2247
|
+
if (t[a] = n[e], this.hasIndices && (t.indices[a] = r[e]), t.groups) {
|
|
2248
|
+
this.#r ||= Dn(this.source);
|
|
2249
|
+
let i = this.#r.get(o);
|
|
2250
|
+
i && (t.groups[i] = n[e], this.hasIndices && (t.indices.groups[i] = r[e]));
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
return t;
|
|
2255
|
+
}
|
|
2256
|
+
};
|
|
2257
|
+
function Tn(e, t, n, r) {
|
|
2258
|
+
if (e.index += t, e.input = n, r) {
|
|
2259
|
+
let n = e.indices;
|
|
2260
|
+
for (let e = 0; e < n.length; e++) {
|
|
2261
|
+
let r = n[e];
|
|
2262
|
+
r && (n[e] = [r[0] + t, r[1] + t]);
|
|
2263
|
+
}
|
|
2264
|
+
let r = n.groups;
|
|
2265
|
+
r && Object.keys(r).forEach((e) => {
|
|
2266
|
+
let n = r[e];
|
|
2267
|
+
n && (r[e] = [n[0] + t, n[1] + t]);
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
function En(e, t) {
|
|
2272
|
+
let n = /* @__PURE__ */ new Map();
|
|
2273
|
+
for (let t of e) n.set(t, { hidden: !0 });
|
|
2274
|
+
for (let [e, r] of t) for (let t of r) q(n, t, {}).transferTo = e;
|
|
2275
|
+
return n;
|
|
2276
|
+
}
|
|
2277
|
+
function Dn(e) {
|
|
2278
|
+
let t = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map(), r = 0, i = 0, a;
|
|
2279
|
+
for (; a = t.exec(e);) {
|
|
2280
|
+
let { 0: e, groups: { capture: t, name: o } } = a;
|
|
2281
|
+
e === "[" ? r++ : r ? e === "]" && r-- : t && (i++, o && n.set(i, o));
|
|
2282
|
+
}
|
|
2283
|
+
return n;
|
|
2284
|
+
}
|
|
2285
|
+
function On(e, t) {
|
|
2286
|
+
let n = kn(e, t);
|
|
2287
|
+
return n.options ? new wn(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
2288
|
+
}
|
|
2289
|
+
function kn(e, t) {
|
|
2290
|
+
let n = Ot(t), r = Bt(Ae(e, {
|
|
2291
|
+
flags: n.flags,
|
|
2292
|
+
normalizeUnknownPropertyNames: !0,
|
|
2293
|
+
rules: {
|
|
2294
|
+
captureGroup: n.rules.captureGroup,
|
|
2295
|
+
singleline: n.rules.singleline
|
|
2296
|
+
},
|
|
2297
|
+
skipBackrefValidation: n.rules.allowOrphanBackrefs,
|
|
2298
|
+
unicodePropertyMap: Mt
|
|
2299
|
+
}), {
|
|
2300
|
+
accuracy: n.accuracy,
|
|
2301
|
+
asciiWordBoundaries: n.rules.asciiWordBoundaries,
|
|
2302
|
+
avoidSubclass: n.avoidSubclass,
|
|
2303
|
+
bestEffortTarget: n.target
|
|
2304
|
+
}), i = cn(r, n), a = vt(i.pattern, {
|
|
2305
|
+
captureTransfers: i._captureTransfers,
|
|
2306
|
+
hiddenCaptures: i._hiddenCaptures,
|
|
2307
|
+
mode: "external"
|
|
2308
|
+
}), o = pt(gt(a.pattern).pattern, {
|
|
2309
|
+
captureTransfers: a.captureTransfers,
|
|
2310
|
+
hiddenCaptures: a.hiddenCaptures
|
|
2311
|
+
}), s = {
|
|
2312
|
+
pattern: o.pattern,
|
|
2313
|
+
flags: `${n.hasIndices ? "d" : ""}${n.global ? "g" : ""}${i.flags}${i.options.disable.v ? "u" : "v"}`
|
|
2314
|
+
};
|
|
2315
|
+
if (n.avoidSubclass) {
|
|
2316
|
+
if (n.lazyCompileLength !== Infinity) throw Error("Lazy compilation requires subclass");
|
|
2317
|
+
} else {
|
|
2318
|
+
let e = o.hiddenCaptures.sort((e, t) => e - t), t = Array.from(o.captureTransfers), i = r._strategy, a = s.pattern.length >= n.lazyCompileLength;
|
|
2319
|
+
(e.length || t.length || i || a) && (s.options = {
|
|
2320
|
+
...e.length && { hiddenCaptures: e },
|
|
2321
|
+
...t.length && { transfers: t },
|
|
2322
|
+
...i && { strategy: i },
|
|
2323
|
+
...a && { lazyCompile: a }
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
return s;
|
|
2327
|
+
}
|
|
2328
|
+
// node_modules/.pnpm/@shikijs+engine-javascript@4.5.0/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs
|
|
2329
|
+
function An(e, t) {
|
|
2330
|
+
return On(e, {
|
|
2331
|
+
global: !0,
|
|
2332
|
+
hasIndices: !0,
|
|
2333
|
+
lazyCompileLength: 3e3,
|
|
2334
|
+
rules: {
|
|
2335
|
+
allowOrphanBackrefs: !0,
|
|
2336
|
+
asciiWordBoundaries: !0,
|
|
2337
|
+
captureGroup: !0,
|
|
2338
|
+
recursionLimit: 5,
|
|
2339
|
+
singleline: !0
|
|
2340
|
+
},
|
|
2341
|
+
...t
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2344
|
+
function jn(e = {}) {
|
|
2345
|
+
let t = {
|
|
2346
|
+
target: "auto",
|
|
2347
|
+
cache: /* @__PURE__ */ new Map(),
|
|
2348
|
+
...e
|
|
2349
|
+
};
|
|
2350
|
+
return t.regexConstructor ||= (e) => An(e, { target: t.target }), {
|
|
2351
|
+
createScanner(e) {
|
|
2352
|
+
return new r(e, t);
|
|
2353
|
+
},
|
|
2354
|
+
createString: a
|
|
2355
|
+
};
|
|
2356
|
+
}
|
|
2357
|
+
// node_modules/.pnpm/@shikijs+engine-javascript@4.5.0/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs
|
|
2358
|
+
function Mn() {
|
|
2359
|
+
let e = {
|
|
2360
|
+
cache: /* @__PURE__ */ new Map(),
|
|
2361
|
+
regexConstructor: () => {
|
|
2362
|
+
throw Error("JavaScriptRawEngine: only support precompiled grammar");
|
|
2363
|
+
}
|
|
2364
|
+
};
|
|
2365
|
+
return {
|
|
2366
|
+
createScanner(t) {
|
|
2367
|
+
return new r(t, e);
|
|
2368
|
+
},
|
|
2369
|
+
createString: a
|
|
2370
|
+
};
|
|
2371
|
+
}
|
|
2372
|
+
export { r as JavaScriptScanner, Mn as createJavaScriptRawEngine, jn as createJavaScriptRegexEngine, An as defaultJavaScriptRegexConstructor };
|