@qwik.dev/devtools 0.2.7 → 0.3.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -1
- package/dist/kit/index.d.mts +568 -0
- package/dist/kit/index.mjs +323 -0
- package/dist/plugin/codegen.d.mts +13 -0
- package/dist/plugin/codegen.mjs +2 -0
- package/dist/plugin/create-hook-runtime-ChnIePeB.mjs +739 -0
- package/dist/plugin/index.d.mts +9 -4
- package/dist/plugin/index.mjs +1562 -9554
- package/dist/ui/_virtual/_commonjsHelpers.qwik.mjs +6 -0
- package/dist/ui/_virtual/browser.qwik.mjs +7 -0
- package/dist/ui/_virtual/browser.qwik2.mjs +4 -0
- package/dist/ui/bundle-graph-eeik1E53.json +1 -0
- package/dist/ui/entry.extension.qwik.mjs +16 -0
- package/dist/ui/index.qwik.mjs +6 -2
- package/dist/ui/lib-types/kit/src/overlay-paths.d.ts +2 -0
- package/dist/ui/lib-types/ui/src/components/IconButton/IconButton.d.ts +10 -0
- package/dist/ui/lib-types/ui/src/components/Icons/Icons.d.ts +15 -0
- package/dist/ui/lib-types/ui/src/components/InfoBanner/InfoBanner.d.ts +7 -0
- package/dist/ui/lib-types/ui/src/components/ThemeToggle/QwikThemeToggle.d.ts +1 -1
- package/dist/ui/lib-types/ui/src/components/Tree/Tree.d.ts +6 -2
- package/dist/ui/lib-types/ui/src/components/Tree/type.d.ts +2 -3
- package/dist/ui/lib-types/ui/src/devtools/CommandPalette.d.ts +10 -0
- package/dist/ui/lib-types/ui/src/devtools/CustomizeTabsPanel.d.ts +11 -0
- package/dist/ui/lib-types/ui/src/devtools/DevtoolsContent.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/devtools/DevtoolsSidebar.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/devtools/QwikDevtools.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/devtools/QwikDevtoolsExtension.d.ts +13 -0
- package/dist/ui/lib-types/ui/src/devtools/command-palette.d.ts +52 -0
- package/dist/ui/lib-types/ui/src/devtools/data-provider.d.ts +12 -0
- package/dist/ui/lib-types/ui/src/devtools/page-data-source.d.ts +9 -0
- package/dist/ui/lib-types/ui/src/devtools/rpc.d.ts +9 -0
- package/dist/ui/lib-types/ui/src/devtools/sidebar-tabs.d.ts +27 -0
- package/dist/ui/lib-types/ui/src/devtools/state.d.ts +39 -0
- package/dist/ui/lib-types/ui/src/devtools/tabs.d.ts +10 -0
- package/dist/ui/lib-types/ui/src/devtools.d.ts +1 -2
- package/dist/ui/lib-types/ui/src/entry.extension.d.ts +15 -0
- package/dist/ui/lib-types/ui/src/features/BuildAnalysis/BuildAnalysis.d.ts +2 -0
- package/dist/ui/lib-types/ui/src/features/CodeBreak/CodeBreak.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/HookTree/HookTree.d.ts +4 -0
- package/dist/ui/lib-types/ui/src/features/HookTree/hookTreeHelpers.d.ts +14 -0
- package/dist/ui/lib-types/ui/src/features/Packages/Packages.d.ts +1 -1
- package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyCard/DependencyCard.d.ts +5 -2
- package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyOperationFeedback/DependencyOperationFeedback.d.ts +14 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyOperationFeedback/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyToolbar/DependencyToolbar.d.ts +13 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/DependencyToolbar/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/InstalledDependencyList/InstalledDependencyList.d.ts +12 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/InstalledDependencyList/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/PackageSearchResults/PackageSearchResults.d.ts +15 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/PackageSearchResults/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/SearchResultCard/SearchResultCard.d.ts +11 -0
- package/dist/ui/lib-types/ui/src/features/Packages/components/SearchResultCard/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Packages/package-utils.d.ts +7 -0
- package/dist/ui/lib-types/ui/src/features/Packages/types.d.ts +4 -24
- package/dist/ui/lib-types/ui/src/features/Performance/Performance.d.ts +4 -1
- package/dist/ui/lib-types/ui/src/features/Performance/components/ComponentCard.d.ts +8 -0
- package/dist/ui/lib-types/ui/src/features/Performance/components/HookDetailsPanel.d.ts +7 -0
- package/dist/ui/lib-types/ui/src/features/Performance/components/PerformanceOverview.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/features/Performance/components/StatCard.d.ts +7 -0
- package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.d.ts +1 -1
- package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.d.ts +5 -4
- package/dist/ui/lib-types/ui/src/features/Performance/utils/formatMs.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Preloads/Preloads.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Preloads/computePreloadViewModel.d.ts +56 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/RenderTree.d.ts +4 -1
- package/dist/ui/lib-types/ui/src/features/RenderTree/TreeBuilder.d.ts +15 -41
- package/dist/ui/lib-types/ui/src/features/RenderTree/components/HighlightedCodeList.d.ts +7 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/components/HookFiltersCard.d.ts +11 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/components/RenderTreeTabs.d.ts +9 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/components/StateTreeNodeLabel.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/data.d.ts +12 -20
- package/dist/ui/lib-types/ui/src/features/RenderTree/formatTreeData.d.ts +16 -47
- package/dist/ui/lib-types/ui/src/features/RenderTree/index.d.ts +1 -1
- package/dist/ui/lib-types/ui/src/features/RenderTree/types.d.ts +29 -45
- package/dist/ui/lib-types/ui/src/features/RenderTree/utils/filterHookTree.d.ts +3 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/utils/getCodeLanguage.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/utils/getValueColorClass.d.ts +2 -0
- package/dist/ui/lib-types/ui/src/index.d.ts +3 -1
- package/dist/ui/lib-types/ui/src/runtime/preloads.d.ts +11 -0
- package/dist/ui/lib-types/ui/src/types/state.d.ts +1 -13
- package/dist/ui/node_modules/.pnpm/@shikijs_core@4.0.2/node_modules/@shikijs/core/dist/index.qwik.mjs +1035 -1060
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-compile.qwik.mjs +36 -0
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.qwik.mjs +78 -0
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/index.qwik.mjs +408 -361
- package/dist/ui/node_modules/.pnpm/@shikijs_engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/abap.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/actionscript-3.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ada.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-expression.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-html.qwik.mjs +16 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-style.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-inline-template.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-let-declaration.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template-blocks.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-template.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/angular-ts.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apache.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apex.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/apl.qwik.mjs +16 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/applescript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ara.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asciidoc.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/asm.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/astro.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/awk.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ballerina.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bat.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/beancount.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/berry.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bibtex.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bicep.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bird2.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/blade.qwik.mjs +20 -20
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/bsl.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/c3.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cadence.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cairo.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clarity.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/clojure.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cmake.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cobol.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeowners.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/codeql.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coffee.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/common-lisp.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/coq.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp-macro.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cpp.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/crystal.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csharp.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/css.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/csv.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cue.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/cypher.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/d.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dart.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dax.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/desktop.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/diff.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/docker.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dotenv.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/dream-maker.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/edge.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elixir.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/elm.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/emacs-lisp.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erb.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/erlang.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-css.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-glsl.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-html.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-sql.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/es-tag-xml.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fennel.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fish.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fluent.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-fixed-form.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fortran-free-form.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/fsharp.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdresource.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdscript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gdshader.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/genie.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gherkin.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-commit.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/git-rebase.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gleam.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-js.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glimmer-ts.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/glsl.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gn.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/gnuplot.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/go.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/graphql.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/groovy.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hack.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haml.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/handlebars.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haskell.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/haxe.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hcl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hjson.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hlsl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html-derivative.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/html.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/http.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hurl.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hxml.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/hy.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/imba.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ini.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/java.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/javascript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja-html.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jinja.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jison.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/json5.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonc.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsonnet.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jssm.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/jsx.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/julia.qwik.mjs +16 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/just.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kdl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kotlin.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/kusto.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/latex.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lean.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/less.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/liquid.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/llvm.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/log.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/logo.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/lua.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/luau.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/make.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-nix.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown-vue.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/markdown.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/marko.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/matlab.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdc.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mdx.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mermaid.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mipsasm.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/mojo.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/moonbit.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/move.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/narrat.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow-groovy.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nextflow.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nginx.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nim.qwik.mjs +20 -20
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nix.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/nushell.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-c.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/objective-cpp.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ocaml.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/odin.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/openscad.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pascal.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/perl.qwik.mjs +16 -16
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/php.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pkl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/plsql.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/po.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/polar.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/postcss.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powerquery.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/powershell.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prisma.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/prolog.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/proto.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/pug.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/puppet.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/purescript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/python.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qml.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qmldir.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/qss.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/r.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/racket.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/raku.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/razor.qwik.mjs +10 -10
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/reg.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/regexp.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rel.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/riscv.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ron.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rosmsg.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rst.qwik.mjs +22 -22
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ruby.qwik.mjs +30 -30
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/rust.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sas.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sass.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scala.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scheme.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/scss.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sdbl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shaderlab.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellscript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/shellsession.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/smalltalk.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/solidity.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/soy.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sparql.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/splunk.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/sql.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ssh-config.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stata.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/stylus.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/surrealql.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/svelte.qwik.mjs +14 -14
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/swift.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/system-verilog.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/systemd.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/talonscript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tasl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tcl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/templ.qwik.mjs +12 -12
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/terraform.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tex.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/toml.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/ts-tags.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsv.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/tsx.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/turtle.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/twig.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typescript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typespec.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/typst.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/v.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vala.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vb.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/verilog.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vhdl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/viml.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-directives.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-html.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-interpolations.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue-vine.qwik.mjs +18 -18
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vue.qwik.mjs +26 -26
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/vyper.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wasm.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wenyan.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wgsl.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wikitext.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wit.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/wolfram.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xml.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/xsl.qwik.mjs +9 -6
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/yaml.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zenscript.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_langs@4.0.2/node_modules/@shikijs/langs/dist/zig.qwik.mjs +7 -3
- package/dist/ui/node_modules/.pnpm/@shikijs_primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.qwik.mjs +661 -730
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/andromeeda.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/aurora-x.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/ayu-mirage.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-frappe.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-latte.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-macchiato.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/catppuccin-mocha.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dark-plus.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula-soft.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/dracula.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/everforest-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-default.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-dimmed.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark-high-contrast.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-default.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light-high-contrast.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/github-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-hard.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-medium.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/gruvbox-light-soft.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon-bright.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/horizon.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/houston.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-dragon.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-lotus.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/kanagawa-wave.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/laserwave.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/light-plus.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-darker.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-lighter.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-ocean.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme-palenight.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/material-theme.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/min-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/monokai.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/night-owl.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/nord.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-dark-pro.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/one-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/plastic.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/poimandres.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/red.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-dawn.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine-moon.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/rose-pine.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/slack-ochin.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/snazzy-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/solarized-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/synthwave-84.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/tokyo-night.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vesper.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-black.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-dark.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_themes@4.0.2/node_modules/@shikijs/themes/dist/vitesse-light.qwik.mjs +4 -4
- package/dist/ui/node_modules/.pnpm/@shikijs_types@4.0.2/node_modules/@shikijs/types/dist/index.qwik.mjs +7 -7
- package/dist/ui/node_modules/.pnpm/@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.qwik.mjs +2953 -2177
- package/dist/ui/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.qwik.mjs +14 -22
- package/dist/ui/node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.qwik.mjs +256 -261
- package/dist/ui/node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.qwik.mjs +110 -115
- package/dist/ui/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.qwik.mjs +8 -15
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.qwik.mjs +177 -0
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.qwik.mjs +182 -0
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.qwik.mjs +20 -31
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.qwik.mjs +4 -22
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.qwik.mjs +124 -114
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.qwik.mjs +14 -41
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.qwik.mjs +4 -23
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.qwik.mjs +4 -22
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.qwik.mjs +10 -24
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.qwik.mjs +53 -231
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.qwik.mjs +58 -236
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.qwik.mjs +8 -38
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.qwik.mjs +36 -85
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.qwik.mjs +20 -40
- package/dist/ui/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.qwik.mjs +6 -24
- package/dist/ui/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.qwik.mjs +24 -29
- package/dist/ui/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.qwik.mjs +120 -121
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.qwik.mjs +14 -0
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.qwik.mjs +297 -0
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/tokenizer/tokenize.qwik.mjs +355 -0
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.qwik.mjs +79 -0
- package/dist/ui/node_modules/.pnpm/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/utils.qwik.mjs +19 -0
- package/dist/ui/node_modules/.pnpm/oniguruma-to-es@4.3.5/node_modules/oniguruma-to-es/dist/esm/index.qwik.mjs +1878 -0
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.qwik.mjs +6 -19
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.qwik.mjs +59 -59
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.qwik.mjs +33 -74
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.qwik.mjs +366 -314
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.qwik.mjs +4 -13
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.qwik.mjs +564 -560
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.qwik.mjs +4 -12
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.qwik.mjs +4 -12
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.qwik.mjs +21 -49
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.qwik.mjs +37 -45
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.qwik.mjs +17 -21
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.qwik.mjs +10 -23
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.qwik.mjs +22 -24
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.qwik.mjs +18 -22
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.qwik.mjs +17 -17
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.qwik.mjs +9 -13
- package/dist/ui/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.qwik.mjs +8 -11
- package/dist/ui/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.qwik.mjs +250 -0
- package/dist/ui/node_modules/.pnpm/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.qwik.mjs +98 -0
- package/dist/ui/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/atomic.qwik.mjs +174 -0
- package/dist/ui/node_modules/.pnpm/regex@6.1.0/node_modules/regex/src/utils-internals.qwik.mjs +16 -0
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/bundle-full.qwik.mjs +59 -23
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/chunk-CtajNgzt.qwik.mjs +28 -19
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/engine-oniguruma.qwik.mjs +11 -6
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/index.qwik.mjs +47 -0
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/langs-bundle-full-DfKZStlK.qwik.mjs +1284 -1281
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/themes.qwik.mjs +396 -395
- package/dist/ui/node_modules/.pnpm/shiki@4.0.2/node_modules/shiki/dist/wasm.qwik.mjs +6 -2
- package/dist/ui/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.qwik.mjs +4 -12
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.qwik.mjs +12 -18
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.qwik.mjs +45 -72
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.qwik.mjs +4 -18
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.qwik.mjs +20 -36
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.qwik.mjs +6 -14
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.qwik.mjs +6 -14
- package/dist/ui/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.qwik.mjs +22 -31
- package/dist/ui/node_modules/.pnpm/vite-hot-client@2.1.0_vite@7.3.5_@types_node@24.10.0_jiti@2.6.1_lightningcss@1.33.0_terser@5.46.0_tsx@4.21.0_yaml@2.8.3_/node_modules/vite-hot-client/dist/index.qwik.mjs +35 -0
- package/dist/ui/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.qwik.mjs +20 -104
- package/dist/ui/packages/devtools/kit/src/overlay-paths.qwik.mjs +25 -0
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsButton/DevtoolsButton.qwik.mjs +143 -0
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsContainer/DevtoolsContainer.qwik.mjs +13 -0
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +497 -0
- package/dist/ui/packages/devtools/ui/src/components/IconButton/IconButton.qwik.mjs +16 -0
- package/dist/ui/packages/devtools/ui/src/components/Icons/Icons.qwik.mjs +664 -0
- package/dist/ui/packages/devtools/ui/src/components/InfoBanner/InfoBanner.qwik.mjs +25 -0
- package/dist/ui/packages/devtools/ui/src/components/Tab/Tab.qwik.mjs +21 -0
- package/dist/ui/packages/devtools/ui/src/components/TabContent/TabContent.qwik.mjs +21 -0
- package/dist/ui/packages/devtools/ui/src/components/TabTitle/TabTitle.qwik.mjs +9 -0
- package/dist/ui/packages/devtools/ui/src/components/ThemeToggle/QwikThemeToggle.qwik.mjs +58 -0
- package/dist/ui/{components → packages/devtools/ui/src/components}/ThemeToggle/theme-script.qwik.mjs +10 -7
- package/dist/ui/packages/devtools/ui/src/components/Tree/Tree.qwik.mjs +234 -0
- package/dist/ui/packages/devtools/ui/src/components/router-head/theme-script.qwik.mjs +4 -0
- package/dist/ui/packages/devtools/ui/src/devtools/CommandPalette.qwik.mjs +284 -0
- package/dist/ui/packages/devtools/ui/src/devtools/CustomizeTabsPanel.qwik.mjs +201 -0
- package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsContent.qwik.mjs +210 -0
- package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsSidebar.qwik.mjs +105 -0
- package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtools.qwik.mjs +105 -0
- package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtoolsExtension.qwik.mjs +36 -0
- package/dist/ui/packages/devtools/ui/src/devtools/command-palette.qwik.mjs +188 -0
- package/dist/ui/packages/devtools/ui/src/devtools/page-data-source.qwik.mjs +61 -0
- package/dist/ui/packages/devtools/ui/src/devtools/rpc.qwik.mjs +91 -0
- package/dist/ui/packages/devtools/ui/src/devtools/sidebar-tabs.qwik.mjs +97 -0
- package/dist/ui/packages/devtools/ui/src/devtools/state.qwik.mjs +30 -0
- package/dist/ui/packages/devtools/ui/src/devtools/tabs.qwik.mjs +82 -0
- package/dist/ui/packages/devtools/ui/src/features/Assets/Assets.qwik.mjs +50 -0
- package/dist/ui/packages/devtools/ui/src/features/BuildAnalysis/BuildAnalysis.qwik.mjs +185 -0
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/CodeBreak.qwik.mjs +53 -0
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/HtmlParser.qwik.mjs +149 -0
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/StateParser.qwik.mjs +181 -0
- package/dist/ui/packages/devtools/ui/src/features/HookTree/HookTree.qwik.mjs +713 -0
- package/dist/ui/packages/devtools/ui/src/features/HookTree/hookTreeHelpers.qwik.mjs +184 -0
- package/dist/ui/packages/devtools/ui/src/features/Inspect/Inspect.qwik.mjs +32 -0
- package/dist/ui/packages/devtools/ui/src/features/Inspect/constant.qwik.mjs +4 -0
- package/dist/ui/packages/devtools/ui/src/features/Inspect/iframe-theme.qwik.mjs +74 -0
- package/dist/ui/packages/devtools/ui/src/features/Overview/Overview.qwik.mjs +199 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/Packages.qwik.mjs +295 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +218 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyOperationFeedback/DependencyOperationFeedback.qwik.mjs +39 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyToolbar/DependencyToolbar.qwik.mjs +75 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/InstalledDependencyList/InstalledDependencyList.qwik.mjs +58 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +29 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageSearchResults/PackageSearchResults.qwik.mjs +51 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/SearchResultCard/SearchResultCard.qwik.mjs +97 -0
- package/dist/ui/packages/devtools/ui/src/features/Packages/package-utils.qwik.mjs +81 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/Performance.qwik.mjs +254 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/ComponentCard.qwik.mjs +49 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/HookDetailsPanel.qwik.mjs +95 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/PerformanceOverview.qwik.mjs +36 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/StatCard.qwik.mjs +21 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/computePerfViewModel.qwik.mjs +118 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/transformPerformanceData.qwik.mjs +36 -0
- package/dist/ui/packages/devtools/ui/src/features/Performance/utils/formatMs.qwik.mjs +15 -0
- package/dist/ui/packages/devtools/ui/src/features/Preloads/Preloads.qwik.mjs +478 -0
- package/dist/ui/packages/devtools/ui/src/features/Preloads/computePreloadViewModel.qwik.mjs +178 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/RenderTree.qwik.mjs +277 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HighlightedCodeList.qwik.mjs +23 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HookFiltersCard.qwik.mjs +80 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/RenderTreeTabs.qwik.mjs +25 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/StateTreeNodeLabel.qwik.mjs +32 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/utils/getCodeLanguage.qwik.mjs +18 -0
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/utils/getValueColorClass.qwik.mjs +21 -0
- package/dist/ui/packages/devtools/ui/src/features/Routes/Routes.qwik.mjs +51 -0
- package/dist/ui/packages/devtools/ui/src/runtime/preloads.qwik.mjs +830 -0
- package/dist/ui/packages/devtools/ui/src/utils/shiki.qwik.mjs +24 -0
- package/dist/ui/q-manifest.json +1878 -1879
- package/dist/ui/styles.css +646 -63
- package/package.json +83 -39
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/assertClassBrand.qwik.mjs +0 -7
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/checkPrivateRedeclaration.qwik.mjs +0 -6
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateFieldGet2.qwik.mjs +0 -7
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateFieldInitSpec.qwik.mjs +0 -7
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateFieldSet2.qwik.mjs +0 -7
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/classPrivateMethodInitSpec.qwik.mjs +0 -7
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/defineProperty.qwik.mjs +0 -12
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/toPrimitive.qwik.mjs +0 -14
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/toPropertyKey.qwik.mjs +0 -9
- package/dist/ui/_virtual/_@oxc-project_runtime@0.115.0/helpers/typeof.qwik.mjs +0 -11
- package/dist/ui/_virtual/_rolldown/runtime.qwik.mjs +0 -33
- package/dist/ui/bundle-graph-C-01xqq_.json +0 -1
- package/dist/ui/components/DevtoolsButton/DevtoolsButton.qwik.mjs +0 -132
- package/dist/ui/components/DevtoolsContainer/DevtoolsContainer.qwik.mjs +0 -7
- package/dist/ui/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +0 -36
- package/dist/ui/components/Icons/Icons.qwik.mjs +0 -216
- package/dist/ui/components/Tab/Tab.qwik.mjs +0 -14
- package/dist/ui/components/TabContent/TabContent.qwik.mjs +0 -10
- package/dist/ui/components/TabTitle/TabTitle.qwik.mjs +0 -7
- package/dist/ui/components/ThemeToggle/QwikThemeToggle.qwik.mjs +0 -38
- package/dist/ui/components/Tree/Tree.qwik.mjs +0 -93
- package/dist/ui/components/Tree/filterVnode.qwik.mjs +0 -62
- package/dist/ui/components/Tree/type.qwik.mjs +0 -4
- package/dist/ui/components/Tree/vnode.qwik.mjs +0 -17
- package/dist/ui/components/router-head/theme-script.qwik.mjs +0 -4
- package/dist/ui/devtools.qwik.mjs +0 -189
- package/dist/ui/features/Assets/Assets.qwik.mjs +0 -18
- package/dist/ui/features/CodeBreack/CodeBreack.qwik.mjs +0 -44
- package/dist/ui/features/CodeBreack/HtmlParser.qwik.mjs +0 -87
- package/dist/ui/features/CodeBreack/StateParser.qwik.mjs +0 -113
- package/dist/ui/features/Overview/Overview.qwik.mjs +0 -43
- package/dist/ui/features/Packages/Packages.qwik.mjs +0 -16
- package/dist/ui/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +0 -97
- package/dist/ui/features/Packages/components/DependencyCard/index.qwik.mjs +0 -1
- package/dist/ui/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +0 -23
- package/dist/ui/features/Packages/components/PackageIcon/index.qwik.mjs +0 -1
- package/dist/ui/features/Performance/Performance.qwik.mjs +0 -118
- package/dist/ui/features/Performance/computePerfViewModel.qwik.mjs +0 -111
- package/dist/ui/features/Performance/transformPerformanceData.qwik.mjs +0 -25
- package/dist/ui/features/RenderTree/RenderTree.qwik.mjs +0 -223
- package/dist/ui/features/RenderTree/TreeBuilder.qwik.mjs +0 -145
- package/dist/ui/features/RenderTree/data.qwik.mjs +0 -40
- package/dist/ui/features/RenderTree/formatTreeData.qwik.mjs +0 -169
- package/dist/ui/features/RenderTree/types.qwik.mjs +0 -51
- package/dist/ui/features/Routes/Routes.qwik.mjs +0 -30
- package/dist/ui/features/inspect/Inspect.qwik.mjs +0 -23
- package/dist/ui/features/inspect/constant.qwik.mjs +0 -4
- package/dist/ui/features/inspect/iframe-theme.qwik.mjs +0 -66
- package/dist/ui/lib-types/kit/src/client.d.ts +0 -2
- package/dist/ui/lib-types/kit/src/constants.d.ts +0 -16
- package/dist/ui/lib-types/kit/src/context.d.ts +0 -10
- package/dist/ui/lib-types/kit/src/globals.d.ts +0 -71
- package/dist/ui/lib-types/kit/src/index.d.ts +0 -6
- package/dist/ui/lib-types/kit/src/server.d.ts +0 -2
- package/dist/ui/lib-types/kit/src/shared.d.ts +0 -1
- package/dist/ui/lib-types/kit/src/types.d.ts +0 -69
- package/dist/ui/lib-types/ui/src/entry.dev.d.ts +0 -2
- package/dist/ui/lib-types/ui/src/features/CodeBreack/CodeBreack.d.ts +0 -1
- package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.test.d.ts +0 -1
- package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.test.d.ts +0 -1
- package/dist/ui/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.qwik.mjs +0 -49
- package/dist/ui/node_modules/.pnpm/birpc@4.0.0/node_modules/birpc/dist/index.qwik.mjs +0 -200
- package/dist/ui/node_modules/.pnpm/brace-expansion@5.0.4/node_modules/brace-expansion/dist/esm/index.qwik.mjs +0 -143
- package/dist/ui/node_modules/.pnpm/copy-anything@4.0.5/node_modules/copy-anything/dist/index.qwik.mjs +0 -42
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.qwik.mjs +0 -200
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.qwik.mjs +0 -206
- package/dist/ui/node_modules/.pnpm/dree@5.1.5/node_modules/dree/bundled/lib/esm/index.esm.qwik.mjs +0 -10
- package/dist/ui/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/getType.qwik.mjs +0 -7
- package/dist/ui/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isArray.qwik.mjs +0 -8
- package/dist/ui/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isPlainObject.qwik.mjs +0 -13
- package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/assert-valid-pattern.qwik.mjs +0 -8
- package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/ast.qwik.mjs +0 -537
- package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/brace-expressions.qwik.mjs +0 -122
- package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/escape.qwik.mjs +0 -19
- package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/index.qwik.mjs +0 -629
- package/dist/ui/node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/unescape.qwik.mjs +0 -26
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/accessDeep.qwik.mjs +0 -96
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/class-registry.qwik.mjs +0 -19
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/custom-transformer-registry.qwik.mjs +0 -18
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/double-indexed-kv.qwik.mjs +0 -23
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/index.qwik.mjs +0 -81
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/is.qwik.mjs +0 -29
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/pathstringifier.qwik.mjs +0 -34
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/plainer.qwik.mjs +0 -105
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/registry.qwik.mjs +0 -24
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/transformer.qwik.mjs +0 -160
- package/dist/ui/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/util.qwik.mjs +0 -30
- package/dist/ui/node_modules/.pnpm/vite-hot-client@2.1.0_vite@8.0.0_@types_node@25.5.0_esbuild@0.27.4_jiti@2.6.1_tsx@4.21.0_yaml@2.8.2_/node_modules/vite-hot-client/dist/index.qwik.mjs +0 -27
- package/dist/ui/packages/kit/src/client.qwik.mjs +0 -17
- package/dist/ui/packages/kit/src/constants.qwik.mjs +0 -12
- package/dist/ui/packages/kit/src/context.qwik.mjs +0 -18
- package/dist/ui/packages/kit/src/globals.qwik.mjs +0 -5
- package/dist/ui/packages/kit/src/index.qwik.mjs +0 -7
- package/dist/ui/packages/kit/src/server.qwik.mjs +0 -1
- package/dist/ui/packages/kit/src/shared.qwik.mjs +0 -4
- package/dist/ui/packages/kit/src/types.qwik.mjs +0 -1
- package/dist/ui/utils/location.qwik.mjs +0 -10
- package/dist/ui/utils/shiki.qwik.mjs +0 -19
- package/dist/ui/utils/type.qwik.mjs +0 -13
- /package/dist/ui/lib-types/ui/src/features/{CodeBreack → CodeBreak}/HtmlParser.d.ts +0 -0
- /package/dist/ui/lib-types/ui/src/features/{CodeBreack → CodeBreak}/StateParser.d.ts +0 -0
- /package/dist/ui/lib-types/ui/src/features/{inspect → Inspect}/Inspect.d.ts +0 -0
- /package/dist/ui/lib-types/ui/src/features/{inspect → Inspect}/constant.d.ts +0 -0
- /package/dist/ui/lib-types/ui/src/features/{inspect → Inspect}/iframe-theme.d.ts +0 -0
- /package/dist/ui/lib-types/ui/src/utils/{heplerState.d.ts → helperState.d.ts} +0 -0
|
@@ -0,0 +1,1878 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __reflectGet = Reflect.get;
|
|
4
|
+
var __typeError = (msg) => {
|
|
5
|
+
throw TypeError(msg);
|
|
6
|
+
};
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
10
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
11
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
12
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
13
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
14
|
+
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
15
|
+
var _captureMap, _compiled, _pattern, _nameMap, _strategy, __EmulatedRegExp_instances, execCore_fn, _a;
|
|
16
|
+
import { parse as J, createCharacter as m, createGroup as A, createAlternative as b, slug as w, createLookaroundAssertion as K, createCharacterSet as E, createUnicodeProperty as Q, createCharacterClass as C, createAssertion as F, createQuantifier as _, createCapturingGroup as P, createBackreference as k, createSubroutine as O } from "../../../../../oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.qwik.mjs";
|
|
17
|
+
import { traverse as S } from "../../../../../oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.qwik.mjs";
|
|
18
|
+
import { possessive, atomic } from "../../../../../regex@6.1.0/node_modules/regex/src/atomic.qwik.mjs";
|
|
19
|
+
import { recursion } from "../../../../../regex-recursion@6.0.2/node_modules/regex-recursion/src/index.qwik.mjs";
|
|
20
|
+
import { hasOnlyChild as o } from "../../../../../oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.qwik.mjs";
|
|
21
|
+
var cp = String.fromCodePoint;
|
|
22
|
+
var r = String.raw;
|
|
23
|
+
var envFlags = {};
|
|
24
|
+
var globalRegExp = globalThis.RegExp;
|
|
25
|
+
envFlags.flagGroups = (() => {
|
|
26
|
+
try {
|
|
27
|
+
new globalRegExp("(?i:)");
|
|
28
|
+
} catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
})();
|
|
33
|
+
envFlags.unicodeSets = (() => {
|
|
34
|
+
try {
|
|
35
|
+
new globalRegExp("[[]]", "v");
|
|
36
|
+
} catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
})();
|
|
41
|
+
envFlags.bugFlagVLiteralHyphenIsRange = envFlags.unicodeSets ? (() => {
|
|
42
|
+
try {
|
|
43
|
+
new globalRegExp(r`[\d\-a]`, "v");
|
|
44
|
+
} catch {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
})() : false;
|
|
49
|
+
envFlags.bugNestedClassIgnoresNegation = envFlags.unicodeSets && new globalRegExp("[[^a]]", "v").test("a");
|
|
50
|
+
function getNewCurrentFlags(current, { enable, disable }) {
|
|
51
|
+
return {
|
|
52
|
+
dotAll: !disable?.dotAll && !!(enable?.dotAll || current.dotAll),
|
|
53
|
+
ignoreCase: !disable?.ignoreCase && !!(enable?.ignoreCase || current.ignoreCase)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function getOrInsert(map, key, defaultValue) {
|
|
57
|
+
if (!map.has(key)) {
|
|
58
|
+
map.set(key, defaultValue);
|
|
59
|
+
}
|
|
60
|
+
return map.get(key);
|
|
61
|
+
}
|
|
62
|
+
function isMinTarget(target, min) {
|
|
63
|
+
return EsVersion[target] >= EsVersion[min];
|
|
64
|
+
}
|
|
65
|
+
function throwIfNullish(value, msg) {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
throw new Error(msg ?? "Value expected");
|
|
68
|
+
}
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
var EsVersion = {
|
|
72
|
+
ES2025: 2025,
|
|
73
|
+
ES2024: 2024,
|
|
74
|
+
ES2018: 2018
|
|
75
|
+
};
|
|
76
|
+
var Target = (
|
|
77
|
+
/** @type {const} */
|
|
78
|
+
{
|
|
79
|
+
auto: "auto",
|
|
80
|
+
ES2025: "ES2025",
|
|
81
|
+
ES2024: "ES2024",
|
|
82
|
+
ES2018: "ES2018"
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
function getOptions(options = {}) {
|
|
86
|
+
if ({}.toString.call(options) !== "[object Object]") {
|
|
87
|
+
throw new Error("Unexpected options");
|
|
88
|
+
}
|
|
89
|
+
if (options.target !== void 0 && !Target[options.target]) {
|
|
90
|
+
throw new Error(`Unexpected target "${options.target}"`);
|
|
91
|
+
}
|
|
92
|
+
const opts = {
|
|
93
|
+
// Sets the level of emulation rigor/strictness.
|
|
94
|
+
accuracy: "default",
|
|
95
|
+
// Disables advanced emulation that relies on returning a `RegExp` subclass, resulting in
|
|
96
|
+
// certain patterns not being emulatable.
|
|
97
|
+
avoidSubclass: false,
|
|
98
|
+
// Oniguruma flags; a string with `i`, `m`, `x`, `D`, `S`, `W`, `y{g}` in any order (all
|
|
99
|
+
// optional). Oniguruma's `m` is equivalent to JavaScript's `s` (`dotAll`).
|
|
100
|
+
flags: "",
|
|
101
|
+
// Include JavaScript flag `g` (`global`) in the result.
|
|
102
|
+
global: false,
|
|
103
|
+
// Include JavaScript flag `d` (`hasIndices`) in the result.
|
|
104
|
+
hasIndices: false,
|
|
105
|
+
// Delay regex construction until first use if the transpiled pattern is at least this length.
|
|
106
|
+
lazyCompileLength: Infinity,
|
|
107
|
+
// JavaScript version used for generated regexes. Using `auto` detects the best value based on
|
|
108
|
+
// your environment. Later targets allow faster processing, simpler generated source, and
|
|
109
|
+
// support for additional features.
|
|
110
|
+
target: "auto",
|
|
111
|
+
// Disables minifications that simplify the pattern without changing the meaning.
|
|
112
|
+
verbose: false,
|
|
113
|
+
...options,
|
|
114
|
+
// Advanced options that override standard behavior, error checking, and flags when enabled.
|
|
115
|
+
rules: {
|
|
116
|
+
// Useful with TextMate grammars that merge backreferences across patterns.
|
|
117
|
+
allowOrphanBackrefs: false,
|
|
118
|
+
// Use ASCII `\b` and `\B`, which increases search performance of generated regexes.
|
|
119
|
+
asciiWordBoundaries: false,
|
|
120
|
+
// Allow unnamed captures and numbered calls (backreferences and subroutines) when using
|
|
121
|
+
// named capture. This is Oniguruma option `ONIG_OPTION_CAPTURE_GROUP`; on by default in
|
|
122
|
+
// `vscode-oniguruma`.
|
|
123
|
+
captureGroup: false,
|
|
124
|
+
// Change the recursion depth limit from Oniguruma's `20` to an integer `2`–`20`.
|
|
125
|
+
recursionLimit: 20,
|
|
126
|
+
// `^` as `\A`; `$` as`\Z`. Improves search performance of generated regexes without changing
|
|
127
|
+
// the meaning if searching line by line. This is Oniguruma option `ONIG_OPTION_SINGLELINE`.
|
|
128
|
+
singleline: false,
|
|
129
|
+
...options.rules
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
if (opts.target === "auto") {
|
|
133
|
+
opts.target = envFlags.flagGroups ? "ES2025" : envFlags.unicodeSets ? "ES2024" : "ES2018";
|
|
134
|
+
}
|
|
135
|
+
return opts;
|
|
136
|
+
}
|
|
137
|
+
var asciiSpaceChar = "[ -\r ]";
|
|
138
|
+
var CharsWithoutIgnoreCaseExpansion = /* @__PURE__ */ new Set([
|
|
139
|
+
cp(304),
|
|
140
|
+
// İ
|
|
141
|
+
cp(305)
|
|
142
|
+
// ı
|
|
143
|
+
]);
|
|
144
|
+
var defaultWordChar = r`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
145
|
+
function getIgnoreCaseMatchChars(char) {
|
|
146
|
+
if (CharsWithoutIgnoreCaseExpansion.has(char)) {
|
|
147
|
+
return [char];
|
|
148
|
+
}
|
|
149
|
+
const set = /* @__PURE__ */ new Set();
|
|
150
|
+
const lower = char.toLowerCase();
|
|
151
|
+
const upper = lower.toUpperCase();
|
|
152
|
+
const title = LowerToTitleCaseMap.get(lower);
|
|
153
|
+
const altLower = LowerToAlternativeLowerCaseMap.get(lower);
|
|
154
|
+
const altUpper = LowerToAlternativeUpperCaseMap.get(lower);
|
|
155
|
+
if ([...upper].length === 1) {
|
|
156
|
+
set.add(upper);
|
|
157
|
+
}
|
|
158
|
+
altUpper && set.add(altUpper);
|
|
159
|
+
title && set.add(title);
|
|
160
|
+
set.add(lower);
|
|
161
|
+
altLower && set.add(altLower);
|
|
162
|
+
return [...set];
|
|
163
|
+
}
|
|
164
|
+
var JsUnicodePropertyMap = /* @__PURE__ */ new Map(
|
|
165
|
+
`C Other
|
|
166
|
+
Cc Control cntrl
|
|
167
|
+
Cf Format
|
|
168
|
+
Cn Unassigned
|
|
169
|
+
Co Private_Use
|
|
170
|
+
Cs Surrogate
|
|
171
|
+
L Letter
|
|
172
|
+
LC Cased_Letter
|
|
173
|
+
Ll Lowercase_Letter
|
|
174
|
+
Lm Modifier_Letter
|
|
175
|
+
Lo Other_Letter
|
|
176
|
+
Lt Titlecase_Letter
|
|
177
|
+
Lu Uppercase_Letter
|
|
178
|
+
M Mark Combining_Mark
|
|
179
|
+
Mc Spacing_Mark
|
|
180
|
+
Me Enclosing_Mark
|
|
181
|
+
Mn Nonspacing_Mark
|
|
182
|
+
N Number
|
|
183
|
+
Nd Decimal_Number digit
|
|
184
|
+
Nl Letter_Number
|
|
185
|
+
No Other_Number
|
|
186
|
+
P Punctuation punct
|
|
187
|
+
Pc Connector_Punctuation
|
|
188
|
+
Pd Dash_Punctuation
|
|
189
|
+
Pe Close_Punctuation
|
|
190
|
+
Pf Final_Punctuation
|
|
191
|
+
Pi Initial_Punctuation
|
|
192
|
+
Po Other_Punctuation
|
|
193
|
+
Ps Open_Punctuation
|
|
194
|
+
S Symbol
|
|
195
|
+
Sc Currency_Symbol
|
|
196
|
+
Sk Modifier_Symbol
|
|
197
|
+
Sm Math_Symbol
|
|
198
|
+
So Other_Symbol
|
|
199
|
+
Z Separator
|
|
200
|
+
Zl Line_Separator
|
|
201
|
+
Zp Paragraph_Separator
|
|
202
|
+
Zs Space_Separator
|
|
203
|
+
ASCII
|
|
204
|
+
ASCII_Hex_Digit AHex
|
|
205
|
+
Alphabetic Alpha
|
|
206
|
+
Any
|
|
207
|
+
Assigned
|
|
208
|
+
Bidi_Control Bidi_C
|
|
209
|
+
Bidi_Mirrored Bidi_M
|
|
210
|
+
Case_Ignorable CI
|
|
211
|
+
Cased
|
|
212
|
+
Changes_When_Casefolded CWCF
|
|
213
|
+
Changes_When_Casemapped CWCM
|
|
214
|
+
Changes_When_Lowercased CWL
|
|
215
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
216
|
+
Changes_When_Titlecased CWT
|
|
217
|
+
Changes_When_Uppercased CWU
|
|
218
|
+
Dash
|
|
219
|
+
Default_Ignorable_Code_Point DI
|
|
220
|
+
Deprecated Dep
|
|
221
|
+
Diacritic Dia
|
|
222
|
+
Emoji
|
|
223
|
+
Emoji_Component EComp
|
|
224
|
+
Emoji_Modifier EMod
|
|
225
|
+
Emoji_Modifier_Base EBase
|
|
226
|
+
Emoji_Presentation EPres
|
|
227
|
+
Extended_Pictographic ExtPict
|
|
228
|
+
Extender Ext
|
|
229
|
+
Grapheme_Base Gr_Base
|
|
230
|
+
Grapheme_Extend Gr_Ext
|
|
231
|
+
Hex_Digit Hex
|
|
232
|
+
IDS_Binary_Operator IDSB
|
|
233
|
+
IDS_Trinary_Operator IDST
|
|
234
|
+
ID_Continue IDC
|
|
235
|
+
ID_Start IDS
|
|
236
|
+
Ideographic Ideo
|
|
237
|
+
Join_Control Join_C
|
|
238
|
+
Logical_Order_Exception LOE
|
|
239
|
+
Lowercase Lower
|
|
240
|
+
Math
|
|
241
|
+
Noncharacter_Code_Point NChar
|
|
242
|
+
Pattern_Syntax Pat_Syn
|
|
243
|
+
Pattern_White_Space Pat_WS
|
|
244
|
+
Quotation_Mark QMark
|
|
245
|
+
Radical
|
|
246
|
+
Regional_Indicator RI
|
|
247
|
+
Sentence_Terminal STerm
|
|
248
|
+
Soft_Dotted SD
|
|
249
|
+
Terminal_Punctuation Term
|
|
250
|
+
Unified_Ideograph UIdeo
|
|
251
|
+
Uppercase Upper
|
|
252
|
+
Variation_Selector VS
|
|
253
|
+
White_Space space
|
|
254
|
+
XID_Continue XIDC
|
|
255
|
+
XID_Start XIDS`.split(/\s/).map((p) => [w(p), p])
|
|
256
|
+
);
|
|
257
|
+
var LowerToAlternativeLowerCaseMap = /* @__PURE__ */ new Map([
|
|
258
|
+
["s", cp(383)],
|
|
259
|
+
// s, ſ
|
|
260
|
+
[cp(383), "s"]
|
|
261
|
+
// ſ, s
|
|
262
|
+
]);
|
|
263
|
+
var LowerToAlternativeUpperCaseMap = /* @__PURE__ */ new Map([
|
|
264
|
+
[cp(223), cp(7838)],
|
|
265
|
+
// ß, ẞ
|
|
266
|
+
[cp(107), cp(8490)],
|
|
267
|
+
// k, K (Kelvin)
|
|
268
|
+
[cp(229), cp(8491)],
|
|
269
|
+
// å, Å (Angstrom)
|
|
270
|
+
[cp(969), cp(8486)]
|
|
271
|
+
// ω, Ω (Ohm)
|
|
272
|
+
]);
|
|
273
|
+
var LowerToTitleCaseMap = new Map([
|
|
274
|
+
titleEntry(453),
|
|
275
|
+
titleEntry(456),
|
|
276
|
+
titleEntry(459),
|
|
277
|
+
titleEntry(498),
|
|
278
|
+
...titleRange(8072, 8079),
|
|
279
|
+
...titleRange(8088, 8095),
|
|
280
|
+
...titleRange(8104, 8111),
|
|
281
|
+
titleEntry(8124),
|
|
282
|
+
titleEntry(8140),
|
|
283
|
+
titleEntry(8188)
|
|
284
|
+
]);
|
|
285
|
+
var PosixClassMap = /* @__PURE__ */ new Map([
|
|
286
|
+
["alnum", r`[\p{Alpha}\p{Nd}]`],
|
|
287
|
+
["alpha", r`\p{Alpha}`],
|
|
288
|
+
["ascii", r`\p{ASCII}`],
|
|
289
|
+
["blank", r`[\p{Zs}\t]`],
|
|
290
|
+
["cntrl", r`\p{Cc}`],
|
|
291
|
+
["digit", r`\p{Nd}`],
|
|
292
|
+
["graph", r`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],
|
|
293
|
+
["lower", r`\p{Lower}`],
|
|
294
|
+
["print", r`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],
|
|
295
|
+
["punct", r`[\p{P}\p{S}]`],
|
|
296
|
+
// Updated value from Onig 6.9.9; changed from Unicode `\p{punct}`
|
|
297
|
+
["space", r`\p{space}`],
|
|
298
|
+
["upper", r`\p{Upper}`],
|
|
299
|
+
["word", r`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
300
|
+
["xdigit", r`\p{AHex}`]
|
|
301
|
+
]);
|
|
302
|
+
function range(start, end) {
|
|
303
|
+
const range2 = [];
|
|
304
|
+
for (let i = start; i <= end; i++) {
|
|
305
|
+
range2.push(i);
|
|
306
|
+
}
|
|
307
|
+
return range2;
|
|
308
|
+
}
|
|
309
|
+
function titleEntry(codePoint) {
|
|
310
|
+
const char = cp(codePoint);
|
|
311
|
+
return [char.toLowerCase(), char];
|
|
312
|
+
}
|
|
313
|
+
function titleRange(start, end) {
|
|
314
|
+
return range(start, end).map((codePoint) => titleEntry(codePoint));
|
|
315
|
+
}
|
|
316
|
+
var UnicodePropertiesWithSpecificCase = /* @__PURE__ */ new Set([
|
|
317
|
+
"Lower",
|
|
318
|
+
"Lowercase",
|
|
319
|
+
"Upper",
|
|
320
|
+
"Uppercase",
|
|
321
|
+
"Ll",
|
|
322
|
+
"Lowercase_Letter",
|
|
323
|
+
"Lt",
|
|
324
|
+
"Titlecase_Letter",
|
|
325
|
+
"Lu",
|
|
326
|
+
"Uppercase_Letter"
|
|
327
|
+
// The `Changes_When_*` properties (and their aliases) could be included, but they're very rare.
|
|
328
|
+
// Some other properties include a handful of chars with specific cases only, but these chars are
|
|
329
|
+
// generally extreme edge cases and using such properties case insensitively generally produces
|
|
330
|
+
// undesired behavior anyway
|
|
331
|
+
]);
|
|
332
|
+
function transform(ast, options) {
|
|
333
|
+
const opts = {
|
|
334
|
+
// A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
|
|
335
|
+
// - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
|
|
336
|
+
// Unicode data; a best-effort approximation requires knowing the target.
|
|
337
|
+
// - `CharacterSet` kind `posix` with values `graph` and `print`: Their complex Unicode
|
|
338
|
+
// representations would be hard to change to ASCII versions after the fact in the generator
|
|
339
|
+
// based on `target`/`accuracy`, so produce the appropriate structure here.
|
|
340
|
+
accuracy: "default",
|
|
341
|
+
asciiWordBoundaries: false,
|
|
342
|
+
avoidSubclass: false,
|
|
343
|
+
bestEffortTarget: "ES2025",
|
|
344
|
+
...options
|
|
345
|
+
};
|
|
346
|
+
addParentProperties(ast);
|
|
347
|
+
const firstPassState = {
|
|
348
|
+
accuracy: opts.accuracy,
|
|
349
|
+
asciiWordBoundaries: opts.asciiWordBoundaries,
|
|
350
|
+
avoidSubclass: opts.avoidSubclass,
|
|
351
|
+
flagDirectivesByAlt: /* @__PURE__ */ new Map(),
|
|
352
|
+
jsGroupNameMap: /* @__PURE__ */ new Map(),
|
|
353
|
+
minTargetEs2024: isMinTarget(opts.bestEffortTarget, "ES2024"),
|
|
354
|
+
passedLookbehind: false,
|
|
355
|
+
strategy: null,
|
|
356
|
+
// Subroutines can appear before the groups they ref, so collect reffed nodes for a second pass
|
|
357
|
+
subroutineRefMap: /* @__PURE__ */ new Map(),
|
|
358
|
+
supportedGNodes: /* @__PURE__ */ new Set(),
|
|
359
|
+
digitIsAscii: ast.flags.digitIsAscii,
|
|
360
|
+
spaceIsAscii: ast.flags.spaceIsAscii,
|
|
361
|
+
wordIsAscii: ast.flags.wordIsAscii
|
|
362
|
+
};
|
|
363
|
+
S(ast, FirstPassVisitor, firstPassState);
|
|
364
|
+
const globalFlags = {
|
|
365
|
+
dotAll: ast.flags.dotAll,
|
|
366
|
+
ignoreCase: ast.flags.ignoreCase
|
|
367
|
+
};
|
|
368
|
+
const secondPassState = {
|
|
369
|
+
currentFlags: globalFlags,
|
|
370
|
+
prevFlags: null,
|
|
371
|
+
globalFlags,
|
|
372
|
+
groupOriginByCopy: /* @__PURE__ */ new Map(),
|
|
373
|
+
groupsByName: /* @__PURE__ */ new Map(),
|
|
374
|
+
multiplexCapturesToLeftByRef: /* @__PURE__ */ new Map(),
|
|
375
|
+
openRefs: /* @__PURE__ */ new Map(),
|
|
376
|
+
reffedNodesByReferencer: /* @__PURE__ */ new Map(),
|
|
377
|
+
subroutineRefMap: firstPassState.subroutineRefMap
|
|
378
|
+
};
|
|
379
|
+
S(ast, SecondPassVisitor, secondPassState);
|
|
380
|
+
const thirdPassState = {
|
|
381
|
+
groupsByName: secondPassState.groupsByName,
|
|
382
|
+
highestOrphanBackref: 0,
|
|
383
|
+
numCapturesToLeft: 0,
|
|
384
|
+
reffedNodesByReferencer: secondPassState.reffedNodesByReferencer
|
|
385
|
+
};
|
|
386
|
+
S(ast, ThirdPassVisitor, thirdPassState);
|
|
387
|
+
ast._originMap = secondPassState.groupOriginByCopy;
|
|
388
|
+
ast._strategy = firstPassState.strategy;
|
|
389
|
+
return ast;
|
|
390
|
+
}
|
|
391
|
+
var FirstPassVisitor = {
|
|
392
|
+
AbsenceFunction({ node, parent, replaceWith }) {
|
|
393
|
+
const { body, kind } = node;
|
|
394
|
+
if (kind === "repeater") {
|
|
395
|
+
const innerGroup = A();
|
|
396
|
+
innerGroup.body[0].body.push(
|
|
397
|
+
// Insert own alts as `body`
|
|
398
|
+
K({ negate: true, body }),
|
|
399
|
+
Q("Any")
|
|
400
|
+
);
|
|
401
|
+
const outerGroup = A();
|
|
402
|
+
outerGroup.body[0].body.push(
|
|
403
|
+
_("greedy", 0, Infinity, innerGroup)
|
|
404
|
+
);
|
|
405
|
+
replaceWith(setParentDeep(outerGroup, parent), { traverse: true });
|
|
406
|
+
} else {
|
|
407
|
+
throw new Error(`Unsupported absence function "(?~|"`);
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
Alternative: {
|
|
411
|
+
enter({ node, parent, key }, { flagDirectivesByAlt }) {
|
|
412
|
+
const flagDirectives = node.body.filter((el) => el.kind === "flags");
|
|
413
|
+
for (let i = key + 1; i < parent.body.length; i++) {
|
|
414
|
+
const forwardSiblingAlt = parent.body[i];
|
|
415
|
+
getOrInsert(flagDirectivesByAlt, forwardSiblingAlt, []).push(...flagDirectives);
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
exit({ node }, { flagDirectivesByAlt }) {
|
|
419
|
+
if (flagDirectivesByAlt.get(node)?.length) {
|
|
420
|
+
const flags = getCombinedFlagModsFromFlagNodes(flagDirectivesByAlt.get(node));
|
|
421
|
+
if (flags) {
|
|
422
|
+
const flagGroup = A({ flags });
|
|
423
|
+
flagGroup.body[0].body = node.body;
|
|
424
|
+
node.body = [setParentDeep(flagGroup, node)];
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
Assertion({ node, parent, key, container, root, remove, replaceWith }, state) {
|
|
430
|
+
const { kind, negate } = node;
|
|
431
|
+
const { asciiWordBoundaries, avoidSubclass, supportedGNodes, wordIsAscii } = state;
|
|
432
|
+
if (kind === "text_segment_boundary") {
|
|
433
|
+
throw new Error(`Unsupported text segment boundary "\\${negate ? "Y" : "y"}"`);
|
|
434
|
+
} else if (kind === "line_end") {
|
|
435
|
+
replaceWith(setParentDeep(K({ body: [
|
|
436
|
+
b({ body: [F("string_end")] }),
|
|
437
|
+
b({ body: [m(10)] })
|
|
438
|
+
// `\n`
|
|
439
|
+
] }), parent));
|
|
440
|
+
} else if (kind === "line_start") {
|
|
441
|
+
replaceWith(setParentDeep(parseFragment(r`(?<=\A|\n(?!\z))`, { skipLookbehindValidation: true }), parent));
|
|
442
|
+
} else if (kind === "search_start") {
|
|
443
|
+
if (supportedGNodes.has(node)) {
|
|
444
|
+
root.flags.sticky = true;
|
|
445
|
+
remove();
|
|
446
|
+
} else {
|
|
447
|
+
const prev = container[key - 1];
|
|
448
|
+
if (prev && isAlwaysNonZeroLength(prev)) {
|
|
449
|
+
replaceWith(setParentDeep(K({ negate: true }), parent));
|
|
450
|
+
} else if (avoidSubclass) {
|
|
451
|
+
throw new Error(r`Uses "\G" in a way that requires a subclass`);
|
|
452
|
+
} else {
|
|
453
|
+
replaceWith(setParent(F("string_start"), parent));
|
|
454
|
+
state.strategy = "clip_search";
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
} else if (kind === "string_end" || kind === "string_start") ;
|
|
458
|
+
else if (kind === "string_end_newline") {
|
|
459
|
+
replaceWith(setParentDeep(parseFragment(r`(?=\n?\z)`), parent));
|
|
460
|
+
} else if (kind === "word_boundary") {
|
|
461
|
+
if (!wordIsAscii && !asciiWordBoundaries) {
|
|
462
|
+
const b2 = `(?:(?<=${defaultWordChar})(?!${defaultWordChar})|(?<!${defaultWordChar})(?=${defaultWordChar}))`;
|
|
463
|
+
const B = `(?:(?<=${defaultWordChar})(?=${defaultWordChar})|(?<!${defaultWordChar})(?!${defaultWordChar}))`;
|
|
464
|
+
replaceWith(setParentDeep(parseFragment(negate ? B : b2), parent));
|
|
465
|
+
}
|
|
466
|
+
} else {
|
|
467
|
+
throw new Error(`Unexpected assertion kind "${kind}"`);
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
Backreference({ node }, { jsGroupNameMap }) {
|
|
471
|
+
let { ref } = node;
|
|
472
|
+
if (typeof ref === "string" && !isValidJsGroupName(ref)) {
|
|
473
|
+
ref = getAndStoreJsGroupName(ref, jsGroupNameMap);
|
|
474
|
+
node.ref = ref;
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
CapturingGroup({ node }, { jsGroupNameMap, subroutineRefMap }) {
|
|
478
|
+
let { name } = node;
|
|
479
|
+
if (name && !isValidJsGroupName(name)) {
|
|
480
|
+
name = getAndStoreJsGroupName(name, jsGroupNameMap);
|
|
481
|
+
node.name = name;
|
|
482
|
+
}
|
|
483
|
+
subroutineRefMap.set(node.number, node);
|
|
484
|
+
if (name) {
|
|
485
|
+
subroutineRefMap.set(name, node);
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
CharacterClassRange({ node, parent, replaceWith }) {
|
|
489
|
+
if (parent.kind === "intersection") {
|
|
490
|
+
const cc = C({ body: [node] });
|
|
491
|
+
replaceWith(setParentDeep(cc, parent), { traverse: true });
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
CharacterSet({ node, parent, replaceWith }, { accuracy, minTargetEs2024, digitIsAscii, spaceIsAscii, wordIsAscii }) {
|
|
495
|
+
const { kind, negate, value } = node;
|
|
496
|
+
if (digitIsAscii && (kind === "digit" || value === "digit")) {
|
|
497
|
+
replaceWith(setParent(E("digit", { negate }), parent));
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (spaceIsAscii && (kind === "space" || value === "space")) {
|
|
501
|
+
replaceWith(setParentDeep(setNegate(parseFragment(asciiSpaceChar), negate), parent));
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
if (wordIsAscii && (kind === "word" || value === "word")) {
|
|
505
|
+
replaceWith(setParent(E("word", { negate }), parent));
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
if (kind === "any") {
|
|
509
|
+
replaceWith(setParent(Q("Any"), parent));
|
|
510
|
+
} else if (kind === "digit") {
|
|
511
|
+
replaceWith(setParent(Q("Nd", { negate }), parent));
|
|
512
|
+
} else if (kind === "dot") ;
|
|
513
|
+
else if (kind === "text_segment") {
|
|
514
|
+
if (accuracy === "strict") {
|
|
515
|
+
throw new Error(r`Use of "\X" requires non-strict accuracy`);
|
|
516
|
+
}
|
|
517
|
+
const eBase = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?";
|
|
518
|
+
const emoji = r`\p{RI}{2}|${eBase}(?:\u200D${eBase})*`;
|
|
519
|
+
replaceWith(setParentDeep(parseFragment(
|
|
520
|
+
// Close approximation of an extended grapheme cluster; see <unicode.org/reports/tr29/>
|
|
521
|
+
r`(?>\r\n|${minTargetEs2024 ? r`\p{RGI_Emoji}` : emoji}|\P{M}\p{M}*)`,
|
|
522
|
+
// Allow JS property `RGI_Emoji` through
|
|
523
|
+
{ skipPropertyNameValidation: true }
|
|
524
|
+
), parent));
|
|
525
|
+
} else if (kind === "hex") {
|
|
526
|
+
replaceWith(setParent(Q("AHex", { negate }), parent));
|
|
527
|
+
} else if (kind === "newline") {
|
|
528
|
+
replaceWith(setParentDeep(parseFragment(negate ? "[^\n]" : "(?>\r\n?|[\n\v\f
\u2028\u2029])"), parent));
|
|
529
|
+
} else if (kind === "posix") {
|
|
530
|
+
if (!minTargetEs2024 && (value === "graph" || value === "print")) {
|
|
531
|
+
if (accuracy === "strict") {
|
|
532
|
+
throw new Error(`POSIX class "${value}" requires min target ES2024 or non-strict accuracy`);
|
|
533
|
+
}
|
|
534
|
+
let ascii = {
|
|
535
|
+
graph: "!-~",
|
|
536
|
+
print: " -~"
|
|
537
|
+
}[value];
|
|
538
|
+
if (negate) {
|
|
539
|
+
ascii = `\0-${cp(ascii.codePointAt(0) - 1)}${cp(ascii.codePointAt(2) + 1)}-`;
|
|
540
|
+
}
|
|
541
|
+
replaceWith(setParentDeep(parseFragment(`[${ascii}]`), parent));
|
|
542
|
+
} else {
|
|
543
|
+
replaceWith(setParentDeep(setNegate(parseFragment(PosixClassMap.get(value)), negate), parent));
|
|
544
|
+
}
|
|
545
|
+
} else if (kind === "property") {
|
|
546
|
+
if (!JsUnicodePropertyMap.has(w(value))) {
|
|
547
|
+
node.key = "sc";
|
|
548
|
+
}
|
|
549
|
+
} else if (kind === "space") {
|
|
550
|
+
replaceWith(setParent(Q("space", { negate }), parent));
|
|
551
|
+
} else if (kind === "word") {
|
|
552
|
+
replaceWith(setParentDeep(setNegate(parseFragment(defaultWordChar), negate), parent));
|
|
553
|
+
} else {
|
|
554
|
+
throw new Error(`Unexpected character set kind "${kind}"`);
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
Directive({ node, parent, root, remove, replaceWith, removeAllPrevSiblings, removeAllNextSiblings }) {
|
|
558
|
+
const { kind, flags } = node;
|
|
559
|
+
if (kind === "flags") {
|
|
560
|
+
if (!flags.enable && !flags.disable) {
|
|
561
|
+
remove();
|
|
562
|
+
} else {
|
|
563
|
+
const flagGroup = A({ flags });
|
|
564
|
+
flagGroup.body[0].body = removeAllNextSiblings();
|
|
565
|
+
replaceWith(setParentDeep(flagGroup, parent), { traverse: true });
|
|
566
|
+
}
|
|
567
|
+
} else if (kind === "keep") {
|
|
568
|
+
const firstAlt = root.body[0];
|
|
569
|
+
const hasWrapperGroup = root.body.length === 1 && // Not emulatable if within a `CapturingGroup`
|
|
570
|
+
o(firstAlt, { type: "Group" }) && firstAlt.body[0].body.length === 1;
|
|
571
|
+
const topLevel = hasWrapperGroup ? firstAlt.body[0] : root;
|
|
572
|
+
if (parent.parent !== topLevel || topLevel.body.length > 1) {
|
|
573
|
+
throw new Error(r`Uses "\K" in a way that's unsupported`);
|
|
574
|
+
}
|
|
575
|
+
const lookbehind = K({ behind: true });
|
|
576
|
+
lookbehind.body[0].body = removeAllPrevSiblings();
|
|
577
|
+
replaceWith(setParentDeep(lookbehind, parent));
|
|
578
|
+
} else {
|
|
579
|
+
throw new Error(`Unexpected directive kind "${kind}"`);
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
Flags({ node, parent }) {
|
|
583
|
+
if (node.posixIsAscii) {
|
|
584
|
+
throw new Error('Unsupported flag "P"');
|
|
585
|
+
}
|
|
586
|
+
if (node.textSegmentMode === "word") {
|
|
587
|
+
throw new Error('Unsupported flag "y{w}"');
|
|
588
|
+
}
|
|
589
|
+
[
|
|
590
|
+
"digitIsAscii",
|
|
591
|
+
// Flag D
|
|
592
|
+
"extended",
|
|
593
|
+
// Flag x
|
|
594
|
+
"posixIsAscii",
|
|
595
|
+
// Flag P
|
|
596
|
+
"spaceIsAscii",
|
|
597
|
+
// Flag S
|
|
598
|
+
"wordIsAscii",
|
|
599
|
+
// Flag W
|
|
600
|
+
"textSegmentMode"
|
|
601
|
+
// Flag y{g} or y{w}
|
|
602
|
+
].forEach((f) => delete node[f]);
|
|
603
|
+
Object.assign(node, {
|
|
604
|
+
// JS flag g; no Onig equiv
|
|
605
|
+
global: false,
|
|
606
|
+
// JS flag d; no Onig equiv
|
|
607
|
+
hasIndices: false,
|
|
608
|
+
// JS flag m; no Onig equiv but its behavior is always on in Onig. Onig's only line break
|
|
609
|
+
// char is line feed, unlike JS, so this flag isn't used since it would produce inaccurate
|
|
610
|
+
// results (also allows `^` and `$` to be used in the generator for string start and end)
|
|
611
|
+
multiline: false,
|
|
612
|
+
// JS flag y; no Onig equiv, but used for `\G` emulation
|
|
613
|
+
sticky: node.sticky ?? false
|
|
614
|
+
// Note: Regex+ doesn't allow explicitly adding flags it handles implicitly, so leave out
|
|
615
|
+
// properties `unicode` (JS flag u) and `unicodeSets` (JS flag v). Keep the existing values
|
|
616
|
+
// for `ignoreCase` (flag i) and `dotAll` (JS flag s, but Onig flag m)
|
|
617
|
+
});
|
|
618
|
+
parent.options = {
|
|
619
|
+
disable: {
|
|
620
|
+
// Onig uses different rules for flag x than Regex+, so disable the implicit flag
|
|
621
|
+
x: true,
|
|
622
|
+
// Onig has no flag to control "named capture only" mode but contextually applies its
|
|
623
|
+
// behavior when named capturing is used, so disable Regex+'s implicit flag for it
|
|
624
|
+
n: true
|
|
625
|
+
},
|
|
626
|
+
force: {
|
|
627
|
+
// Always add flag v because we're generating an AST that relies on it (it enables JS
|
|
628
|
+
// support for Onig features nested classes, intersection, Unicode properties, etc.).
|
|
629
|
+
// However, the generator might disable flag v based on its `target` option
|
|
630
|
+
v: true
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
},
|
|
634
|
+
Group({ node }) {
|
|
635
|
+
if (!node.flags) {
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
const { enable, disable } = node.flags;
|
|
639
|
+
enable?.extended && delete enable.extended;
|
|
640
|
+
disable?.extended && delete disable.extended;
|
|
641
|
+
enable?.dotAll && disable?.dotAll && delete enable.dotAll;
|
|
642
|
+
enable?.ignoreCase && disable?.ignoreCase && delete enable.ignoreCase;
|
|
643
|
+
enable && !Object.keys(enable).length && delete node.flags.enable;
|
|
644
|
+
disable && !Object.keys(disable).length && delete node.flags.disable;
|
|
645
|
+
!node.flags.enable && !node.flags.disable && delete node.flags;
|
|
646
|
+
},
|
|
647
|
+
LookaroundAssertion({ node }, state) {
|
|
648
|
+
const { kind } = node;
|
|
649
|
+
if (kind === "lookbehind") {
|
|
650
|
+
state.passedLookbehind = true;
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
NamedCallout({ node, parent, replaceWith }) {
|
|
654
|
+
const { kind } = node;
|
|
655
|
+
if (kind === "fail") {
|
|
656
|
+
replaceWith(setParentDeep(K({ negate: true }), parent));
|
|
657
|
+
} else {
|
|
658
|
+
throw new Error(`Unsupported named callout "(*${kind.toUpperCase()}"`);
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
Quantifier({ node }) {
|
|
662
|
+
if (node.body.type === "Quantifier") {
|
|
663
|
+
const group = A();
|
|
664
|
+
group.body[0].body.push(node.body);
|
|
665
|
+
node.body = setParentDeep(group, node);
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
Regex: {
|
|
669
|
+
enter({ node }, { supportedGNodes }) {
|
|
670
|
+
const leadingGs = [];
|
|
671
|
+
let hasAltWithLeadG = false;
|
|
672
|
+
let hasAltWithoutLeadG = false;
|
|
673
|
+
for (const alt of node.body) {
|
|
674
|
+
if (alt.body.length === 1 && alt.body[0].kind === "search_start") {
|
|
675
|
+
alt.body.pop();
|
|
676
|
+
} else {
|
|
677
|
+
const leadingG = getLeadingG(alt.body);
|
|
678
|
+
if (leadingG) {
|
|
679
|
+
hasAltWithLeadG = true;
|
|
680
|
+
Array.isArray(leadingG) ? leadingGs.push(...leadingG) : leadingGs.push(leadingG);
|
|
681
|
+
} else {
|
|
682
|
+
hasAltWithoutLeadG = true;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
if (hasAltWithLeadG && !hasAltWithoutLeadG) {
|
|
687
|
+
leadingGs.forEach((g) => supportedGNodes.add(g));
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
exit(_2, { accuracy, passedLookbehind, strategy }) {
|
|
691
|
+
if (accuracy === "strict" && passedLookbehind && strategy) {
|
|
692
|
+
throw new Error(r`Uses "\G" in a way that requires non-strict accuracy`);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
Subroutine({ node }, { jsGroupNameMap }) {
|
|
697
|
+
let { ref } = node;
|
|
698
|
+
if (typeof ref === "string" && !isValidJsGroupName(ref)) {
|
|
699
|
+
ref = getAndStoreJsGroupName(ref, jsGroupNameMap);
|
|
700
|
+
node.ref = ref;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
var SecondPassVisitor = {
|
|
705
|
+
Backreference({ node }, { multiplexCapturesToLeftByRef, reffedNodesByReferencer }) {
|
|
706
|
+
const { orphan, ref } = node;
|
|
707
|
+
if (!orphan) {
|
|
708
|
+
reffedNodesByReferencer.set(node, [...multiplexCapturesToLeftByRef.get(ref).map(({ node: node2 }) => node2)]);
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
CapturingGroup: {
|
|
712
|
+
enter({
|
|
713
|
+
node,
|
|
714
|
+
parent,
|
|
715
|
+
replaceWith,
|
|
716
|
+
skip
|
|
717
|
+
}, {
|
|
718
|
+
groupOriginByCopy,
|
|
719
|
+
groupsByName,
|
|
720
|
+
multiplexCapturesToLeftByRef,
|
|
721
|
+
openRefs,
|
|
722
|
+
reffedNodesByReferencer
|
|
723
|
+
}) {
|
|
724
|
+
const origin = groupOriginByCopy.get(node);
|
|
725
|
+
if (origin && openRefs.has(node.number)) {
|
|
726
|
+
const recursion2 = setParent(createRecursion(node.number), parent);
|
|
727
|
+
reffedNodesByReferencer.set(recursion2, openRefs.get(node.number));
|
|
728
|
+
replaceWith(recursion2);
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
openRefs.set(node.number, node);
|
|
732
|
+
multiplexCapturesToLeftByRef.set(node.number, []);
|
|
733
|
+
if (node.name) {
|
|
734
|
+
getOrInsert(multiplexCapturesToLeftByRef, node.name, []);
|
|
735
|
+
}
|
|
736
|
+
const multiplexNodes = multiplexCapturesToLeftByRef.get(node.name ?? node.number);
|
|
737
|
+
for (let i = 0; i < multiplexNodes.length; i++) {
|
|
738
|
+
const multiplex = multiplexNodes[i];
|
|
739
|
+
if (
|
|
740
|
+
// This group is from subroutine expansion, and there's a multiplex value from either the
|
|
741
|
+
// origin node or a prior subroutine expansion group with the same origin
|
|
742
|
+
origin === multiplex.node || origin && origin === multiplex.origin || // This group is not from subroutine expansion, and it comes after a subroutine expansion
|
|
743
|
+
// group that refers to this group
|
|
744
|
+
node === multiplex.origin
|
|
745
|
+
) {
|
|
746
|
+
multiplexNodes.splice(i, 1);
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
multiplexCapturesToLeftByRef.get(node.number).push({ node, origin });
|
|
751
|
+
if (node.name) {
|
|
752
|
+
multiplexCapturesToLeftByRef.get(node.name).push({ node, origin });
|
|
753
|
+
}
|
|
754
|
+
if (node.name) {
|
|
755
|
+
const groupsWithSameName = getOrInsert(groupsByName, node.name, /* @__PURE__ */ new Map());
|
|
756
|
+
let hasDuplicateNameToRemove = false;
|
|
757
|
+
if (origin) {
|
|
758
|
+
hasDuplicateNameToRemove = true;
|
|
759
|
+
} else {
|
|
760
|
+
for (const groupInfo of groupsWithSameName.values()) {
|
|
761
|
+
if (!groupInfo.hasDuplicateNameToRemove) {
|
|
762
|
+
hasDuplicateNameToRemove = true;
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
groupsByName.get(node.name).set(node, { node, hasDuplicateNameToRemove });
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
exit({ node }, { openRefs }) {
|
|
771
|
+
openRefs.delete(node.number);
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
Group: {
|
|
775
|
+
enter({ node }, state) {
|
|
776
|
+
state.prevFlags = state.currentFlags;
|
|
777
|
+
if (node.flags) {
|
|
778
|
+
state.currentFlags = getNewCurrentFlags(state.currentFlags, node.flags);
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
exit(_2, state) {
|
|
782
|
+
state.currentFlags = state.prevFlags;
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
Subroutine({ node, parent, replaceWith }, state) {
|
|
786
|
+
const { isRecursive, ref } = node;
|
|
787
|
+
if (isRecursive) {
|
|
788
|
+
let reffed = parent;
|
|
789
|
+
while (reffed = reffed.parent) {
|
|
790
|
+
if (reffed.type === "CapturingGroup" && (reffed.name === ref || reffed.number === ref)) {
|
|
791
|
+
break;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
state.reffedNodesByReferencer.set(node, reffed);
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
const reffedGroupNode = state.subroutineRefMap.get(ref);
|
|
798
|
+
const isGlobalRecursion = ref === 0;
|
|
799
|
+
const expandedSubroutine = isGlobalRecursion ? createRecursion(0) : (
|
|
800
|
+
// The reffed group might itself contain subroutines, which are expanded during sub-traversal
|
|
801
|
+
cloneCapturingGroup(reffedGroupNode, state.groupOriginByCopy, null)
|
|
802
|
+
);
|
|
803
|
+
let replacement = expandedSubroutine;
|
|
804
|
+
if (!isGlobalRecursion) {
|
|
805
|
+
const reffedGroupFlagMods = getCombinedFlagModsFromFlagNodes(getAllParents(
|
|
806
|
+
reffedGroupNode,
|
|
807
|
+
(p) => p.type === "Group" && !!p.flags
|
|
808
|
+
));
|
|
809
|
+
const reffedGroupFlags = reffedGroupFlagMods ? getNewCurrentFlags(state.globalFlags, reffedGroupFlagMods) : state.globalFlags;
|
|
810
|
+
if (!areFlagsEqual(reffedGroupFlags, state.currentFlags)) {
|
|
811
|
+
replacement = A({
|
|
812
|
+
flags: getFlagModsFromFlags(reffedGroupFlags)
|
|
813
|
+
});
|
|
814
|
+
replacement.body[0].body.push(expandedSubroutine);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
replaceWith(setParentDeep(replacement, parent), { traverse: !isGlobalRecursion });
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
var ThirdPassVisitor = {
|
|
821
|
+
Backreference({ node, parent, replaceWith }, state) {
|
|
822
|
+
if (node.orphan) {
|
|
823
|
+
state.highestOrphanBackref = Math.max(state.highestOrphanBackref, node.ref);
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
const reffedNodes = state.reffedNodesByReferencer.get(node);
|
|
827
|
+
const participants = reffedNodes.filter((reffed) => canParticipateWithNode(reffed, node));
|
|
828
|
+
if (!participants.length) {
|
|
829
|
+
replaceWith(setParentDeep(K({ negate: true }), parent));
|
|
830
|
+
} else if (participants.length > 1) {
|
|
831
|
+
const group = A({
|
|
832
|
+
atomic: true,
|
|
833
|
+
body: participants.reverse().map((reffed) => b({
|
|
834
|
+
body: [k(reffed.number)]
|
|
835
|
+
}))
|
|
836
|
+
});
|
|
837
|
+
replaceWith(setParentDeep(group, parent));
|
|
838
|
+
} else {
|
|
839
|
+
node.ref = participants[0].number;
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
CapturingGroup({ node }, state) {
|
|
843
|
+
node.number = ++state.numCapturesToLeft;
|
|
844
|
+
if (node.name) {
|
|
845
|
+
if (state.groupsByName.get(node.name).get(node).hasDuplicateNameToRemove) {
|
|
846
|
+
delete node.name;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
Regex: {
|
|
851
|
+
exit({ node }, state) {
|
|
852
|
+
const numCapsNeeded = Math.max(state.highestOrphanBackref - state.numCapturesToLeft, 0);
|
|
853
|
+
for (let i = 0; i < numCapsNeeded; i++) {
|
|
854
|
+
const emptyCapture = P();
|
|
855
|
+
node.body.at(-1).body.push(emptyCapture);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
Subroutine({ node }, state) {
|
|
860
|
+
if (!node.isRecursive || node.ref === 0) {
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
node.ref = state.reffedNodesByReferencer.get(node).number;
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
function addParentProperties(root) {
|
|
867
|
+
S(root, {
|
|
868
|
+
"*"({ node, parent }) {
|
|
869
|
+
node.parent = parent;
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
function areFlagsEqual(a, b2) {
|
|
874
|
+
return a.dotAll === b2.dotAll && a.ignoreCase === b2.ignoreCase;
|
|
875
|
+
}
|
|
876
|
+
function canParticipateWithNode(capture, node) {
|
|
877
|
+
let rightmostPoint = node;
|
|
878
|
+
do {
|
|
879
|
+
if (rightmostPoint.type === "Regex") {
|
|
880
|
+
return false;
|
|
881
|
+
}
|
|
882
|
+
if (rightmostPoint.type === "Alternative") {
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
if (rightmostPoint === capture) {
|
|
886
|
+
return false;
|
|
887
|
+
}
|
|
888
|
+
const kidsOfParent = getKids(rightmostPoint.parent);
|
|
889
|
+
for (const kid of kidsOfParent) {
|
|
890
|
+
if (kid === rightmostPoint) {
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
if (kid === capture || isAncestorOf(kid, capture)) {
|
|
894
|
+
return true;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
} while (rightmostPoint = rightmostPoint.parent);
|
|
898
|
+
throw new Error("Unexpected path");
|
|
899
|
+
}
|
|
900
|
+
function cloneCapturingGroup(obj, originMap, up, up2) {
|
|
901
|
+
const store = Array.isArray(obj) ? [] : {};
|
|
902
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
903
|
+
if (key === "parent") {
|
|
904
|
+
store.parent = Array.isArray(up) ? up2 : up;
|
|
905
|
+
} else if (value && typeof value === "object") {
|
|
906
|
+
store[key] = cloneCapturingGroup(value, originMap, store, up);
|
|
907
|
+
} else {
|
|
908
|
+
if (key === "type" && value === "CapturingGroup") {
|
|
909
|
+
originMap.set(store, originMap.get(obj) ?? obj);
|
|
910
|
+
}
|
|
911
|
+
store[key] = value;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return store;
|
|
915
|
+
}
|
|
916
|
+
function createRecursion(ref) {
|
|
917
|
+
const node = O(ref);
|
|
918
|
+
node.isRecursive = true;
|
|
919
|
+
return node;
|
|
920
|
+
}
|
|
921
|
+
function getAllParents(node, filterFn) {
|
|
922
|
+
const results = [];
|
|
923
|
+
while (node = node.parent) {
|
|
924
|
+
if (!filterFn || filterFn(node)) {
|
|
925
|
+
results.push(node);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
return results;
|
|
929
|
+
}
|
|
930
|
+
function getAndStoreJsGroupName(name, map) {
|
|
931
|
+
if (map.has(name)) {
|
|
932
|
+
return map.get(name);
|
|
933
|
+
}
|
|
934
|
+
const jsName = `$${map.size}_${name.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug, "_")}`;
|
|
935
|
+
map.set(name, jsName);
|
|
936
|
+
return jsName;
|
|
937
|
+
}
|
|
938
|
+
function getCombinedFlagModsFromFlagNodes(flagNodes) {
|
|
939
|
+
const flagProps = ["dotAll", "ignoreCase"];
|
|
940
|
+
const combinedFlags = { enable: {}, disable: {} };
|
|
941
|
+
flagNodes.forEach(({ flags }) => {
|
|
942
|
+
flagProps.forEach((prop) => {
|
|
943
|
+
if (flags.enable?.[prop]) {
|
|
944
|
+
delete combinedFlags.disable[prop];
|
|
945
|
+
combinedFlags.enable[prop] = true;
|
|
946
|
+
}
|
|
947
|
+
if (flags.disable?.[prop]) {
|
|
948
|
+
combinedFlags.disable[prop] = true;
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
});
|
|
952
|
+
if (!Object.keys(combinedFlags.enable).length) {
|
|
953
|
+
delete combinedFlags.enable;
|
|
954
|
+
}
|
|
955
|
+
if (!Object.keys(combinedFlags.disable).length) {
|
|
956
|
+
delete combinedFlags.disable;
|
|
957
|
+
}
|
|
958
|
+
if (combinedFlags.enable || combinedFlags.disable) {
|
|
959
|
+
return combinedFlags;
|
|
960
|
+
}
|
|
961
|
+
return null;
|
|
962
|
+
}
|
|
963
|
+
function getFlagModsFromFlags({ dotAll, ignoreCase }) {
|
|
964
|
+
const mods = {};
|
|
965
|
+
if (dotAll || ignoreCase) {
|
|
966
|
+
mods.enable = {};
|
|
967
|
+
dotAll && (mods.enable.dotAll = true);
|
|
968
|
+
ignoreCase && (mods.enable.ignoreCase = true);
|
|
969
|
+
}
|
|
970
|
+
if (!dotAll || !ignoreCase) {
|
|
971
|
+
mods.disable = {};
|
|
972
|
+
!dotAll && (mods.disable.dotAll = true);
|
|
973
|
+
!ignoreCase && (mods.disable.ignoreCase = true);
|
|
974
|
+
}
|
|
975
|
+
return mods;
|
|
976
|
+
}
|
|
977
|
+
function getKids(node) {
|
|
978
|
+
if (!node) {
|
|
979
|
+
throw new Error("Node expected");
|
|
980
|
+
}
|
|
981
|
+
const { body } = node;
|
|
982
|
+
return Array.isArray(body) ? body : body ? [body] : null;
|
|
983
|
+
}
|
|
984
|
+
function getLeadingG(els) {
|
|
985
|
+
const firstToConsider = els.find((el) => el.kind === "search_start" || isLoneGLookaround(el, { negate: false }) || !isAlwaysZeroLength(el));
|
|
986
|
+
if (!firstToConsider) {
|
|
987
|
+
return null;
|
|
988
|
+
}
|
|
989
|
+
if (firstToConsider.kind === "search_start") {
|
|
990
|
+
return firstToConsider;
|
|
991
|
+
}
|
|
992
|
+
if (firstToConsider.type === "LookaroundAssertion") {
|
|
993
|
+
return firstToConsider.body[0].body[0];
|
|
994
|
+
}
|
|
995
|
+
if (firstToConsider.type === "CapturingGroup" || firstToConsider.type === "Group") {
|
|
996
|
+
const gNodesForGroup = [];
|
|
997
|
+
for (const alt of firstToConsider.body) {
|
|
998
|
+
const leadingG = getLeadingG(alt.body);
|
|
999
|
+
if (!leadingG) {
|
|
1000
|
+
return null;
|
|
1001
|
+
}
|
|
1002
|
+
Array.isArray(leadingG) ? gNodesForGroup.push(...leadingG) : gNodesForGroup.push(leadingG);
|
|
1003
|
+
}
|
|
1004
|
+
return gNodesForGroup;
|
|
1005
|
+
}
|
|
1006
|
+
return null;
|
|
1007
|
+
}
|
|
1008
|
+
function isAncestorOf(node, descendant) {
|
|
1009
|
+
const kids = getKids(node) ?? [];
|
|
1010
|
+
for (const kid of kids) {
|
|
1011
|
+
if (kid === descendant || isAncestorOf(kid, descendant)) {
|
|
1012
|
+
return true;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
function isAlwaysZeroLength({ type }) {
|
|
1018
|
+
return type === "Assertion" || type === "Directive" || type === "LookaroundAssertion";
|
|
1019
|
+
}
|
|
1020
|
+
function isAlwaysNonZeroLength(node) {
|
|
1021
|
+
const types = [
|
|
1022
|
+
"Character",
|
|
1023
|
+
"CharacterClass",
|
|
1024
|
+
"CharacterSet"
|
|
1025
|
+
];
|
|
1026
|
+
return types.includes(node.type) || node.type === "Quantifier" && node.min && types.includes(node.body.type);
|
|
1027
|
+
}
|
|
1028
|
+
function isLoneGLookaround(node, options) {
|
|
1029
|
+
const opts = {
|
|
1030
|
+
negate: null,
|
|
1031
|
+
...options
|
|
1032
|
+
};
|
|
1033
|
+
return node.type === "LookaroundAssertion" && (opts.negate === null || node.negate === opts.negate) && node.body.length === 1 && o(node.body[0], {
|
|
1034
|
+
type: "Assertion",
|
|
1035
|
+
kind: "search_start"
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
function isValidJsGroupName(name) {
|
|
1039
|
+
return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(name);
|
|
1040
|
+
}
|
|
1041
|
+
function parseFragment(pattern, options) {
|
|
1042
|
+
const ast = J(pattern, {
|
|
1043
|
+
...options,
|
|
1044
|
+
// Providing a custom set of Unicode property names avoids converting some JS Unicode
|
|
1045
|
+
// properties (ex: `\p{Alpha}`) to Onig POSIX classes
|
|
1046
|
+
unicodePropertyMap: JsUnicodePropertyMap
|
|
1047
|
+
});
|
|
1048
|
+
const alts = ast.body;
|
|
1049
|
+
if (alts.length > 1 || alts[0].body.length > 1) {
|
|
1050
|
+
return A({ body: alts });
|
|
1051
|
+
}
|
|
1052
|
+
return alts[0].body[0];
|
|
1053
|
+
}
|
|
1054
|
+
function setNegate(node, negate) {
|
|
1055
|
+
node.negate = negate;
|
|
1056
|
+
return node;
|
|
1057
|
+
}
|
|
1058
|
+
function setParent(node, parent) {
|
|
1059
|
+
node.parent = parent;
|
|
1060
|
+
return node;
|
|
1061
|
+
}
|
|
1062
|
+
function setParentDeep(node, parent) {
|
|
1063
|
+
addParentProperties(node);
|
|
1064
|
+
node.parent = parent;
|
|
1065
|
+
return node;
|
|
1066
|
+
}
|
|
1067
|
+
function generate(ast, options) {
|
|
1068
|
+
const opts = getOptions(options);
|
|
1069
|
+
const minTargetEs2024 = isMinTarget(opts.target, "ES2024");
|
|
1070
|
+
const minTargetEs2025 = isMinTarget(opts.target, "ES2025");
|
|
1071
|
+
const recursionLimit = opts.rules.recursionLimit;
|
|
1072
|
+
if (!Number.isInteger(recursionLimit) || recursionLimit < 2 || recursionLimit > 20) {
|
|
1073
|
+
throw new Error("Invalid recursionLimit; use 2-20");
|
|
1074
|
+
}
|
|
1075
|
+
let hasCaseInsensitiveNode = null;
|
|
1076
|
+
let hasCaseSensitiveNode = null;
|
|
1077
|
+
if (!minTargetEs2025) {
|
|
1078
|
+
const iStack = [ast.flags.ignoreCase];
|
|
1079
|
+
S(ast, FlagModifierVisitor, {
|
|
1080
|
+
getCurrentModI: () => iStack.at(-1),
|
|
1081
|
+
popModI() {
|
|
1082
|
+
iStack.pop();
|
|
1083
|
+
},
|
|
1084
|
+
pushModI(isIOn) {
|
|
1085
|
+
iStack.push(isIOn);
|
|
1086
|
+
},
|
|
1087
|
+
setHasCasedChar() {
|
|
1088
|
+
if (iStack.at(-1)) {
|
|
1089
|
+
hasCaseInsensitiveNode = true;
|
|
1090
|
+
} else {
|
|
1091
|
+
hasCaseSensitiveNode = true;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
const appliedGlobalFlags = {
|
|
1097
|
+
dotAll: ast.flags.dotAll,
|
|
1098
|
+
// - Turn global flag i on if a case insensitive node was used and no case sensitive nodes were
|
|
1099
|
+
// used (to avoid unnecessary node expansion).
|
|
1100
|
+
// - Turn global flag i off if a case sensitive node was used (since case sensitivity can't be
|
|
1101
|
+
// forced without the use of ES2025 flag groups)
|
|
1102
|
+
ignoreCase: !!((ast.flags.ignoreCase || hasCaseInsensitiveNode) && !hasCaseSensitiveNode)
|
|
1103
|
+
};
|
|
1104
|
+
let lastNode = ast;
|
|
1105
|
+
const state = {
|
|
1106
|
+
accuracy: opts.accuracy,
|
|
1107
|
+
appliedGlobalFlags,
|
|
1108
|
+
captureMap: /* @__PURE__ */ new Map(),
|
|
1109
|
+
currentFlags: {
|
|
1110
|
+
dotAll: ast.flags.dotAll,
|
|
1111
|
+
ignoreCase: ast.flags.ignoreCase
|
|
1112
|
+
},
|
|
1113
|
+
inCharClass: false,
|
|
1114
|
+
lastNode,
|
|
1115
|
+
originMap: ast._originMap,
|
|
1116
|
+
recursionLimit,
|
|
1117
|
+
useAppliedIgnoreCase: !!(!minTargetEs2025 && hasCaseInsensitiveNode && hasCaseSensitiveNode),
|
|
1118
|
+
useFlagMods: minTargetEs2025,
|
|
1119
|
+
useFlagV: minTargetEs2024,
|
|
1120
|
+
verbose: opts.verbose
|
|
1121
|
+
};
|
|
1122
|
+
function gen(node) {
|
|
1123
|
+
state.lastNode = lastNode;
|
|
1124
|
+
lastNode = node;
|
|
1125
|
+
const fn = throwIfNullish(generator[node.type], `Unexpected node type "${node.type}"`);
|
|
1126
|
+
return fn(node, state, gen);
|
|
1127
|
+
}
|
|
1128
|
+
const result = {
|
|
1129
|
+
pattern: ast.body.map(gen).join("|"),
|
|
1130
|
+
// Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags
|
|
1131
|
+
flags: gen(ast.flags),
|
|
1132
|
+
options: { ...ast.options }
|
|
1133
|
+
};
|
|
1134
|
+
if (!minTargetEs2024) {
|
|
1135
|
+
delete result.options.force.v;
|
|
1136
|
+
result.options.disable.v = true;
|
|
1137
|
+
result.options.unicodeSetsPlugin = null;
|
|
1138
|
+
}
|
|
1139
|
+
result._captureTransfers = /* @__PURE__ */ new Map();
|
|
1140
|
+
result._hiddenCaptures = [];
|
|
1141
|
+
state.captureMap.forEach((value, key) => {
|
|
1142
|
+
if (value.hidden) {
|
|
1143
|
+
result._hiddenCaptures.push(key);
|
|
1144
|
+
}
|
|
1145
|
+
if (value.transferTo) {
|
|
1146
|
+
getOrInsert(result._captureTransfers, value.transferTo, []).push(key);
|
|
1147
|
+
}
|
|
1148
|
+
});
|
|
1149
|
+
return result;
|
|
1150
|
+
}
|
|
1151
|
+
var FlagModifierVisitor = {
|
|
1152
|
+
"*": {
|
|
1153
|
+
enter({ node }, state) {
|
|
1154
|
+
if (isAnyGroup(node)) {
|
|
1155
|
+
const currentModI = state.getCurrentModI();
|
|
1156
|
+
state.pushModI(
|
|
1157
|
+
node.flags ? getNewCurrentFlags({ ignoreCase: currentModI }, node.flags).ignoreCase : currentModI
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
exit({ node }, state) {
|
|
1162
|
+
if (isAnyGroup(node)) {
|
|
1163
|
+
state.popModI();
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
Backreference(_2, state) {
|
|
1168
|
+
state.setHasCasedChar();
|
|
1169
|
+
},
|
|
1170
|
+
Character({ node }, state) {
|
|
1171
|
+
if (charHasCase(cp(node.value))) {
|
|
1172
|
+
state.setHasCasedChar();
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1175
|
+
CharacterClassRange({ node, skip }, state) {
|
|
1176
|
+
skip();
|
|
1177
|
+
if (getCasesOutsideCharClassRange(node, { firstOnly: true }).length) {
|
|
1178
|
+
state.setHasCasedChar();
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
CharacterSet({ node }, state) {
|
|
1182
|
+
if (node.kind === "property" && UnicodePropertiesWithSpecificCase.has(node.value)) {
|
|
1183
|
+
state.setHasCasedChar();
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
var generator = {
|
|
1188
|
+
/**
|
|
1189
|
+
@param {AlternativeNode} node
|
|
1190
|
+
*/
|
|
1191
|
+
Alternative({ body }, _2, gen) {
|
|
1192
|
+
return body.map(gen).join("");
|
|
1193
|
+
},
|
|
1194
|
+
/**
|
|
1195
|
+
@param {AssertionNode} node
|
|
1196
|
+
*/
|
|
1197
|
+
Assertion({ kind, negate }) {
|
|
1198
|
+
if (kind === "string_end") {
|
|
1199
|
+
return "$";
|
|
1200
|
+
}
|
|
1201
|
+
if (kind === "string_start") {
|
|
1202
|
+
return "^";
|
|
1203
|
+
}
|
|
1204
|
+
if (kind === "word_boundary") {
|
|
1205
|
+
return negate ? r`\B` : r`\b`;
|
|
1206
|
+
}
|
|
1207
|
+
throw new Error(`Unexpected assertion kind "${kind}"`);
|
|
1208
|
+
},
|
|
1209
|
+
/**
|
|
1210
|
+
@param {BackreferenceNode} node
|
|
1211
|
+
*/
|
|
1212
|
+
Backreference({ ref }, state) {
|
|
1213
|
+
if (typeof ref !== "number") {
|
|
1214
|
+
throw new Error("Unexpected named backref in transformed AST");
|
|
1215
|
+
}
|
|
1216
|
+
if (!state.useFlagMods && state.accuracy === "strict" && state.currentFlags.ignoreCase && !state.captureMap.get(ref).ignoreCase) {
|
|
1217
|
+
throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");
|
|
1218
|
+
}
|
|
1219
|
+
return "\\" + ref;
|
|
1220
|
+
},
|
|
1221
|
+
/**
|
|
1222
|
+
@param {CapturingGroupNode} node
|
|
1223
|
+
*/
|
|
1224
|
+
CapturingGroup(node, state, gen) {
|
|
1225
|
+
const { body, name, number } = node;
|
|
1226
|
+
const data = { ignoreCase: state.currentFlags.ignoreCase };
|
|
1227
|
+
const origin = state.originMap.get(node);
|
|
1228
|
+
if (origin) {
|
|
1229
|
+
data.hidden = true;
|
|
1230
|
+
if (number > origin.number) {
|
|
1231
|
+
data.transferTo = origin.number;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
state.captureMap.set(number, data);
|
|
1235
|
+
return `(${name ? `?<${name}>` : ""}${body.map(gen).join("|")})`;
|
|
1236
|
+
},
|
|
1237
|
+
/**
|
|
1238
|
+
@param {CharacterNode} node
|
|
1239
|
+
*/
|
|
1240
|
+
Character({ value }, state) {
|
|
1241
|
+
const char = cp(value);
|
|
1242
|
+
const escaped = getCharEscape(value, {
|
|
1243
|
+
escDigit: state.lastNode.type === "Backreference",
|
|
1244
|
+
inCharClass: state.inCharClass,
|
|
1245
|
+
useFlagV: state.useFlagV
|
|
1246
|
+
});
|
|
1247
|
+
if (escaped !== char) {
|
|
1248
|
+
return escaped;
|
|
1249
|
+
}
|
|
1250
|
+
if (state.useAppliedIgnoreCase && state.currentFlags.ignoreCase && charHasCase(char)) {
|
|
1251
|
+
const cases = getIgnoreCaseMatchChars(char);
|
|
1252
|
+
return state.inCharClass ? cases.join("") : cases.length > 1 ? `[${cases.join("")}]` : cases[0];
|
|
1253
|
+
}
|
|
1254
|
+
return char;
|
|
1255
|
+
},
|
|
1256
|
+
/**
|
|
1257
|
+
@param {CharacterClassNode} node
|
|
1258
|
+
*/
|
|
1259
|
+
CharacterClass(node, state, gen) {
|
|
1260
|
+
const { kind, negate, parent } = node;
|
|
1261
|
+
let { body } = node;
|
|
1262
|
+
if (kind === "intersection" && !state.useFlagV) {
|
|
1263
|
+
throw new Error("Use of character class intersection requires min target ES2024");
|
|
1264
|
+
}
|
|
1265
|
+
if (envFlags.bugFlagVLiteralHyphenIsRange && state.useFlagV && body.some(isLiteralHyphen)) {
|
|
1266
|
+
body = [m(45), ...body.filter((kid) => !isLiteralHyphen(kid))];
|
|
1267
|
+
}
|
|
1268
|
+
const genClass = () => `[${negate ? "^" : ""}${body.map(gen).join(kind === "intersection" ? "&&" : "")}]`;
|
|
1269
|
+
if (!state.inCharClass) {
|
|
1270
|
+
if (
|
|
1271
|
+
// Already established `kind !== 'intersection'` if `!state.useFlagV`; don't check again
|
|
1272
|
+
(!state.useFlagV || envFlags.bugNestedClassIgnoresNegation) && !negate
|
|
1273
|
+
) {
|
|
1274
|
+
const negatedChildClasses = body.filter(
|
|
1275
|
+
(kid) => kid.type === "CharacterClass" && kid.kind === "union" && kid.negate
|
|
1276
|
+
);
|
|
1277
|
+
if (negatedChildClasses.length) {
|
|
1278
|
+
const group = A();
|
|
1279
|
+
const groupFirstAlt = group.body[0];
|
|
1280
|
+
group.parent = parent;
|
|
1281
|
+
groupFirstAlt.parent = group;
|
|
1282
|
+
body = body.filter((kid) => !negatedChildClasses.includes(kid));
|
|
1283
|
+
node.body = body;
|
|
1284
|
+
if (body.length) {
|
|
1285
|
+
node.parent = groupFirstAlt;
|
|
1286
|
+
groupFirstAlt.body.push(node);
|
|
1287
|
+
} else {
|
|
1288
|
+
group.body.pop();
|
|
1289
|
+
}
|
|
1290
|
+
negatedChildClasses.forEach((cc) => {
|
|
1291
|
+
const newAlt = b({ body: [cc] });
|
|
1292
|
+
cc.parent = newAlt;
|
|
1293
|
+
newAlt.parent = group;
|
|
1294
|
+
group.body.push(newAlt);
|
|
1295
|
+
});
|
|
1296
|
+
return gen(group);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
state.inCharClass = true;
|
|
1300
|
+
const result = genClass();
|
|
1301
|
+
state.inCharClass = false;
|
|
1302
|
+
return result;
|
|
1303
|
+
}
|
|
1304
|
+
const firstEl = body[0];
|
|
1305
|
+
if (
|
|
1306
|
+
// Already established that the parent is a char class via `inCharClass`; don't check again
|
|
1307
|
+
kind === "union" && !negate && firstEl && // Allows many nested classes to work with `target` ES2018 which doesn't support nesting
|
|
1308
|
+
((!state.useFlagV || !state.verbose) && parent.kind === "union" && !(envFlags.bugFlagVLiteralHyphenIsRange && state.useFlagV) || !state.verbose && parent.kind === "intersection" && // JS doesn't allow intersection with union or ranges
|
|
1309
|
+
body.length === 1 && firstEl.type !== "CharacterClassRange")
|
|
1310
|
+
) {
|
|
1311
|
+
return body.map(gen).join("");
|
|
1312
|
+
}
|
|
1313
|
+
if (!state.useFlagV && parent.type === "CharacterClass") {
|
|
1314
|
+
throw new Error("Uses nested character class in a way that requires min target ES2024");
|
|
1315
|
+
}
|
|
1316
|
+
return genClass();
|
|
1317
|
+
},
|
|
1318
|
+
/**
|
|
1319
|
+
@param {CharacterClassRangeNode} node
|
|
1320
|
+
*/
|
|
1321
|
+
CharacterClassRange(node, state) {
|
|
1322
|
+
const min = node.min.value;
|
|
1323
|
+
const max = node.max.value;
|
|
1324
|
+
const escOpts = {
|
|
1325
|
+
escDigit: false,
|
|
1326
|
+
inCharClass: true,
|
|
1327
|
+
useFlagV: state.useFlagV
|
|
1328
|
+
};
|
|
1329
|
+
const minStr = getCharEscape(min, escOpts);
|
|
1330
|
+
const maxStr = getCharEscape(max, escOpts);
|
|
1331
|
+
const extraChars = /* @__PURE__ */ new Set();
|
|
1332
|
+
if (state.useAppliedIgnoreCase && state.currentFlags.ignoreCase) {
|
|
1333
|
+
const charsOutsideRange = getCasesOutsideCharClassRange(node);
|
|
1334
|
+
const ranges = getCodePointRangesFromChars(charsOutsideRange);
|
|
1335
|
+
ranges.forEach((value) => {
|
|
1336
|
+
extraChars.add(
|
|
1337
|
+
Array.isArray(value) ? `${getCharEscape(value[0], escOpts)}-${getCharEscape(value[1], escOpts)}` : getCharEscape(value, escOpts)
|
|
1338
|
+
);
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
return `${minStr}-${maxStr}${[...extraChars].join("")}`;
|
|
1342
|
+
},
|
|
1343
|
+
/**
|
|
1344
|
+
@param {CharacterSetNode} node
|
|
1345
|
+
*/
|
|
1346
|
+
CharacterSet({ kind, negate, value, key }, state) {
|
|
1347
|
+
if (kind === "dot") {
|
|
1348
|
+
return state.currentFlags.dotAll ? state.appliedGlobalFlags.dotAll || state.useFlagMods ? "." : "[^]" : (
|
|
1349
|
+
// Onig's only line break char is line feed, unlike JS
|
|
1350
|
+
r`[^\n]`
|
|
1351
|
+
);
|
|
1352
|
+
}
|
|
1353
|
+
if (kind === "digit") {
|
|
1354
|
+
return negate ? r`\D` : r`\d`;
|
|
1355
|
+
}
|
|
1356
|
+
if (kind === "property") {
|
|
1357
|
+
if (state.useAppliedIgnoreCase && state.currentFlags.ignoreCase && UnicodePropertiesWithSpecificCase.has(value)) {
|
|
1358
|
+
throw new Error(`Unicode property "${value}" can't be case-insensitive when other chars have specific case`);
|
|
1359
|
+
}
|
|
1360
|
+
return `${negate ? r`\P` : r`\p`}{${key ? `${key}=` : ""}${value}}`;
|
|
1361
|
+
}
|
|
1362
|
+
if (kind === "word") {
|
|
1363
|
+
return negate ? r`\W` : r`\w`;
|
|
1364
|
+
}
|
|
1365
|
+
throw new Error(`Unexpected character set kind "${kind}"`);
|
|
1366
|
+
},
|
|
1367
|
+
/**
|
|
1368
|
+
@param {FlagsNode} node
|
|
1369
|
+
*/
|
|
1370
|
+
Flags(node, state) {
|
|
1371
|
+
return (
|
|
1372
|
+
// The transformer should never turn on the properties for flags d, g, m since Onig doesn't
|
|
1373
|
+
// have equivs. Flag m is never used since Onig uses different line break chars than JS
|
|
1374
|
+
// (node.hasIndices ? 'd' : '') +
|
|
1375
|
+
// (node.global ? 'g' : '') +
|
|
1376
|
+
// (node.multiline ? 'm' : '') +
|
|
1377
|
+
(state.appliedGlobalFlags.ignoreCase ? "i" : "") + (node.dotAll ? "s" : "") + (node.sticky ? "y" : "")
|
|
1378
|
+
);
|
|
1379
|
+
},
|
|
1380
|
+
/**
|
|
1381
|
+
@param {GroupNode} node
|
|
1382
|
+
*/
|
|
1383
|
+
Group({ atomic: atomic2, body, flags, parent }, state, gen) {
|
|
1384
|
+
const currentFlags = state.currentFlags;
|
|
1385
|
+
if (flags) {
|
|
1386
|
+
state.currentFlags = getNewCurrentFlags(currentFlags, flags);
|
|
1387
|
+
}
|
|
1388
|
+
const contents = body.map(gen).join("|");
|
|
1389
|
+
const result = !state.verbose && body.length === 1 && // Single alt
|
|
1390
|
+
parent.type !== "Quantifier" && !atomic2 && (!state.useFlagMods || !flags) ? contents : `(?${getGroupPrefix(atomic2, flags, state.useFlagMods)}${contents})`;
|
|
1391
|
+
state.currentFlags = currentFlags;
|
|
1392
|
+
return result;
|
|
1393
|
+
},
|
|
1394
|
+
/**
|
|
1395
|
+
@param {LookaroundAssertionNode} node
|
|
1396
|
+
*/
|
|
1397
|
+
LookaroundAssertion({ body, kind, negate }, _2, gen) {
|
|
1398
|
+
const prefix = `${kind === "lookahead" ? "" : "<"}${negate ? "!" : "="}`;
|
|
1399
|
+
return `(?${prefix}${body.map(gen).join("|")})`;
|
|
1400
|
+
},
|
|
1401
|
+
/**
|
|
1402
|
+
@param {QuantifierNode} node
|
|
1403
|
+
*/
|
|
1404
|
+
Quantifier(node, _2, gen) {
|
|
1405
|
+
return gen(node.body) + getQuantifierStr(node);
|
|
1406
|
+
},
|
|
1407
|
+
/**
|
|
1408
|
+
@param {SubroutineNode & {isRecursive: true}} node
|
|
1409
|
+
*/
|
|
1410
|
+
Subroutine({ isRecursive, ref }, state) {
|
|
1411
|
+
if (!isRecursive) {
|
|
1412
|
+
throw new Error("Unexpected non-recursive subroutine in transformed AST");
|
|
1413
|
+
}
|
|
1414
|
+
const limit = state.recursionLimit;
|
|
1415
|
+
return ref === 0 ? `(?R=${limit})` : r`\g<${ref}&R=${limit}>`;
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
var BaseEscapeChars = /* @__PURE__ */ new Set([
|
|
1419
|
+
"$",
|
|
1420
|
+
"(",
|
|
1421
|
+
")",
|
|
1422
|
+
"*",
|
|
1423
|
+
"+",
|
|
1424
|
+
".",
|
|
1425
|
+
"?",
|
|
1426
|
+
"[",
|
|
1427
|
+
"\\",
|
|
1428
|
+
"]",
|
|
1429
|
+
"^",
|
|
1430
|
+
"{",
|
|
1431
|
+
"|",
|
|
1432
|
+
"}"
|
|
1433
|
+
]);
|
|
1434
|
+
var CharClassEscapeChars = /* @__PURE__ */ new Set([
|
|
1435
|
+
"-",
|
|
1436
|
+
"\\",
|
|
1437
|
+
"]",
|
|
1438
|
+
"^",
|
|
1439
|
+
// Literal `[` doesn't require escaping with flag u, but this can help work around regex source
|
|
1440
|
+
// linters and regex syntax processors that expect unescaped `[` to create a nested class
|
|
1441
|
+
"["
|
|
1442
|
+
]);
|
|
1443
|
+
var CharClassEscapeCharsFlagV = /* @__PURE__ */ new Set([
|
|
1444
|
+
"(",
|
|
1445
|
+
")",
|
|
1446
|
+
"-",
|
|
1447
|
+
"/",
|
|
1448
|
+
"[",
|
|
1449
|
+
"\\",
|
|
1450
|
+
"]",
|
|
1451
|
+
"^",
|
|
1452
|
+
"{",
|
|
1453
|
+
"|",
|
|
1454
|
+
"}",
|
|
1455
|
+
// Double punctuators; also includes already-listed `-` and `^`
|
|
1456
|
+
"!",
|
|
1457
|
+
"#",
|
|
1458
|
+
"$",
|
|
1459
|
+
"%",
|
|
1460
|
+
"&",
|
|
1461
|
+
"*",
|
|
1462
|
+
"+",
|
|
1463
|
+
",",
|
|
1464
|
+
".",
|
|
1465
|
+
":",
|
|
1466
|
+
";",
|
|
1467
|
+
"<",
|
|
1468
|
+
"=",
|
|
1469
|
+
">",
|
|
1470
|
+
"?",
|
|
1471
|
+
"@",
|
|
1472
|
+
"`",
|
|
1473
|
+
"~"
|
|
1474
|
+
]);
|
|
1475
|
+
var CharCodeEscapeMap = /* @__PURE__ */ new Map([
|
|
1476
|
+
[9, r`\t`],
|
|
1477
|
+
// horizontal tab
|
|
1478
|
+
[10, r`\n`],
|
|
1479
|
+
// line feed
|
|
1480
|
+
[11, r`\v`],
|
|
1481
|
+
// vertical tab
|
|
1482
|
+
[12, r`\f`],
|
|
1483
|
+
// form feed
|
|
1484
|
+
[13, r`\r`],
|
|
1485
|
+
// carriage return
|
|
1486
|
+
[8232, r`\u2028`],
|
|
1487
|
+
// line separator
|
|
1488
|
+
[8233, r`\u2029`],
|
|
1489
|
+
// paragraph separator
|
|
1490
|
+
[65279, r`\uFEFF`]
|
|
1491
|
+
// ZWNBSP/BOM
|
|
1492
|
+
]);
|
|
1493
|
+
var casedRe = /^\p{Cased}$/u;
|
|
1494
|
+
function charHasCase(char) {
|
|
1495
|
+
return casedRe.test(char);
|
|
1496
|
+
}
|
|
1497
|
+
function getCasesOutsideCharClassRange(node, options) {
|
|
1498
|
+
const firstOnly = !!options?.firstOnly;
|
|
1499
|
+
const min = node.min.value;
|
|
1500
|
+
const max = node.max.value;
|
|
1501
|
+
const found = [];
|
|
1502
|
+
if (min < 65 && (max === 65535 || max >= 131071) || min === 65536 && max >= 131071) {
|
|
1503
|
+
return found;
|
|
1504
|
+
}
|
|
1505
|
+
for (let i = min; i <= max; i++) {
|
|
1506
|
+
const char = cp(i);
|
|
1507
|
+
if (!charHasCase(char)) {
|
|
1508
|
+
continue;
|
|
1509
|
+
}
|
|
1510
|
+
const charsOutsideRange = getIgnoreCaseMatchChars(char).filter((caseOfChar) => {
|
|
1511
|
+
const num = caseOfChar.codePointAt(0);
|
|
1512
|
+
return num < min || num > max;
|
|
1513
|
+
});
|
|
1514
|
+
if (charsOutsideRange.length) {
|
|
1515
|
+
found.push(...charsOutsideRange);
|
|
1516
|
+
if (firstOnly) {
|
|
1517
|
+
break;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
return found;
|
|
1522
|
+
}
|
|
1523
|
+
function getCharEscape(codePoint, { escDigit, inCharClass, useFlagV }) {
|
|
1524
|
+
if (CharCodeEscapeMap.has(codePoint)) {
|
|
1525
|
+
return CharCodeEscapeMap.get(codePoint);
|
|
1526
|
+
}
|
|
1527
|
+
if (
|
|
1528
|
+
// Control chars, etc.; condition modeled on the Chrome developer console's display for strings
|
|
1529
|
+
codePoint < 32 || codePoint > 126 && codePoint < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
|
|
1530
|
+
codePoint > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
|
|
1531
|
+
escDigit && isDigitCharCode(codePoint)
|
|
1532
|
+
) {
|
|
1533
|
+
return codePoint > 255 ? `\\u{${codePoint.toString(16).toUpperCase()}}` : `\\x${codePoint.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
1534
|
+
}
|
|
1535
|
+
const escapeChars = inCharClass ? useFlagV ? CharClassEscapeCharsFlagV : CharClassEscapeChars : BaseEscapeChars;
|
|
1536
|
+
const char = cp(codePoint);
|
|
1537
|
+
return (escapeChars.has(char) ? "\\" : "") + char;
|
|
1538
|
+
}
|
|
1539
|
+
function getCodePointRangesFromChars(chars) {
|
|
1540
|
+
const codePoints = chars.map((char) => char.codePointAt(0)).sort((a, b2) => a - b2);
|
|
1541
|
+
const values = [];
|
|
1542
|
+
let start = null;
|
|
1543
|
+
for (let i = 0; i < codePoints.length; i++) {
|
|
1544
|
+
if (codePoints[i + 1] === codePoints[i] + 1) {
|
|
1545
|
+
start ?? (start = codePoints[i]);
|
|
1546
|
+
} else if (start === null) {
|
|
1547
|
+
values.push(codePoints[i]);
|
|
1548
|
+
} else {
|
|
1549
|
+
values.push([start, codePoints[i]]);
|
|
1550
|
+
start = null;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
return values;
|
|
1554
|
+
}
|
|
1555
|
+
function getGroupPrefix(atomic2, flagMods, useFlagMods) {
|
|
1556
|
+
if (atomic2) {
|
|
1557
|
+
return ">";
|
|
1558
|
+
}
|
|
1559
|
+
let mods = "";
|
|
1560
|
+
if (flagMods && useFlagMods) {
|
|
1561
|
+
const { enable, disable } = flagMods;
|
|
1562
|
+
mods = (enable?.ignoreCase ? "i" : "") + (enable?.dotAll ? "s" : "") + (disable ? "-" : "") + (disable?.ignoreCase ? "i" : "") + (disable?.dotAll ? "s" : "");
|
|
1563
|
+
}
|
|
1564
|
+
return `${mods}:`;
|
|
1565
|
+
}
|
|
1566
|
+
function getQuantifierStr({ kind, max, min }) {
|
|
1567
|
+
let base;
|
|
1568
|
+
if (!min && max === 1) {
|
|
1569
|
+
base = "?";
|
|
1570
|
+
} else if (!min && max === Infinity) {
|
|
1571
|
+
base = "*";
|
|
1572
|
+
} else if (min === 1 && max === Infinity) {
|
|
1573
|
+
base = "+";
|
|
1574
|
+
} else if (min === max) {
|
|
1575
|
+
base = `{${min}}`;
|
|
1576
|
+
} else {
|
|
1577
|
+
base = `{${min},${max === Infinity ? "" : max}}`;
|
|
1578
|
+
}
|
|
1579
|
+
return base + {
|
|
1580
|
+
greedy: "",
|
|
1581
|
+
lazy: "?",
|
|
1582
|
+
possessive: "+"
|
|
1583
|
+
}[kind];
|
|
1584
|
+
}
|
|
1585
|
+
function isAnyGroup({ type }) {
|
|
1586
|
+
return type === "CapturingGroup" || type === "Group" || type === "LookaroundAssertion";
|
|
1587
|
+
}
|
|
1588
|
+
function isDigitCharCode(value) {
|
|
1589
|
+
return value > 47 && value < 58;
|
|
1590
|
+
}
|
|
1591
|
+
function isLiteralHyphen({ type, value }) {
|
|
1592
|
+
return type === "Character" && value === 45;
|
|
1593
|
+
}
|
|
1594
|
+
var EmulatedRegExp = (_a = class extends RegExp {
|
|
1595
|
+
/**
|
|
1596
|
+
@overload
|
|
1597
|
+
@param {string} pattern
|
|
1598
|
+
@param {string} [flags]
|
|
1599
|
+
@param {EmulatedRegExpOptions} [options]
|
|
1600
|
+
*/
|
|
1601
|
+
/**
|
|
1602
|
+
@overload
|
|
1603
|
+
@param {EmulatedRegExp} pattern
|
|
1604
|
+
@param {string} [flags]
|
|
1605
|
+
*/
|
|
1606
|
+
constructor(pattern, flags, options) {
|
|
1607
|
+
var __super = (...args) => {
|
|
1608
|
+
super(...args);
|
|
1609
|
+
__privateAdd(this, __EmulatedRegExp_instances);
|
|
1610
|
+
/**
|
|
1611
|
+
@type {Map<number, {
|
|
1612
|
+
hidden?: true;
|
|
1613
|
+
transferTo?: number;
|
|
1614
|
+
}>}
|
|
1615
|
+
*/
|
|
1616
|
+
__privateAdd(this, _captureMap, /* @__PURE__ */ new Map());
|
|
1617
|
+
/**
|
|
1618
|
+
@type {RegExp | EmulatedRegExp | null}
|
|
1619
|
+
*/
|
|
1620
|
+
__privateAdd(this, _compiled, null);
|
|
1621
|
+
/**
|
|
1622
|
+
@type {string}
|
|
1623
|
+
*/
|
|
1624
|
+
__privateAdd(this, _pattern);
|
|
1625
|
+
/**
|
|
1626
|
+
@type {Map<number, string>?}
|
|
1627
|
+
*/
|
|
1628
|
+
__privateAdd(this, _nameMap, null);
|
|
1629
|
+
/**
|
|
1630
|
+
@type {string?}
|
|
1631
|
+
*/
|
|
1632
|
+
__privateAdd(this, _strategy, null);
|
|
1633
|
+
/**
|
|
1634
|
+
Can be used to serialize the instance.
|
|
1635
|
+
@type {EmulatedRegExpOptions}
|
|
1636
|
+
*/
|
|
1637
|
+
__publicField(this, "rawOptions", {});
|
|
1638
|
+
return this;
|
|
1639
|
+
};
|
|
1640
|
+
const lazyCompile = !!options?.lazyCompile;
|
|
1641
|
+
if (pattern instanceof RegExp) {
|
|
1642
|
+
if (options) {
|
|
1643
|
+
throw new Error("Cannot provide options when copying a regexp");
|
|
1644
|
+
}
|
|
1645
|
+
const re = pattern;
|
|
1646
|
+
__super(re, flags);
|
|
1647
|
+
__privateSet(this, _pattern, re.source);
|
|
1648
|
+
if (re instanceof _a) {
|
|
1649
|
+
__privateSet(this, _captureMap, __privateGet(re, _captureMap));
|
|
1650
|
+
__privateSet(this, _nameMap, __privateGet(re, _nameMap));
|
|
1651
|
+
__privateSet(this, _strategy, __privateGet(re, _strategy));
|
|
1652
|
+
this.rawOptions = re.rawOptions;
|
|
1653
|
+
}
|
|
1654
|
+
} else {
|
|
1655
|
+
const opts = {
|
|
1656
|
+
hiddenCaptures: [],
|
|
1657
|
+
strategy: null,
|
|
1658
|
+
transfers: [],
|
|
1659
|
+
...options
|
|
1660
|
+
};
|
|
1661
|
+
__super(lazyCompile ? "" : pattern, flags);
|
|
1662
|
+
__privateSet(this, _pattern, pattern);
|
|
1663
|
+
__privateSet(this, _captureMap, createCaptureMap(opts.hiddenCaptures, opts.transfers));
|
|
1664
|
+
__privateSet(this, _strategy, opts.strategy);
|
|
1665
|
+
this.rawOptions = options ?? {};
|
|
1666
|
+
}
|
|
1667
|
+
if (!lazyCompile) {
|
|
1668
|
+
__privateSet(this, _compiled, this);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
// Override the getter with one that works with lazy-compiled regexes
|
|
1672
|
+
get source() {
|
|
1673
|
+
return __privateGet(this, _pattern) || "(?:)";
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
Called internally by all String/RegExp methods that use regexes.
|
|
1677
|
+
@override
|
|
1678
|
+
@param {string} str
|
|
1679
|
+
@returns {RegExpExecArray?}
|
|
1680
|
+
*/
|
|
1681
|
+
exec(str) {
|
|
1682
|
+
if (!__privateGet(this, _compiled)) {
|
|
1683
|
+
const { lazyCompile, ...rest } = this.rawOptions;
|
|
1684
|
+
__privateSet(this, _compiled, new _a(__privateGet(this, _pattern), this.flags, rest));
|
|
1685
|
+
}
|
|
1686
|
+
const useLastIndex = this.global || this.sticky;
|
|
1687
|
+
const pos = this.lastIndex;
|
|
1688
|
+
if (__privateGet(this, _strategy) === "clip_search" && useLastIndex && pos) {
|
|
1689
|
+
this.lastIndex = 0;
|
|
1690
|
+
const match = __privateMethod(this, __EmulatedRegExp_instances, execCore_fn).call(this, str.slice(pos));
|
|
1691
|
+
if (match) {
|
|
1692
|
+
adjustMatchDetailsForOffset(match, pos, str, this.hasIndices);
|
|
1693
|
+
this.lastIndex += pos;
|
|
1694
|
+
}
|
|
1695
|
+
return match;
|
|
1696
|
+
}
|
|
1697
|
+
return __privateMethod(this, __EmulatedRegExp_instances, execCore_fn).call(this, str);
|
|
1698
|
+
}
|
|
1699
|
+
}, _captureMap = new WeakMap(), _compiled = new WeakMap(), _pattern = new WeakMap(), _nameMap = new WeakMap(), _strategy = new WeakMap(), __EmulatedRegExp_instances = new WeakSet(), /**
|
|
1700
|
+
Adds support for hidden and transfer captures.
|
|
1701
|
+
@param {string} str
|
|
1702
|
+
@returns
|
|
1703
|
+
*/
|
|
1704
|
+
execCore_fn = function(str) {
|
|
1705
|
+
__privateGet(this, _compiled).lastIndex = this.lastIndex;
|
|
1706
|
+
const match = __superGet(_a.prototype, this, "exec").call(__privateGet(this, _compiled), str);
|
|
1707
|
+
this.lastIndex = __privateGet(this, _compiled).lastIndex;
|
|
1708
|
+
if (!match || !__privateGet(this, _captureMap).size) {
|
|
1709
|
+
return match;
|
|
1710
|
+
}
|
|
1711
|
+
const matchCopy = [...match];
|
|
1712
|
+
match.length = 1;
|
|
1713
|
+
let indicesCopy;
|
|
1714
|
+
if (this.hasIndices) {
|
|
1715
|
+
indicesCopy = [...match.indices];
|
|
1716
|
+
match.indices.length = 1;
|
|
1717
|
+
}
|
|
1718
|
+
const mappedNums = [0];
|
|
1719
|
+
for (let i = 1; i < matchCopy.length; i++) {
|
|
1720
|
+
const { hidden, transferTo } = __privateGet(this, _captureMap).get(i) ?? {};
|
|
1721
|
+
if (hidden) {
|
|
1722
|
+
mappedNums.push(null);
|
|
1723
|
+
} else {
|
|
1724
|
+
mappedNums.push(match.length);
|
|
1725
|
+
match.push(matchCopy[i]);
|
|
1726
|
+
if (this.hasIndices) {
|
|
1727
|
+
match.indices.push(indicesCopy[i]);
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
if (transferTo && matchCopy[i] !== void 0) {
|
|
1731
|
+
const to = mappedNums[transferTo];
|
|
1732
|
+
if (!to) {
|
|
1733
|
+
throw new Error(`Invalid capture transfer to "${to}"`);
|
|
1734
|
+
}
|
|
1735
|
+
match[to] = matchCopy[i];
|
|
1736
|
+
if (this.hasIndices) {
|
|
1737
|
+
match.indices[to] = indicesCopy[i];
|
|
1738
|
+
}
|
|
1739
|
+
if (match.groups) {
|
|
1740
|
+
if (!__privateGet(this, _nameMap)) {
|
|
1741
|
+
__privateSet(this, _nameMap, createNameMap(this.source));
|
|
1742
|
+
}
|
|
1743
|
+
const name = __privateGet(this, _nameMap).get(transferTo);
|
|
1744
|
+
if (name) {
|
|
1745
|
+
match.groups[name] = matchCopy[i];
|
|
1746
|
+
if (this.hasIndices) {
|
|
1747
|
+
match.indices.groups[name] = indicesCopy[i];
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
return match;
|
|
1754
|
+
}, _a);
|
|
1755
|
+
function adjustMatchDetailsForOffset(match, offset, input, hasIndices) {
|
|
1756
|
+
match.index += offset;
|
|
1757
|
+
match.input = input;
|
|
1758
|
+
if (hasIndices) {
|
|
1759
|
+
const indices = match.indices;
|
|
1760
|
+
for (let i = 0; i < indices.length; i++) {
|
|
1761
|
+
const arr = indices[i];
|
|
1762
|
+
if (arr) {
|
|
1763
|
+
indices[i] = [arr[0] + offset, arr[1] + offset];
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
const groupIndices = indices.groups;
|
|
1767
|
+
if (groupIndices) {
|
|
1768
|
+
Object.keys(groupIndices).forEach((key) => {
|
|
1769
|
+
const arr = groupIndices[key];
|
|
1770
|
+
if (arr) {
|
|
1771
|
+
groupIndices[key] = [arr[0] + offset, arr[1] + offset];
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
function createCaptureMap(hiddenCaptures, transfers) {
|
|
1778
|
+
const captureMap = /* @__PURE__ */ new Map();
|
|
1779
|
+
for (const num of hiddenCaptures) {
|
|
1780
|
+
captureMap.set(num, {
|
|
1781
|
+
hidden: true
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
for (const [to, from] of transfers) {
|
|
1785
|
+
for (const num of from) {
|
|
1786
|
+
getOrInsert(captureMap, num, {}).transferTo = to;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
return captureMap;
|
|
1790
|
+
}
|
|
1791
|
+
function createNameMap(pattern) {
|
|
1792
|
+
const re = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu;
|
|
1793
|
+
const map = /* @__PURE__ */ new Map();
|
|
1794
|
+
let numCharClassesOpen = 0;
|
|
1795
|
+
let numCaptures = 0;
|
|
1796
|
+
let match;
|
|
1797
|
+
while (match = re.exec(pattern)) {
|
|
1798
|
+
const { 0: m2, groups: { capture, name } } = match;
|
|
1799
|
+
if (m2 === "[") {
|
|
1800
|
+
numCharClassesOpen++;
|
|
1801
|
+
} else if (!numCharClassesOpen) {
|
|
1802
|
+
if (capture) {
|
|
1803
|
+
numCaptures++;
|
|
1804
|
+
if (name) {
|
|
1805
|
+
map.set(numCaptures, name);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
} else if (m2 === "]") {
|
|
1809
|
+
numCharClassesOpen--;
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
return map;
|
|
1813
|
+
}
|
|
1814
|
+
function toRegExp(pattern, options) {
|
|
1815
|
+
const d = toRegExpDetails(pattern, options);
|
|
1816
|
+
if (d.options) {
|
|
1817
|
+
return new EmulatedRegExp(d.pattern, d.flags, d.options);
|
|
1818
|
+
}
|
|
1819
|
+
return new RegExp(d.pattern, d.flags);
|
|
1820
|
+
}
|
|
1821
|
+
function toRegExpDetails(pattern, options) {
|
|
1822
|
+
const opts = getOptions(options);
|
|
1823
|
+
const onigurumaAst = J(pattern, {
|
|
1824
|
+
flags: opts.flags,
|
|
1825
|
+
normalizeUnknownPropertyNames: true,
|
|
1826
|
+
rules: {
|
|
1827
|
+
captureGroup: opts.rules.captureGroup,
|
|
1828
|
+
singleline: opts.rules.singleline
|
|
1829
|
+
},
|
|
1830
|
+
skipBackrefValidation: opts.rules.allowOrphanBackrefs,
|
|
1831
|
+
unicodePropertyMap: JsUnicodePropertyMap
|
|
1832
|
+
});
|
|
1833
|
+
const regexPlusAst = transform(onigurumaAst, {
|
|
1834
|
+
accuracy: opts.accuracy,
|
|
1835
|
+
asciiWordBoundaries: opts.rules.asciiWordBoundaries,
|
|
1836
|
+
avoidSubclass: opts.avoidSubclass,
|
|
1837
|
+
bestEffortTarget: opts.target
|
|
1838
|
+
});
|
|
1839
|
+
const generated = generate(regexPlusAst, opts);
|
|
1840
|
+
const recursionResult = recursion(generated.pattern, {
|
|
1841
|
+
captureTransfers: generated._captureTransfers,
|
|
1842
|
+
hiddenCaptures: generated._hiddenCaptures,
|
|
1843
|
+
mode: "external"
|
|
1844
|
+
});
|
|
1845
|
+
const possessiveResult = possessive(recursionResult.pattern);
|
|
1846
|
+
const atomicResult = atomic(possessiveResult.pattern, {
|
|
1847
|
+
captureTransfers: recursionResult.captureTransfers,
|
|
1848
|
+
hiddenCaptures: recursionResult.hiddenCaptures
|
|
1849
|
+
});
|
|
1850
|
+
const details = {
|
|
1851
|
+
pattern: atomicResult.pattern,
|
|
1852
|
+
flags: `${opts.hasIndices ? "d" : ""}${opts.global ? "g" : ""}${generated.flags}${generated.options.disable.v ? "u" : "v"}`
|
|
1853
|
+
};
|
|
1854
|
+
if (opts.avoidSubclass) {
|
|
1855
|
+
if (opts.lazyCompileLength !== Infinity) {
|
|
1856
|
+
throw new Error("Lazy compilation requires subclass");
|
|
1857
|
+
}
|
|
1858
|
+
} else {
|
|
1859
|
+
const hiddenCaptures = atomicResult.hiddenCaptures.sort((a, b2) => a - b2);
|
|
1860
|
+
const transfers = Array.from(atomicResult.captureTransfers);
|
|
1861
|
+
const strategy = regexPlusAst._strategy;
|
|
1862
|
+
const lazyCompile = details.pattern.length >= opts.lazyCompileLength;
|
|
1863
|
+
if (hiddenCaptures.length || transfers.length || strategy || lazyCompile) {
|
|
1864
|
+
details.options = {
|
|
1865
|
+
...hiddenCaptures.length && { hiddenCaptures },
|
|
1866
|
+
...transfers.length && { transfers },
|
|
1867
|
+
...strategy && { strategy },
|
|
1868
|
+
...lazyCompile && { lazyCompile }
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
return details;
|
|
1873
|
+
}
|
|
1874
|
+
export {
|
|
1875
|
+
EmulatedRegExp,
|
|
1876
|
+
toRegExp,
|
|
1877
|
+
toRegExpDetails
|
|
1878
|
+
};
|