agent-afk 5.221.5 → 5.222.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,153 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/typst-BUadGCkm.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-BmBUJMz7.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
2
+ var di=Object.defineProperty;var pi=Object.getPrototypeOf;var hi=Reflect.get;var ur=t=>{throw TypeError(t)};var fi=(t,e,r)=>e in t?di(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var g=(t,e,r)=>fi(t,typeof e!="symbol"?e+"":e,r),yt=(t,e,r)=>e.has(t)||ur("Cannot "+r);var $=(t,e,r)=>(yt(t,e,"read from private field"),r?r.call(t):e.get(t)),ce=(t,e,r)=>e.has(t)?ur("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),W=(t,e,r,n)=>(yt(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Et=(t,e,r)=>(yt(t,e,"access private method"),r);var dr=(t,e,r)=>hi(pi(t),r,e);import{_ as u,w as Qt,s as Zr,f as mi,a as gi,b as _i,c as pr,h as yi}from"./index-Q48Eod_3.js";const hr={}.hasOwnProperty;function Ei(t,e){const r=e||{};function n(i,...s){let o=n.invalid;const a=n.handlers;if(i&&hr.call(i,t)){const c=String(i[t]);o=hr.call(a,c)?a[c]:n.unknown}if(o)return o.call(this,i,...s)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var Nt=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,wi=Object.getOwnPropertyNames,Ai=Object.prototype.hasOwnProperty,vi=(t,e)=>{let r={};for(var n in t)Nt(r,n,{get:t[n],enumerable:!0});return Nt(r,Symbol.toStringTag,{value:"Module"}),r},Ci=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=wi(e),s=0,o=i.length,a;s<o;s++)a=i[s],!Ai.call(t,a)&&a!==r&&Nt(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(n=bi(e,a))||n.enumerable});return t},Ii=(t,e,r)=>(Ci(t,e,"default"),r);const Yr=[{id:"abap",name:"ABAP",import:(()=>u(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>u(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>u(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>u(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>u(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>u(()=>import("./angular-html-DA-rfuFy.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>u(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>u(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>u(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>u(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>u(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>u(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>u(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>u(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>u(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>u(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>u(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>u(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>u(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>u(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>u(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>u(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>u(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>u(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>u(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>u(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>u(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>u(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>u(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>u(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>u(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>u(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>u(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>u(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>u(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>u(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>u(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>u(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>u(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>u(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>u(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>u(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>u(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>u(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>u(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>u(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>u(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>u(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>u(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>u(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>u(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>u(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>u(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>u(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>u(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>u(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>u(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>u(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>u(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>u(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>u(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>u(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>u(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>u(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>u(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>u(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>u(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>u(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>u(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>u(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>u(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>u(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>u(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>u(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>u(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>u(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>u(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>u(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>u(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>u(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>u(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>u(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>u(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>u(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>u(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>u(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>u(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>u(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>u(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>u(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>u(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>u(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>u(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>u(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>u(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>u(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>u(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>u(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>u(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>u(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>u(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>u(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>u(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>u(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>u(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>u(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>u(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>u(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>u(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>u(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>u(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>u(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>u(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>u(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>u(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>u(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>u(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>u(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>u(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>u(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>u(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>u(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>u(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>u(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>u(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>u(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>u(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>u(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>u(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>u(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>u(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>u(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>u(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>u(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>u(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>u(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>u(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>u(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>u(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>u(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>u(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>u(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>u(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>u(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>u(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>u(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>u(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>u(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>u(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>u(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>u(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>u(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>u(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>u(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>u(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>u(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>u(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>u(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>u(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>u(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>u(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>u(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>u(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>u(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>u(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>u(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>u(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>u(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>u(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>u(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>u(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>u(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>u(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>u(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>u(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>u(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>u(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>u(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>u(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>u(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>u(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>u(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>u(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>u(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>u(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>u(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>u(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>u(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>u(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>u(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>u(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>u(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>u(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>u(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>u(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>u(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>u(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>u(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>u(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>u(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>u(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>u(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>u(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>u(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>u(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>u(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>u(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>u(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>u(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>u(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>u(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>u(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>u(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>u(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>u(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>u(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>u(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>u(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>u(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>u(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>u(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>u(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>u(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>u(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>u(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>u(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>u(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>u(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>u(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>u(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>u(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>u(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>u(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>u(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>u(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>u(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>u(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>u(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>u(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>u(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>u(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>u(()=>import("./zig-VOosw3JB.js"),[]))}],Ri=Object.fromEntries(Yr.map(t=>[t.id,t.import])),Si=Object.fromEntries(Yr.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(r=>[r,t.import]))||[]})),ki={...Ri,...Si},Ti=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>u(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>u(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>u(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>u(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>u(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>u(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>u(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>u(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>u(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>u(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>u(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>u(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>u(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>u(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>u(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>u(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>u(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>u(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>u(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>u(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>u(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>u(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>u(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>u(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>u(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>u(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>u(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>u(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>u(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>u(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>u(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>u(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>u(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>u(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>u(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>u(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>u(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>u(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>u(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>u(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>u(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>u(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>u(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>u(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>u(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>u(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>u(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>u(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>u(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>u(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>u(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>u(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>u(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>u(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>u(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>u(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>u(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>u(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>u(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>u(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>u(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>u(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Li=Object.fromEntries(Ti.map(t=>[t.id,t.import]));var Jt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Pi(){return 2147483648}function Oi(){return typeof performance<"u"?performance.now():Date.now()}const xi=(t,e)=>t+(e-t%e)%e;async function Ni(t){let e,r;const n={};function i(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function s(f,m,_){n.HEAPU8.copyWithin(f,m,m+_)}function o(f){try{return e.grow(f-r.byteLength+65535>>>16),i(e.buffer),1}catch{}}function a(f){const m=n.HEAPU8.length;f=f>>>0;const _=Pi();if(f>_)return!1;for(let b=1;b<=4;b*=2){let w=m*(1+.2/b);w=Math.min(w,f+100663296);const y=Math.min(_,xi(Math.max(f,w),65536));if(o(y))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(f,m,_=1024){const b=m+_;let w=m;for(;f[w]&&!(w>=b);)++w;if(w-m>16&&f.buffer&&c)return c.decode(f.subarray(m,w));let y="";for(;m<w;){let E=f[m++];if(!(E&128)){y+=String.fromCharCode(E);continue}const A=f[m++]&63;if((E&224)===192){y+=String.fromCharCode((E&31)<<6|A);continue}const v=f[m++]&63;if((E&240)===224?E=(E&15)<<12|A<<6|v:E=(E&7)<<18|A<<12|v<<6|f[m++]&63,E<65536)y+=String.fromCharCode(E);else{const I=E-65536;y+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return y}function p(f,m){return f?l(n.HEAPU8,f,m):""}const d={emscripten_get_now:Oi,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function h(){const m=await t({env:d,wasi_snapshot_preview1:d});e=m.memory,i(e.buffer),Object.assign(n,m),n.UTF8ToString=p}return await h(),n}var Di=Object.defineProperty,Vi=(t,e,r)=>e in t?Di(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e,r)=>Vi(t,typeof e!="symbol"?e+"":e,r);let O=null;function $i(t){throw new Jt(t.UTF8ToString(t.getLastOnigError()))}class ot{constructor(e){T(this,"utf16Length"),T(this,"utf8Length"),T(this,"utf16Value"),T(this,"utf8Value"),T(this,"utf16OffsetToUtf8"),T(this,"utf8OffsetToUtf16");const r=e.length,n=ot._utf8ByteLength(e),i=n!==r,s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const a=new Uint8Array(n);let c=0;for(let l=0;l<r;l++){const p=e.charCodeAt(l);let d=p,h=!1;if(p>=55296&&p<=56319&&l+1<r){const f=e.charCodeAt(l+1);f>=56320&&f<=57343&&(d=(p-55296<<10)+65536|f-56320,h=!0)}i&&(s[l]=c,h&&(s[l+1]=c),d<=127?o[c+0]=l:d<=2047?(o[c+0]=l,o[c+1]=l):d<=65535?(o[c+0]=l,o[c+1]=l,o[c+2]=l):(o[c+0]=l,o[c+1]=l,o[c+2]=l,o[c+3]=l)),d<=127?a[c++]=d:d<=2047?(a[c++]=192|(d&1984)>>>6,a[c++]=128|(d&63)>>>0):d<=65535?(a[c++]=224|(d&61440)>>>12,a[c++]=128|(d&4032)>>>6,a[c++]=128|(d&63)>>>0):(a[c++]=240|(d&1835008)>>>18,a[c++]=128|(d&258048)>>>12,a[c++]=128|(d&4032)>>>6,a[c++]=128|(d&63)>>>0),h&&l++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let r=0;for(let n=0,i=e.length;n<i;n++){const s=e.charCodeAt(n);let o=s,a=!1;if(s>=55296&&s<=56319&&n+1<i){const c=e.charCodeAt(n+1);c>=56320&&c<=57343&&(o=(s-55296<<10)+65536|c-56320,a=!0)}o<=127?r+=1:o<=2047?r+=2:o<=65535?r+=3:r+=4,a&&n++}return r}createString(e){const r=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,r),r}}const at=class X{constructor(e){if(T(this,"id",++X.LAST_ID),T(this,"_onigBinding"),T(this,"content"),T(this,"utf16Length"),T(this,"utf8Length"),T(this,"utf16OffsetToUtf8"),T(this,"utf8OffsetToUtf16"),T(this,"ptr"),!O)throw new Jt("Must invoke loadWasm first.");this._onigBinding=O,this.content=e;const r=new ot(e);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=O.omalloc(1e4)),X._sharedPtrInUse=!0,O.HEAPU8.set(r.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=r.createString(O)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};T(at,"LAST_ID",0);T(at,"_sharedPtr",0);T(at,"_sharedPtrInUse",!1);let en=at;class Mi{constructor(e){if(T(this,"_onigBinding"),T(this,"_ptr"),!O)throw new Jt("Must invoke loadWasm first.");const r=[],n=[];for(let a=0,c=e.length;a<c;a++){const l=new ot(e[a]);r[a]=l.createString(O),n[a]=l.utf8Length}const i=O.omalloc(4*e.length);O.HEAPU32.set(r,i/4);const s=O.omalloc(4*e.length);O.HEAPU32.set(n,s/4);const o=O.createOnigScanner(i,s,e.length);for(let a=0,c=e.length;a<c;a++)O.ofree(r[a]);O.ofree(s),O.ofree(i),o===0&&$i(O),this._onigBinding=O,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof e=="string"){e=new en(e);const s=this._findNextMatchSync(e,r,!1,i);return e.dispose(),s}return this._findNextMatchSync(e,r,!1,i)}_findNextMatchSync(e,r,n,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(r),i);if(o===0)return null;const a=s.HEAPU32;let c=o/4;const l=a[c++],p=a[c++],d=[];for(let h=0;h<p;h++){const f=e.convertUtf8OffsetToUtf16(a[c++]),m=e.convertUtf8OffsetToUtf16(a[c++]);d[h]={start:f,end:m,length:m-f}}return{index:l,captureIndices:d}}}function Gi(t){return typeof t.instantiator=="function"}function Bi(t){return typeof t.default=="function"}function Fi(t){return typeof t.data<"u"}function ji(t){return typeof Response<"u"&&t instanceof Response}function Ui(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let Be;function tn(t){if(Be)return Be;async function e(){O=await Ni(async r=>{let n=t;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),Gi(n)?n=await n.instantiator(r):Bi(n)?n=await n.default(r):(Fi(n)&&(n=n.data),ji(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await Wi(n)(r):n=await Hi(n)(r):Ui(n)?n=await bt(n)(r):n instanceof WebAssembly.Module?n=await bt(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await bt(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return Be=e(),Be}function bt(t){return e=>WebAssembly.instantiate(t,e)}function Wi(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Hi(t){return async e=>{const r=await t.arrayBuffer();return WebAssembly.instantiate(r,e)}}let rn;function zi(t){rn=t}function qi(){return rn}async function Xi(t){return t&&await tn(t),{createScanner(e){return new Mi(e.map(r=>typeof r=="string"?r:r.source))},createString(e){return new en(e)}}}const Qi=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:Xi,getDefaultWasmLoader:qi,loadWasm:tn,setDefaultWasmLoader:zi},Symbol.toStringTag,{value:"Module"}));var nn=vi({});Ii(nn,Qi);var S=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Ji(t){return Kt(t)}function Kt(t){return Array.isArray(t)?Ki(t):t instanceof RegExp?t:typeof t=="object"?Zi(t):t}function Ki(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=Kt(t[r]);return e}function Zi(t){let e={};for(let r in t)e[r]=Kt(t[r]);return e}function sn(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function on(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?on(t.substring(0,t.length-1)):t.substr(~e+1)}var wt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(t){return t===null?!1:(wt.lastIndex=0,wt.test(t))}static replaceCaptures(t,e,r){return t.replace(wt,(n,i,s,o)=>{let a=r[parseInt(i||s,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return n})}};function an(t,e){return t<e?-1:t>e?1:0}function cn(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let s=an(t[i],e[i]);if(s!==0)return s}return 0}return r-n}function fr(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function ln(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var un=class{constructor(t){g(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Je=class{constructor(t,e,r){g(this,"_cachedMatchRoot",new un(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=r}static createFromRawTheme(t,e){return this.createFromParsedTheme(ts(t),e)}static createFromParsedTheme(t,e){return ns(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(i=>Yi(t.parent,i.parentScopes));return n?new dn(n.fontStyle,n.foreground,n.background):null}},At=class qe{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new qe(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new qe(r,e[n]);return r}push(e){return new qe(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function Yi(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!es(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function es(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var dn=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function ts(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let d=o.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let d=o.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&fr(o.settings.foreground)&&(l=o.settings.foreground);let p=null;typeof o.settings.background=="string"&&fr(o.settings.background)&&(p=o.settings.background);for(let d=0,h=a.length;d<h;d++){let m=a[d].trim().split(" "),_=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),r[n++]=new rs(_,b,i,c,l,p)}}return r}var rs=class{constructor(t,e,r,n,i,s){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=s}},V=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(V||{});function ns(t,e){t.sort((c,l)=>{let p=an(c.scope,l.scope);return p!==0||(p=cn(c.parentScopes,l.parentScopes),p!==0)?p:c.index-l.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(r=c.fontStyle),c.foreground!==null&&(n=c.foreground),c.background!==null&&(i=c.background)}let s=new is(e),o=new dn(r,s.getId(n),s.getId(i)),a=new os(new Dt(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let p=t[c];a.insert(0,p.scope,p.parentScopes,p.fontStyle,s.getId(p.foreground),s.getId(p.background))}return new Je(s,o,a)}var is=class{constructor(t){g(this,"_isFrozen");g(this,"_lastColorId");g(this,"_id2color");g(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},ss=Object.freeze([]),Dt=class pn{constructor(e,r,n,i,s){g(this,"scopeDepth");g(this,"parentScopes");g(this,"fontStyle");g(this,"foreground");g(this,"background");this.scopeDepth=e,this.parentScopes=r||ss,this.fontStyle=n,this.foreground=i,this.background=s}clone(){return new pn(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},os=class Vt{constructor(e,r=[],n={}){g(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const s=r.parentScopes[i].length-e.parentScopes[n].length;if(s!==0)return s;n++,i++}return r.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,s;if(n===-1?(i=e,s=""):(i=e.substring(0,n),s=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(Vt._cmpBySpecificity),r}insert(e,r,n,i,s,o){if(r===""){this._doInsertHere(e,n,i,s,o);return}let a=r.indexOf("."),c,l;a===-1?(c=r,l=""):(c=r.substring(0,a),l=r.substring(a+1));let p;this._children.hasOwnProperty(c)?p=this._children[c]:(p=new Vt(this._mainRule.clone(),Dt.cloneArr(this._rulesWithParentScopes)),this._children[c]=p),p.insert(e+1,l,n,i,s,o)}_doInsertHere(e,r,n,i,s){if(r===null){this._mainRule.acceptOverwrite(e,n,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(cn(c.parentScopes,r)===0){c.acceptOverwrite(e,n,i,s);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Dt(e,r,n,i,s))}},me=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),s=B.getForeground(e),o=B.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,r,n,i,s,o,a){let c=B.getLanguageId(e),l=B.getTokenType(e),p=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),f=B.getBackground(e);return r!==0&&(c=r),n!==8&&(l=n),i!==null&&(p=i?1:0),s!==-1&&(d=s),o!==0&&(h=o),a!==0&&(f=a),(c<<0|l<<8|p<<10|d<<11|h<<15|f<<24)>>>0}};function Ke(t,e){const r=[],n=as(t);let i=n.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let l=o();if(r.push({matcher:l,priority:c}),i!==",")break;i=n.next()}return r;function s(){if(i==="-"){i=n.next();const c=s();return l=>!!c&&!c(l)}if(i==="("){i=n.next();const c=a();return i===")"&&(i=n.next()),c}if(mr(i)){const c=[];do c.push(i),i=n.next();while(mr(i));return l=>e(c,l)}return null}function o(){const c=[];let l=s();for(;l;)c.push(l),l=s();return p=>c.every(d=>d(p))}function a(){const c=[];let l=o();for(;l&&(c.push(l),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");l=o()}return p=>c.some(d=>d(p))}}function mr(t){return!!t&&!!t.match(/[\w\.:]+/)}function as(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function hn(t){typeof t.dispose=="function"&&t.dispose()}var Le=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},cs=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},ls=class{constructor(){g(this,"_references",[]);g(this,"_seenReferenceKeys",new Set);g(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},us=class{constructor(t,e){g(this,"seenFullScopeRequests",new Set);g(this,"seenPartialScopeRequests",new Set);g(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Le(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new ls;for(const r of t)ds(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof Le){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function ds(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=r.lookup(e);t instanceof Le?Xe({baseGrammar:s,selfGrammar:i},n):$t(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},n);const o=r.injections(t.scopeName);if(o)for(const a of o)n.add(new Le(a))}function $t(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];Ze([n],e,r)}}function Xe(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&Ze(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&Ze(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Ze(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?sn({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Ze(n.patterns,{...e,repository:i},r);const s=n.include;if(!s)continue;const o=fn(s);switch(o.kind){case 0:Xe({...e,selfGrammar:e.baseGrammar},r);break;case 1:Xe(e,r);break;case 2:$t(o.ruleName,{...e,repository:i},r);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};o.kind===4?$t(o.ruleName,c,r):Xe(c,r)}else o.kind===4?r.add(new cs(o.scopeName,o.ruleName)):r.add(new Le(o.scopeName));break}}}var ps=class{constructor(){g(this,"kind",0)}},hs=class{constructor(){g(this,"kind",1)}},fs=class{constructor(t){g(this,"kind",2);this.ruleName=t}},ms=class{constructor(t){g(this,"kind",3);this.scopeName=t}},gs=class{constructor(t,e){g(this,"kind",4);this.scopeName=t,this.ruleName=e}};function fn(t){if(t==="$base")return new ps;if(t==="$self")return new hs;const e=t.indexOf("#");if(e===-1)return new ms(t);if(e===0)return new fs(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new gs(r,n)}}var _s=/\\(\d+)/,gr=/\\(\d+)/g,ys=-1,mn=-2;var Me=class{constructor(t,e,r,n){g(this,"$location");g(this,"id");g(this,"_nameIsCapturing");g(this,"_name");g(this,"_contentNameIsCapturing");g(this,"_contentName");this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${on(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Fe.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,t,e)}},Es=class extends Me{constructor(e,r,n,i,s){super(e,r,n,i);g(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,r){throw new Error("Not supported!")}compile(e,r){throw new Error("Not supported!")}compileAG(e,r,n,i){throw new Error("Not supported!")}},bs=class extends Me{constructor(e,r,n,i,s){super(e,r,n,null);g(this,"_match");g(this,"captures");g(this,"_cachedCompiledPatterns");this._match=new Pe(i,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,r){r.push(this._match)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Oe,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_r=class extends Me{constructor(e,r,n,i,s){super(e,r,n,i);g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,r){for(const n of this.patterns)e.getRule(n).collectPatterns(e,r)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Oe,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Me{constructor(e,r,n,i,s,o,a,c,l,p){super(e,r,n,i);g(this,"_begin");g(this,"beginCaptures");g(this,"_end");g(this,"endHasBackReferences");g(this,"endCaptures");g(this,"applyEndPatternLast");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this._begin=new Pe(s,this.id),this.beginCaptures=o,this._end=new Pe(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=l||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,r){return this._end.resolveBackReferences(e,r)}collectPatterns(e,r){r.push(this._begin)}compile(e,r){return this._getCachedCompiledPatterns(e,r).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e,r).compileAG(e,n,i)}_getCachedCompiledPatterns(e,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Oe;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}},Ye=class extends Me{constructor(e,r,n,i,s,o,a,c,l){super(e,r,n,i);g(this,"_begin");g(this,"beginCaptures");g(this,"whileCaptures");g(this,"_while");g(this,"whileHasBackReferences");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");g(this,"_cachedCompiledWhilePatterns");this._begin=new Pe(s,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new Pe(a,mn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,r){return this._while.resolveBackReferences(e,r)}collectPatterns(e,r){r.push(this._begin)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Oe;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,r){return this._getCachedCompiledWhilePatterns(e,r).compile(e)}compileWhileAG(e,r,n,i){return this._getCachedCompiledWhilePatterns(e,r).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Oe,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||"￿"),this._cachedCompiledWhilePatterns}},gn=class D{static createCaptureRule(e,r,n,i,s){return e.registerRule(o=>new Es(r,o,n,i,s))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new bs(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=sn({},n,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new _r(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(s,r,n))}return e.while?new Ye(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,r,n),D._compilePatterns(e.patterns,r,n)):new Mt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,D._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=D.getCompiledRuleId(e[o],r,n)),i[a]=D.createCaptureRule(r,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const a=e[s];let c=-1;if(a.include){const l=fn(a.include);switch(l.kind){case 0:case 1:c=D.getCompiledRuleId(n[a.include],r,n);break;case 2:let p=n[l.ruleName];p&&(c=D.getCompiledRuleId(p,r,n));break;case 3:case 4:const d=l.scopeName,h=l.kind===4?l.ruleName:null,f=r.getExternalGrammar(d,n);if(f)if(h){let m=f.repository[h];m&&(c=D.getCompiledRuleId(m,r,f.repository))}else c=D.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else c=D.getCompiledRuleId(a,r,n);if(c!==-1){const l=r.getRule(c);let p=!1;if((l instanceof _r||l instanceof Mt||l instanceof Ye)&&l.hasMissingPatterns&&l.patterns.length===0&&(p=!0),p)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Pe=class _n{constructor(e,r){g(this,"source");g(this,"ruleId");g(this,"hasAnchor");g(this,"hasBackReferences");g(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,s=[],o=!1;for(let a=0;a<n;a++)if(e.charAt(a)==="\\"&&a+1<n){const l=e.charAt(a+1);l==="z"?(s.push(e.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,n)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=_s.test(this.source):this.hasBackReferences=!1}clone(){return new _n(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return gr.lastIndex=0,this.source.replace(gr,(i,s)=>ln(n[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],r=[],n=[],i=[],s,o,a,c;for(s=0,o=this.source.length;s<o;s++)a=this.source.charAt(s),e[s]=a,r[s]=a,n[s]=a,i[s]=a,a==="\\"&&s+1<o&&(c=this.source.charAt(s+1),c==="A"?(e[s+1]="￿",r[s+1]="￿",n[s+1]="A",i[s+1]="A"):c==="G"?(e[s+1]="￿",r[s+1]="G",n[s+1]="￿",i[s+1]="G"):(e[s+1]=c,r[s+1]=c,n[s+1]=c,i[s+1]=c),s++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Oe=class{constructor(){g(this,"_items");g(this,"_hasAnchors");g(this,"_cached");g(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new yr(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new yr(t,n,this._items.map(i=>i.ruleId))}},yr=class{constructor(t,e,r){g(this,"scanner");this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
3
+ `)}findNextMatchSync(t,e,r){const n=this.scanner.findNextMatchSync(t,e,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},vt=class{constructor(t,e){this.languageId=t,this.tokenType=e}},ee,ws=(ee=class{constructor(e,r){g(this,"_defaultAttributes");g(this,"_embeddedLanguagesMatcher");g(this,"_getBasicScopeAttributes",new un(e=>{const r=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new vt(r,n)}));this._defaultAttributes=new vt(e,8),this._embeddedLanguagesMatcher=new As(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?ee._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const r=e.match(ee.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},g(ee,"_NULL_SCOPE_METADATA",new vt(0,0)),g(ee,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),ee),As=class{constructor(t){g(this,"values");g(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([r,n])=>ln(r));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Er=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function yn(t,e,r,n,i,s,o,a){const c=e.content.length;let l=!1,p=-1;if(o){const f=vs(t,e,r,n,i,s);i=f.stack,n=f.linePos,r=f.isFirstLine,p=f.anchorPosition}const d=Date.now();for(;!l;){if(a!==0&&Date.now()-d>a)return new Er(i,!0);h()}return new Er(i,!1);function h(){const f=Cs(t,e,r,n,i,p);if(!f){s.produce(i,c),l=!0;return}const m=f.captureIndices,_=f.matchedRuleId,b=m&&m.length>0?m[0].end>n:!1;if(_===ys){const w=i.getRule(t);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Se(t,e,r,i,s,w.endCaptures,m),s.produce(i,m[0].end);const y=i;if(i=i.parent,p=y.getAnchorPos(),!b&&y.getEnterPos()===n){i=y,s.produce(i,c),l=!0;return}}else{const w=t.getRule(_);s.produce(i,m[0].start);const y=i,E=w.getName(e.content,m),A=i.contentNameScopesList.pushAttributed(E,t);if(i=i.push(_,n,p,m[0].end===c,null,A,A),w instanceof Mt){const v=w;Se(t,e,r,i,s,v.beginCaptures,m),s.produce(i,m[0].end),p=m[0].end;const I=v.getContentName(e.content,m),R=A.pushAttributed(I,t);if(i=i.withContentNameScopesList(R),v.endHasBackReferences&&(i=i.withEndRule(v.getEndWithResolvedBackReferences(e.content,m))),!b&&y.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),l=!0;return}}else if(w instanceof Ye){const v=w;Se(t,e,r,i,s,v.beginCaptures,m),s.produce(i,m[0].end),p=m[0].end;const I=v.getContentName(e.content,m),R=A.pushAttributed(I,t);if(i=i.withContentNameScopesList(R),v.whileHasBackReferences&&(i=i.withEndRule(v.getWhileWithResolvedBackReferences(e.content,m))),!b&&y.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),l=!0;return}}else if(Se(t,e,r,i,s,w.captures,m),s.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),s.produce(i,c),l=!0;return}}m[0].end>n&&(n=m[0].end,r=!1)}}function vs(t,e,r,n,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let c=i;c;c=c.pop()){const l=c.getRule(t);l instanceof Ye&&a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:l,findOptions:p}=Ss(c.rule,t,c.stack.endRule,r,n===o),d=l.findNextMatchSync(e,n,p);if(d){if(d.ruleId!==mn){i=c.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(c.stack,d.captureIndices[0].start),Se(t,e,r,c.stack,s,c.rule.whileCaptures,d.captureIndices),s.produce(c.stack,d.captureIndices[0].end),o=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:o,isFirstLine:r}}function Cs(t,e,r,n,i,s){const o=Is(t,e,r,n,i,s),a=t.getInjections();if(a.length===0)return o;const c=Rs(a,t,e,r,n,i,s);if(!c)return o;if(!o)return c;const l=o.captureIndices[0].start,p=c.captureIndices[0].start;return p<l||c.priorityMatch&&p===l?c:o}function Is(t,e,r,n,i,s){const o=i.getRule(t),{ruleScanner:a,findOptions:c}=En(o,t,i.endRule,r,n===s),l=a.findNextMatchSync(e,n,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function Rs(t,e,r,n,i,s,o){let a=Number.MAX_VALUE,c=null,l,p=0;const d=s.contentNameScopesList.getScopeNames();for(let h=0,f=t.length;h<f;h++){const m=t[h];if(!m.matcher(d))continue;const _=e.getRule(m.ruleId),{ruleScanner:b,findOptions:w}=En(_,e,null,n,i===o),y=b.findNextMatchSync(r,i,w);if(!y)continue;const E=y.captureIndices[0].start;if(!(E>=a)&&(a=E,c=y.captureIndices,l=y.ruleId,p=m.priority,a===i))break}return c?{priorityMatch:p===-1,captureIndices:c,matchedRuleId:l}:null}function En(t,e,r,n,i){return{ruleScanner:t.compileAG(e,r,n,i),findOptions:0}}function Ss(t,e,r,n,i){return{ruleScanner:t.compileWhileAG(e,r,n,i),findOptions:0}}function Se(t,e,r,n,i,s,o){if(s.length===0)return;const a=e.content,c=Math.min(s.length,o.length),l=[],p=o[0].end;for(let d=0;d<c;d++){const h=s[d];if(h===null)continue;const f=o[d];if(f.length===0)continue;if(f.start>p)break;for(;l.length>0&&l[l.length-1].endPos<=f.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,f.start):i.produce(n,f.start),h.retokenizeCapturedWithRuleId){const _=h.getName(a,o),b=n.contentNameScopesList.pushAttributed(_,t),w=h.getContentName(a,o),y=b.pushAttributed(w,t),E=n.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,b,y),A=t.createOnigString(a.substring(0,f.end));yn(t,A,r&&f.start===0,f.start,E,i,!1,0),hn(A);continue}const m=h.getName(a,o);if(m!==null){const b=(l.length>0?l[l.length-1].scopes:n.contentNameScopesList).pushAttributed(m,t);l.push(new ks(b,f.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ks=class{constructor(t,e){g(this,"scopes");g(this,"endPos");this.scopes=t,this.endPos=e}};function Ts(t,e,r,n,i,s,o,a){return new Ps(t,e,r,n,i,s,o,a)}function br(t,e,r,n,i){const s=Ke(e,et),o=gn.getCompiledRuleId(r,n,i.repository);for(const a of s)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function et(t,e){if(e.length<t.length)return!1;let r=0;return t.every(n=>{for(let i=r;i<e.length;i++)if(Ls(e[i],n))return r=i+1,!0;return!1})}function Ls(t,e){if(!t)return!1;if(t===e)return!0;const r=e.length;return t.length>r&&t.substr(0,r)===e&&t[r]==="."}var Ps=class{constructor(t,e,r,n,i,s,o,a){g(this,"_rootId");g(this,"_lastRuleId");g(this,"_ruleId2desc");g(this,"_includedGrammars");g(this,"_grammarRepository");g(this,"_grammar");g(this,"_injections");g(this,"_basicScopeAttributesProvider");g(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new ws(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=wr(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const l=Ke(c,et);for(const p of l)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],r=this._rootScopeName,n=t.lookup(r);if(n){const i=n.injections;if(i)for(let o in i)br(e,o,i[o],this,n);const s=this._grammarRepository.injections(r);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const c=a.injectionSelector;c&&br(e,c,a,this,a)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,r=t(e);return this._ruleId2desc[e]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=wr(r,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,r=0){const n=this._tokenize(t,e,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(t,e,r=0){const n=this._tokenize(t,e,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(t,e,r,n){this._rootId===-1&&(this._rootId=gn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Gt.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=me.set(0,l.languageId,l.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=ke.createRootAndLookUpScopeName(h,d,this):f=ke.createRoot("unknown",d),e=new Gt(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,e.reset();t=t+`
4
+ `;const s=this.createOnigString(t),o=s.content.length,a=new xs(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=yn(this,s,i,0,e,a,!0,n);return hn(s),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function wr(t,e){return t=Ji(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ke=class Q{constructor(e,r,n){this.parent=e,this.scopePath=r,this.tokenAttributes=n}static fromExtension(e,r){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const s of r)i=At.push(i,s.scopeNames),n=new Q(n,i,s.encodedTokenAttributes);return n}static createRoot(e,r){return new Q(null,new At(null,e),r)}static createRootAndLookUpScopeName(e,r,n){const i=n.getMetadataForScope(e),s=new At(null,e),o=n.themeProvider.themeMatch(s),a=Q.mergeAttributes(r,i,o);return new Q(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Q.equals(this,e)}static equals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.scopeName!==r.scopeName||e.tokenAttributes!==r.tokenAttributes)return!1;e=e.parent,r=r.parent}while(!0)}static mergeAttributes(e,r,n){let i=-1,s=0,o=0;return n!==null&&(i=n.fontStyle,s=n.foregroundId,o=n.backgroundId),me.set(e,r.languageId,r.tokenType,null,i,s,o)}pushAttributed(e,r){if(e===null)return this;if(e.indexOf(" ")===-1)return Q._pushAttributed(this,e,r);const n=e.split(/ /g);let i=this;for(const s of n)i=Q._pushAttributed(i,s,r);return i}static _pushAttributed(e,r,n){const i=n.getMetadataForScope(r),s=e.scopePath.push(r),o=n.themeProvider.themeMatch(s),a=Q.mergeAttributes(e.tokenAttributes,i,o);return new Q(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const r=[];let n=this;for(;n&&n!==e;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?r.reverse():void 0}},F,Gt=(F=class{constructor(e,r,n,i,s,o,a,c){g(this,"_stackElementBrand");g(this,"_enterPos");g(this,"_anchorPos");g(this,"depth");this.parent=e,this.ruleId=r,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:F._equals(this,e)}static _equals(e,r){return e===r?!0:this._structuralEquals(e,r)?ke.equals(e.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.depth!==r.depth||e.ruleId!==r.ruleId||e.endRule!==r.endRule)return!1;e=e.parent,r=r.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){F._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,r,n,i,s,o,a){return new F(this,e,r,n,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,r){var n,i;return this.parent&&(r=this.parent._writeString(e,r)),e[r++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,r}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new F(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let r=this;for(;r&&r._enterPos===e._enterPos;){if(r.ruleId===e.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){var e,r,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((r=this.nameScopesList)==null?void 0:r.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,r){const n=ke.fromExtension((e==null?void 0:e.nameScopesList)??null,r.nameScopesList);return new F(e,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,ke.fromExtension(n,r.contentNameScopesList))}},g(F,"NULL",new F(null,0,0,0,!1,null,null,null)),F),Os=class{constructor(t,e){g(this,"balancedBracketScopes");g(this,"unbalancedBracketScopes");g(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Ke(r,et).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(r=>Ke(r,et).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},xs=class{constructor(t,e,r,n){g(this,"_emitBinaryTokens");g(this,"_lineText");g(this,"_tokens");g(this,"_binaryTokens");g(this,"_lastTokenEndIndex");g(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=t,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,s=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(i=me.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(i=me.set(i,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const r=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:r}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},Ns=class{constructor(t,e){g(this,"_grammars",new Map);g(this,"_rawGrammars",new Map);g(this,"_injectionGrammars",new Map);g(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,r,n,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,Ts(t,s,e,r,n,i,this,this._onigLib))}return this._grammars.get(t)}},Ds=class{constructor(e){g(this,"_options");g(this,"_syncRegistry");g(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new Ns(Je.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,r){this._syncRegistry.setTheme(Je.createFromRawTheme(e,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,r,n){return this.loadGrammarWithConfiguration(e,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,r,n){return this._loadGrammar(e,r,n.embeddedLanguages,n.tokenTypes,new Os(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,r,n,i,s){const o=new us(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,r,n,i,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const r=this._options.loadGrammar(e);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(e,r=[],n=0,i=null){return this._syncRegistry.addGrammar(e,r),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,r=0,n=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(e,r,n,i,s)}},Bt=Gt.NULL;function tt(t,e){const r=typeof t=="string"?{}:{...t.colorReplacements},n=typeof t=="string"?t:t.name;for(const[i,s]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof s=="string"?r[i]=s:i===n&&Object.assign(r,s);return r}function oe(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function Vs(t){return Array.isArray(t)?t:[t]}async function bn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ct(t){return!t||["plaintext","txt","text","plain"].includes(t)}function wn(t){return t==="ansi"||ct(t)}function lt(t){return t==="none"}function An(t){return lt(t)}const $s=/(\r?\n)/g;function ut(t,e=!1){var s;if(t.length===0)return[["",0]];const r=t.split($s);let n=0;const i=[];for(let o=0;o<r.length;o+=2){const a=e?r[o]+(r[o+1]||""):r[o];i.push([a,n]),n+=r[o].length,n+=((s=r[o+1])==null?void 0:s.length)||0}return i}const Ar={light:"#333333",dark:"#bbbbbb"},vr={light:"#fffffe",dark:"#1e1e1e"},Cr="__shiki_resolved";function Zt(t){var a,c,l,p,d;if(t!=null&&t[Cr])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:r,fg:n}=e;if(!r||!n){const h=e.settings?e.settings.find(f=>!f.name&&!f.scope):void 0;(a=h==null?void 0:h.settings)!=null&&a.foreground&&(n=h.settings.foreground),(c=h==null?void 0:h.settings)!=null&&c.background&&(r=h.settings.background),!n&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(n=e.colors["editor.foreground"]),!r&&((p=e==null?void 0:e.colors)!=null&&p["editor.background"])&&(r=e.colors["editor.background"]),n||(n=e.type==="light"?Ar.light:Ar.dark),r||(r=e.type==="light"?vr.light:vr.dark),e.fg=n,e.bg=r}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const s=new Map;function o(h){var m;if(s.has(h))return s.get(h);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(m=e.colorReplacements)!=null&&m[`#${f}`]?o(h):(s.set(h,f),f)}e.settings=e.settings.map(h=>{var b,w;const f=((b=h.settings)==null?void 0:b.foreground)&&!h.settings.foreground.startsWith("#"),m=((w=h.settings)==null?void 0:w.background)&&!h.settings.background.startsWith("#");if(!f&&!m)return h;const _={...h,settings:{...h.settings}};if(f){const y=o(h.settings.foreground);e.colorReplacements[y]=h.settings.foreground,_.settings.foreground=y}if(m){const y=o(h.settings.background);e.colorReplacements[y]=h.settings.background,_.settings.background=y}return _});for(const h of Object.keys(e.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!((d=e.colors[h])!=null&&d.startsWith("#"))){const f=o(e.colors[h]);e.colorReplacements[f]=e.colors[h],e.colors[h]=f}return Object.defineProperty(e,Cr,{enumerable:!1,writable:!1,value:!0}),e}async function vn(t){return[...new Set((await Promise.all(t.filter(e=>!wn(e)).map(async e=>await bn(e).then(r=>Array.isArray(r)?r:[r])))).flat())]}async function Cn(t){return(await Promise.all(t.map(async e=>An(e)?null:Zt(await bn(e))))).filter(e=>!!e)}function In(t,e){if(!e)return t;if(e[t]){const r=new Set([t]);for(;e[t];){if(t=e[t],r.has(t))throw new S(`Circular alias \`${[...r].join(" -> ")} -> ${t}\``);r.add(t)}}return t}var Ms=class extends Ds{constructor(e,r,n,i={}){super(e);g(this,"_resolver");g(this,"_themes");g(this,"_langs");g(this,"_alias");g(this,"_resolvedThemes",new Map);g(this,"_resolvedGrammars",new Map);g(this,"_langMap",new Map);g(this,"_langGraph",new Map);g(this,"_textmateThemeCache",new WeakMap);g(this,"_loadedThemesCache",null);g(this,"_loadedLanguagesCache",null);this._resolver=e,this._themes=r,this._langs=n,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const r=Zt(e);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let r=this._textmateThemeCache.get(e);r||(r=Je.createFromRawTheme(e),this._textmateThemeCache.set(e,r)),this._syncRegistry.setTheme(r)}getGrammar(e){return e=In(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){var s,o,a,c;if(this.getGrammar(e.name))return;const r=new Set([...this._langMap.values()].filter(l=>{var p;return(p=l.embeddedLangsLazy)==null?void 0:p.includes(e.name)}));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(l=>{this._alias[l]=e.name}),this._loadedLanguagesCache=null,r.size)for(const l of r)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,(o=(s=this._syncRegistry)==null?void 0:s._injectionGrammars)==null||o.delete(l.scopeName),(c=(a=this._syncRegistry)==null?void 0:a._grammars)==null||c.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const r=[...this._langGraph.entries()],n=r.filter(([i,s])=>!s);if(n.length){const i=r.filter(([s,o])=>{var a;return o?(a=o.embeddedLanguages||o.embeddedLangs)==null?void 0:a.some(c=>n.map(([l])=>l).includes(c)):!1}).filter(s=>!n.includes(s));throw new S(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of r)this._resolver.addLanguage(s);for(const[i,s]of r)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const r=e.embeddedLanguages??e.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}},Gs=class{constructor(t,e){g(this,"_langs",new Map);g(this,"_scopeToLang",new Map);g(this,"_injections",new Map);g(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},e.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let r=[];for(let n=1;n<=e.length;n++){const i=e.slice(0,n).join(".");r=[...r,...this._injections.get(i)||[]]}return r}};let Re=0;function Yt(t){Re+=1,t.warnings!==!1&&Re>=10&&Re%10===0&&console.warn(`[Shiki] ${Re} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");const r=(t.langs||[]).flat(1),n=(t.themes||[]).flat(1).map(Zt),i=new Ms(new Gs(t.engine,r),n,r,t.langAlias);let s;function o(y){return In(y,t.langAlias)}function a(y){b();const E=i.getGrammar(typeof y=="string"?y:y.name);if(!E)throw new S(`Language \`${y}\` not found, you may need to load it first`);return E}function c(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const E=i.getTheme(y);if(!E)throw new S(`Theme \`${y}\` not found, you may need to load it first`);return E}function l(y){b();const E=c(y);return s!==y&&(i.setTheme(E),s=y),{theme:E,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function h(...y){b(),i.loadLanguages(y.flat(1))}async function f(...y){return h(await vn(y))}function m(...y){b();for(const E of y.flat(1))i.loadTheme(E)}async function _(...y){return b(),m(await Cn(y))}function b(){if(e)throw new S("Shiki instance has been disposed")}function w(){e||(e=!0,i.dispose(),Re-=1)}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:f,loadLanguageSync:h,loadTheme:_,loadThemeSync:m,dispose:w,[Symbol.dispose]:w}}const Rl=Yt;async function Rn(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,r,n]=await Promise.all([Cn(t.themes||[]),vn(t.langs||[]),t.engine]);return Yt({...t,themes:e,langs:r,engine:n})}const Sl=Rn,Sn=new WeakMap;function dt(t,e){Sn.set(t,e)}function xe(t){return Sn.get(t)}var pt=class kn{constructor(...e){g(this,"_stacks",{});g(this,"lang");if(e.length===2){const[r,n]=e;this.lang=n,this._stacks=r}else{const[r,n,i]=e;this.lang=n,this._stacks={[i]:r}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,r){return new kn(Object.fromEntries(Vs(r).map(n=>[n,Bt])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Bs(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Bs(t){const e=[],r=new Set;function n(i){var o;if(r.has(i))return;r.add(i);const s=(o=i==null?void 0:i.nameScopesList)==null?void 0:o.scopeName;s&&e.push(s),i.parent&&n(i.parent)}return n(t),e}function Fs(t,e){if(!(t instanceof pt))throw new S("Invalid grammar state");return t.getInternalStack(e)}const js=/,/,Us=/ /;function Tn(t,e,r={}){const{theme:n=t.getLoadedThemes()[0]}=r;if(ct(t.resolveLangAlias(r.lang||"text"))||lt(n))return ut(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=t.setTheme(n),o=t.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==o.name)throw new S(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${o.name}"`);if(!r.grammarState.themes.includes(i.name))throw new S(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Ws(e,o,i,s,r)}function Ln(...t){if(t.length===2)return xe(t[1]);const[e,r,n={}]=t,{lang:i="text",theme:s=e.getLoadedThemes()[0]}=n;if(ct(i)||lt(s))throw new S("Plain language does not have grammar state");if(i==="ansi")throw new S("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(s),c=e.getLanguage(i);return new pt(er(r,c,o,a,n).stateStack,c.name,o.name)}function Ws(t,e,r,n,i){const s=er(t,e,r,n,i),o=new pt(s.stateStack,e.name,r.name);return dt(s.tokens,o),s.tokens}function er(t,e,r,n,i){const s=tt(r,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=i,l=ut(t);let p=i.grammarState?Fs(i.grammarState,r.name)??Bt:i.grammarContextCode!=null?er(i.grammarContextCode,e,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Bt,d=[];const h=[];for(let f=0,m=l.length;f<m;f++){const[_,b]=l[f];if(_===""){d=[],h.push([]);continue}if(o>0&&_.length>=o){d=[],h.push([{content:_,offset:b,color:"",fontStyle:0}]);continue}let w,y,E;c&&c!=="tokenType"&&(w=e.tokenizeLine(_,p,a),y=w.tokens,E=0);const A=e.tokenizeLine2(_,p,a),v=A.tokens.length/2;for(let I=0;I<v;I++){const R=A.tokens[2*I],G=I+1<v?A.tokens[2*I+2]:_.length;if(R===G)continue;const N=A.tokens[2*I+1],q=oe(n[me.getForeground(N)],s),_e=me.getFontStyle(N),M={content:_.substring(R,G),offset:b+R,color:q,fontStyle:_e};if(c==="tokenType")M.type=me.getTokenType(N);else if(c){const cr=[];if(c!=="scopeName")for(const J of r.settings){let ye;switch(typeof J.scope){case"string":ye=J.scope.split(js).map(_t=>_t.trim());break;case"object":ye=J.scope;break;default:continue}cr.push({settings:J,selectors:ye.map(_t=>_t.split(Us))})}M.explanation=[];let lr=0;for(;R+lr<G;){const J=y[E],ye=_.substring(J.startIndex,J.endIndex);lr+=ye.length,M.explanation.push({content:ye,scopes:c==="scopeName"?Hs(J.scopes):zs(cr,J.scopes)}),E+=1}}d.push(M)}h.push(d),d=[],p=A.ruleStack}return{tokens:h,stateStack:p}}function Hs(t){return t.map(e=>({scopeName:e}))}function zs(t,e){const r=[];for(let n=0,i=e.length;n<i;n++){const s=e[n];r[n]={scopeName:s,themeMatches:Xs(t,s,e.slice(0,n))}}return r}function Ir(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function qs(t,e,r){if(!Ir(t.at(-1),e))return!1;let n=t.length-2,i=r.length-1;for(;n>=0&&i>=0;)Ir(t[n],r[i])&&(n-=1),i-=1;return n===-1}function Xs(t,e,r){const n=[];for(const{selectors:i,settings:s}of t)for(const o of i)if(qs(o,e,r)){n.push(s);break}return n}function tr(t,e,r,n=Tn){const i=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),s=i.map(l=>{const p=n(t,e,{...r,theme:l.theme});return{tokens:p,state:xe(p),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=Qs(...s.map(l=>l.tokens)),a=o[0].map((l,p)=>l.map((d,h)=>{const f={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in r&&r.includeExplanation&&(f.explanation=d.explanation),o.forEach((m,_)=>{const{content:b,explanation:w,offset:y,...E}=m[p][h];f.variants[i[_].color]=E}),f})),c=s[0].state?new pt(Object.fromEntries(s.map(l=>{var p;return[l.theme,(p=l.state)==null?void 0:p.getInternalStack(l.theme)]})),s[0].state.lang):void 0;return c&&dt(a,c),a}function Qs(...t){const e=t.map(()=>[]),r=t.length;for(let n=0;n<t[0].length;n++){const i=t.map(c=>c[n]),s=e.map(()=>[]);e.forEach((c,l)=>c.push(s[l]));const o=i.map(()=>0),a=i.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(l=>l.content.length));for(let l=0;l<r;l++){const p=a[l];p.content.length===c?(s[l].push(p),o[l]+=1,a[l]=i[l][o[l]]):(s[l].push({...p,content:p.content.slice(0,c)}),a[l]={...p,content:p.content.slice(c),offset:p.offset+c})}}}return e}const Js=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Ks=/["&'<>`]/g,Zs=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ys=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eo=/[|\\{}()[\]^$+*?.]/g,Rr=new WeakMap;function to(t,e){if(t=t.replace(e.subset?ro(e.subset):Ks,n),e.subset||e.escapeOnly)return t;return t.replace(Zs,r).replace(Ys,n);function r(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function n(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function ro(t){let e=Rr.get(t);return e||(e=no(t),Rr.set(t,e)),e}function no(t){const e=[];let r=-1;for(;++r<t.length;)e.push(t[r].replace(eo,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const io=/[\dA-Fa-f]/;function so(t,e,r){const n="&#x"+t.toString(16).toUpperCase();return r&&e&&!io.test(String.fromCharCode(e))?n:n+";"}const oo=/\d/;function ao(t,e,r){const n="&#"+String(t);return r&&e&&!oo.test(String.fromCharCode(e))?n:n+";"}const co=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ct={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},lo=["cent","copy","divide","gt","lt","not","para","times"],Pn={}.hasOwnProperty,Ft={};let je;for(je in Ct)Pn.call(Ct,je)&&(Ft[Ct[je]]=je);const uo=/[^\dA-Za-z]/;function po(t,e,r,n){const i=String.fromCharCode(t);if(Pn.call(Ft,i)){const s=Ft[i],o="&"+s;return r&&co.includes(s)&&!lo.includes(s)&&(!n||e&&e!==61&&uo.test(String.fromCharCode(e)))?o:o+";"}return""}function ho(t,e,r){let n=so(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=po(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const s=ao(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function ve(t,e){return to(t,Object.assign({format:ho},e))}const fo=/^>|^->|<!--|-->|--!>|<!-$/g,mo=[">"],go=["<",">"];function _o(t,e,r,n){return n.settings.bogusComments?"<?"+ve(t.value,Object.assign({},n.settings.characterReferences,{subset:mo}))+">":"<!--"+t.value.replace(fo,i)+"-->";function i(s){return ve(s,Object.assign({},n.settings.characterReferences,{subset:go}))}}function yo(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}const P=xn(1),On=xn(-1),Eo=[];function xn(t){return e;function e(r,n,i){const s=r?r.children:Eo;let o=(n||0)+t,a=s[o];if(!i)for(;a&&Qt(a);)o+=t,a=s[o];return a}}const bo={}.hasOwnProperty;function Nn(t){return e;function e(r,n,i){return bo.call(t,r.tagName)&&t[r.tagName](r,n,i)}}const rr=Nn({body:Ao,caption:It,colgroup:It,dd:Ro,dt:Io,head:It,html:wo,li:Co,optgroup:So,option:ko,p:vo,rp:Sr,rt:Sr,tbody:Lo,td:kr,tfoot:Po,th:kr,thead:To,tr:Oo});function It(t,e,r){const n=P(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Qt(n.value.charAt(0)))}function wo(t,e,r){const n=P(r,e);return!n||n.type!=="comment"}function Ao(t,e,r){const n=P(r,e);return!n||n.type!=="comment"}function vo(t,e,r){const n=P(r,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function Co(t,e,r){const n=P(r,e);return!n||n.type==="element"&&n.tagName==="li"}function Io(t,e,r){const n=P(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function Ro(t,e,r){const n=P(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Sr(t,e,r){const n=P(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function So(t,e,r){const n=P(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ko(t,e,r){const n=P(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function To(t,e,r){const n=P(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function Lo(t,e,r){const n=P(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function Po(t,e,r){return!P(r,e)}function Oo(t,e,r){const n=P(r,e);return!n||n.type==="element"&&n.tagName==="tr"}function kr(t,e,r){const n=P(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const xo=Nn({body:Vo,colgroup:$o,head:Do,html:No,tbody:Mo});function No(t){const e=P(t,-1);return!e||e.type!=="comment"}function Do(t){const e=new Set;for(const n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const r=t.children[0];return!r||r.type==="element"}function Vo(t){const e=P(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Qt(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function $o(t,e,r){const n=On(r,e),i=P(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&rr(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Mo(t,e,r){const n=On(r,e),i=P(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&rr(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Ue={name:[[`
5
+ \f\r &/=>`.split(""),`
6
+ \f\r "&'/=>\``.split("")],[`\0
7
+ \f\r "&'/<=>`.split(""),`\0
8
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
9
+ \f\r &>`.split(""),`\0
10
+ \f\r "&'<=>\``.split("")],[`\0
11
+ \f\r "&'<=>\``.split(""),`\0
12
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Go(t,e,r,n){const i=n.schema,s=i.space==="svg"?!1:n.settings.omitOptionalTags;let o=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase());const a=[];let c;i.space==="html"&&t.tagName==="svg"&&(n.schema=Zr);const l=Bo(n,t.properties),p=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,p&&(o=!1),(l||!s||!xo(t,e,r))&&(a.push("<",t.tagName,l?" "+l:""),o&&(i.space==="svg"||n.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!n.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(p),!o&&(!s||!rr(t,e,r))&&a.push("</"+t.tagName+">"),a.join("")}function Bo(t,e){const r=[];let n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const s=Fo(t,i,e[i]);s&&r.push(s)}}for(;++n<r.length;){const s=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&s!=='"'&&s!=="'"&&(r[n]+=" ")}return r.join("")}function Fo(t,e,r){const n=mi(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,a;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const c=ve(n.attribute,Object.assign({},t.settings.characterReferences,{subset:Ue.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?gi:_i)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?c:(t.settings.preferUnquoted&&(a=ve(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Ue.unquoted[i][s]}))),a!==r&&(t.settings.quoteSmart&&pr(r,o)>pr(r,t.alternative)&&(o=t.alternative),a=o+ve(r,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?Ue.single:Ue.double)[i][s],attribute:!0}))+o),c+(a&&"="+a))}const jo=["<","&"];function Dn(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:ve(t.value,Object.assign({},n.settings.characterReferences,{subset:jo}))}function Uo(t,e,r,n){return n.settings.allowDangerousHtml?t.value:Dn(t,e,r,n)}function Wo(t,e,r,n){return n.all(t)}const Ho=Ei("type",{invalid:zo,unknown:qo,handlers:{comment:_o,doctype:yo,element:Go,raw:Uo,root:Wo,text:Dn}});function zo(t){throw new Error("Expected node, not `"+t+"`")}function qo(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Xo={},Qo={},Jo=[];function Ko(t,e){const r=e||Xo,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:Zo,all:Yo,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||Js,characterReferences:r.characterReferences||Qo,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?Zr:yi,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Zo(t,e,r){return Ho(t,e,r,this)}function Yo(t){const e=[],r=t&&t.children||Jo;let n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}const Tr=/\s+/g;function Vn(t,e){var n;if(!e)return t;t.properties||(t.properties={}),(n=t.properties).class||(n.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(Tr)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(e)?e:e.split(Tr);for(const i of r)i&&!t.properties.class.includes(i)&&t.properties.class.push(i);return t}const ea=/:?lang=["']([^"']+)["']/g,ta=/(?:```|~~~)([\w-]+)/g,ra=/\\begin\{([\w-]+)\}/g,na=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,ia=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function sa(t){const e=ut(t,!0).map(([i])=>i);function r(i){if(i===t.length)return{line:e.length-1,character:e.at(-1).length};let s=i,o=0;for(const a of e){if(s<a.length)break;s-=a.length,o++}return{line:o,character:s}}function n(i,s){let o=0;for(let a=0;a<i;a++)o+=e[a].length;return o+=s,o}return{lines:e,indexToPos:r,posToIndex:n}}function oa(t,e,r){const n=new Set;for(const s of t.matchAll(ea)){const o=s[1].toLowerCase().trim();o&&n.add(o)}for(const s of t.matchAll(ta)){const o=s[1].toLowerCase().trim();o&&n.add(o)}for(const s of t.matchAll(ra)){const o=s[1].toLowerCase().trim();o&&n.add(o)}for(const s of t.matchAll(na)){const o=s[1].toLowerCase().trim(),a=o.includes("/")?o.split("/").pop():o;a&&n.add(a)}if(ia.test(t)&&n.add("yaml"),!r)return[...n];const i=r.getBundledLanguages();return[...n].filter(s=>s&&i[s])}const aa=["color","background-color"];function ca(t,e){let r=0;const n=[];for(const i of e)i>r&&n.push({...t,content:t.content.slice(r,i),offset:t.offset+r}),r=i;return r<t.content.length&&n.push({...t,content:t.content.slice(r),offset:t.offset+r}),n}function la(t,e){let r=0,n=t.length;for(;r<n;){const i=r+(n-r>>1);t[i]<=e?r=i+1:n=i}return r}function ua(t,e){const r=[...e instanceof Set?e:new Set(e)].sort((n,i)=>n-i);return r.length?t.map(n=>n.flatMap(i=>{const s=i.offset+i.content.length,o=la(r,i.offset);let a=o;for(;a<r.length&&r[a]<s;)a++;if(o===a)return i;const c=r.slice(o,a);for(let l=0;l<c.length;l++)c[l]-=i.offset;return ca(i,c)})):t}function da(t,e,r,n,i="css-vars"){const s={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(p=>rt(t.variants[p])),a=new Set(o.flatMap(p=>Object.keys(p))),c={},l=(p,d)=>{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return r+e[p]+(d==="color"?"":h)};return o.forEach((p,d)=>{for(const h of a){const f=p[h]||"inherit";if(d===0&&n&&aa.includes(h))if(n==="light-dark()"&&o.length>1){const m=e.findIndex(y=>y==="light"),_=e.findIndex(y=>y==="dark");if(m===-1||_===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=o[m][h]||"inherit",w=o[_][h]||"inherit";c[h]=`light-dark(${b}, ${w})`,i==="css-vars"&&(c[l(d,h)]=f)}else c[h]=f;else i==="css-vars"&&(c[l(d,h)]=f)}}),s.htmlStyle=c,s}function rt(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&V.Italic&&(e["font-style"]="italic"),t.fontStyle&V.Bold&&(e["font-weight"]="bold");const r=[];t.fontStyle&V.Underline&&r.push("underline"),t.fontStyle&V.Strikethrough&&r.push("line-through"),r.length&&(e["text-decoration"]=r.join(" "))}return e}function jt(t){return typeof t=="string"?t:Object.entries(t).map(([e,r])=>`${e}:${r}`).join(";")}function pa(){const t=new WeakMap;function e(r){if(!t.has(r.meta)){let i=function(o){if(typeof o=="number"){if(o<0||o>r.source.length)throw new S(`Invalid decoration offset: ${o}. Code length: ${r.source.length}`);return{...n.indexToPos(o),offset:o}}else{const a=n.lines[o.line];if(a===void 0)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${n.lines.length}`);let c=o.character;if(c<0&&(c=a.length+c),c<0||c>a.length)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:c,offset:n.posToIndex(o.line,c)}}};const n=sa(r.source),s=(r.options.decorations||[]).map(o=>({...o,start:i(o.start),end:i(o.end)}));ha(s),t.set(r.meta,{decorations:s,converter:n,source:r.source})}return t.get(r.meta)}return{name:"shiki:decorations",tokens(r){var n;if((n=this.options.decorations)!=null&&n.length)return ua(r,e(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]))},code(r){var p;if(!((p=this.options.decorations)!=null&&p.length))return;const n=e(this),i=[...r.children].filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==n.converter.lines.length)throw new S(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function s(d,h,f,m){const _=i[d];let b="",w=-1,y=-1;if(h===0&&(w=0),f===0&&(y=0),f===Number.POSITIVE_INFINITY&&(y=_.children.length),w===-1||y===-1)for(let A=0;A<_.children.length;A++)b+=$n(_.children[A]),w===-1&&b.length===h&&(w=A+1),y===-1&&b.length===f&&(y=A+1);if(w===-1)throw new S(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(y===-1)throw new S(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const E=_.children.slice(w,y);if(!m.alwaysWrap&&E.length===_.children.length)a(_,m,"line");else if(!m.alwaysWrap&&E.length===1&&E[0].type==="element")a(E[0],m,"token");else{const A={type:"element",tagName:"span",properties:{},children:E};a(A,m,"wrapper"),_.children.splice(w,E.length,A)}}function o(d,h){i[d]=a(i[d],h,"line")}function a(d,h,f){var b;const m=h.properties||{},_=h.transform||(w=>w);return d.tagName=h.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},(b=h.properties)!=null&&b.class&&Vn(d,h.properties.class),d=_(d,f)||d,d}const c=[],l=n.decorations.sort((d,h)=>h.start.offset-d.start.offset||d.end.offset-h.end.offset);for(const d of l){const{start:h,end:f}=d;if(h.line===f.line)s(h.line,h.character,f.character,d);else if(h.line<f.line){s(h.line,h.character,Number.POSITIVE_INFINITY,d);for(let m=h.line+1;m<f.line;m++)c.unshift(()=>o(m,d));s(f.line,0,f.character,d)}}c.forEach(d=>d())}}}function ha(t){for(let e=0;e<t.length;e++){const r=t[e];if(r.start.offset>r.end.offset)throw new S(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=e+1;n<t.length;n++){const i=t[n],s=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,o=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,a=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,c=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(s||o||a||c){if(s&&o||a&&c||a&&r.start.offset===r.end.offset||o&&i.start.offset===i.end.offset)continue;throw new S(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function $n(t){return t.type==="text"?t.value:t.type==="element"?t.children.map($n).join(""):""}const fa=[pa()];function nt(t){const e=ma(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...fa]}function ma(t){const e=[],r=[],n=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:e,post:r,normal:n}}var de=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Rt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ga(t,e){const r=t.indexOf("\x1B",e);if(r!==-1&&t[r+1]==="["){const n=t.indexOf("m",r);if(n!==-1)return{sequence:t.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:t.length}}function Lr(t){const e=t.shift();if(e==="2"){const r=t.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(e==="5"){const r=t.shift();if(r)return{type:"table",index:Number(r)}}}function _a(t){const e=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)e.push({type:"resetAll"});else if(n<=9)Rt[n]&&e.push({type:"setDecoration",value:Rt[n]});else if(n<=29){const i=Rt[n-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)e.push({type:"setForegroundColor",value:{type:"named",name:de[n-30]}});else if(n===38){const i=Lr(t);i&&e.push({type:"setForegroundColor",value:i})}else if(n===39)e.push({type:"resetForegroundColor"});else if(n<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:de[n-40]}});else if(n===48){const i=Lr(t);i&&e.push({type:"setBackgroundColor",value:i})}else n===49?e.push({type:"resetBackgroundColor"}):n===53?e.push({type:"setDecoration",value:"overline"}):n===55?e.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?e.push({type:"setForegroundColor",value:{type:"named",name:de[n-90+8]}}):n>=100&&n<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:de[n-100+8]}})}return e}function ya(){let t=null,e=null,r=new Set;return{parse(n){const i=[];let s=0;do{const o=ga(n,s),a=o.sequence?n.substring(s,o.startPosition):n.substring(s);if(a.length>0&&i.push({value:a,foreground:t,background:e,decorations:new Set(r)}),o.sequence){const c=_a(o.sequence);for(const l of c)l.type==="resetAll"?(t=null,e=null,r.clear()):l.type==="resetForegroundColor"?t=null:l.type==="resetBackgroundColor"?e=null:l.type==="resetDecoration"&&r.delete(l.value);for(const l of c)l.type==="setForegroundColor"?t=l.value:l.type==="setBackgroundColor"?e=l.value:l.type==="setDecoration"&&r.add(l.value)}s=o.position}while(s<n.length);return i}}}var Ea={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function ba(t=Ea){function e(a){return t[a]}function r(a){return`#${a.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let l=0;l<de.length;l++)n.push(e(de[l]));let a=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let p=0;p<6;p++)for(let d=0;d<6;d++)n.push(r([a[l],a[p],a[d]]));let c=8;for(let l=0;l<24;l++,c+=10)n.push(r([c,c,c]));return n}function s(a){return i()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return r(a.rgb);case"table":return s(a.index)}}return{value:o}}const wa=/#([0-9a-f]{3,8})/i,Aa=/var\((--[\w-]+-ansi-[\w-]+)\)/,va={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Ca(t,e,r){const n=tt(t,r),i=ut(e),s=ba(Object.fromEntries(de.map(a=>{var l;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,((l=t.colors)==null?void 0:l[c])||va[a]]}))),o=ya();return i.map(a=>o.parse(a[0]).map(c=>{let l,p;c.decorations.has("reverse")?(l=c.background?s.value(c.background):t.bg,p=c.foreground?s.value(c.foreground):t.fg):(l=c.foreground?s.value(c.foreground):t.fg,p=c.background?s.value(c.background):void 0),l=oe(l,n),p=oe(p,n),c.decorations.has("dim")&&(l=Ia(l));let d=V.None;return c.decorations.has("bold")&&(d|=V.Bold),c.decorations.has("italic")&&(d|=V.Italic),c.decorations.has("underline")&&(d|=V.Underline),c.decorations.has("strikethrough")&&(d|=V.Strikethrough),{content:c.value,offset:a[1],color:l,bgColor:p,fontStyle:d}}))}function Ia(t){const e=t.match(wa);if(e){const n=e[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],s=n[1],o=n[2],a=n[3];return`#${i}${i}${s}${s}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(n.length===3){const i=n[0],s=n[1],o=n[2];return`#${i}${i}${s}${s}${o}${o}80`}}}const r=t.match(Aa);return r?`var(${r[1]}-dim)`:t}function it(t,e,r={}){const n=t.resolveLangAlias(r.lang||"text"),{theme:i=t.getLoadedThemes()[0]}=r;if(!ct(n)&&!lt(i)&&n==="ansi"){const{theme:s}=t.setTheme(i);return Ca(s,e,r)}return Tn(t,e,r)}function Ne(t,e,r){let n,i,s,o,a,c;if("themes"in r){const{defaultColor:l="light",cssVariablePrefix:p="--shiki-",colorsRendering:d="css-vars"}=r,h=Object.entries(r.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,y)=>w.color===l?-1:y.color===l?1:0);if(h.length===0)throw new S("`themes` option must not be empty");const f=tr(t,e,r,it);if(c=xe(f),l&&l!=="light-dark()"&&!h.some(w=>w.color===l))throw new S(`\`themes\` option must contain the defaultColor key \`${l}\``);const m=h.map(w=>t.getTheme(w.theme)),_=h.map(w=>w.color);s=f.map(w=>w.map(y=>da(y,_,p,l,d))),c&&dt(s,c);const b=h.map(w=>tt(w.theme,r));i=Pr(h,m,b,p,l,"fg",d),n=Pr(h,m,b,p,l,"bg",d),o=`shiki-themes ${m.map(w=>w.name).join(" ")}`,a=l?void 0:[i,n].join(";")}else if("theme"in r){const l=tt(r.theme,r);s=it(t,e,r);const p=t.getTheme(r.theme);n=oe(p.bg,l),i=oe(p.fg,l),o=p.name,c=xe(s)}else throw new S("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:n,themeName:o,rootStyle:a,grammarState:c}}function Pr(t,e,r,n,i,s,o){return t.map((a,c)=>{const l=oe(e[c][s],r[c])||"inherit",p=`${n+a.color}${s==="bg"?"-bg":""}:${l}`;if(c===0&&i){if(i==="light-dark()"&&t.length>1){const d=t.findIndex(f=>f.color==="light"),h=t.findIndex(f=>f.color==="dark");if(d===-1||h===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${oe(e[d][s],r[d])||"inherit"}, ${oe(e[h][s],r[h])||"inherit"});${p}`}return l}return o==="css-vars"?p:null}).filter(a=>!!a).join(";")}const Mn=/^\s+$/,Ra=/^(\s*)(.*?)(\s*)$/;function De(t,e,r,n={meta:{},options:r,codeToHast:(i,s)=>De(t,i,s),codeToTokens:(i,s)=>Ne(t,i,s)}){var m,_;let i=e;for(const b of nt(r))i=((m=b.preprocess)==null?void 0:m.call(n,i,r))||i;let{tokens:s,fg:o,bg:a,themeName:c,rootStyle:l,grammarState:p}=Ne(t,i,r);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=r;d===!0?s=ka(s):d==="never"&&(s=Ta(s)),h&&(s=La(s));const f={...n,get source(){return i}};for(const b of nt(r))s=((_=b.tokens)==null?void 0:_.call(f,s))||s;return Sa(s,{...r,fg:o,bg:a,themeName:c,rootStyle:r.rootStyle===!1?!1:r.rootStyle??l},f,p)}function Sa(t,e,r,n=xe(t)){var _,b,w,y;const i=nt(e),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=e,l={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?l.style=e.rootStyle:l.style=`background-color:${e.bg};color:${e.fg}`),c!==!1&&c!=null&&(l.tabindex=c.toString());for(const[E,A]of Object.entries(e.meta||{}))E.startsWith("_")||(l[E]=A);let p={type:"element",tagName:"pre",properties:l,children:[],data:e.data},d={type:"element",tagName:"code",properties:{},children:s};const h=[],f={...r,structure:a,addClassToHast:Vn,get source(){return r.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return p},get code(){return d},get lines(){return h}};if(t.forEach((E,A)=>{var R,G;A&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
13
+ `}));let v={type:"element",tagName:"span",properties:{class:"line"},children:[]},I=0;for(const N of E){let q={type:"element",tagName:"span",properties:{...N.htmlAttrs},children:[{type:"text",value:N.content}]};const _e=jt(N.htmlStyle||rt(N));_e&&(q.properties.style=_e);for(const M of i)q=((R=M==null?void 0:M.span)==null?void 0:R.call(f,q,A+1,I,v,N))||q;a==="inline"?o.children.push(q):a==="classic"&&v.children.push(q),I+=N.content.length}if(a==="classic"){for(const N of i)v=((G=N==null?void 0:N.line)==null?void 0:G.call(f,v,A+1))||v;h.push(v),s.push(v)}else a==="inline"&&h.push(v)}),a==="classic"){for(const E of i)d=((_=E==null?void 0:E.code)==null?void 0:_.call(f,d))||d;p.children.push(d);for(const E of i)p=((b=E==null?void 0:E.pre)==null?void 0:b.call(f,p))||p;o.children.push(p)}else if(a==="inline"){const E=[];let A={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const I of o.children)I.type==="element"&&I.tagName==="br"?(E.push(A),A={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(I.type==="element"||I.type==="text")&&A.children.push(I);E.push(A);let v={type:"element",tagName:"code",properties:{},children:E};for(const I of i)v=((w=I==null?void 0:I.code)==null?void 0:w.call(f,v))||v;o.children=[];for(let I=0;I<v.children.length;I++){I>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const R=v.children[I];R.type==="element"&&o.children.push(...R.children)}}let m=o;for(const E of i)m=((y=E==null?void 0:E.root)==null?void 0:y.call(f,m))||m;return n&&dt(m,n),m}function ka(t){return t.map(e=>{const r=[];let n="",i;return e.forEach((s,o)=>{const a=!(s.fontStyle&&(s.fontStyle&V.Underline||s.fontStyle&V.Strikethrough));a&&Mn.test(s.content)&&e[o+1]?(i===void 0&&(i=s.offset),n+=s.content):n?(a?r.push({...s,offset:i,content:n+s.content}):r.push({content:n,offset:i},s),i=void 0,n=""):r.push(s)}),r})}function Ta(t){return t.map(e=>e.flatMap(r=>{if(Mn.test(r.content))return r;const n=r.content.match(Ra);if(!n)return r;const[,i,s,o]=n;if(!i&&!o)return r;const a=[{...r,offset:r.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:r.offset}),o&&a.push({content:o,offset:r.offset+i.length+s.length}),a}))}function La(t){return t.map(e=>{const r=[];for(const n of e){if(r.length===0){r.push({...n});continue}const i=r.at(-1),s=jt(i.htmlStyle||rt(i)),o=jt(n.htmlStyle||rt(n)),a=i.fontStyle&&(i.fontStyle&V.Underline||i.fontStyle&V.Strikethrough),c=n.fontStyle&&(n.fontStyle&V.Underline||n.fontStyle&V.Strikethrough);!a&&!c&&s===o?i.content+=n.content:r.push({...n})}return r})}const Pa=Ko;function Gn(t,e,r){var s;const n={meta:{},options:r,codeToHast:(o,a)=>De(t,o,a),codeToTokens:(o,a)=>Ne(t,o,a)};let i=Pa(De(t,e,r,n));for(const o of nt(r))i=((s=o.postprocess)==null?void 0:s.call(n,i,r))||i;return i}async function Bn(t){const e=await Rn(t);return{getLastGrammarState:(...r)=>Ln(e,...r),codeToTokensBase:(r,n)=>it(e,r,n),codeToTokensWithThemes:(r,n)=>tr(e,r,n),codeToTokens:(r,n)=>Ne(e,r,n),codeToHast:(r,n)=>De(e,r,n),codeToHtml:(r,n)=>Gn(e,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function kl(t){const e=Yt(t);return{getLastGrammarState:(...r)=>Ln(e,...r),codeToTokensBase:(r,n)=>it(e,r,n),codeToTokensWithThemes:(r,n)=>tr(e,r,n),codeToTokens:(r,n)=>Ne(e,r,n),codeToHast:(r,n)=>De(e,r,n),codeToHtml:(r,n)=>Gn(e,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Oa(t){let e;async function r(n){if(e){const i=await e;return await Promise.all([i.loadTheme(...n.themes||[]),i.loadLanguage(...n.langs||[])]),i}else return e=t({...n,themes:n.themes||[],langs:n.langs||[]}),e}return r}const Tl=Oa(Bn);function xa(t){const e=t.langs,r=t.themes,n=t.engine;async function i(s){function o(d){var h;if(typeof d=="string"){if(d=((h=s.langAlias)==null?void 0:h[d])||d,wn(d))return[];const f=e[d];if(!f)throw new S(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function a(d){if(An(d))return"none";if(typeof d=="string"){const h=r[d];if(!h)throw new S(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return h}return d}const c=(s.themes??[]).map(d=>a(d)),l=(s.langs??[]).map(d=>o(d)),p=await Bn({engine:s.engine??n(),...s,themes:c,langs:l});return{...p,loadLanguage(...d){return p.loadLanguage(...d.map(o))},loadTheme(...d){return p.loadTheme(...d.map(a))},getBundledLanguages(){return e},getBundledThemes(){return r}}}return i}function Na(t){let e;async function r(n={}){if(e){const i=await e;return await Promise.all([i.loadTheme(...n.themes||[]),i.loadLanguage(...n.langs||[])]),i}else{e=t({...n,themes:[],langs:[]});const i=await e;return await Promise.all([i.loadTheme(...n.themes||[]),i.loadLanguage(...n.langs||[])]),i}}return r}function Da(t,e){const r=Na(t);async function n(i,s){var c;const o=await r({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),a=await((c=e==null?void 0:e.guessEmbeddedLanguages)==null?void 0:c.call(e,i,s.lang,o));return a&&await o.loadLanguage(...a),o}return{getSingletonHighlighter(i){return r(i)},async codeToHtml(i,s){return(await n(i,s)).codeToHtml(i,s)},async codeToHast(i,s){return(await n(i,s)).codeToHast(i,s)},async codeToTokens(i,s){return(await n(i,s)).codeToTokens(i,s)},async codeToTokensBase(i,s){return(await n(i,s)).codeToTokensBase(i,s)},async codeToTokensWithThemes(i,s){return(await n(i,s)).codeToTokensWithThemes(i,s)},async getLastGrammarState(i,s){return(await r({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(i,s)}}}function Ll(t={}){var o;const{name:e="css-variables",variablePrefix:r="--shiki-",fontStyle:n=!0}=t,i=a=>{var c;return(c=t.variableDefaults)!=null&&c[a]?`var(${r}${a}, ${t.variableDefaults[a]})`:`var(${r}${a})`},s={name:e,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return n||(s.tokenColors=(o=s.tokenColors)==null?void 0:o.map(a=>{var c;return(c=a.settings)!=null&&c.fontStyle&&delete a.settings.fontStyle,a})),s}const Va=xa({langs:ki,themes:Li,engine:()=>(0,nn.createOnigurumaEngine)(u(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Pl,codeToHast:Ol,codeToTokens:xl,codeToTokensBase:Nl,codeToTokensWithThemes:Dl,getSingletonHighlighter:Vl,getLastGrammarState:$l}=Da(Va,{guessEmbeddedLanguages:oa}),Or=4294967295;var $a=class{constructor(t,e={}){g(this,"patterns");g(this,"options");g(this,"regexps");this.patterns=t,this.options=e;const{forgiving:r=!1,cache:n,regexConstructor:i}=e;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(s=>{if(typeof s!="string")return s;const o=n==null?void 0:n.get(s);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const a=i(s);return n==null||n.set(s,a),a}catch(a){if(n==null||n.set(s,a),r)return null;throw a}})}findNextMatchSync(t,e,r){const n=typeof t=="string"?t:t.content,i=[];function s(o,a,c=0){return{index:o,captureIndices:a.indices.map(l=>l==null?{start:Or,end:Or,length:0}:{start:l[0]+c,end:l[1]+c,length:l[1]-l[0]})}}for(let o=0;o<this.regexps.length;o++){const a=this.regexps[o];if(a)try{a.lastIndex=e;const c=a.exec(n);if(!c)continue;if(c.index===e)return s(o,c,0);i.push([o,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(i.length){const o=Math.min(...i.map(a=>a[1].index));for(const[a,c,l]of i)if(c.index===o)return s(a,c,l)}return null}};function Ce(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function Ma(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}const nr=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),x=String.raw;function Ie(t,e){if(t==null)throw new Error(e??"Value expected");return t}const Fn=x`\[\^?`,jn=`c.? | C(?:-.?)?|${x`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${x`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${x`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${x`o\{[^\}]*\}?`}|${x`\d{1,3}`}`,ir=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,We=new RegExp(x`
14
+ \\ (?:
15
+ ${jn}
16
+ | [gk]<[^>]*>?
17
+ | [gk]'[^']*'?
18
+ | .
19
+ )
20
+ | \( (?:
21
+ \? (?:
22
+ [:=!>({]
23
+ | <[=!]
24
+ | <[^>]*>
25
+ | '[^']*'
26
+ | ~\|?
27
+ | #(?:[^)\\]|\\.?)*
28
+ | [^:)]*[:)]
29
+ )?
30
+ | \*[^\)]*\)?
31
+ )?
32
+ | (?:${ir.source})+
33
+ | ${Fn}
34
+ | .
35
+ `.replace(/\s+/g,""),"gsu"),St=new RegExp(x`
36
+ \\ (?:
37
+ ${jn}
38
+ | .
39
+ )
40
+ | \[:(?:\^?\p{Alpha}+|\^):\]
41
+ | ${Fn}
42
+ | &&
43
+ | .
44
+ `.replace(/\s+/g,""),"gsu");function Ga(t,e={}){const r={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const n=ic(r.flags),i=[n.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:r.rules.singleline};let o=[],a;for(We.lastIndex=0;a=We.exec(t);){const d=Ba(s,t,a[0],We.lastIndex);d.tokens?o.push(...d.tokens):d.token&&o.push(d.token),d.lastIndex!==void 0&&(We.lastIndex=d.lastIndex)}const c=[];let l=0;o.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++l:d.raw==="("&&c.push(d)}),l||c.forEach((d,h)=>{d.kind="capturing",d.number=h+1});const p=l||c.length;return{tokens:o.map(d=>d.type==="EscapedNumber"?oc(d,p):d).flat(),flags:n}}function Ba(t,e,r,n){const[i,s]=r;if(r==="["||r==="[^"){const o=Fa(e,r,n);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:xr(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Ka(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Wn(r)}}if(s==="K")return{token:Hn("keep",r)};if(s==="N"||s==="R")return{token:pe("newline",r,{negate:s==="N"})};if(s==="O")return{token:pe("any",r)};if(s==="X")return{token:pe("text_segment",r)};const o=Un(r,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(i==="("){if(s==="*")return{token:tc(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(e[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:ec(r,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,r==="("&&!t.captureGroup||r==="(?:")return{token:we("group",r)};if(r==="(?>")return{token:we("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:we(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&t.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:we("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:we("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Xa(r)}}if(t.getCurrentModX()){if(r==="#"){const o=e.indexOf(`
45
+ `,n);return{lastIndex:o===-1?e.length:o}}if(/^\s$/.test(r)){const o=/\s+/y;return o.lastIndex=n,{lastIndex:o.exec(e)?o.lastIndex:n}}}if(r===".")return{token:pe("dot",r)};if(r==="^"||r==="$"){const o=t.singleline?{"^":x`\A`,$:x`\Z`}[r]:r;return{token:xr(o,r)}}return r==="|"?{token:Ua(r)}:ir.test(r)?{tokens:ac(r)}:{token:te(Ce(r),r)}}function Fa(t,e,r){const n=[Nr(e[1]==="^",e)];let i=1,s;for(St.lastIndex=r;s=St.exec(t);){const o=s[0];if(o[0]==="["&&o[1]!==":")i++,n.push(Nr(o[1]==="^",o));else if(o==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(te(93,o));else if(i--,n.push(Wa(o)),!i)break}else{const a=ja(o);Array.isArray(a)?n.push(...a):n.push(a)}}return{tokens:n,lastIndex:St.lastIndex||t.length}}function ja(t){if(t[0]==="\\")return Un(t,{inCharClass:!0});if(t[0]==="["){const e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!nr.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return pe("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?Ha(t):t==="&&"?za(t):te(Ce(t),t)}function Un(t,{inCharClass:e}){const r=t[1];if(r==="c"||r==="C")return Ya(t);if("dDhHsSwW".includes(r))return rc(t);if(t.startsWith(x`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return nc(t)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(t))try{const n=t.split(/\\x/).slice(1).map(o=>parseInt(o,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),s=new TextEncoder;return[...i].map(o=>{const a=[...s.encode(o)].map(c=>`\\x${c.toString(16)}`).join("");return te(Ce(o),a)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return te(sc(t),t);if(Dr.has(r))return te(Dr.get(r),t);if(/\d/.test(r))return qa(e,t);if(t==="\\")throw new Error(x`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return te(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function Ua(t){return{type:"Alternator",raw:t}}function xr(t,e){return{type:"Assertion",kind:t,raw:e}}function Wn(t){return{type:"Backreference",raw:t}}function te(t,e){return{type:"Character",value:t,raw:e}}function Wa(t){return{type:"CharacterClassClose",raw:t}}function Ha(t){return{type:"CharacterClassHyphen",raw:t}}function za(t){return{type:"CharacterClassIntersector",raw:t}}function Nr(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function pe(t,e,r={}){return{type:"CharacterSet",kind:t,...r,raw:e}}function Hn(t,e,r={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:Ie(r.flags),raw:e}}function qa(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function Xa(t){return{type:"GroupClose",raw:t}}function we(t,e,r={}){return{type:"GroupOpen",kind:t,...r,raw:e}}function Qa(t,e,r,n){return{type:"NamedCallout",kind:t,tag:e,arguments:r,raw:n}}function Ja(t,e,r,n){return{type:"Quantifier",kind:t,min:e,max:r,raw:n}}function Ka(t){return{type:"Subroutine",raw:t}}const Za=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Dr=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Ya(t){const e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return te(Ce(e.toUpperCase())-64,t)}function ec(t,e){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;n??(n="");const i=(e.getCurrentModX()||r.includes("x"))&&!n.includes("x"),s=$r(r),o=$r(n),a={};if(s&&(a.enable=s),o&&(a.disable=o),t.endsWith(")"))return e.replaceCurrentModX(i),Hn("flags",t,{flags:a});if(t.endsWith(":"))return e.pushModX(i),e.numOpenGroups++,we("group",t,{...(s||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${t}"`)}function tc(t){const e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:r,tag:n,args:i}=e.groups;if(!r)throw new Error(`Invalid named callout "${t}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const s=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[o,a,c]=s,l=Za.has(r)?r.toLowerCase():"custom";switch(l){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${l}"`)}return Qa(l,n??null,(i==null?void 0:i.split(","))??null,t)}function Vr(t){let e=null,r,n;if(t[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,o=1e5;if(+i>o||s&&+s>o)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+i,n=s===void 0?+i:s===""?1/0:+s,r>n&&(e="possessive",[r,n]=[n,r]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else r=t[0]==="+"?1:0,n=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return Ja(e,r,n,t)}function rc(t){const e=t[1].toLowerCase();return pe({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function nc(t){const{p:e,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return pe("property",t,{value:n,negate:e==="P"&&!r||e==="p"&&!!r})}function $r(t){const e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function ic(t){const e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<t.length;r++){const n=t[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(t.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[r+2]==="g"?"grapheme":"word",r+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return e}function sc(t){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const e=t[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function oc(t,e){const{raw:r,inCharClass:n}=t,i=r.slice(1);if(!n&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=e))return[Wn(r)];const s=[],o=i.match(/^[0-7]+|\d/g);for(let a=0;a<o.length;a++){const c=o[a];let l;if(a===0&&c!=="8"&&c!=="9"){if(l=parseInt(c,8),l>127)throw new Error(x`Octal encoded byte above 177 unsupported "${r}"`)}else l=Ce(c);s.push(te(l,(a===0?"\\":"")+c))}return s}function ac(t){const e=[],r=new RegExp(ir,"gy");let n;for(;n=r.exec(t);){const i=n[0];if(i[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(s){const{min:o,max:a}=s.groups;if(+o>+a&&i.endsWith("?")){r.lastIndex--,e.push(Vr(i.slice(0,-1)));continue}}}e.push(Vr(i))}return e}function zn(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const r=t.body[0];return!e||Object.keys(e).every(n=>e[n]===r[n])}function cc(t){return lc.has(t.type)}const lc=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function qn(t,e={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},n=Ga(t,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),i=(h,f)=>{const m=n.tokens[s.nextIndex];switch(s.parent=h,s.nextIndex++,m.type){case"Alternator":return ge();case"Assertion":return uc(m);case"Backreference":return dc(m,s);case"Character":return ht(m.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return pc(m,s,f);case"CharacterClassOpen":return hc(m,s,f);case"CharacterSet":return fc(m,s);case"Directive":return bc(m.kind,{flags:m.flags});case"GroupOpen":return mc(m,s,f);case"NamedCallout":return Ac(m.kind,m.tag,m.arguments);case"Quantifier":return gc(m,s);case"Subroutine":return _c(m,s);default:throw new Error(`Unexpected token type "${m.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:i},o=Cc(wc(n.flags));let a=o.body[0];for(;s.nextIndex<n.tokens.length;){const h=i(a,{});h.type==="Alternative"?(o.body.push(h),a=h):a.body.push(h)}const{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:p,subroutines:d}=s;if(l&&p.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:h}of d)if(typeof h=="number"){if(h>c.length)throw new Error("Subroutine uses a group number that's not defined");h&&(c[h-1].isSubroutined=!0)}else if(p.has(h)){if(p.get(h).length>1)throw new Error(x`Subroutine uses a duplicate group name "\g<${h}>"`);p.get(h)[0].isSubroutined=!0}else throw new Error(x`Subroutine uses a group name that's not defined "\g<${h}>"`);return o}function uc({kind:t}){return Ut(Ie({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===x`\B`||t===x`\Y`})}function dc({raw:t},e){const r=/^\\k[<']/.test(t),n=r?t.slice(3,-1):t.slice(1),i=(s,o=!1)=>{const a=e.capturingGroups.length;let c=!1;if(s>a)if(e.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,Wt(o?a+1-s:s,{orphan:c})};if(r){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(s)return i(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${t}"`);return Wt(n)}return i(+n)}function pc(t,e,r){const{tokens:n,walk:i}=e,s=e.parent,o=s.body.at(-1),a=n[e.nextIndex];if(!r.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){const c=i(s,{...r,isCheckingRangeEnd:!0});if(o.type==="Character"&&c.type==="Character")return s.body.pop(),Ec(o,c);throw new Error("Invalid character class range")}return ht(Ce("-"))}function hc({negate:t},e,r){const{tokens:n,walk:i}=e,s=[Qe()],o=n[e.nextIndex];let a=Br(o);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")s.push(Qe()),e.nextIndex++;else{const l=s.at(-1);l.body.push(i(l,r))}a=Br(n[e.nextIndex],o)}const c=Qe({negate:t});return s.length===1?c.body=s[0].body:(c.kind="intersection",c.body=s.map(l=>l.body.length===1?l.body[0]:l)),e.nextIndex++,c}function fc({kind:t,negate:e,value:r},n){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o}=n;if(t==="property"){const a=ft(r);if(nr.has(a)&&!(o!=null&&o.has(a)))t="posix",r=a;else return Ae(r,{negate:e,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o})}return t==="posix"?vc(r,{negate:e}):Ht(t,{negate:e})}function mc(t,e,r){const{tokens:n,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:o,walk:a}=e,c=Ic(t),l=c.type==="AbsenceFunction",p=Gr(c),d=p&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&Ma(s,c.name,[]).push(c)),l&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let h=Fr(n[e.nextIndex]);for(;h.type!=="GroupClose";){if(h.type==="Alternator")c.body.push(ge()),e.nextIndex++;else{const f=c.body.at(-1),m=a(f,{...r,isInAbsenceFunction:r.isInAbsenceFunction||l,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||d});if(f.body.push(m),(p||r.isInLookbehind)&&!o){const _="Lookbehind includes a pattern not allowed by Oniguruma";if(d||r.isInNegLookbehind){if(Mr(m)||m.type==="CapturingGroup")throw new Error(_)}else if(Mr(m)||Gr(m)&&m.negate)throw new Error(_)}}h=Fr(n[e.nextIndex])}return e.nextIndex++,c}function gc({kind:t,min:e,max:r},n){const i=n.parent,s=i.body.at(-1);if(!s||!cc(s))throw new Error("Quantifier requires a repeatable token");const o=Qn(t,e,r,s);return i.body.pop(),o}function _c({raw:t},e){const{capturingGroups:r,subroutines:n}=e;let i=t.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(s){const a=+s.groups.num,c=r.length;if(e.hasNumberedRef=!0,i={"":a,"+":c+a,"-":c+1-a}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const o=Jn(i);return n.push(o),o}function yc(t,e){return{type:"AbsenceFunction",kind:t,body:Ge(e==null?void 0:e.body)}}function ge(t){return{type:"Alternative",body:Kn(t==null?void 0:t.body)}}function Ut(t,e){const r={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(r.negate=!!(e!=null&&e.negate)),r}function Wt(t,e){const r=!!(e!=null&&e.orphan);return{type:"Backreference",ref:t,...r&&{orphan:r}}}function Xn(t,e){const r={name:void 0,isSubroutined:!1,...e};if(r.name!==void 0&&!Rc(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Ge(e==null?void 0:e.body)}}function ht(t,e){const r={useLastValid:!1,...e};if(t>1114111){const n=t.toString(16);if(r.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:t}}function Qe(t){const e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:Kn(t==null?void 0:t.body)}}function Ec(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function Ht(t,e){const r=!!(e!=null&&e.negate),n={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(n.negate=r),(t==="text_segment"||t==="newline"&&!r)&&(n.variableLength=!0),n}function bc(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Ie(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function wc(t){return{type:"Flags",...t}}function H(t){const e=t==null?void 0:t.atomic,r=t==null?void 0:t.flags;if(e&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...r&&{flags:r},body:Ge(t==null?void 0:t.body)}}function ue(t){const e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:Ge(t==null?void 0:t.body)}}function Ac(t,e,r){return{type:"NamedCallout",kind:t,tag:e,arguments:r}}function vc(t,e){const r=!!(e!=null&&e.negate);if(!nr.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:r}}function Qn(t,e,r,n){if(e>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:r,body:n}}function Cc(t,e){return{type:"Regex",body:Ge(e==null?void 0:e.body),flags:t}}function Jn(t){return{type:"Subroutine",ref:t}}function Ae(t,e){var i;const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e};let n=(i=r.unicodePropertyMap)==null?void 0:i.get(ft(t));if(!n){if(r.normalizeUnknownPropertyNames)n=Sc(t);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(x`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:n??t,negate:r.negate}}function Ic({flags:t,kind:e,name:r,negate:n,number:i}){switch(e){case"absence_repeater":return yc("repeater");case"atomic":return H({atomic:!0});case"capturing":return Xn(i,{name:r});case"group":return H({flags:t});case"lookahead":case"lookbehind":return ue({behind:e==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${e}"`)}}function Ge(t){if(t===void 0)t=[ge()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function Kn(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Mr(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Gr(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function Rc(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function Sc(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function ft(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Br(t,e){const r=e;return Ie(t,`Unclosed character class${(r==null?void 0:r.type)==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Fr(t){return Ie(t,"Unclosed group")}function Te(t,e,r=null){function n(s,o){for(let a=0;a<s.length;a++){const c=i(s[a],o,a,s);a=Math.max(-1,a+c)}}function i(s,o=null,a=null,c=null){var w,y;let l=0,p=!1;const d={node:s,parent:o,key:a,container:c,root:t,remove(){He(c).splice(Math.max(0,Ee(a)+l),1),l--,p=!0},removeAllNextSiblings(){return He(c).splice(Ee(a)+1)},removeAllPrevSiblings(){const E=Ee(a)+l;return l-=E,He(c).splice(0,Math.max(0,E))},replaceWith(E,A={}){const v=!!A.traverse;c?c[Math.max(0,Ee(a)+l)]=E:Ie(o,"Can't replace root node")[a]=E,v&&i(E,o,a,c),p=!0},replaceWithMultiple(E,A={}){const v=!!A.traverse;if(He(c).splice(Math.max(0,Ee(a)+l),1,...E),l+=E.length-1,v){let I=0;for(let R=0;R<E.length;R++)I+=i(E[R],o,Ee(a)+R+I,c)}p=!0},skip(){p=!0}},{type:h}=s,f=e["*"],m=e[h],_=typeof f=="function"?f:f==null?void 0:f.enter,b=typeof m=="function"?m:m==null?void 0:m.enter;if(_==null||_(d,r),b==null||b(d,r),!p)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(s.min,s,"min"),i(s.max,s,"max");break;case"Quantifier":i(s.body,s,"body");break;case"Regex":n(s.body,s),i(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${h}"`)}return(w=m==null?void 0:m.exit)==null||w.call(m,d,r),(y=f==null?void 0:f.exit)==null||y.call(f,d,r),l}return i(t),t}function He(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Ee(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const kc=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Tc(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function Lc(t,e,r,n){return t.slice(0,e)+n+t.slice(e+r.length)}const U=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function sr(t,e,r,n){const i=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let o=0,a="";for(const c of t.matchAll(i)){const{0:l,groups:{$skip:p}}=c;if(!p&&(!n||n===U.DEFAULT==!o)){r instanceof Function?a+=r(c,{context:o?U.CHAR_CLASS:U.DEFAULT,negated:s[s.length-1]}):a+=r;continue}l[0]==="["?(o++,s.push(l[1]==="^")):l==="]"&&o&&(o--,s.pop()),a+=l}return a}function Zn(t,e,r,n){sr(t,e,r,n)}function Pc(t,e,r=0,n){if(!new RegExp(e,"su").test(t))return null;const i=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let s=0,o;for(;o=i.exec(t);){const{0:a,groups:{$skip:c}}=o;if(!c&&(!n||n===U.DEFAULT==!s))return o;a==="["?s++:a==="]"&&s&&s--,i.lastIndex==o.index&&i.lastIndex++}return null}function ze(t,e,r){return!!Pc(t,e,0,r)}function Oc(t,e){const r=/\\?./gsu;r.lastIndex=e;let n=t.length,i=0,s=1,o;for(;o=r.exec(t);){const[a]=o;if(a==="[")i++;else if(i)a==="]"&&i--;else if(a==="(")s++;else if(a===")"&&(s--,!s)){n=o.index;break}}return t.slice(e,n)}const jr=new RegExp(String.raw`(?<noncapturingStart>${kc})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function xc(t,e){const r=(e==null?void 0:e.hiddenCaptures)??[];let n=(e==null?void 0:e.captureTransfers)??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:n,hiddenCaptures:r};const i="(?>",s="(?:(?=(",o=[0],a=[];let c=0,l=0,p=NaN,d;do{d=!1;let h=0,f=0,m=!1,_;for(jr.lastIndex=Number.isNaN(p)?0:p+s.length;_=jr.exec(t);){const{0:b,index:w,groups:{capturingStart:y,noncapturingStart:E}}=_;if(b==="[")h++;else if(h)b==="]"&&h--;else if(b===i&&!m)p=w,m=!0;else if(m&&E)f++;else if(y)m?f++:(c++,o.push(c+l));else if(b===")"&&m){if(!f){l++;const A=c+l;if(t=`${t.slice(0,p)}${s}${t.slice(p+i.length,w)}))<$$${A}>)${t.slice(w+1)}`,d=!0,a.push(A),Tc(r,A),n.size){const v=new Map;n.forEach((I,R)=>{v.set(R>=A?R+1:R,I.map(G=>G>=A?G+1:G))}),n=v}break}f--}}}while(d);return r.push(...a),t=sr(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:h,groups:{backrefNum:f,wrappedBackrefNum:m}})=>{if(f){const _=+f;if(_>o.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${o[_]}`}return`\\${m}`},U.DEFAULT),{pattern:t,captureTransfers:n,hiddenCaptures:r}}const Yn=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,kt=new RegExp(String.raw`
46
+ \\(?: \d+
47
+ | c[A-Za-z]
48
+ | [gk]<[^>]+>
49
+ | [pPu]\{[^\}]+\}
50
+ | u[A-Fa-f\d]{4}
51
+ | x[A-Fa-f\d]{2}
52
+ )
53
+ | \((?: \? (?: [:=!>]
54
+ | <(?:[=!]|[^>]+>)
55
+ | [A-Za-z\-]+:
56
+ | \(DEFINE\)
57
+ ))?
58
+ | (?<qBase>${Yn})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
59
+ | \\?.
60
+ `.replace(/\s+/g,""),"gsu");function Nc(t){if(!new RegExp(`${Yn}\\+`).test(t))return{pattern:t};const e=[];let r=null,n=null,i="",s=0,o;for(kt.lastIndex=0;o=kt.exec(t);){const{0:a,index:c,groups:{qBase:l,qMod:p,invalidQ:d}}=o;if(a==="[")s||(n=c),s++;else if(a==="]")s?s--:n=null;else if(!s)if(p==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${a}"`);let h=-1;if(/^\{\d+\}$/.test(l))t=Lc(t,c+l.length,p,"");else{if(i===")"||i==="]"){const f=i===")"?r:n;if(f===null)throw new Error(`Invalid unmatched "${i}"`);t=`${t.slice(0,f)}(?>${t.slice(f,c)}${l})${t.slice(c+a.length)}`}else t=`${t.slice(0,c-i.length)}(?>${i}${l})${t.slice(c+a.length)}`;h+=4}kt.lastIndex+=h}else a[0]==="("?e.push(c):a===")"&&(r=e.length?e.pop():null);i=a}return{pattern:t}}const j=String.raw,Dc=j`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,zt=j`\(\?R=(?<rDepth>[^\)]+)\)|${Dc}`,mt=j`\(\?<(?![=!])(?<captureName>[^>]+)>`,ei=j`${mt}|(?<unnamed>\()(?!\?)`,le=new RegExp(j`${mt}|${zt}|\(\?|\\?.`,"gsu"),Tt="Cannot use multiple overlapping recursions";function Vc(t,e){const{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...e};let i=(e==null?void 0:e.captureTransfers)??new Map;if(!new RegExp(zt,"su").test(t))return{pattern:t,captureTransfers:i,hiddenCaptures:r};if(n==="plugin"&&ze(t,j`\(\?\(DEFINE\)`,U.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=ze(t,j`\\[1-9]`,U.DEFAULT),a=new Map,c=[];let l=!1,p=0,d=0,h;for(le.lastIndex=0;h=le.exec(t);){const{0:f,groups:{captureName:m,rDepth:_,gRNameOrNum:b,gRDepth:w}}=h;if(f==="[")p++;else if(p)f==="]"&&p--;else if(_){if(Ur(_),l)throw new Error(Tt);if(o)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const y=t.slice(0,h.index),E=t.slice(le.lastIndex);if(ze(E,zt,U.DEFAULT))throw new Error(Tt);const A=+_-1;t=Wr(y,E,A,!1,r,s,d),i=zr(i,y,A,s.length,0,d);break}else if(b){Ur(w);let y=!1;for(const M of c)if(M.name===b||M.num===+b){if(y=!0,M.hasRecursedWithin)throw new Error(Tt);break}if(!y)throw new Error(j`Recursive \g cannot be used outside the referenced group "${n==="external"?b:j`\g<${b}&R=${w}>`}"`);const E=a.get(b),A=Oc(t,E);if(o&&ze(A,j`${mt}|\((?!\?)`,U.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=t.slice(E,h.index),I=A.slice(v.length+f.length),R=s.length,G=+w-1,N=Wr(v,I,G,!0,r,s,d);i=zr(i,v,G,s.length-R,R,d);const q=t.slice(0,E),_e=t.slice(E+A.length);t=`${q}${N}${_e}`,le.lastIndex+=N.length-f.length-v.length-I.length,c.forEach(M=>M.hasRecursedWithin=!0),l=!0}else if(m)d++,a.set(String(d),le.lastIndex),a.set(m,le.lastIndex),c.push({num:d,name:m});else if(f[0]==="("){const y=f==="(";y&&(d++,a.set(String(d),le.lastIndex)),c.push(y?{num:d}:{})}else f===")"&&c.pop()}return r.push(...s),{pattern:t,captureTransfers:i,hiddenCaptures:r}}function Ur(t){const e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function Wr(t,e,r,n,i,s,o){const a=new Set;n&&Zn(t+e,mt,({groups:{captureName:l}})=>{a.add(l)},U.DEFAULT);const c=[r,n?a:null,i,s,o];return`${t}${Hr(`(?:${t}`,"forward",...c)}(?:)${Hr(`${e})`,"backward",...c)}${e}`}function Hr(t,e,r,n,i,s,o){const c=p=>e==="forward"?p+2:r-p+2-1;let l="";for(let p=0;p<r;p++){const d=c(p);l+=sr(t,j`${ei}|\\k<(?<backref>[^>]+)>`,({0:h,groups:{captureName:f,unnamed:m,backref:_}})=>{if(_&&n&&!n.has(_))return h;const b=`_$${d}`;if(m||f){const w=o+s.length+1;return s.push(w),$c(i,w),m?h:`(?<${f}${b}>`}return j`\k<${_}${b}>`},U.DEFAULT)}return l}function $c(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function zr(t,e,r,n,i,s){if(t.size&&n){let o=0;Zn(e,ei,()=>o++,U.DEFAULT);const a=s-o+i,c=new Map;return t.forEach((l,p)=>{const d=(n-o*r)/r,h=o*r,f=p>a+o?p+n:p,m=[];for(const _ of l)if(_<=a)m.push(_);else if(_>a+o+d)m.push(_+n);else if(_<=a+o)for(let b=0;b<=r;b++)m.push(_+o*b);else for(let b=0;b<=r;b++)m.push(_+h+d*b);c.set(f,m)}),c}return t}var L=String.fromCodePoint,C=String.raw,z={},gt=globalThis.RegExp;z.flagGroups=(()=>{try{new gt("(?i:)")}catch{return!1}return!0})();z.unicodeSets=(()=>{try{new gt("[[]]","v")}catch{return!1}return!0})();z.bugFlagVLiteralHyphenIsRange=z.unicodeSets?(()=>{try{new gt(C`[\d\-a]`,"v")}catch{return!0}return!1})():!1;z.bugNestedClassIgnoresNegation=z.unicodeSets&&new gt("[[^a]]","v").test("a");function st(t,{enable:e,disable:r}){return{dotAll:!(r!=null&&r.dotAll)&&!!(e!=null&&e.dotAll||t.dotAll),ignoreCase:!(r!=null&&r.ignoreCase)&&!!(e!=null&&e.ignoreCase||t.ignoreCase)}}function Ve(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}function qt(t,e){return qr[t]>=qr[e]}function Mc(t,e){if(t==null)throw new Error(e??"Value expected");return t}var qr={ES2025:2025,ES2024:2024,ES2018:2018},Gc={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function ti(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!Gc[t.target])throw new Error(`Unexpected target "${t.target}"`);const e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=z.flagGroups?"ES2025":z.unicodeSets?"ES2024":"ES2018"),e}var Bc="[ -\r ]",Fc=new Set([L(304),L(305)]),K=C`[\p{L}\p{M}\p{N}\p{Pc}]`;function ri(t){if(Fc.has(t))return[t];const e=new Set,r=t.toLowerCase(),n=r.toUpperCase(),i=Wc.get(r),s=jc.get(r),o=Uc.get(r);return[...n].length===1&&e.add(n),o&&e.add(o),i&&e.add(i),e.add(r),s&&e.add(s),[...e]}var or=new Map(`C Other
61
+ Cc Control cntrl
62
+ Cf Format
63
+ Cn Unassigned
64
+ Co Private_Use
65
+ Cs Surrogate
66
+ L Letter
67
+ LC Cased_Letter
68
+ Ll Lowercase_Letter
69
+ Lm Modifier_Letter
70
+ Lo Other_Letter
71
+ Lt Titlecase_Letter
72
+ Lu Uppercase_Letter
73
+ M Mark Combining_Mark
74
+ Mc Spacing_Mark
75
+ Me Enclosing_Mark
76
+ Mn Nonspacing_Mark
77
+ N Number
78
+ Nd Decimal_Number digit
79
+ Nl Letter_Number
80
+ No Other_Number
81
+ P Punctuation punct
82
+ Pc Connector_Punctuation
83
+ Pd Dash_Punctuation
84
+ Pe Close_Punctuation
85
+ Pf Final_Punctuation
86
+ Pi Initial_Punctuation
87
+ Po Other_Punctuation
88
+ Ps Open_Punctuation
89
+ S Symbol
90
+ Sc Currency_Symbol
91
+ Sk Modifier_Symbol
92
+ Sm Math_Symbol
93
+ So Other_Symbol
94
+ Z Separator
95
+ Zl Line_Separator
96
+ Zp Paragraph_Separator
97
+ Zs Space_Separator
98
+ ASCII
99
+ ASCII_Hex_Digit AHex
100
+ Alphabetic Alpha
101
+ Any
102
+ Assigned
103
+ Bidi_Control Bidi_C
104
+ Bidi_Mirrored Bidi_M
105
+ Case_Ignorable CI
106
+ Cased
107
+ Changes_When_Casefolded CWCF
108
+ Changes_When_Casemapped CWCM
109
+ Changes_When_Lowercased CWL
110
+ Changes_When_NFKC_Casefolded CWKCF
111
+ Changes_When_Titlecased CWT
112
+ Changes_When_Uppercased CWU
113
+ Dash
114
+ Default_Ignorable_Code_Point DI
115
+ Deprecated Dep
116
+ Diacritic Dia
117
+ Emoji
118
+ Emoji_Component EComp
119
+ Emoji_Modifier EMod
120
+ Emoji_Modifier_Base EBase
121
+ Emoji_Presentation EPres
122
+ Extended_Pictographic ExtPict
123
+ Extender Ext
124
+ Grapheme_Base Gr_Base
125
+ Grapheme_Extend Gr_Ext
126
+ Hex_Digit Hex
127
+ IDS_Binary_Operator IDSB
128
+ IDS_Trinary_Operator IDST
129
+ ID_Continue IDC
130
+ ID_Start IDS
131
+ Ideographic Ideo
132
+ Join_Control Join_C
133
+ Logical_Order_Exception LOE
134
+ Lowercase Lower
135
+ Math
136
+ Noncharacter_Code_Point NChar
137
+ Pattern_Syntax Pat_Syn
138
+ Pattern_White_Space Pat_WS
139
+ Quotation_Mark QMark
140
+ Radical
141
+ Regional_Indicator RI
142
+ Sentence_Terminal STerm
143
+ Soft_Dotted SD
144
+ Terminal_Punctuation Term
145
+ Unified_Ideograph UIdeo
146
+ Uppercase Upper
147
+ Variation_Selector VS
148
+ White_Space space
149
+ XID_Continue XIDC
150
+ XID_Start XIDS`.split(/\s/).map(t=>[ft(t),t])),jc=new Map([["s",L(383)],[L(383),"s"]]),Uc=new Map([[L(223),L(7838)],[L(107),L(8490)],[L(229),L(8491)],[L(969),L(8486)]]),Wc=new Map([re(453),re(456),re(459),re(498),...Lt(8072,8079),...Lt(8088,8095),...Lt(8104,8111),re(8124),re(8140),re(8188)]),Hc=new Map([["alnum",C`[\p{Alpha}\p{Nd}]`],["alpha",C`\p{Alpha}`],["ascii",C`\p{ASCII}`],["blank",C`[\p{Zs}\t]`],["cntrl",C`\p{Cc}`],["digit",C`\p{Nd}`],["graph",C`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",C`\p{Lower}`],["print",C`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",C`[\p{P}\p{S}]`],["space",C`\p{space}`],["upper",C`\p{Upper}`],["word",C`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",C`\p{AHex}`]]);function zc(t,e){const r=[];for(let n=t;n<=e;n++)r.push(n);return r}function re(t){const e=L(t);return[e.toLowerCase(),e]}function Lt(t,e){return zc(t,e).map(r=>re(r))}var ni=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function qc(t,e){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};ii(t);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:qt(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};Te(t,Xc,n);const i={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};Te(t,Qc,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Te(t,Jc,o),t._originMap=s.groupOriginByCopy,t._strategy=n.strategy,t}var Xc={AbsenceFunction({node:t,parent:e,replaceWith:r}){const{body:n,kind:i}=t;if(i==="repeater"){const s=H();s.body[0].body.push(ue({negate:!0,body:n}),Ae("Any"));const o=H();o.body[0].body.push(Qn("greedy",0,1/0,s)),r(k(o,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:r},{flagDirectivesByAlt:n}){const i=t.body.filter(s=>s.kind==="flags");for(let s=r+1;s<e.body.length;s++){const o=e.body[s];Ve(n,o,[]).push(...i)}},exit({node:t},{flagDirectivesByAlt:e}){var r;if((r=e.get(t))!=null&&r.length){const n=oi(e.get(t));if(n){const i=H({flags:n});i.body[0].body=t.body,t.body=[k(i,t)]}}}},Assertion({node:t,parent:e,key:r,container:n,root:i,remove:s,replaceWith:o},a){const{kind:c,negate:l}=t,{asciiWordBoundaries:p,avoidSubclass:d,supportedGNodes:h,wordIsAscii:f}=a;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if(c==="line_end")o(k(ue({body:[ge({body:[Ut("string_end")]}),ge({body:[ht(10)]})]}),e));else if(c==="line_start")o(k(Z(C`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(c==="search_start")if(h.has(t))i.flags.sticky=!0,s();else{const m=n[r-1];if(m&&rl(m))o(k(ue({negate:!0}),e));else{if(d)throw new Error(C`Uses "\G" in a way that requires a subclass`);o(ne(Ut("string_start"),e)),a.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")o(k(Z(C`(?=\n?\z)`),e));else if(c==="word_boundary"){if(!f&&!p){const m=`(?:(?<=${K})(?!${K})|(?<!${K})(?=${K}))`,_=`(?:(?<=${K})(?=${K})|(?<!${K})(?!${K}))`;o(k(Z(l?_:m),e))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!Ot(r)&&(r=Pt(r,e),t.ref=r)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:r}){let{name:n}=t;n&&!Ot(n)&&(n=Pt(n,e),t.name=n),r.set(t.number,t),n&&r.set(n,t)},CharacterClassRange({node:t,parent:e,replaceWith:r}){if(e.kind==="intersection"){const n=Qe({body:[t]});r(k(n,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:s,spaceIsAscii:o,wordIsAscii:a}){const{kind:c,negate:l,value:p}=t;if(s&&(c==="digit"||p==="digit")){r(ne(Ht("digit",{negate:l}),e));return}if(o&&(c==="space"||p==="space")){r(k(xt(Z(Bc),l),e));return}if(a&&(c==="word"||p==="word")){r(ne(Ht("word",{negate:l}),e));return}if(c==="any")r(ne(Ae("Any"),e));else if(c==="digit")r(ne(Ae("Nd",{negate:l}),e));else if(c!=="dot")if(c==="text_segment"){if(n==="strict")throw new Error(C`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",h=C`\p{RI}{2}|${d}(?:\u200D${d})*`;r(k(Z(C`(?>\r\n|${i?C`\p{RGI_Emoji}`:h}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(c==="hex")r(ne(Ae("AHex",{negate:l}),e));else if(c==="newline")r(k(Z(l?`[^
151
+ ]`:`(?>\r
152
+ ?|[
153
+ \v\f…\u2028\u2029])`),e));else if(c==="posix")if(!i&&(p==="graph"||p==="print")){if(n==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[p];l&&(d=`\0-${L(d.codePointAt(0)-1)}${L(d.codePointAt(2)+1)}-􏿿`),r(k(Z(`[${d}]`),e))}else r(k(xt(Z(Hc.get(p)),l),e));else if(c==="property")or.has(ft(p))||(t.key="sc");else if(c==="space")r(ne(Ae("space",{negate:l}),e));else if(c==="word")r(k(xt(Z(K),l),e));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:t,parent:e,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:a,flags:c}=t;if(a==="flags")if(!c.enable&&!c.disable)n();else{const l=H({flags:c});l.body[0].body=o(),i(k(l,e),{traverse:!0})}else if(a==="keep"){const l=r.body[0],d=r.body.length===1&&zn(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:r;if(e.parent!==d||d.body.length>1)throw new Error(C`Uses "\K" in a way that's unsupported`);const h=ue({behind:!0});h.body[0].body=s(),i(k(h,e))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete t[r]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:e,disable:r}=t.flags;e!=null&&e.extended&&delete e.extended,r!=null&&r.extended&&delete r.extended,e!=null&&e.dotAll&&(r!=null&&r.dotAll)&&delete e.dotAll,e!=null&&e.ignoreCase&&(r!=null&&r.ignoreCase)&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,r&&!Object.keys(r).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){const{kind:r}=t;r==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:r}){const{kind:n}=t;if(n==="fail")r(k(ue({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const e=H();e.body[0].body.push(t.body),t.body=k(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){const r=[];let n=!1,i=!1;for(const s of t.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const o=ci(s.body);o?(n=!0,Array.isArray(o)?r.push(...o):r.push(o)):i=!0}n&&!i&&r.forEach(s=>e.add(s))},exit(t,{accuracy:e,passedLookbehind:r,strategy:n}){if(e==="strict"&&r&&n)throw new Error(C`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!Ot(r)&&(r=Pt(r,e),t.ref=r)}},Qc={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:r}){const{orphan:n,ref:i}=t;n||r.set(t,[...e.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:a,reffedNodesByReferencer:c}){const l=i.get(t);if(l&&a.has(t.number)){const d=ne(Xr(t.number),e);c.set(d,a.get(t.number)),r(d);return}a.set(t.number,t),o.set(t.number,[]),t.name&&Ve(o,t.name,[]);const p=o.get(t.name??t.number);for(let d=0;d<p.length;d++){const h=p[d];if(l===h.node||l&&l===h.origin||t===h.origin){p.splice(d,1);break}}if(o.get(t.number).push({node:t,origin:l}),t.name&&o.get(t.name).push({node:t,origin:l}),t.name){const d=Ve(s,t.name,new Map);let h=!1;if(l)h=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){h=!0;break}s.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:h})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=st(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:r},n){const{isRecursive:i,ref:s}=t;if(i){let p=e;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===s||p.number===s)););n.reffedNodesByReferencer.set(t,p);return}const o=n.subroutineRefMap.get(s),a=s===0,c=a?Xr(0):si(o,n.groupOriginByCopy,null);let l=c;if(!a){const p=oi(Yc(o,h=>h.type==="Group"&&!!h.flags)),d=p?st(n.globalFlags,p):n.globalFlags;Kc(d,n.currentFlags)||(l=H({flags:el(d)}),l.body[0].body.push(c))}r(k(l,e),{traverse:!a})}},Jc={Backreference({node:t,parent:e,replaceWith:r},n){if(t.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,t.ref);return}const s=n.reffedNodesByReferencer.get(t).filter(o=>Zc(o,t));if(!s.length)r(k(ue({negate:!0}),e));else if(s.length>1){const o=H({atomic:!0,body:s.reverse().map(a=>ge({body:[Wt(a.number)]}))});r(k(o,e))}else t.ref=s[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){const r=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let n=0;n<r;n++){const i=Xn();t.body.at(-1).body.push(i)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function ii(t){Te(t,{"*"({node:e,parent:r}){e.parent=r}})}function Kc(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function Zc(t,e){let r=e;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===t)return!1;const n=ai(r.parent);for(const i of n){if(i===r)break;if(i===t||li(i,t))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function si(t,e,r,n){const i=Array.isArray(t)?[]:{};for(const[s,o]of Object.entries(t))s==="parent"?i.parent=Array.isArray(r)?n:r:o&&typeof o=="object"?i[s]=si(o,e,i,r):(s==="type"&&o==="CapturingGroup"&&e.set(i,e.get(t)??t),i[s]=o);return i}function Xr(t){const e=Jn(t);return e.isRecursive=!0,e}function Yc(t,e){const r=[];for(;t=t.parent;)(!e||e(t))&&r.push(t);return r}function Pt(t,e){if(e.has(t))return e.get(t);const r=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,r),r}function oi(t){const e=["dotAll","ignoreCase"],r={enable:{},disable:{}};return t.forEach(({flags:n})=>{e.forEach(i=>{var s,o;(s=n.enable)!=null&&s[i]&&(delete r.disable[i],r.enable[i]=!0),(o=n.disable)!=null&&o[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function el({dotAll:t,ignoreCase:e}){const r={};return(t||e)&&(r.enable={},t&&(r.enable.dotAll=!0),e&&(r.enable.ignoreCase=!0)),(!t||!e)&&(r.disable={},!t&&(r.disable.dotAll=!0),!e&&(r.disable.ignoreCase=!0)),r}function ai(t){if(!t)throw new Error("Node expected");const{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function ci(t){const e=t.find(r=>r.kind==="search_start"||nl(r,{negate:!1})||!tl(r));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){const r=[];for(const n of e.body){const i=ci(n.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function li(t,e){const r=ai(t)??[];for(const n of r)if(n===e||li(n,e))return!0;return!1}function tl({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function rl(t){const e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function nl(t,e){const r={negate:null,...e};return t.type==="LookaroundAssertion"&&(r.negate===null||t.negate===r.negate)&&t.body.length===1&&zn(t.body[0],{type:"Assertion",kind:"search_start"})}function Ot(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function Z(t,e){const n=qn(t,{...e,unicodePropertyMap:or}).body;return n.length>1||n[0].body.length>1?H({body:n}):n[0].body[0]}function xt(t,e){return t.negate=e,t}function ne(t,e){return t.parent=e,t}function k(t,e){return ii(t),t.parent=e,t}function il(t,e){const r=ti(e),n=qt(r.target,"ES2024"),i=qt(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,a=null;if(!i){const f=[t.flags.ignoreCase];Te(t,sl,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?o=!0:a=!0}})}const c={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||o)&&!a)};let l=t;const p={accuracy:r.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:t._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&o&&a),useFlagMods:i,useFlagV:n,verbose:r.verbose};function d(f){return p.lastNode=l,l=f,Mc(ol[f.type],`Unexpected node type "${f.type}"`)(f,p,d)}const h={pattern:t.body.map(d).join("|"),flags:d(t.flags),options:{...t.options}};return n||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],p.captureMap.forEach((f,m)=>{f.hidden&&h._hiddenCaptures.push(m),f.transferTo&&Ve(h._captureTransfers,f.transferTo,[]).push(m)}),h}var sl={"*":{enter({node:t},e){if(Jr(t)){const r=e.getCurrentModI();e.pushModI(t.flags?st({ignoreCase:r},t.flags).ignoreCase:r)}},exit({node:t},e){Jr(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){ar(L(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},r){e(),ui(t,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&ni.has(t.value)&&e.setHasCasedChar()}},ol={Alternative({body:t},e,r){return t.map(r).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?C`\B`:C`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,r){const{body:n,name:i,number:s}=t,o={ignoreCase:e.currentFlags.ignoreCase},a=e.originMap.get(t);return a&&(o.hidden=!0,s>a.number&&(o.transferTo=a.number)),e.captureMap.set(s,o),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:t},e){const r=L(t),n=be(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(n!==r)return n;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&ar(r)){const i=ri(r);return e.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(t,e,r){const{kind:n,negate:i,parent:s}=t;let{body:o}=t;if(n==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");z.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&o.some(Kr)&&(o=[ht(45),...o.filter(l=>!Kr(l))]);const a=()=>`[${i?"^":""}${o.map(r).join(n==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||z.bugNestedClassIgnoresNegation)&&!i){const p=o.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(p.length){const d=H(),h=d.body[0];return d.parent=s,h.parent=d,o=o.filter(f=>!p.includes(f)),t.body=o,o.length?(t.parent=h,h.body.push(t)):d.body.pop(),p.forEach(f=>{const m=ge({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),r(d)}}e.inCharClass=!0;const l=a();return e.inCharClass=!1,l}const c=o[0];if(n==="union"&&!i&&c&&((!e.useFlagV||!e.verbose)&&s.kind==="union"&&!(z.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&s.kind==="intersection"&&o.length===1&&c.type!=="CharacterClassRange"))return o.map(r).join("");if(!e.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(t,e){const r=t.min.value,n=t.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},s=be(r,i),o=be(n,i),a=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){const c=ui(t);dl(c).forEach(p=>{a.add(Array.isArray(p)?`${be(p[0],i)}-${be(p[1],i)}`:be(p,i))})}return`${s}-${o}${[...a].join("")}`},CharacterSet({kind:t,negate:e,value:r,key:n},i){if(t==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":C`[^\n]`;if(t==="digit")return e?C`\D`:C`\d`;if(t==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ni.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${e?C`\P`:C`\p`}{${n?`${n}=`:""}${r}}`}if(t==="word")return e?C`\W`:C`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:r,parent:n},i,s){const o=i.currentFlags;r&&(i.currentFlags=st(o,r));const a=e.map(s).join("|"),c=!i.verbose&&e.length===1&&n.type!=="Quantifier"&&!t&&(!i.useFlagMods||!r)?a:`(?${pl(t,r,i.useFlagMods)}${a})`;return i.currentFlags=o,c},LookaroundAssertion({body:t,kind:e,negate:r},n,i){return`(?${`${e==="lookahead"?"":"<"}${r?"!":"="}`}${t.map(i).join("|")})`},Quantifier(t,e,r){return r(t.body)+hl(t)},Subroutine({isRecursive:t,ref:e},r){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return e===0?`(?R=${n})`:C`\g<${e}&R=${n}>`}},al=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),cl=new Set(["-","\\","]","^","["]),ll=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Qr=new Map([[9,C`\t`],[10,C`\n`],[11,C`\v`],[12,C`\f`],[13,C`\r`],[8232,C`\u2028`],[8233,C`\u2029`],[65279,C`\uFEFF`]]),ul=new RegExp("^\\p{Cased}$","u");function ar(t){return ul.test(t)}function ui(t,e){const r=!!(e!=null&&e.firstOnly),n=t.min.value,i=t.max.value,s=[];if(n<65&&(i===65535||i>=131071)||n===65536&&i>=131071)return s;for(let o=n;o<=i;o++){const a=L(o);if(!ar(a))continue;const c=ri(a).filter(l=>{const p=l.codePointAt(0);return p<n||p>i});if(c.length&&(s.push(...c),r))break}return s}function be(t,{escDigit:e,inCharClass:r,useFlagV:n}){if(Qr.has(t))return Qr.get(t);if(t<32||t>126&&t<160||t>262143||e&&fl(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?n?ll:cl:al,s=L(t);return(i.has(s)?"\\":"")+s}function dl(t){const e=t.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),r=[];let n=null;for(let i=0;i<e.length;i++)e[i+1]===e[i]+1?n??(n=e[i]):n===null?r.push(e[i]):(r.push([n,e[i]]),n=null);return r}function pl(t,e,r){if(t)return">";let n="";if(e&&r){const{enable:i,disable:s}=e;n=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${n}:`}function hl({kind:t,max:e,min:r}){let n;return!r&&e===1?n="?":!r&&e===1/0?n="*":r===1&&e===1/0?n="+":r===e?n=`{${r}}`:n=`{${r},${e===1/0?"":e}}`,n+{greedy:"",lazy:"?",possessive:"+"}[t]}function Jr({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function fl(t){return t>47&&t<58}function Kr({type:t,value:e}){return t==="Character"&&e===45}var ie,Y,he,se,fe,$e,Xt,ae,ml=(ae=class extends RegExp{constructor(r,n,i){var e=(...wu)=>(super(...wu),ce(this,$e),ce(this,ie,new Map),ce(this,Y,null),ce(this,he),ce(this,se,null),ce(this,fe,null),g(this,"rawOptions",{}),this);const s=!!(i!=null&&i.lazyCompile);if(r instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const o=r;e(o,n),W(this,he,o.source),o instanceof ae&&(W(this,ie,$(o,ie)),W(this,se,$(o,se)),W(this,fe,$(o,fe)),this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...i};e(s?"":r,n),W(this,he,r),W(this,ie,_l(o.hiddenCaptures,o.transfers)),W(this,fe,o.strategy),this.rawOptions=i??{}}s||W(this,Y,this)}get source(){return $(this,he)||"(?:)"}exec(r){if(!$(this,Y)){const{lazyCompile:s,...o}=this.rawOptions;W(this,Y,new ae($(this,he),this.flags,o))}const n=this.global||this.sticky,i=this.lastIndex;if($(this,fe)==="clip_search"&&n&&i){this.lastIndex=0;const s=Et(this,$e,Xt).call(this,r.slice(i));return s&&(gl(s,i,r,this.hasIndices),this.lastIndex+=i),s}return Et(this,$e,Xt).call(this,r)}},ie=new WeakMap,Y=new WeakMap,he=new WeakMap,se=new WeakMap,fe=new WeakMap,$e=new WeakSet,Xt=function(r){$(this,Y).lastIndex=this.lastIndex;const n=dr(ae.prototype,this,"exec").call($(this,Y),r);if(this.lastIndex=$(this,Y).lastIndex,!n||!$(this,ie).size)return n;const i=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);const o=[0];for(let a=1;a<i.length;a++){const{hidden:c,transferTo:l}=$(this,ie).get(a)??{};if(c?o.push(null):(o.push(n.length),n.push(i[a]),this.hasIndices&&n.indices.push(s[a])),l&&i[a]!==void 0){const p=o[l];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(n[p]=i[a],this.hasIndices&&(n.indices[p]=s[a]),n.groups){$(this,se)||W(this,se,yl(this.source));const d=$(this,se).get(l);d&&(n.groups[d]=i[a],this.hasIndices&&(n.indices.groups[d]=s[a]))}}}return n},ae);function gl(t,e,r,n){if(t.index+=e,t.input=r,n){const i=t.indices;for(let o=0;o<i.length;o++){const a=i[o];a&&(i[o]=[a[0]+e,a[1]+e])}const s=i.groups;s&&Object.keys(s).forEach(o=>{const a=s[o];a&&(s[o]=[a[0]+e,a[1]+e])})}}function _l(t,e){const r=new Map;for(const n of t)r.set(n,{hidden:!0});for(const[n,i]of e)for(const s of i)Ve(r,s,{}).transferTo=n;return r}function yl(t){const e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n=0,i=0,s;for(;s=e.exec(t);){const{0:o,groups:{capture:a,name:c}}=s;o==="["?n++:n?o==="]"&&n--:a&&(i++,c&&r.set(i,c))}return r}function El(t,e){const r=bl(t,e);return r.options?new ml(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function bl(t,e){const r=ti(e),n=qn(t,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:or}),i=qc(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),s=il(i,r),o=Vc(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=Nc(o.pattern),c=xc(a.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),l={pattern:c.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=c.hiddenCaptures.sort((m,_)=>m-_),d=Array.from(c.captureTransfers),h=i._strategy,f=l.pattern.length>=r.lazyCompileLength;(p.length||d.length||h||f)&&(l.options={...p.length&&{hiddenCaptures:p},...d.length&&{transfers:d},...h&&{strategy:h},...f&&{lazyCompile:f}})}return l}function wl(t,e){return El(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function Ml(t={}){const e={target:"auto",cache:new Map,...t};return e.regexConstructor||(e.regexConstructor=r=>wl(r,{target:e.target})),{createScanner(r){return new $a(r,e)},createString(r){return{content:r}}}}export{S as ShikiError,Vn as addClassToHast,oe as applyColorReplacements,ki as bundledLanguages,Si as bundledLanguagesAlias,Ri as bundledLanguagesBase,Yr as bundledLanguagesInfo,Li as bundledThemes,Ti as bundledThemesInfo,Ol as codeToHast,Pl as codeToHtml,xl as codeToTokens,Nl as codeToTokensBase,Dl as codeToTokensWithThemes,xa as createBundledHighlighter,Ll as createCssVariablesTheme,Va as createHighlighter,Bn as createHighlighterCore,kl as createHighlighterCoreSync,Ml as createJavaScriptRegexEngine,Xi as createOnigurumaEngine,sa as createPositionConverter,Sl as createShikiInternal,Rl as createShikiInternalSync,Yt as createShikiPrimitive,Rn as createShikiPrimitiveAsync,Da as createSingletonShorthands,wl as defaultJavaScriptRegexConstructor,da as flatTokenVariants,$l as getLastGrammarState,Vl as getSingletonHighlighter,Tl as getSingletonHighlighterCore,rt as getTokenStyleObject,oa as guessEmbeddedLanguages,Pa as hastToHtml,lt as isNoneTheme,ct as isPlainLang,wn as isSpecialLang,An as isSpecialTheme,tn as loadWasm,Na as makeSingletonHighlighter,Oa as makeSingletonHighlighterCore,bn as normalizeGetter,Zt as normalizeTheme,tt as resolveColorReplacements,ut as splitLines,ca as splitToken,ua as splitTokens,jt as stringifyTokenStyle,Vs as toArray,Ca as tokenizeAnsiWithTheme,Ws as tokenizeWithTheme,Sa as tokensToHast,pa as transformerDecorations};