codemini-cli 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OPERATIONS.md +1 -1
- package/README.md +25 -25
- package/codemini-web/dist/assets/abap-9R7RjkQK.js +1 -0
- package/codemini-web/dist/assets/actionscript-3-CNowah7a.js +1 -0
- package/codemini-web/dist/assets/ada-D5HmrmpD.js +1 -0
- package/codemini-web/dist/assets/andromeeda-i_b3g2bn.js +1 -0
- package/codemini-web/dist/assets/{angular-html-Cde9qVP5.js → angular-html-CHsdtmkx.js} +1 -1
- package/codemini-web/dist/assets/angular-html-DlSp9HPG.js +1 -0
- package/codemini-web/dist/assets/{angular-ts-DefScAWP.js → angular-ts-B29Ypg6B.js} +1 -1
- package/codemini-web/dist/assets/angular-ts-JNDGGWj0.js +1 -0
- package/codemini-web/dist/assets/apache-D37U8o0r.js +1 -0
- package/codemini-web/dist/assets/apex-CszkG4lQ.js +1 -0
- package/codemini-web/dist/assets/apl-BASZ7uB_.js +1 -0
- package/codemini-web/dist/assets/{apl-w753UHCW.js → apl-Byuv-g-O.js} +1 -1
- package/codemini-web/dist/assets/applescript-Ajt9gmC_.js +1 -0
- package/codemini-web/dist/assets/ara-DpGk8XWf.js +1 -0
- package/codemini-web/dist/assets/asciidoc-BdDORSgx.js +1 -0
- package/codemini-web/dist/assets/asm-DGLRM3OU.js +1 -0
- package/codemini-web/dist/assets/{astro-DBA9Da7s.js → astro-CTzEugGW.js} +1 -1
- package/codemini-web/dist/assets/astro-l-XABzN2.js +1 -0
- package/codemini-web/dist/assets/aurora-x-DdfqxvM_.js +1 -0
- package/codemini-web/dist/assets/awk-B-J9te9x.js +1 -0
- package/codemini-web/dist/assets/ayu-dark-BdNJk5qF.js +1 -0
- package/codemini-web/dist/assets/ayu-light-DkLNbAkT.js +1 -0
- package/codemini-web/dist/assets/ayu-mirage-BoyGjGHX.js +1 -0
- package/codemini-web/dist/assets/ballerina-CZ8CAKmi.js +1 -0
- package/codemini-web/dist/assets/bat-fNtaIqKE.js +1 -0
- package/codemini-web/dist/assets/beancount-9imagnS2.js +1 -0
- package/codemini-web/dist/assets/berry-QTBYpUPn.js +1 -0
- package/codemini-web/dist/assets/bibtex-CzFWvn9u.js +1 -0
- package/codemini-web/dist/assets/bicep-DLWEubga.js +1 -0
- package/codemini-web/dist/assets/bird2-V7dWeQhQ.js +1 -0
- package/codemini-web/dist/assets/blade-B3_bxlV2.js +1 -0
- package/codemini-web/dist/assets/{blade-B-u5p0Rp.js → blade-Dt6km9YT.js} +1 -1
- package/codemini-web/dist/assets/bsl-D3u1l2dW.js +1 -0
- package/codemini-web/dist/assets/c-CgTSul4N.js +1 -0
- package/codemini-web/dist/assets/c3-SmmwBAzR.js +1 -0
- package/codemini-web/dist/assets/cadence-DVNAI4pJ.js +1 -0
- package/codemini-web/dist/assets/cairo-CoQzhJ_o.js +1 -0
- package/codemini-web/dist/assets/catppuccin-frappe-DXCXlnyU.js +1 -0
- package/codemini-web/dist/assets/catppuccin-latte-BXW2qYGv.js +1 -0
- package/codemini-web/dist/assets/catppuccin-macchiato--32cesHH.js +1 -0
- package/codemini-web/dist/assets/catppuccin-mocha-BBRFilGN.js +1 -0
- package/codemini-web/dist/assets/clarity-BJs8u8xG.js +1 -0
- package/codemini-web/dist/assets/clojure-DpYoDXXl.js +1 -0
- package/codemini-web/dist/assets/cmake-CdseusyP.js +1 -0
- package/codemini-web/dist/assets/{cobol-CkQrskif.js → cobol-D_kesMA-.js} +1 -1
- package/codemini-web/dist/assets/cobol-DqhY5el-.js +1 -0
- package/codemini-web/dist/assets/codeowners-5EAeZxPo.js +1 -0
- package/codemini-web/dist/assets/codeql-OkUuMGe9.js +1 -0
- package/codemini-web/dist/assets/coffee-DF15_0rk.js +1 -0
- package/codemini-web/dist/assets/common-lisp-DCRDlc4V.js +1 -0
- package/codemini-web/dist/assets/coq-acwo70uY.js +1 -0
- package/codemini-web/dist/assets/cpp-Cudwe5mG.js +1 -0
- package/codemini-web/dist/assets/{crystal-Dh09vXLx.js → crystal-Bw1_1hFA.js} +1 -1
- package/codemini-web/dist/assets/crystal-DV9Nijjb.js +1 -0
- package/codemini-web/dist/assets/csharp-Cqz84DXU.js +1 -0
- package/codemini-web/dist/assets/css-z2ijrDWT.js +1 -0
- package/codemini-web/dist/assets/csv-CqpUSPyF.js +1 -0
- package/codemini-web/dist/assets/cue-D4-Hq7Jx.js +1 -0
- package/codemini-web/dist/assets/cypher-CXMVfSpG.js +1 -0
- package/codemini-web/dist/assets/d-Cc_KoyiC.js +1 -0
- package/codemini-web/dist/assets/dark-plus-C0kLyDb3.js +1 -0
- package/codemini-web/dist/assets/dart-CVd7TDni.js +1 -0
- package/codemini-web/dist/assets/dax-DtoJMuz5.js +1 -0
- package/codemini-web/dist/assets/desktop-BkIJ2CMP.js +1 -0
- package/codemini-web/dist/assets/diff-RUsawely.js +1 -0
- package/codemini-web/dist/assets/docker-CDpVZYy7.js +1 -0
- package/codemini-web/dist/assets/dotenv-DWnlamm2.js +1 -0
- package/codemini-web/dist/assets/dracula-QP8aKUFB.js +1 -0
- package/codemini-web/dist/assets/dracula-soft-BNzyYlRI.js +1 -0
- package/codemini-web/dist/assets/dream-maker-MNBsfIGU.js +1 -0
- package/codemini-web/dist/assets/{edge-CCRtknu5.js → edge-BosfXYh1.js} +1 -1
- package/codemini-web/dist/assets/edge-r5NIe9Lp.js +1 -0
- package/codemini-web/dist/assets/{elixir-5EYbFEoC.js → elixir-B04apOJS.js} +1 -1
- package/codemini-web/dist/assets/elixir-Dw_vsdUl.js +1 -0
- package/codemini-web/dist/assets/elm-DPfFNNkG.js +1 -0
- package/codemini-web/dist/assets/emacs-lisp-BHIDiQRU.js +1 -0
- package/codemini-web/dist/assets/{erb-C6pPz4fX.js → erb-BNioEFKQ.js} +1 -1
- package/codemini-web/dist/assets/erb-DZuoCU5t.js +1 -0
- package/codemini-web/dist/assets/erlang-CqHCISqs.js +1 -0
- package/codemini-web/dist/assets/everforest-dark-DSK976eP.js +1 -0
- package/codemini-web/dist/assets/everforest-light-BkaBVm1r.js +1 -0
- package/codemini-web/dist/assets/fennel-BsP4yvxI.js +1 -0
- package/codemini-web/dist/assets/fish-CimYqIk1.js +1 -0
- package/codemini-web/dist/assets/fluent-O-Iic89O.js +1 -0
- package/codemini-web/dist/assets/fortran-fixed-form-60ZQAHDk.js +1 -0
- package/codemini-web/dist/assets/fortran-free-form-BVNtEstX.js +1 -0
- package/codemini-web/dist/assets/fsharp-Ch5ZVinn.js +1 -0
- package/codemini-web/dist/assets/gdresource-CqNLhJW1.js +1 -0
- package/codemini-web/dist/assets/gdscript-D-FJCTl3.js +1 -0
- package/codemini-web/dist/assets/gdshader-Czvzt8dR.js +1 -0
- package/codemini-web/dist/assets/genie-Mnf_jXpg.js +1 -0
- package/codemini-web/dist/assets/gherkin-DzkYuFEO.js +1 -0
- package/codemini-web/dist/assets/git-commit-CSWECvqq.js +1 -0
- package/codemini-web/dist/assets/git-rebase-MUvuytPe.js +1 -0
- package/codemini-web/dist/assets/github-dark-C98YWDhk.js +1 -0
- package/codemini-web/dist/assets/github-dark-default-CDGuVkyn.js +1 -0
- package/codemini-web/dist/assets/github-dark-dimmed-CarTohA3.js +1 -0
- package/codemini-web/dist/assets/github-dark-high-contrast-CsjOICAd.js +1 -0
- package/codemini-web/dist/assets/github-light-D17m3GP4.js +1 -0
- package/codemini-web/dist/assets/github-light-default-DiMoa1ZI.js +1 -0
- package/codemini-web/dist/assets/github-light-high-contrast-DGwHD8Ty.js +1 -0
- package/codemini-web/dist/assets/gleam-MAXpOqqF.js +1 -0
- package/codemini-web/dist/assets/{glimmer-js-C4PTXfaW.js → glimmer-js-Dn6vjgHP.js} +1 -1
- package/codemini-web/dist/assets/glimmer-js-HDDEErW7.js +1 -0
- package/codemini-web/dist/assets/glimmer-ts-Dq0_BflX.js +1 -0
- package/codemini-web/dist/assets/{glimmer-ts-Df1V6YK_.js → glimmer-ts-mq-Q_zEE.js} +1 -1
- package/codemini-web/dist/assets/glsl-C4rvog10.js +1 -0
- package/codemini-web/dist/assets/gn-BNADkWgR.js +1 -0
- package/codemini-web/dist/assets/gnuplot-BRQvwTQM.js +1 -0
- package/codemini-web/dist/assets/go-iV8pwUYW.js +1 -0
- package/codemini-web/dist/assets/graphql-Dg0Ewf8Q.js +1 -0
- package/codemini-web/dist/assets/groovy-CxG1cXrE.js +1 -0
- package/codemini-web/dist/assets/gruvbox-dark-hard-Cnb1fzry.js +1 -0
- package/codemini-web/dist/assets/gruvbox-dark-medium-Cu5j8v_d.js +1 -0
- package/codemini-web/dist/assets/gruvbox-dark-soft-BghHDwrM.js +1 -0
- package/codemini-web/dist/assets/gruvbox-light-hard-BUhLUxUB.js +1 -0
- package/codemini-web/dist/assets/gruvbox-light-medium-GXeiXGL9.js +1 -0
- package/codemini-web/dist/assets/gruvbox-light-soft-pTZgKx7j.js +1 -0
- package/codemini-web/dist/assets/{hack-zJL_tEH0.js → hack-DeD259o6.js} +1 -1
- package/codemini-web/dist/assets/hack-DjE76gIx.js +1 -0
- package/codemini-web/dist/assets/{haml-qjVLLTZk.js → haml-B8MRe8CS.js} +1 -1
- package/codemini-web/dist/assets/haml-DyIc_iO2.js +1 -0
- package/codemini-web/dist/assets/handlebars-DQ4X08Zf.js +1 -0
- package/codemini-web/dist/assets/{handlebars-B3RyMMk0.js → handlebars-GoJyzhp1.js} +1 -1
- package/codemini-web/dist/assets/haskell-BZ8bGMYA.js +1 -0
- package/codemini-web/dist/assets/haxe-1eAUKQ0B.js +1 -0
- package/codemini-web/dist/assets/hcl-DQqvKq2I.js +1 -0
- package/codemini-web/dist/assets/{highlighted-body-OFNGDK62-0FuBVb0_.js → highlighted-body-OFNGDK62-CDUecv8k.js} +1 -1
- package/codemini-web/dist/assets/hjson-DNWMSWLN.js +1 -0
- package/codemini-web/dist/assets/hlsl-Df5oFh9i.js +1 -0
- package/codemini-web/dist/assets/horizon-BCbhfxa1.js +1 -0
- package/codemini-web/dist/assets/horizon-bright-B0vmEjwb.js +1 -0
- package/codemini-web/dist/assets/houston-DHnjBE42.js +1 -0
- package/codemini-web/dist/assets/{html-DP-V-rfg.js → html-B7kk5NVw.js} +1 -1
- package/codemini-web/dist/assets/html-GfHBuoLs.js +1 -0
- package/codemini-web/dist/assets/{html-derivative-DB9UhNDN.js → html-derivative-Ba28nVB3.js} +1 -1
- package/codemini-web/dist/assets/html-derivative-ChSmSZXY.js +1 -0
- package/codemini-web/dist/assets/http-DMTBhQm8.js +1 -0
- package/codemini-web/dist/assets/hurl-XIpACwjS.js +1 -0
- package/codemini-web/dist/assets/hxml-PnV_FpS-.js +1 -0
- package/codemini-web/dist/assets/hy-DaILHjW8.js +1 -0
- package/codemini-web/dist/assets/imba-BA6_JyKt.js +1 -0
- package/codemini-web/dist/assets/index-Cfk9ARKs.js +426 -0
- package/codemini-web/dist/assets/index-Dqq2DCEb.css +2 -0
- package/codemini-web/dist/assets/ini-DqXMcqXm.js +1 -0
- package/codemini-web/dist/assets/java-Ds1cyVrp.js +1 -0
- package/codemini-web/dist/assets/javascript-Cx8CXBJR.js +1 -0
- package/codemini-web/dist/assets/{jinja-BcRTlqOI.js → jinja-8ATGhxJO.js} +1 -1
- package/codemini-web/dist/assets/jinja-Dx5IcFSt.js +1 -0
- package/codemini-web/dist/assets/jison-CSsYnr7O.js +1 -0
- package/codemini-web/dist/assets/json-CY14kIzN.js +1 -0
- package/codemini-web/dist/assets/json5-Cus7zL-r.js +1 -0
- package/codemini-web/dist/assets/jsonc-RzqrtWTz.js +1 -0
- package/codemini-web/dist/assets/jsonl-CLcLUtvq.js +1 -0
- package/codemini-web/dist/assets/jsonnet--7yRuAzt.js +1 -0
- package/codemini-web/dist/assets/jssm-Cid5Rr2Y.js +1 -0
- package/codemini-web/dist/assets/jsx-DmH5dwMF.js +1 -0
- package/codemini-web/dist/assets/julia-vjG00jwO.js +1 -0
- package/codemini-web/dist/assets/{just-O9z-zIlY.js → just-BlUYrdKb.js} +1 -1
- package/codemini-web/dist/assets/just-C7G3KFgN.js +1 -0
- package/codemini-web/dist/assets/kanagawa-dragon-BxDDNs-7.js +1 -0
- package/codemini-web/dist/assets/kanagawa-lotus-BQyifewU.js +1 -0
- package/codemini-web/dist/assets/kanagawa-wave-BsJGVIZT.js +1 -0
- package/codemini-web/dist/assets/kdl-D2MbAIKj.js +1 -0
- package/codemini-web/dist/assets/kotlin-fpq87Jdo.js +1 -0
- package/codemini-web/dist/assets/kusto-BcKmLn2p.js +1 -0
- package/codemini-web/dist/assets/laserwave-CrjhMkHv.js +1 -0
- package/codemini-web/dist/assets/latex-D8-NgtPj.js +1 -0
- package/codemini-web/dist/assets/lean-B9Xp-kaJ.js +1 -0
- package/codemini-web/dist/assets/less-BKjOc0Gl.js +1 -0
- package/codemini-web/dist/assets/light-plus-DFt9HI_B.js +1 -0
- package/codemini-web/dist/assets/{liquid-BK2PyMjt.js → liquid-BUh7yINm.js} +1 -1
- package/codemini-web/dist/assets/liquid-D2m0XXrV.js +1 -0
- package/codemini-web/dist/assets/llvm-XDy97SdL.js +1 -0
- package/codemini-web/dist/assets/log-tjGJZ7jx.js +1 -0
- package/codemini-web/dist/assets/logo-rCQwad-6.js +1 -0
- package/codemini-web/dist/assets/lua-BeSXusec.js +1 -0
- package/codemini-web/dist/assets/luau-C0wE4YeK.js +1 -0
- package/codemini-web/dist/assets/make-DZENZd8z.js +1 -0
- package/codemini-web/dist/assets/markdown-CbgVmtS5.js +1 -0
- package/codemini-web/dist/assets/marko-DPnRthJQ.js +1 -0
- package/codemini-web/dist/assets/{marko-CTEKS39A.js → marko-Dm8xPXkG.js} +1 -1
- package/codemini-web/dist/assets/material-theme-YhiuxyiP.js +1 -0
- package/codemini-web/dist/assets/material-theme-darker-CKeuyK7B.js +1 -0
- package/codemini-web/dist/assets/material-theme-lighter-C56RzTfM.js +1 -0
- package/codemini-web/dist/assets/material-theme-ocean-DUos8xKe.js +1 -0
- package/codemini-web/dist/assets/material-theme-palenight-CZBKx4B1.js +1 -0
- package/codemini-web/dist/assets/matlab-BJwkjxyL.js +1 -0
- package/codemini-web/dist/assets/mdc-BLdFHYKv.js +1 -0
- package/codemini-web/dist/assets/{mdc-BOaCYzzL.js → mdc-Dzipcsdb.js} +1 -1
- package/codemini-web/dist/assets/mdx-BvkytFG9.js +1 -0
- package/codemini-web/dist/assets/mermaid-Ctx7uNrT.js +1 -0
- package/codemini-web/dist/assets/mermaid-GHXKKRXX-BWSxGKNn.js +1 -0
- package/codemini-web/dist/assets/min-dark-BA-rwgF3.js +1 -0
- package/codemini-web/dist/assets/min-light-DHUVhXnm.js +1 -0
- package/codemini-web/dist/assets/mipsasm-ByaU0dEX.js +1 -0
- package/codemini-web/dist/assets/mojo-CqhYERP_.js +1 -0
- package/codemini-web/dist/assets/monokai-D3MyQCxG.js +1 -0
- package/codemini-web/dist/assets/moonbit-C4BfwLm6.js +1 -0
- package/codemini-web/dist/assets/move-DOj5FawL.js +1 -0
- package/codemini-web/dist/assets/narrat-CDHYPJWr.js +1 -0
- package/codemini-web/dist/assets/{nextflow-Cto1mpL3.js → nextflow-BRiWOV-p.js} +1 -1
- package/codemini-web/dist/assets/nextflow-c8YCPRRb.js +1 -0
- package/codemini-web/dist/assets/nextflow-groovy-D6rYlJlL.js +1 -0
- package/codemini-web/dist/assets/nginx-u-hq5m-a.js +1 -0
- package/codemini-web/dist/assets/night-owl-NHZjGVLB.js +1 -0
- package/codemini-web/dist/assets/night-owl-light-DcKosvl7.js +1 -0
- package/codemini-web/dist/assets/nim-B5b6_jZr.js +1 -0
- package/codemini-web/dist/assets/{nim-BZyx58NM.js → nim-CvgRYLO2.js} +1 -1
- package/codemini-web/dist/assets/nix-Csr5leD-.js +1 -0
- package/codemini-web/dist/assets/nord-DomFMWpF.js +1 -0
- package/codemini-web/dist/assets/nushell-IZVQdI7Z.js +1 -0
- package/codemini-web/dist/assets/objective-c-DD1i5sf2.js +1 -0
- package/codemini-web/dist/assets/objective-cpp-CtzOCe2w.js +1 -0
- package/codemini-web/dist/assets/ocaml-BlMDMjEj.js +1 -0
- package/codemini-web/dist/assets/odin-CoWSDSNi.js +1 -0
- package/codemini-web/dist/assets/one-dark-pro-DWENJxB_.js +1 -0
- package/codemini-web/dist/assets/one-light-CEeF6aqP.js +1 -0
- package/codemini-web/dist/assets/openscad-D3gRRPUh.js +1 -0
- package/codemini-web/dist/assets/pascal-G3gJIkHz.js +1 -0
- package/codemini-web/dist/assets/{perl-BW8t13Xq.js → perl-BIcNvyL6.js} +1 -1
- package/codemini-web/dist/assets/perl-DdF12AsD.js +1 -0
- package/codemini-web/dist/assets/php-BP-3TkW_.js +1 -0
- package/codemini-web/dist/assets/{php-Cq5FOhfR.js → php-CyQZnE0l.js} +1 -1
- package/codemini-web/dist/assets/pierre-dark-CBqOR10c.js +1 -0
- package/codemini-web/dist/assets/pierre-light-sgwdVCEP.js +1 -0
- package/codemini-web/dist/assets/pkl-DdsryWcC.js +1 -0
- package/codemini-web/dist/assets/plastic-CwUA_4-2.js +1 -0
- package/codemini-web/dist/assets/plsql-C2yEtnCG.js +1 -0
- package/codemini-web/dist/assets/po-Dy7ytuR1.js +1 -0
- package/codemini-web/dist/assets/poimandres-u68WOWhl.js +1 -0
- package/codemini-web/dist/assets/polar-CjLVWIyd.js +1 -0
- package/codemini-web/dist/assets/postcss-DiNtjF5e.js +1 -0
- package/codemini-web/dist/assets/powerquery-iC4Ra9LJ.js +1 -0
- package/codemini-web/dist/assets/powershell-Ch2YpFAx.js +1 -0
- package/codemini-web/dist/assets/prisma-HWctQCpn.js +1 -0
- package/codemini-web/dist/assets/prolog-DHAsH4Hf.js +1 -0
- package/codemini-web/dist/assets/proto-mTghX89X.js +1 -0
- package/codemini-web/dist/assets/pug-HwoxZo9M.js +1 -0
- package/codemini-web/dist/assets/{pug-B4WHazil.js → pug-_XoIcKf3.js} +1 -1
- package/codemini-web/dist/assets/puppet-D1Zcnrr5.js +1 -0
- package/codemini-web/dist/assets/purescript-s82m5f0Y.js +1 -0
- package/codemini-web/dist/assets/python-BhsI1K6K.js +1 -0
- package/codemini-web/dist/assets/qml-CysuucQ6.js +1 -0
- package/codemini-web/dist/assets/qmldir-Bzkc2Njy.js +1 -0
- package/codemini-web/dist/assets/qss-CKbozdtF.js +1 -0
- package/codemini-web/dist/assets/r-BKej5r_k.js +1 -0
- package/codemini-web/dist/assets/racket-CUDoXUwy.js +1 -0
- package/codemini-web/dist/assets/raku-XPAjN9OU.js +1 -0
- package/codemini-web/dist/assets/{razor-CQPYUgex.js → razor-DQ6FV4WL.js} +1 -1
- package/codemini-web/dist/assets/razor-ZpEr_C9H.js +1 -0
- package/codemini-web/dist/assets/red-8aRo80UF.js +1 -0
- package/codemini-web/dist/assets/reg-B0B_plbq.js +1 -0
- package/codemini-web/dist/assets/regexp-CK-1EP63.js +1 -0
- package/codemini-web/dist/assets/rel-DhoFe2Y7.js +1 -0
- package/codemini-web/dist/assets/riscv-CKx_Jisq.js +1 -0
- package/codemini-web/dist/assets/ron-qyvgw9vu.js +1 -0
- package/codemini-web/dist/assets/rose-pine-R3f76h4_.js +1 -0
- package/codemini-web/dist/assets/rose-pine-dawn-BS09rtpK.js +1 -0
- package/codemini-web/dist/assets/rose-pine-moon-B4Q4DiPG.js +1 -0
- package/codemini-web/dist/assets/rosmsg-Dy_ItAfo.js +1 -0
- package/codemini-web/dist/assets/rst-CjO4XFKz.js +1 -0
- package/codemini-web/dist/assets/{rst-B-OS2pa5.js → rst-DDrWKQ9c.js} +1 -1
- package/codemini-web/dist/assets/ruby-BOVYgV5O.js +1 -0
- package/codemini-web/dist/assets/{ruby-BM15fmxz.js → ruby-CZgIYPlP.js} +1 -1
- package/codemini-web/dist/assets/rust-CNEVkiWF.js +1 -0
- package/codemini-web/dist/assets/sas-DPGT0TjQ.js +1 -0
- package/codemini-web/dist/assets/sass-D2nye32F.js +1 -0
- package/codemini-web/dist/assets/scala-B8greAnE.js +1 -0
- package/codemini-web/dist/assets/scheme-Ci_aquns.js +1 -0
- package/codemini-web/dist/assets/{scss-C0BQ8YVM.js → scss-CaciJ0Gl.js} +1 -1
- package/codemini-web/dist/assets/scss-YARKxu2i.js +1 -0
- package/codemini-web/dist/assets/sdbl-D4tJqBiC.js +1 -0
- package/codemini-web/dist/assets/shaderlab-JWcsxey4.js +1 -0
- package/codemini-web/dist/assets/shellscript-CxhArCCJ.js +1 -0
- package/codemini-web/dist/assets/shellsession-DYmuifdt.js +1 -0
- package/codemini-web/dist/assets/slack-dark-BcN7KJ02.js +1 -0
- package/codemini-web/dist/assets/slack-ochin-D4iInQ9w.js +1 -0
- package/codemini-web/dist/assets/smalltalk-BwSireXb.js +1 -0
- package/codemini-web/dist/assets/snazzy-light-B45TfPsv.js +1 -0
- package/codemini-web/dist/assets/solarized-dark-8yYW1wLs.js +1 -0
- package/codemini-web/dist/assets/solarized-light-BY3Hr0Ud.js +1 -0
- package/codemini-web/dist/assets/solidity-CIUlntDs.js +1 -0
- package/codemini-web/dist/assets/{soy-C6D0Ibo9.js → soy-7iHZG9Jz.js} +1 -1
- package/codemini-web/dist/assets/soy-h0dQKbQs.js +1 -0
- package/codemini-web/dist/assets/sparql-BGRSvFxd.js +1 -0
- package/codemini-web/dist/assets/splunk-DueVPk5k.js +1 -0
- package/codemini-web/dist/assets/sql-Q6zkgi_w.js +1 -0
- package/codemini-web/dist/assets/ssh-config-DKIMErlp.js +1 -0
- package/codemini-web/dist/assets/stata-lXN9BRaz.js +1 -0
- package/codemini-web/dist/assets/stylus-oqceM0yt.js +1 -0
- package/codemini-web/dist/assets/surrealql-l0SGzwOs.js +1 -0
- package/codemini-web/dist/assets/svelte-BM89dRu0.js +1 -0
- package/codemini-web/dist/assets/{svelte-DJ-0FpL2.js → svelte-CijnRGul.js} +1 -1
- package/codemini-web/dist/assets/swift-foA31xPc.js +1 -0
- package/codemini-web/dist/assets/synthwave-84-B002ZU4p.js +1 -0
- package/codemini-web/dist/assets/system-verilog-CCSGcM60.js +1 -0
- package/codemini-web/dist/assets/systemd-BymS_eIJ.js +1 -0
- package/codemini-web/dist/assets/talonscript-Ccc0122j.js +1 -0
- package/codemini-web/dist/assets/tasl-o38sfjeU.js +1 -0
- package/codemini-web/dist/assets/tcl-DISPE-5Q.js +1 -0
- package/codemini-web/dist/assets/{templ-7Bvm-rei.js → templ-CNjJl440.js} +1 -1
- package/codemini-web/dist/assets/templ-D1GoDFsp.js +1 -0
- package/codemini-web/dist/assets/terraform-V85Kewcz.js +1 -0
- package/codemini-web/dist/assets/tex-CxEkh6NI.js +1 -0
- package/codemini-web/dist/assets/tokyo-night-BLn5KNCP.js +1 -0
- package/codemini-web/dist/assets/toml-uEjeW8NC.js +1 -0
- package/codemini-web/dist/assets/{ts-tags-BfuR6EQ0.js → ts-tags-B88Nbzcl.js} +1 -1
- package/codemini-web/dist/assets/ts-tags-DV6nguf9.js +1 -0
- package/codemini-web/dist/assets/tsv-DjGwUc04.js +1 -0
- package/codemini-web/dist/assets/tsx-5O-M05V0.js +1 -0
- package/codemini-web/dist/assets/turtle-PTxTluYn.js +1 -0
- package/codemini-web/dist/assets/twig-B3Kws0Fb.js +1 -0
- package/codemini-web/dist/assets/{twig-_uxJ-QmX.js → twig-BROkIZLg.js} +1 -1
- package/codemini-web/dist/assets/typescript-hRweav8r.js +1 -0
- package/codemini-web/dist/assets/typespec-CKEcF6Kw.js +1 -0
- package/codemini-web/dist/assets/typst-DSQh9HII.js +1 -0
- package/codemini-web/dist/assets/v-obK6h_YW.js +1 -0
- package/codemini-web/dist/assets/vala-DXa9jSo-.js +1 -0
- package/codemini-web/dist/assets/vb-DEPbtYq-.js +1 -0
- package/codemini-web/dist/assets/verilog-Bs-185hK.js +1 -0
- package/codemini-web/dist/assets/vesper-B7BneC5G.js +1 -0
- package/codemini-web/dist/assets/vhdl-CBukgB2Z.js +1 -0
- package/codemini-web/dist/assets/viml-C1cRY0x6.js +1 -0
- package/codemini-web/dist/assets/vitesse-black-D3_12zni.js +1 -0
- package/codemini-web/dist/assets/vitesse-dark-B_iF7INE.js +1 -0
- package/codemini-web/dist/assets/vitesse-light-DbrrMtxY.js +1 -0
- package/codemini-web/dist/assets/{vue-DkOBu49o.js → vue-BUQP_8VF.js} +1 -1
- package/codemini-web/dist/assets/vue-CT36qSUr.js +1 -0
- package/codemini-web/dist/assets/vue-html-bJyjqZnI.js +1 -0
- package/codemini-web/dist/assets/vue-vine-BLqV15Pm.js +1 -0
- package/codemini-web/dist/assets/{vue-vine-veyFk6GJ.js → vue-vine-RK3AHrhp.js} +1 -1
- package/codemini-web/dist/assets/vyper-BxVot6rR.js +1 -0
- package/codemini-web/dist/assets/wasm-BNTPmfEI.js +1 -0
- package/codemini-web/dist/assets/wasm-o5uYkU9G.js +1 -0
- package/codemini-web/dist/assets/wenyan-MnC4h24X.js +1 -0
- package/codemini-web/dist/assets/wgsl-BgfkHnVi.js +1 -0
- package/codemini-web/dist/assets/wikitext-DCOnP3yk.js +1 -0
- package/codemini-web/dist/assets/wit-5UDEI7sp.js +1 -0
- package/codemini-web/dist/assets/wolfram-vvgPlu2n.js +1 -0
- package/codemini-web/dist/assets/xml-DyJ3D9rW.js +1 -0
- package/codemini-web/dist/assets/xsl-BOsdDgv_.js +1 -0
- package/codemini-web/dist/assets/yaml-C-G727Y6.js +1 -0
- package/codemini-web/dist/assets/zenscript-BPjqX0BY.js +1 -0
- package/codemini-web/dist/assets/zig-Bd91oU8r.js +1 -0
- package/codemini-web/dist/codemini_logo.png +0 -0
- package/codemini-web/dist/favicon.ico +0 -0
- package/codemini-web/dist/index.html +6 -3
- package/codemini-web/lib/runtime-bridge.js +22 -1
- package/codemini-web/server.js +919 -880
- package/deployment.md +5 -5
- package/package.json +1 -1
- package/src/commands/chat.js +1 -1
- package/src/commands/run.js +22 -7
- package/src/core/agent-loop.js +11 -7
- package/src/core/chat-runtime.js +314 -86
- package/src/core/command-evaluator.js +9 -3
- package/src/core/command-risk.js +9 -1
- package/src/core/config-store.js +4 -2
- package/src/core/context-compact.js +65 -3
- package/src/core/default-system-prompt.js +12 -4
- package/src/core/fff-adapter.js +1 -1
- package/src/core/reflect-skill.js +1 -1
- package/src/core/reply-language.js +6 -0
- package/src/core/shell-profile.js +14 -1
- package/src/core/soul.js +1 -3
- package/src/core/system-prompt-composer.js +42 -0
- package/src/core/tools.js +2 -2
- package/src/tui/chat-app.js +13 -3
- package/codemini-web/dist/assets/index-CSYMjBeT.css +0 -2
- package/codemini-web/dist/assets/index-DtiSt5vh.js +0 -206
- package/codemini-web/dist/assets/mermaid-GHXKKRXX-BQrwnoIu.js +0 -1
- /package/codemini-web/dist/assets/{bird2-Bs7YDhA3.js → bird2-VVa6lZ01.js} +0 -0
- /package/codemini-web/dist/assets/{css-BTi88BmP.js → css-Dr0v2l-V.js} +0 -0
- /package/codemini-web/dist/assets/{dart-Czrjv-nr.js → dart-BIyV3H7V.js} +0 -0
- /package/codemini-web/dist/assets/{emacs-lisp-D4W-_rAk.js → emacs-lisp-CVlPXEEa.js} +0 -0
- /package/codemini-web/dist/assets/{go-BTh90-YS.js → go-D6k5URxL.js} +0 -0
- /package/codemini-web/dist/assets/{horizon-bright-CpoqdULz.js → horizon-bright-CXcxBcih.js} +0 -0
- /package/codemini-web/dist/assets/{kusto-ByPWIc1b.js → kusto-B1r4va-8.js} +0 -0
- /package/codemini-web/dist/assets/{nextflow-groovy-D1X5Yd05.js → nextflow-groovy-o7ZjyFmf.js} +0 -0
- /package/codemini-web/dist/assets/{typespec-8nkhqWz6.js → typespec-N7-U_jBZ.js} +0 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-CDUecv8k.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/angular-html-DlSp9HPG.js","assets/html-GfHBuoLs.js","assets/css-Dr0v2l-V.js","assets/javascript-Cx8CXBJR.js","assets/angular-ts-B29Ypg6B.js","assets/scss-YARKxu2i.js","assets/apl-BASZ7uB_.js","assets/json-CY14kIzN.js","assets/xml-DyJ3D9rW.js","assets/java-Ds1cyVrp.js","assets/astro-l-XABzN2.js","assets/postcss-DiNtjF5e.js","assets/tsx-5O-M05V0.js","assets/typescript-hRweav8r.js","assets/blade-B3_bxlV2.js","assets/html-derivative-ChSmSZXY.js","assets/sql-Q6zkgi_w.js","assets/bsl-D3u1l2dW.js","assets/sdbl-D4tJqBiC.js","assets/c-CgTSul4N.js","assets/cairo-CoQzhJ_o.js","assets/python-BhsI1K6K.js","assets/cobol-D_kesMA-.js","assets/coffee-DF15_0rk.js","assets/cpp-Cudwe5mG.js","assets/glsl-C4rvog10.js","assets/regexp-CK-1EP63.js","assets/crystal-DV9Nijjb.js","assets/shellscript-CxhArCCJ.js","assets/edge-BosfXYh1.js","assets/elixir-Dw_vsdUl.js","assets/elm-DPfFNNkG.js","assets/erb-DZuoCU5t.js","assets/ruby-CZgIYPlP.js","assets/graphql-Dg0Ewf8Q.js","assets/jsx-DmH5dwMF.js","assets/haml-DyIc_iO2.js","assets/lua-BeSXusec.js","assets/yaml-C-G727Y6.js","assets/erlang-CqHCISqs.js","assets/markdown-CbgVmtS5.js","assets/fortran-fixed-form-60ZQAHDk.js","assets/fortran-free-form-BVNtEstX.js","assets/fsharp-Ch5ZVinn.js","assets/gdresource-CqNLhJW1.js","assets/gdscript-D-FJCTl3.js","assets/gdshader-Czvzt8dR.js","assets/git-commit-CSWECvqq.js","assets/diff-RUsawely.js","assets/git-rebase-MUvuytPe.js","assets/glimmer-js-HDDEErW7.js","assets/glimmer-ts-Dq0_BflX.js","assets/hack-DjE76gIx.js","assets/handlebars-DQ4X08Zf.js","assets/http-DMTBhQm8.js","assets/hurl-XIpACwjS.js","assets/csv-CqpUSPyF.js","assets/hxml-PnV_FpS-.js","assets/haxe-1eAUKQ0B.js","assets/jinja-8ATGhxJO.js","assets/jison-CSsYnr7O.js","assets/julia-vjG00jwO.js","assets/r-BKej5r_k.js","assets/just-C7G3KFgN.js","assets/perl-DdF12AsD.js","assets/latex-D8-NgtPj.js","assets/tex-CxEkh6NI.js","assets/liquid-D2m0XXrV.js","assets/marko-DPnRthJQ.js","assets/less-BKjOc0Gl.js","assets/mdc-BLdFHYKv.js","assets/nextflow-c8YCPRRb.js","assets/nextflow-groovy-o7ZjyFmf.js","assets/nginx-u-hq5m-a.js","assets/nim-B5b6_jZr.js","assets/php-CyQZnE0l.js","assets/pug-HwoxZo9M.js","assets/qml-CysuucQ6.js","assets/razor-ZpEr_C9H.js","assets/csharp-Cqz84DXU.js","assets/rst-CjO4XFKz.js","assets/cmake-CdseusyP.js","assets/sas-DPGT0TjQ.js","assets/shaderlab-JWcsxey4.js","assets/hlsl-Df5oFh9i.js","assets/shellsession-DYmuifdt.js","assets/soy-7iHZG9Jz.js","assets/sparql-BGRSvFxd.js","assets/turtle-PTxTluYn.js","assets/stata-lXN9BRaz.js","assets/surrealql-l0SGzwOs.js","assets/svelte-BM89dRu0.js","assets/templ-D1GoDFsp.js","assets/go-D6k5URxL.js","assets/ts-tags-B88Nbzcl.js","assets/twig-B3Kws0Fb.js","assets/vue-CT36qSUr.js","assets/vue-html-bJyjqZnI.js","assets/vue-vine-BLqV15Pm.js","assets/stylus-oqceM0yt.js","assets/xsl-BOsdDgv_.js","assets/angular-html-CHsdtmkx.js","assets/html-B7kk5NVw.js","assets/css-z2ijrDWT.js","assets/javascript-WC6XFf_S.js","assets/angular-ts-JNDGGWj0.js","assets/scss-CaciJ0Gl.js","assets/apl-Byuv-g-O.js","assets/json-CmuSmrUv.js","assets/xml-BkdunjRC.js","assets/java-X0I2c5Az.js","assets/astro-CTzEugGW.js","assets/postcss-DrpvRGGG.js","assets/tsx-CfyUE2pW.js","assets/typescript-C6LvTgbf.js","assets/blade-Dt6km9YT.js","assets/html-derivative-Ba28nVB3.js","assets/sql-CZAMrWdL.js","assets/bsl-CPV9KqsG.js","assets/sdbl-DoQ_zDzo.js","assets/c-Bv0tI3pq.js","assets/cairo-CyiRuu7R.js","assets/python-DcnbpNOV.js","assets/cobol-DqhY5el-.js","assets/coffee-rY-gkJy7.js","assets/cpp-Bw-qV0P6.js","assets/glsl-C8VPaAWs.js","assets/regexp-da3KYCEG.js","assets/crystal-Bw1_1hFA.js","assets/shellscript-KUJZnuCi.js","assets/edge-r5NIe9Lp.js","assets/elixir-B04apOJS.js","assets/elm-Cezz_HNz.js","assets/erb-BNioEFKQ.js","assets/ruby-BOVYgV5O.js","assets/graphql-WZCiqIl-.js","assets/jsx-Bl4e1-KE.js","assets/haml-B8MRe8CS.js","assets/lua-BroxvhVt.js","assets/yaml-D_uvhEF7.js","assets/erlang-BC8wryba.js","assets/markdown-DMIvNSB1.js","assets/fortran-fixed-form-CyrImzNA.js","assets/fortran-free-form-CIAQqF5W.js","assets/fsharp-OCW_PZ4J.js","assets/gdresource-Cl3bohRI.js","assets/gdscript-B_XVILZe.js","assets/gdshader-BOrkFM_X.js","assets/git-commit-DJZpdBwB.js","assets/diff-D4HSRbRn.js","assets/git-rebase-BJE30GTP.js","assets/glimmer-js-Dn6vjgHP.js","assets/glimmer-ts-mq-Q_zEE.js","assets/hack-DeD259o6.js","assets/handlebars-GoJyzhp1.js","assets/http-Deln4Vyb.js","assets/hurl-CYSuhGkj.js","assets/csv-DUpZC5ZD.js","assets/hxml-BmF7ngDz.js","assets/haxe-Df79h8x1.js","assets/jinja-Dx5IcFSt.js","assets/jison-DuNOGix6.js","assets/julia-Cqc1ADyw.js","assets/r-B4lG5syH.js","assets/just-BlUYrdKb.js","assets/perl-BIcNvyL6.js","assets/latex-BEPTKliI.js","assets/tex-ezg8IclB.js","assets/liquid-BUh7yINm.js","assets/marko-Dm8xPXkG.js","assets/less-DgluPI4Z.js","assets/mdc-Dzipcsdb.js","assets/nextflow-BRiWOV-p.js","assets/nextflow-groovy-D6rYlJlL.js","assets/nginx-Da_Uewgc.js","assets/nim-CvgRYLO2.js","assets/php-BP-3TkW_.js","assets/pug-_XoIcKf3.js","assets/qml-DWxWu28U.js","assets/razor-DQ6FV4WL.js","assets/csharp-Ca2kU4Te.js","assets/rst-DDrWKQ9c.js","assets/cmake-CCC7tP43.js","assets/sas-DYNukvU9.js","assets/shaderlab-TbUUdmUb.js","assets/hlsl-CckLjo_3.js","assets/shellsession-BeWGuVoR.js","assets/soy-h0dQKbQs.js","assets/sparql-DIFvSn1n.js","assets/turtle-BsUuoeVK.js","assets/stata-C5mLa_ER.js","assets/surrealql-DyoUfV6n.js","assets/svelte-CijnRGul.js","assets/templ-CNjJl440.js","assets/go-iV8pwUYW.js","assets/ts-tags-DV6nguf9.js","assets/twig-BROkIZLg.js","assets/vue-BUQP_8VF.js","assets/vue-html-Bx2Sgp8M.js","assets/vue-vine-RK3AHrhp.js","assets/stylus-BO6mlOab.js","assets/xsl-C66i1pDH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),i=n(((e,t)=>{t.exports=r()})),a=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=n(((e,t)=>{t.exports=a()})),s=n((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),c=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function I(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function L(e,t){ie++,re[ie]=e.current,e.current=t}var oe=ae(null),se=ae(null),ce=ae(null),le=ae(null);function ue(e,t){switch(L(ce,t),L(se,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(oe),L(oe,e)}function de(){I(oe),I(se),I(ce)}function fe(e){e.memoizedState!==null&&L(le,e);var t=oe.current,n=ef(t,e.type);t!==n&&(L(se,e),L(oe,n))}function pe(e){se.current===e&&(I(oe),I(se)),le.current===e&&(I(le),lp._currentValue=ne)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Tp(e.type)):e}function at(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cf(e);e!==null;){if(n=e[st])return n;e=Cf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(te(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Jt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Qt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ct]||null;if(!i)throw Error(a(90));Bt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Nu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,`passive`,{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=h({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=h({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(h({},On,{dataTransfer:0})),jn=bn(h({},Cn,{relatedTarget:0})),Mn=bn(h({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(h({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(h({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(h({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(h({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(h({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(h({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(h({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(h({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Ld(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){kd(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xe.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Ld(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),Ct(t,[e])}var Zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<wu)throw wu=0,Tu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=li(31,n,t,i),e.elementType=ee,e.lanes=o,e;case y:return mi(n.children,i,o,t);case b:s=8,i|=24;break;case x:return e=li(12,n,t,i|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,i),e.elementType=T,e.lanes=o,e;case E:return e=li(19,n,t,i),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=li(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-Re(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,Ii=!1,Li=null,Ri=!1,zi=Error(a(519));function Bi(e){throw Ki(yi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:Ad(`cancel`,t),Ad(`close`,t);break;case`iframe`:case`object`:case`embed`:Ad(`load`,t);break;case`video`:case`audio`:for(n=0;n<Dd.length;n++)Ad(Dd[n],t);break;case`source`:Ad(`error`,t);break;case`img`:case`image`:case`link`:Ad(`error`,t),Ad(`load`,t);break;case`details`:Ad(`toggle`,t);break;case`input`:Ad(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Ad(`invalid`,t);break;case`textarea`:Ad(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ud(t.textContent,n)?(r.popover!=null&&(Ad(`beforetoggle`,t),Ad(`toggle`,t)),r.onScroll!=null&&Ad(`scroll`,t),r.onScrollEnd!=null&&Ad(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Pi=Pi.return}}function Ui(e){if(e!==Pi)return!1;if(!Ii)return Hi(e),Ii=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||tf(e.type,e.memoizedProps)),n=!n),n&&Fi&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Fi=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Fi=Sf(e)}else t===27?(t=Fi,uf(e.type)?(e=xf,xf=null,Fi=e):Fi=t):Fi=Pi?bf(e.stateNode.nextSibling):null;return!0}function Wi(){Fi=Pi=null,Ii=!1}function Gi(){var e=Li;return e!==null&&(uu===null?uu=e:uu.push.apply(uu,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=ae(null),Ji=null,Yi=null;function Xi(e,t,n){L(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,I(qi)}function Qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $i(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Qi(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ea(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Cr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===le.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}i=i.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(a(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=xd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=P.S;P.S=function(e,t){pu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=ae(null);function xa(){var e=ba.current;return e===null?Jl.pooledCache:e}function Sa(e,t){t===null?L(ba,ba.current):L(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(a(460)),Ta=Error(a(474)),Ea=Error(a(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Jl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(a(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(a(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===g?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===O&&Aa(a)===t.type)?(t=i(t,n.props),La(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=mi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Aa(t),f(e,t,n)}if(te(t)||j(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===C)return f(e,ia(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Aa(n),p(e,t,n,r)}if(te(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===C)return p(e,t,ia(e,n),r);Ra(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Aa(r),m(e,t,n,r,i)}if(te(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===C)return m(e,t,n,ia(t,r),i);Ra(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ii&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ii&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ii&&ki(i,h),l}function g(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ii&&ki(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ii&&ki(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ii&&ki(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Aa(l)===r.type){n(e,r.sibling),c=i(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Aa(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===C)return b(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ql&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Xl&f)===f:(r&f)===f){f!==0&&f===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),iu|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=ae(null),to=ae(0);function no(e,t){e=nu,L(to,e),L(eo,t),nu=e|t.baseLanes}function ro(){L(to,nu),L(eo,eo.current)}function io(){nu=to.current,I(eo),I(to)}var ao=ae(null),oo=null;function so(e){var t=e.alternate;L(po,po.current&1),L(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){L(po,po.current),L(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(L(po,po.current),L(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){L(po,po.current),L(ao,ao.current)}function fo(e){I(ao),oo===e&&(oo=null),I(po)}var po=ae(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_f(n)||vf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,go=null,_o=null,vo=null,yo=!1,bo=!1,xo=!1,So=0,Co=0,wo=null,To=0;function Eo(){throw Error(a(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return ho=a,go=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Gs:Ks,xo=!1,a=n(r,i),xo=!1,bo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){P.H=Ws;var t=_o!==null&&_o.next!==null;if(ho=0,vo=_o=go=null,yo=!1,Co=0,wo=null,t)throw Error(a(300));e===null||lc||(e=e.dependencies,e!==null&&ta(e)&&(lc=!0))}function Ao(e,t,n,r){go=e;var i=0;do{if(bo&&(wo=null),Co=0,bo=!1,25<=i)throw Error(a(301));if(i+=1,vo=_o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=qs,o=t(n,r)}while(bo);return o}function jo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Ro(t):t,e=e.useState()[0],(_o===null?null:_o.memoizedState)!==e&&(go.flags|=1024),t}function Mo(){var e=So!==0;return So=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}ho=0,vo=_o=go=null,bo=!1,Co=So=0,wo=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vo===null?go.memoizedState=vo=e:vo=vo.next=e,vo}function Io(){if(_o===null){var e=go.alternate;e=e===null?null:e.memoizedState}else e=_o.next;var t=vo===null?go.memoizedState:vo.next;if(t!==null)vo=t,_o=e;else{if(e===null)throw go.alternate===null?Error(a(467)):Error(a(310));_o=e,e={memoizedState:_o.memoizedState,baseState:_o.baseState,baseQueue:_o.baseQueue,queue:_o.queue,next:null},vo===null?go.memoizedState=vo=e:vo=vo.next=e}return vo}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ro(e){var t=Co;return Co+=1,wo===null&&(wo=[]),e=ka(wo,e,t),t=go,(vo===null?t.memoizedState:vo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Gs:Ks),e}function zo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ro(e);if(e.$$typeof===C)return ra(e)}throw Error(a(438,String(e)))}function Bo(e){var t=null,n=go.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=go.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Lo(),go.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function Vo(e,t){return typeof t==`function`?t(e):t}function Ho(e){return Uo(Io(),_o,e)}function Uo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(Xl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,go.lanes|=p,iu|=p;f=u.action,xo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,go.lanes|=f,iu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(lc=!0,d&&(n=ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wo(e){var t=Io(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Cr(o,t.memoizedState)||(lc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Go(e,t,n){var r=go,i=Io(),o=Ii;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Cr((_o||i).memoizedState,n);if(s&&(i.memoizedState=n,lc=!0),i=i.queue,gs(Jo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||vo!==null&&vo.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,i,n,t),null),Jl===null)throw Error(a(349));o||ho&127||Ko(r,t,n)}return n}function Ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=go.updateQueue,t===null?(t=Lo(),go.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qo(e,t,n,r){t.value=n,t.getSnapshot=r,Yo(t)&&Xo(e)}function Jo(e,t,n){return n(function(){Yo(t)&&Xo(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Xo(e){var t=ii(e,2);t!==null&&Ou(t,e,2)}function Zo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),xo){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t}function Qo(e,t,n,r){return e.baseState=n,Uo(e,_o,typeof r==`function`?r:Vo)}function $o(e,t,n,r,i){if(Vs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),ts(e,t,s)}catch(n){rs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),ts(e,t,a)}catch(n){rs(e,t,n)}}function ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ns(e,t,n)},function(n){return rs(e,t,n)}):ns(e,t,n)}function ns(e,t,n){t.status=`fulfilled`,t.value=n,is(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,es(e,n)))}function rs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,is(t),t=t.next;while(t!==r)}e.action=null}function is(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function os(e,t){if(Ii){var n=Jl.formState;if(n!==null){a:{var r=go;if(Ii){if(Fi){b:{for(var i=Fi,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=bf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=bf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},n.queue=r,n=Rs.bind(null,go,r),r.dispatch=n,r=Zo(!1),a=Bs.bind(null,go,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=$o.bind(null,go,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Io(),_o,e)}function cs(e,t,n){if(t=Uo(e,t,as)[0],e=Ho(Vo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ro(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Io();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(go.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Io(),n=_o;if(n!==null)return cs(t,n,e);Io(),t=t.memoizedState,n=Io();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=go.updateQueue,t===null&&(t=Lo(),go.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fs(){return Io().memoizedState}function ps(e,t,n,r){var i=Fo();go.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Io();r=r===void 0?null:r;var a=i.memoizedState.inst;_o!==null&&r!==null&&Do(r,_o.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(go.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){go.flags|=4;var t=go.updateQueue;if(t===null)t=Lo(),go.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Io().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(ql&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),xo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||ho&1073741824&&!(Xl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Du(),go.lanes|=e,iu|=e,n)}function Ds(e,t,n,r){return Cr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(Xl&261930)?(lc=!0,e.memoizedState=n):(e=Du(),go.lanes|=e,iu|=e,t):(e=Es(e,n,r),Cr(e,t)||(lc=!0),e)}function Os(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Bs(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,va(c,r),Eu(e)):zs(e,t,r,Eu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=js(e).queue;Os(e,i,t,ne,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Eu())}function Ns(){return ra(lp)}function Ps(){return Io().memoizedState}function Fs(){return Io().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(Ou(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ri(e,t,n,r),n!==null&&(Ou(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Eu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),Jl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return Ou(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(a(479))}else t=ri(e,n,r,2),t!==null&&Ou(t,e,2)}function Vs(e){var t=e.alternate;return e===go||t!==null&&t===go}function Hs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Ws={readContext:ra,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Ws.useEffectEvent=Eo;var Gs={readContext:ra,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,go,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,go,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,go,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=go,i=Fo();if(Ii){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Jl===null)throw Error(a(349));Xl&127||Ko(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=Jl.identifierPrefix;if(Ii){var n=Oi,r=Di;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=To++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ns,useFormState:os,useActionState:os,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bs.bind(null,go,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bo,useCacheRefresh:function(){return Fo().memoizedState=Is.bind(null,go)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(ql&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:ra,use:zo,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Ho,useRef:fs,useState:function(){return Ho(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Io(),_o.memoizedState,e,t)},useTransition:function(){var e=Ho(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ps,useHostTransitionStatus:Ns,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Qo(Io(),_o,e,t)},useMemoCache:Bo,useCacheRefresh:Fs};Ks.useEffectEvent=vs;var qs={readContext:ra,use:zo,useCallback:ws,useContext:ra,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Wo,useRef:fs,useState:function(){return Wo(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Io();return _o===null?Es(n,e,t):Ds(n,_o.memoizedState,e,t)},useTransition:function(){var e=Wo(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ps,useHostTransitionStatus:Ns,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Io();return _o===null?(n.baseState=e,[e,n.queue.dispatch]):Qo(n,_o,e,t)},useMemoCache:Bo,useCacheRefresh:Fs};qs.useEffectEvent=vs;function Js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Eu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Ou(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Eu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Ou(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Eu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(Ou(t,e,n),qa(t,e,n))}};function Xs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,a):!0}function Zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ys.enqueueReplaceState(t,t.state,null)}function Qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function $s(e){Zr(e)}function ec(e){console.error(e)}function tc(e){Zr(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ic(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function ac(e){return e=Ga(e),e.tag=3,e}function oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){rc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){rc(t,n,r),typeof i!=`function`&&(gu===null?gu=new Set([this]):gu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function sc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,i,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Bu():n.alternate===null&&ru===0&&(ru=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,i)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,i)),!1}throw Error(a(435,n.tag))}return rd(e,r,i),Bu(),!1}if(Ii)return t=ao.current,t===null?(r!==zi&&(t=Error(a(423),{cause:r}),Ki(yi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=yi(r,n),i=ic(e.stateNode,r,i),Ja(e,i),ru!==4&&(ru=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==zi&&(e=Error(a(422),{cause:r}),Ki(yi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=yi(o,n),lu===null?lu=[o]:lu.push(o),ru!==4&&(ru=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ic(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(gu===null||!gu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ac(i),oc(i,e,n,r),Ja(n,i),!1}n=n.return}while(n!==null);return!1}var cc=Error(a(461)),lc=!1;function uc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function dc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!lc?(No(e,t,i),Fc(e,t,i)):(Ii&&s&&ji(t),t.flags|=1,uc(e,t,r,i),t.child)}function fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,pc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ic(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Fc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(lc=!1,t.pendingProps=r=a,Ic(e,i))e.flags&131072&&(lc=!0);else return t.lanes=e.lanes,Fc(e,t,i)}return xc(e,t,n,r,i)}function mc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return uc(e,t,i,n),t.child}function hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function _c(e,t){return t=Ac({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vc(e,t,n){return Ba(t,e.child,null,n),e=_c(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function yc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ii){if(r.mode===`hidden`)return e=_c(t,r),t.lanes=536870912,hc(null,e);if(co(t),(e=Fi)?(e=gf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return _c(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),i)if(t.flags&256)t.flags&=-257,t=vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(lc||ea(e,t,n,!1),i=(n&e.childLanes)!==0,lc||i){if(r=Jl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),Ou(r,e,s),cc;Bu(),t=vc(e,t,n)}else e=o.treeContext,Fi=bf(s.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=_c(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xc(e,t,n,r,i){return na(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!lc?(No(e,t,i),Fc(e,t,i)):(Ii&&r&&ji(t),t.flags|=1,uc(e,t,n,i),t.child)}function Sc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!lc?(No(e,t,a),Fc(e,t,a)):(Ii&&r&&ji(t),t.flags|=1,uc(e,t,n,a),t.child)}function Cc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ys,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Js(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ys.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=ra(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Zs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Js(t,n,d,r),l=t.memoizedState),(c=Ha||Xs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=ra(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Zs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Js(t,n,s,r),p=t.memoizedState),(u=Ha||Xs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,bc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):uc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Fc(e,t,i),e}function wc(e,t,n,r){return Wi(),t.flags|=256,uc(e,t,n,r),t.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(e){return{baseLanes:e,cachePool:Ca()}}function Dc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=su),e}function Oc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(po.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ii){if(i?so(t):uo(t),(e=Fi)?(e=gf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(uo(t),i=t.mode,c=Ac({mode:`hidden`,children:c},i),r=mi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(null,r)):(so(t),kc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,i=t.mode,r=Ac({mode:`visible`,children:r.children},i),c=mi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=Ec(n),r.childLanes=Dc(e,s,n),t.memoizedState=Tc,t=hc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),vf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=jc(e,t,n)}else if(lc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,lc||s){if(s=Jl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),Ou(s,e,r),cc;_f(c)||Bu(),t=jc(e,t,n)}else _f(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=bf(c.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=kc(t,r.children),t.flags|=4096);return t}return i?(uo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,i,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,hc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Ec(n):(i=c.cachePool,i===null?i=Ca():(l=la._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Dc(e,s,n),t.memoizedState=Tc,hc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function kc(e,t){return t=Ac({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ac(e,t){return e=li(22,e,null,t),e.lanes=0,e}function jc(e,t,n){return Ba(t,e.child,null,n),e=kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function Nc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Pc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(po,o),uc(e,t,r,n),r=Ii?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Nc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Nc(t,!0,n,null,a,r);break;case`together`:Nc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Fc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),iu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ta(e))):!0}function Lc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Fc(e,t,n),e===null?null:e.sibling):Oc(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Pc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(po,po.current),r)break;return null;case 22:return t.lanes=0,mc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Fc(e,t,n)}function Rc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)lc=!0;else{if(!Ic(e,n)&&!(t.flags&128))return lc=!1,Lc(e,t,n);lc=!!(e.flags&131072)}else lc=!1,Ii&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Qs(e,r),t.tag=1,t=Cc(null,t,e,r,n)):(t.tag=0,t=xc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=dc(null,t,e,r,n);break a}else if(i===D){t.tag=14,t=fc(null,t,e,r,n);break a}}throw t=N(e)||e,Error(a(306,t,``))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Qs(r,t.pendingProps),Cc(e,t,r,i,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=wc(e,t,r,n);break a}else if(r!==i){i=yi(Error(a(424)),t),Ki(i),t=wc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=bf(e.firstChild),Pi=t,Ii=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===i){t=Fc(e,t,n);break a}uc(e,t,r,n)}t=t.child}return t;case 26:return bc(e,t),e===null?(n=H(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ii||(n=t.type,e=t.pendingProps,r=Qd(ce.current).createElement(n),r[st]=t,r[ct]=e,Kd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=H(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&Ii&&(r=t.stateNode=wf(t.type,t.pendingProps,ce.current),Pi=t,Ri=!0,i=Fi,uf(t.type)?(xf=i,Fi=bf(r.firstChild)):Fi=i),uc(e,t,t.pendingProps.children,n),bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ii&&((i=r=Fi)&&(r=mf(r,t.type,t.pendingProps,Ri),r===null?i=!1:(t.stateNode=r,Pi=t,Fi=bf(r.firstChild),Ri=!1,i=!0)),i||Bi(t)),fe(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,tf(i,o)?r=null:s!==null&&tf(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Oo(e,t,jo,null,null,n),lp._currentValue=i),bc(e,t),uc(e,t,r,n),t.child;case 6:return e===null&&Ii&&((e=n=Fi)&&(n=hf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||Bi(t)),null;case 13:return Oc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):uc(e,t,r,n),t.child;case 11:return dc(e,t,t.type,t.pendingProps,n);case 7:return uc(e,t,t.pendingProps,n),t.child;case 8:return uc(e,t,t.pendingProps.children,n),t.child;case 12:return uc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),uc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,na(t),i=ra(i),r=r(i),t.flags|=1,uc(e,t,r,n),t.child;case 14:return fc(e,t,t.type,t.pendingProps,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 19:return Pc(e,t,n);case 31:return yc(e,t,n);case 22:return mc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(i=xa(),i===null&&(i=Jl,o=ua(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ua(t),Xi(t,la,i)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Xi(t,la,r),r!==i.cache&&$i(t,[la],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Xi(t,la,r))),uc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function zc(e){e.flags|=4}function Bc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Lu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function Vc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t))if(Lu())e.flags|=8192;else throw ja=Da,Ta}function Hc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,cu|=t)}function Uc(e,t){if(!Ii)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wc(t),null;case 1:return Wc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?zc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Wc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(zc(t),o===null?(Wc(t),Bc(t,i,null,r,n)):(Wc(t),Vc(t,o))):o?o===e.memoizedState?(Wc(t),t.flags&=-16777217):(zc(t),Wc(t),Vc(t,o)):(e=e.memoizedProps,e!==r&&zc(t),Wc(t),Bc(t,i,e,r,n)),null;case 27:if(pe(t),n=ce.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Wc(t),null}e=oe.current,Ui(t)?Vi(t,e):(e=wf(i,r,n),t.stateNode=e,zc(t))}return Wc(t),null;case 5:if(pe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Wc(t),null}if(o=oe.current,Ui(t))Vi(t,o);else{var s=Qd(ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ce.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Pi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Bi(t,!0)}else e=Qd(e).createTextNode(r),e[st]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(a(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),i=!1}else i=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return de(),e===null&&Nd(t.stateNode.containerInfo),Wc(t),null;case 10:return Zi(t.type),Wc(t),null;case 19:if(I(po),r=t.memoizedState,r===null)return Wc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Uc(r,!1);else{if(ru!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return L(po,po.current&1|2),Ii&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>mu&&(t.flags|=128,i=!0,Uc(r,!1),t.lanes=4194304)}else{if(!i)if(e=mo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ii)return Wc(t),null}else 2*Ee()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,i=!0,Uc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=po.current,L(po,i?n&1|2:n&1),Ii&&ki(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),Wc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Kc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(a(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(po),null;case 4:return de(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&I(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function qc(e,t){switch(Mi(t),t.tag){case 3:Zi(la),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:I(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&I(ba);break;case 24:Zi(la)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nd(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){nd(e,t,n)}else n.current=null}function el(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nd(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[ct]=t}catch(t){nd(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[st]=e,t[ct]=n}catch(t){nd(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Xd=vp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},vp=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Qs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:pf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,dl=e;break}dl=t.return}}function pl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ol(e,n),r&4&&Jc(5,n);break;case 1:if(Ol(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=Qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Ol(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&ol(n);case 26:case 5:Ol(e,n),t===null&&r&4&&el(n),r&512&&Qc(n,n.return);break;case 12:Ol(e,n);break;case 31:Ol(e,n),r&4&&yl(e,n);break;case 13:Ol(e,n),r&4&&bl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),yf(e,n))));break;case 22:if(r=n.memoizedState!==null||sl,!r){t=t!==null&&t.memoizedState!==null||cl,i=sl;var a=cl;sl=r,(cl=t)&&!a?Al(e,n,(n.subtreeFlags&8772)!=0):Ol(e,n),sl=i,cl=a}break;case 30:break;default:Ol(e,n)}}function ml(e){var t=e.alternate;t!==null&&(e.alternate=null,ml(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var hl=null,gl=!1;function _l(e,t,n){for(n=n.child;n!==null;)vl(e,t,n),n=n.sibling}function vl(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:cl||$c(n,t),_l(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cl||$c(n,t);var r=hl,i=gl;uf(n.type)&&(hl=n.stateNode,gl=!1),_l(e,t,n),Tf(n.stateNode),hl=r,gl=i;break;case 5:cl||$c(n,t);case 6:if(r=hl,i=gl,hl=null,_l(e,t,n),hl=r,gl=i,hl!==null)if(gl)try{(hl.nodeType===9?hl.body:hl.nodeName===`HTML`?hl.ownerDocument.body:hl).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{hl.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:hl!==null&&(gl?(e=hl,df(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):df(hl,n.stateNode));break;case 4:r=hl,i=gl,hl=n.stateNode.containerInfo,gl=!0,_l(e,t,n),hl=r,gl=i;break;case 0:case 11:case 14:case 15:Yc(2,n,t),cl||Yc(4,n,t),_l(e,t,n);break;case 1:cl||($c(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),_l(e,t,n);break;case 21:_l(e,t,n);break;case 22:cl=(r=cl)||n.memoizedState!==null,_l(e,t,n),cl=r;break;default:_l(e,t,n)}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){nd(t,t.return,e)}}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){nd(t,t.return,e)}}function xl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ul),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ul),t;default:throw Error(a(435,e.tag))}}function Sl(e,t){var n=xl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(uf(c.type)){hl=c.stateNode,gl=!1;break a}break;case 5:hl=c.stateNode,gl=!1;break a;case 3:case 4:hl=c.stateNode.containerInfo,gl=!0;break a}c=c.return}if(hl===null)throw Error(a(160));vl(o,s,i),hl=null,gl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tl(t,e),t=t.sibling}var wl=null;function Tl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Cl(t,e),El(e),r&4&&(Yc(3,e,e.return),Jc(3,e),Yc(5,e,e.return));break;case 1:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&64&&sl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=wl;if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Kd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=Qf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Kd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Qf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Kd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else $f(i,e.type,e.stateNode);else e.stateNode=qf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&tl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(i,e.type,e.stateNode):qf(i,r,e.memoizedProps))}break;case 27:Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),n!==null&&r&4&&tl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Cl(t,e),El(e),r&512&&(cl||n===null||$c(n,n.return)),e.flags&32){i=e.stateNode;try{Kt(i,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,tl(e,i,n===null?i:n.memoizedProps)),r&1024&&(ll=!0);break;case 6:if(Cl(t,e),El(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if(Zf=null,i=wl,wl=Of(t.containerInfo),Cl(t,e),wl=i,El(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){nd(e,e.return,t)}ll&&(ll=!1,Dl(e));break;case 4:r=wl,wl=Of(e.stateNode.containerInfo),Cl(t,e),El(e),wl=r;break;case 12:Cl(t,e),El(e);break;case 31:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 13:Cl(t,e),El(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(fu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=sl,d=cl;if(sl=u||i,cl=d||l,Cl(t,e),cl=d,sl=u,El(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||sl||cl||kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?ff(m,!0):ff(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Sl(e,n))));break;case 19:Cl(t,e),El(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Sl(e,r)));break;case 30:break;case 21:break;default:Cl(t,e),El(e)}}function El(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(nl(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;al(e,rl(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),al(e,rl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;il(e,rl(e),s);break;default:throw Error(a(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pl(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yc(4,t,t.return),kl(t);break;case 1:$c(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),kl(t);break;case 27:Tf(t.stateNode);case 26:case 5:$c(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function Al(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Al(i,a,n),Jc(4,a);break;case 1:if(Al(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:ol(a);case 26:case 5:Al(i,a,n),n&&r===null&&o&4&&el(a),Qc(a,a.return);break;case 12:Al(i,a,n);break;case 31:Al(i,a,n),n&&o&4&&yl(i,a);break;case 13:Al(i,a,n),n&&o&4&&bl(i,a);break;case 22:a.memoizedState===null&&Al(i,a,n),Qc(a,a.return);break;case 30:break;default:Al(i,a,n)}t=t.sibling}}function jl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function Ml(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Nl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pl(e,t,n,r),t=t.sibling}function Pl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Nl(e,t,n,r),i&2048&&Jc(9,t);break;case 1:Nl(e,t,n,r);break;case 3:Nl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){Nl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Nl(e,t,n,r);break;case 31:Nl(e,t,n,r);break;case 13:Nl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Nl(e,t,n,r):(a._visibility|=2,Fl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Nl(e,t,n,r):Il(e,t),i&2048&&jl(o,t);break;case 24:Nl(e,t,n,r),i&2048&&Ml(t.alternate,t);break;default:Nl(e,t,n,r)}}function Fl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Fl(a,o,s,c,i),Jc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Fl(a,o,s,c,i)):u._visibility&2?Fl(a,o,s,c,i):Il(a,o),i&&l&2048&&jl(o.alternate,o);break;case 24:Fl(a,o,s,c,i),i&&l&2048&&Ml(o.alternate,o);break;default:Fl(a,o,s,c,i)}t=t.sibling}}function Il(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Il(n,r),i&2048&&jl(r.alternate,r);break;case 24:Il(n,r),i&2048&&Ml(r.alternate,r);break;default:Il(n,r)}t=t.sibling}}var Ll=8192;function Rl(e,t,n){if(e.subtreeFlags&Ll)for(e=e.child;e!==null;)zl(e,t,n),e=e.sibling}function zl(e,t,n){switch(e.tag){case 26:Rl(e,t,n),e.flags&Ll&&e.memoizedState!==null&&np(n,wl,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,n);break;case 3:case 4:var r=wl;wl=Of(e.stateNode.containerInfo),Rl(e,t,n),wl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ll,Ll=16777216,Rl(e,t,n),Ll=r):Rl(e,t,n));break;default:Rl(e,t,n)}}function Bl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hl(e),e=e.sibling}function Hl(e){switch(e.tag){case 0:case 11:case 15:Vl(e),e.flags&2048&&Yc(9,e,e.return);break;case 3:Vl(e);break;case 12:Vl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ul(e)):Vl(e);break;default:Vl(e)}}function Ul(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];dl=r,Wl(r,e)}Bl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yc(8,t,t.return),Ul(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ul(t));break;default:Ul(t)}e=e.sibling}}function Wl(e,t){for(;dl!==null;){var n=dl;switch(n.tag){case 0:case 11:case 15:Yc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,dl=r;else a:for(n=e;dl!==null;){r=dl;var i=r.sibling,a=r.return;if(ml(r),r===n){dl=null;break a}if(i!==null){i.return=a,dl=i;break a}dl=a}}}var Gl={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},Kl=typeof WeakMap==`function`?WeakMap:Map,ql=0,Jl=null,Yl=null,Xl=0,Zl=0,Ql=null,$l=!1,eu=!1,tu=!1,nu=0,ru=0,iu=0,au=0,ou=0,su=0,cu=0,lu=null,uu=null,du=!1,fu=0,pu=0,mu=1/0,hu=null,gu=null,_u=0,vu=null,yu=null,bu=0,xu=0,Su=null,Cu=null,wu=0,Tu=null;function Eu(){return ql&2&&Xl!==0?Xl&-Xl:P.T===null?it():xd()}function Du(){if(su===0)if(!(Xl&536870912)||Ii){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),su=e}else su=536870912;return e=ao.current,e!==null&&(e.flags|=32),su}function Ou(e,t,n){(e===Jl&&(Zl===2||Zl===9)||e.cancelPendingCommit!==null)&&(Fu(e,0),Mu(e,Xl,su,!1)),Ze(e,n),(!(ql&2)||e!==Jl)&&(e===Jl&&(!(ql&2)&&(au|=n),ru===4&&Mu(e,Xl,su,!1)),md(e))}function ku(e,t,n){if(ql&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),i=r?Hu(e,t):Vu(e,t,!0),o=r;do{if(i===0){eu&&!r&&Mu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ju(n)){i=Vu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=lu;var l=c.current.memoizedState.isDehydrated;if(l&&(Fu(c,s).flags|=256),s=Vu(c,s,!1),s!==2){if(tu&&!l){c.errorRecoveryDisabledLanes|=o,au|=o,i=4;break a}o=uu,uu=i,o!==null&&(uu===null?uu=o:uu.push.apply(uu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Fu(e,0),Mu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Mu(r,t,su,!$l);break a;case 2:uu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=fu+300-Ee(),10<i)){if(Mu(r,t,su,!$l),Ke(r,0,!0)!==0)break a;bu=t,r.timeoutHandle=af(Au.bind(null,r,n,uu,hu,du,t,su,au,cu,$l,o,`Throttled`,-0,0),i);break a}Au(r,n,uu,hu,du,t,su,au,cu,$l,o,null,-0,0)}}break}while(1);md(e)}function Au(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},zl(t,a,d);var m=(a&62914560)===a?fu-Ee():(a&4194048)===a?pu-Ee():0;if(m=ip(d,m),m!==null){bu=a,e.cancelPendingCommit=m(z.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Mu(e,a,o,!l);return}}z(e,t,a,n,r,i,o,s,c)}function ju(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Mu(e,t,n,r){t&=~ou,t&=~au,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Nu(){return ql&6?!0:(hd(0,!1),!1)}function Pu(){if(Yl!==null){if(Zl===0)var e=Yl.return;else e=Yl,Yi=Ji=null,Po(e),Pa=null,Fa=0,e=Yl;for(;e!==null;)qc(e.alternate,e),e=e.return;Yl=null}}function Fu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,of(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bu=0,Pu(),Jl=e,Yl=n=di(e.current,null),Xl=t,Zl=0,Ql=null,$l=!1,eu=qe(e,t),tu=!1,cu=su=ou=au=iu=ru=0,uu=lu=null,du=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return nu=t,ti(),n}function Iu(e,t){go=null,P.H=Ws,t===wa||t===Ea?(t=Ma(),Zl=3):t===Ta?(t=Ma(),Zl=4):Zl=t===cc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ql=t,Yl===null&&(ru=1,nc(e,yi(t,e.current)))}function Lu(){var e=ao.current;return e===null?!0:(Xl&4194048)===Xl?oo===null:(Xl&62914560)===Xl||Xl&536870912?e===oo:!1}function Ru(){var e=P.H;return P.H=Ws,e===null?Ws:e}function zu(){var e=P.A;return P.A=Gl,e}function Bu(){ru=4,$l||(Xl&4194048)!==Xl&&ao.current!==null||(eu=!0),!(iu&134217727)&&!(au&134217727)||Jl===null||Mu(Jl,Xl,su,!1)}function Vu(e,t,n){var r=ql;ql|=2;var i=Ru(),a=zu();(Jl!==e||Xl!==t)&&(hu=null,Fu(e,t)),t=!1;var o=ru;a:do try{if(Zl!==0&&Yl!==null){var s=Yl,c=Ql;switch(Zl){case 8:Pu(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=Zl;if(Zl=0,Ql=null,Ku(e,s,c,l),n&&eu){o=0;break a}break;default:l=Zl,Zl=0,Ql=null,Ku(e,s,c,l)}}R(),o=ru;break}catch(t){Iu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,ql=r,P.H=i,P.A=a,Yl===null&&(Jl=null,Xl=0,ti()),o}function R(){for(;Yl!==null;)Wu(Yl)}function Hu(e,t){var n=ql;ql|=2;var r=Ru(),i=zu();Jl!==e||Xl!==t?(hu=null,mu=Ee()+500,Fu(e,t)):eu=qe(e,t);a:do try{if(Zl!==0&&Yl!==null){t=Yl;var o=Ql;b:switch(Zl){case 1:Zl=0,Ql=null,Ku(e,t,o,1);break;case 2:case 9:if(Oa(o)){Zl=0,Ql=null,Gu(t);break}t=function(){Zl!==2&&Zl!==9||Jl!==e||(Zl=7),md(e)},o.then(t,t);break a;case 3:Zl=7;break a;case 4:Zl=5;break a;case 7:Oa(o)?(Zl=0,Ql=null,Gu(t)):(Zl=0,Ql=null,Ku(e,t,o,7));break;case 5:var s=null;switch(Yl.tag){case 26:s=Yl.memoizedState;case 5:case 27:var c=Yl;if(s?tp(s):c.stateNode.complete){Zl=0,Ql=null;var l=c.sibling;if(l!==null)Yl=l;else{var u=c.return;u===null?Yl=null:(Yl=u,qu(u))}break b}}Zl=0,Ql=null,Ku(e,t,o,5);break;case 6:Zl=0,Ql=null,Ku(e,t,o,6);break;case 8:Pu(),ru=6;break a;default:throw Error(a(462))}}Uu();break}catch(t){Iu(e,t)}while(1);return Yi=Ji=null,P.H=r,P.A=i,ql=n,Yl===null?(Jl=null,Xl=0,ti(),ru):0}function Uu(){for(;Yl!==null&&!we();)Wu(Yl)}function Wu(e){var t=Rc(e.alternate,e,nu);e.memoizedProps=e.pendingProps,t===null?qu(e):Yl=t}function Gu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Sc(n,t,t.pendingProps,t.type,void 0,Xl);break;case 11:t=Sc(n,t,t.pendingProps,t.type.render,t.ref,Xl);break;case 5:Po(t);default:qc(n,t),t=Yl=fi(t,nu),t=Rc(n,t,nu)}e.memoizedProps=e.pendingProps,t===null?qu(e):Yl=t}function Ku(e,t,n,r){Yi=Ji=null,Po(t),Pa=null,Fa=0;var i=t.return;try{if(sc(e,i,t,n,Xl)){ru=1,nc(e,yi(n,e.current)),Yl=null;return}}catch(t){if(i!==null)throw Yl=i,t;ru=1,nc(e,yi(n,e.current)),Yl=null;return}t.flags&32768?(Ii||r===1?e=!0:eu||Xl&536870912?e=!1:($l=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ju(t,e)):qu(t)}function qu(e){var t=e;do{if(t.flags&32768){Ju(t,$l);return}e=t.return;var n=Gc(t.alternate,t,nu);if(n!==null){Yl=n;return}if(t=t.sibling,t!==null){Yl=t;return}Yl=t=e}while(t!==null);ru===0&&(ru=5)}function Ju(e,t){do{var n=Kc(e.alternate,e);if(n!==null){n.flags&=32767,Yl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Yl=e;return}Yl=e=n}while(e!==null);ru=6,Yl=null}function z(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do $u();while(_u!==0);if(ql&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ei,Qe(e,n,o,s,c,l),e===Jl&&(Yl=Jl=null,Xl=0),yu=t,vu=e,bu=n,xu=o,Su=i,Cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Ae,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=ql,ql|=4;try{fl(e,t,n)}finally{ql=s,F.p=i,P.T=r}}_u=1,Yu(),Xu(),Zu()}}function Yu(){if(_u===1){_u=0;var e=vu,t=yu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=ql;ql|=4;try{Tl(t,e);var a=Zd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vp=!!Xd,Zd=Xd=null}finally{ql=i,F.p=r,P.T=n}}e.current=t,_u=2}}function Xu(){if(_u===2){_u=0;var e=vu,t=yu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=ql;ql|=4;try{pl(e,t.alternate,t)}finally{ql=i,F.p=r,P.T=n}}_u=3}}function Zu(){if(_u===4||_u===3){_u=0,Te();var e=vu,t=yu,n=bu,r=Cu;t.subtreeFlags&10256||t.flags&10256?_u=5:(_u=0,yu=vu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(gu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}bu&3&&$u(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Tu?wu++:(wu=0,Tu=e):wu=0,hd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(_u!==5)return!1;var e=vu,t=xu;xu=0;var n=rt(bu),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,ql&6)throw Error(a(331));var c=ql;if(ql|=4,Hl(o.current),Pl(o,o.current,s,n),ql=c,hd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{F.p=i,P.T=r,Qu(e,t)}}function td(e,t,n){t=yi(n,t),t=ic(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(Ze(e,2),md(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=yi(n,e),n=ac(2),r=Ka(t,n,2),r!==null&&(oc(n,r,t,e),Ze(r,2),md(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(tu=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Jl===e&&(Xl&n)===n&&(ru===4||ru===3&&(Xl&62914560)===Xl&&300>Ee()-fu?!(ql&2)&&Fu(e,0):ou|=n,cu===Xl&&(cu=0)),md(e)}function ad(e,t){t===0&&(t=Ye()),e=ii(e,t),e!==null&&(Ze(e,t),md(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Se(e,t)}var ld=null,ud=null,dd=!1,fd=!1,B=!1,pd=0;function md(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,V())}function hd(e,t){if(!B&&fd){B=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=Xl,a=Ke(r,r===Jl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,bd(r,a));r=r.next}while(n);B=!1}}function gd(){_d()}function _d(){fd=dd=!1;var e=0;pd!==0&&rf()&&(e=pd);for(var t=Ee(),n=null,r=ld;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}_u!==0&&_u!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Jl,n=Xl,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Zl===2||Zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=yd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(_u!==0&&_u!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=Xl;return r=Ke(e,e===Jl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(ku(e,r,t),vd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if($u())return null;ku(e,t,!0)}function V(){cf(function(){ql&6?Se(Oe,gd):_d()})}function xd(){if(pd===0){var e=ma;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),pd=e}return pd}function Sd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function Cd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function wd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Sd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?Sd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?Cd(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Cd(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Td=0;Td<Yr.length;Td++){var Ed=Yr[Td];Xr(Ed.toLowerCase(),`on`+(Ed[0].toUpperCase()+Ed.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Dd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Od=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Dd));function kd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}}}}function Ad(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Pd(t,e,2,!1),n.add(r))}function jd(e,t,n){var r=0;t&&(r|=4),Pd(n,e,r,t)}var Md=`_reactListening`+Math.random().toString(36).slice(2);function Nd(e){if(!e[Md]){e[Md]=!0,xt.forEach(function(t){t!==`selectionchange`&&(Od.has(t)||jd(t,!1,e),jd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Md]||(t[Md]=!0,jd(`selectionchange`,!1,t))}}function Pd(e,t,n,r){switch(Tp(t)){case 2:var i=yp;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Fd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=gt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),o=[];a:{var s=Jr.get(e);if(s!==void 0){var c=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:c=Bn;break;case`focusin`:u=`focus`,c=jn;break;case`focusout`:u=`blur`,c=jn;break;case`beforeblur`:case`afterblur`:c=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Hn;break;case Vr:case Hr:case Ur:c=Mn;break;case qr:c=Un;break;case`scroll`:case`scrollend`:c=wn;break;case`wheel`:c=Wn;break;case`copy`:case`cut`:case`paste`:c=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Vn;break;case`toggle`:case`beforetoggle`:c=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Id(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?gt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:vt(c),h=u==null?s:vt(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Rd,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;c!==null&&zd(o,s,c,d,!1),u!==null&&f!==null&&zd(o,f,u,d,!0)}}a:{if(s=r?vt(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=dr;else if(ar(s))if(fr)v=xr;else{v=yr;var y=vr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Ht(s,`number`,s.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(o,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(o,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Ld(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Ld(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),wd(o,e,r,n,i)}kd(o,t)})}function Id(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ld(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(Id(e,i,a)),i=ln(e,t),i!=null&&r.push(Id(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Rd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(Id(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Id(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Bd=/\r\n?/g,Vd=/\u0000|\uFFFD/g;function Hd(e){return(typeof e==`string`?e:``+e).replace(Bd,`
|
|
10
|
+
`).replace(Vd,``)}function Ud(e,t){return t=Hd(t),Hd(e)===t}function Wd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Wd(e,t,`name`,i.name,i,null),Wd(e,t,`formEncType`,i.formEncType,i,null),Wd(e,t,`formMethod`,i.formMethod,i,null),Wd(e,t,`formTarget`,i.formTarget,i,null)):(Wd(e,t,`encType`,i.encType,i,null),Wd(e,t,`method`,i.method,i,null),Wd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&Ad(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ad(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ad(`beforetoggle`,e),Ad(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Gd(e,t,n,r,i,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&Ad(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ad(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function Kd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Ad(`error`,e),Ad(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Wd(e,t,o,s,n,null)}}i&&Wd(e,t,`srcSet`,n.srcSet,n,null),r&&Wd(e,t,`src`,n.src,n,null);return;case`input`:Ad(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Wd(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Ad(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Wd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in Ad(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Wd(e,t,s,c,n,null)}Gt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Wd(e,t,l,r,n,null)}return;case`dialog`:Ad(`beforetoggle`,e),Ad(`toggle`,e),Ad(`cancel`,e),Ad(`close`,e);break;case`iframe`:case`object`:Ad(`load`,e);break;case`video`:case`audio`:for(r=0;r<Dd.length;r++)Ad(Dd[r],e);break;case`image`:Ad(`error`,e),Ad(`load`,e);break;case`details`:Ad(`toggle`,e);break;case`embed`:case`source`:case`link`:Ad(`error`,e),Ad(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Wd(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Gd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Wd(e,t,c,r,n,null))}function qd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Wd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Wd(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Wd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Wd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Wd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Wd(e,t,s,i,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Wd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Wd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Wd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Wd(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Gd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Gd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Wd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Wd(e,t,f,p,r,m)}function Jd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Yd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Jd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Xd=null,Zd=null;function Qd(e){return e.nodeType===9?e:e.ownerDocument}function $d(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function ef(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function tf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nf=null;function rf(){var e=window.event;return e&&e.type===`popstate`?e===nf?!1:(nf=e,!0):(nf=null,!1)}var af=typeof setTimeout==`function`?setTimeout:void 0,of=typeof clearTimeout==`function`?clearTimeout:void 0,sf=typeof Promise==`function`?Promise:void 0,cf=typeof queueMicrotask==`function`?queueMicrotask:sf===void 0?af:function(e){return sf.resolve(null).then(e).catch(lf)};function lf(e){setTimeout(function(){throw e})}function uf(e){return e===`head`}function df(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tf(e.ownerDocument.body);n=i}while(n);Wp(t)}function ff(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:pf(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bf(e.nextSibling),e===null)break}return null}function hf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bf(e.nextSibling),e===null))return null;return e}function gf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bf(e.nextSibling),e===null))return null;return e}function _f(e){return e.data===`$?`||e.data===`$~`}function vf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function yf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function bf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var xf=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function wf(e,t,n){switch(t=Qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Tf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var Ef=new Map,Df=new Set;function Of(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kf=F.d;F.d={f:Af,r:jf,D:Pf,C:Ff,L:If,m:Lf,X:zf,S:Rf,M:Bf};function Af(){var e=kf.f(),t=Nu();return e||t}function jf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):kf.r(e)}var Mf=typeof document>`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Ef.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Ef.has(a)&&(e=h({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=yt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);bt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=yt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=h({src:e,async:!0},t),(t=Ef.get(i))&&Xf(e,t),a=n.createElement(`script`),bt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=yt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Xf(e,t),a=n.createElement(`script`),bt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function H(e,t,n,r){var i=(i=ce.current)?Of(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=yt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=yt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Wf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=yt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Vf(e){return`href="`+zt(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),bt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+zt(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),Kd(r,`style`,i),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Vf(n.href);var o=e.querySelector(Hf(i));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Uf(n),(i=Ef.get(i))&&Yf(r,i),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(i=e.querySelector(Kf(o)))?(t.instance=i,bt(i),i):(r=n,(i=Ef.get(o))&&(r=h({},n),Xf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),bt(i),Kd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Ef.get(i))&&Yf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Yd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ap.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function up(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function fp(e){return e?(e=si,e):si}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(Ou(n,e,t),qa(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&Ou(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=Eu();t=nt(t);var n=ii(e,t);n!==null&&Ou(n,e,t),hp(e,t)}}var vp=!0;function yp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,xp(e,t,n,r)}finally{F.p=a,P.T=i}}function bp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,xp(e,t,n,r)}finally{F.p=a,P.T=i}}function xp(e,t,n,r){if(vp){var i=Sp(r);if(i===null)Fd(e,t,r,Cp,n),Pp(e,r);else if(Ip(i,e,t,n,r))r.stopPropagation();else if(Pp(e,r),t&4&&-1<Np.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}md(a),!(ql&6)&&(mu=Ee()+500,hd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&Ou(s,a,2),Nu(),hp(a,2)}if(a=Sp(r),a===null&&Fd(e,t,r,Cp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Fd(e,t,r,null,n)}}function Sp(e){return e=nn(e),wp(e)}var Cp=null;function wp(e){if(Cp=null,e=gt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cp=e,null}function Tp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Ep=!1,Dp=null,Op=null,kp=null,Ap=new Map,jp=new Map,Mp=[],Np=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Pp(e,t){switch(e){case`focusin`:case`focusout`:Dp=null;break;case`dragenter`:case`dragleave`:Op=null;break;case`mouseover`:case`mouseout`:kp=null;break;case`pointerover`:case`pointerout`:Ap.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jp.delete(t.pointerId)}}function Fp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ip(e,t,n,r,i){switch(t){case`focusin`:return Dp=Fp(Dp,e,t,n,r,i),!0;case`dragenter`:return Op=Fp(Op,e,t,n,r,i),!0;case`mouseover`:return kp=Fp(kp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ap.set(a,Fp(Ap.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jp.set(a,Fp(jp.get(a)||null,e,t,n,r,i)),!0}return!1}function Lp(e){var t=gt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,at(e.priority,function(){_p(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,at(e.priority,function(){_p(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Rp(e)&&n.delete(t)}function Bp(){Ep=!1,Dp!==null&&Rp(Dp)&&(Dp=null),Op!==null&&Rp(Op)&&(Op=null),kp!==null&&Rp(kp)&&(kp=null),Ap.forEach(zp),jp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Ep||(Ep=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Dp!==null&&Vp(Dp,e),Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap.forEach(t),jp.forEach(t);for(var n=0;n<Mp.length;n++){var r=Mp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mp.length&&(n=Mp[0],n.blockedOn===null);)Lp(n),n.blockedOn===null&&Mp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(wp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;pp(n,Eu(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),Nu(),t[lt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mp.length&&t!==0&&t<Mp[n].priority;n++);Mp.splice(n,0,e),n===0&&Lp(e)}};var Jp=n.version;if(Jp!==`19.2.5`)throw Error(a(527,Jp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Fe=Xp.inject(Yp),Ie=Xp}catch{}}e.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r=``,i=$s,o=ec,c=tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dp(e,1,!1,null,null,n,r,null,i,o,c,Gp),e[lt]=t.current,Nd(e),new Kp(t)}})),u=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=t(i(),1);function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return d.useCallback(p(...e),e)}var h=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),g=n(((e,t)=>{t.exports=h()})),_=g();function v(e){let t=b(e),n=d.forwardRef((e,n)=>{let{children:r,...i}=e,a=d.Children.toArray(r),o=a.find(C);if(o){let e=o.props.children,r=a.map(t=>t===o?d.Children.count(e)>1?d.Children.only(null):d.isValidElement(e)?e.props.children:null:t);return(0,_.jsx)(t,{...i,ref:n,children:d.isValidElement(e)?d.cloneElement(e,void 0,r):null})}return(0,_.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var y=v(`Slot`);function b(e){let t=d.forwardRef((e,t)=>{let{children:n,...r}=e;if(d.isValidElement(n)){let e=T(n),i=w(r,n.props);return n.type!==d.Fragment&&(i.ref=t?p(t,e):e),d.cloneElement(n,i)}return d.Children.count(n)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x=Symbol(`radix.slottable`);function S(e){let t=({children:e})=>(0,_.jsx)(_.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=x,t}function C(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===x}function w(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function T(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var E=t(c(),1),D=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=v(`Primitive.${t}`),r=d.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,_.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function O(e,t){e&&E.flushSync(()=>e.dispatchEvent(t))}var ee=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),k=`VisuallyHidden`,A=d.forwardRef((e,t)=>(0,_.jsx)(D.span,{...e,ref:t,style:{...ee,...e.style}}));A.displayName=k;var j=A;function M(e,t){let n=d.createContext(t),r=e=>{let{children:t,...r}=e,i=d.useMemo(()=>r,Object.values(r));return(0,_.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function N(e,t=[]){let n=[];function r(t,r){let i=d.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=d.useMemo(()=>o,Object.values(o));return(0,_.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=d.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>d.createContext(e));return function(n){let r=n?.[e]||t;return d.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,te(i,...t)]}function te(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function P(e){let t=e+`CollectionProvider`,[n,r]=N(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=d.useRef(null),a=d.useRef(new Map).current;return(0,_.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=v(s),l=d.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,_.jsx)(c,{ref:m(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=v(u),h=d.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=d.useRef(null),s=m(t,o),c=a(u,n);return d.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,_.jsx)(p,{[f]:``,ref:s,children:r})});h.displayName=u;function g(t){let n=a(e+`CollectionConsumer`,t);return d.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},g,r]}typeof window<`u`&&window.document&&window.document.createElement;function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ne=globalThis?.document?d.useLayoutEffect:()=>{},re=d.useInsertionEffect||ne;function ie({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ae({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=d.useRef(e!==void 0);d.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,d.useCallback(t=>{if(s){let n=I(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ae({defaultProp:e,onChange:t}){let[n,r]=d.useState(e),i=d.useRef(n),a=d.useRef(t);return re(()=>{a.current=t},[t]),d.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function I(e){return typeof e==`function`}function L(e,t){return d.useReducer((e,n)=>t[e][n]??e,e)}var oe=e=>{let{present:t,children:n}=e,r=se(t),i=typeof n==`function`?n({present:r.isPresent}):d.Children.only(n),a=m(r.ref,le(i));return typeof n==`function`||r.isPresent?d.cloneElement(i,{ref:a}):null};oe.displayName=`Presence`;function se(e){let[t,n]=d.useState(),r=d.useRef(null),i=d.useRef(e),a=d.useRef(`none`),[o,s]=L(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return d.useEffect(()=>{let e=ce(r.current);a.current=o===`mounted`?e:`none`},[o]),ne(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=ce(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),ne(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=ce(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=ce(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:d.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function ce(e){return e?.animationName||`none`}function le(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ue=d.useId||(()=>void 0),de=0;function fe(e){let[t,n]=d.useState(ue());return ne(()=>{e||n(e=>e??String(de++))},[e]),e||(t?`radix-${t}`:``)}var pe=d.createContext(void 0);function me(e){let t=d.useContext(pe);return e||t||`ltr`}function he(e){let t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...e)=>t.current?.(...e),[])}function ge(e,t=globalThis?.document){let n=he(e);d.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var _e=`DismissableLayer`,ve=`dismissableLayer.update`,ye=`dismissableLayer.pointerDownOutside`,be=`dismissableLayer.focusOutside`,xe,Se=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ce=d.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=d.useContext(Se),[u,f]=d.useState(null),p=u?.ownerDocument??globalThis?.document,[,h]=d.useState({}),g=m(t,e=>f(e)),v=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=u?v.indexOf(u):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=Ee(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!C||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},p),T=De(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},p);return ge(e=>{x===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},p),d.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(xe=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Oe(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=xe)}},[u,p,n,l]),d.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Oe())},[u,l]),d.useEffect(()=>{let e=()=>h({});return document.addEventListener(ve,e),()=>document.removeEventListener(ve,e)},[]),(0,_.jsx)(D.div,{...c,ref:g,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,T.onFocusCapture),onBlurCapture:F(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,w.onPointerDownCapture)})});Ce.displayName=_e;var we=`DismissableLayerBranch`,Te=d.forwardRef((e,t)=>{let n=d.useContext(Se),r=d.useRef(null),i=m(t,r);return d.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,_.jsx)(D.div,{...e,ref:i})});Te.displayName=we;function Ee(e,t=globalThis?.document){let n=he(e),r=d.useRef(!1),i=d.useRef(()=>{});return d.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ke(ye,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function De(e,t=globalThis?.document){let n=he(e),r=d.useRef(!1);return d.useEffect(()=>{let e=e=>{e.target&&!r.current&&ke(be,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Oe(){let e=new CustomEvent(ve);document.dispatchEvent(e)}function ke(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?O(i,a):i.dispatchEvent(a)}var Ae=`focusScope.autoFocusOnMount`,je=`focusScope.autoFocusOnUnmount`,Me={bubbles:!1,cancelable:!0},Ne=`FocusScope`,Pe=d.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=d.useState(null),l=he(i),u=he(a),f=d.useRef(null),p=m(t,e=>c(e)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?f.current=t:Ve(f.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Ve(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ve(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),d.useEffect(()=>{if(s){He.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ae,Me);s.addEventListener(Ae,l),s.dispatchEvent(t),t.defaultPrevented||(Fe(Ge(Le(s)),{select:!0}),document.activeElement===e&&Ve(s))}return()=>{s.removeEventListener(Ae,l),setTimeout(()=>{let t=new CustomEvent(je,Me);s.addEventListener(je,u),s.dispatchEvent(t),t.defaultPrevented||Ve(e??document.body,{select:!0}),s.removeEventListener(je,u),He.remove(h)},0)}}},[s,l,u,h]);let g=d.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ie(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Ve(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Ve(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,_.jsx)(D.div,{tabIndex:-1,...o,ref:p,onKeyDown:g})});Pe.displayName=Ne;function Fe(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ve(r,{select:t}),document.activeElement!==n)return}function Ie(e){let t=Le(e);return[Re(t,e),Re(t.reverse(),e)]}function Le(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Re(e,t){for(let n of e)if(!ze(n,{upTo:t}))return n}function ze(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Be(e){return e instanceof HTMLInputElement&&`select`in e}function Ve(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Be(e)&&t&&e.select()}}var He=Ue();function Ue(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=We(e,t),e.unshift(t)},remove(t){e=We(e,t),e[0]?.resume()}}}function We(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ge(e){return e.filter(e=>e.tagName!==`A`)}var Ke=`Portal`,qe=d.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=d.useState(!1);ne(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?E.createPortal((0,_.jsx)(D.div,{...r,ref:t}),o):null});qe.displayName=Ke;var Je=0;function Ye(){d.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Xe()),document.body.insertAdjacentElement(`beforeend`,e[1]??Xe()),Je++,()=>{Je===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Je--}},[])}function Xe(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Ze=function(){return Ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ze.apply(this,arguments)};function Qe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function $e(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var et=`right-scroll-bar-position`,tt=`width-before-scroll-bar`,nt=`with-scroll-bars-hidden`,rt=`--removed-body-scroll-bar-size`;function it(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function at(e,t){var n=(0,d.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ot=typeof window<`u`?d.useLayoutEffect:d.useEffect,st=new WeakMap;function ct(e,t){var n=at(t||null,function(t){return e.forEach(function(e){return it(e,t)})});return ot(function(){var t=st.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||it(e,null)}),i.forEach(function(e){r.has(e)||it(e,a)})}st.set(n,e)},[e]),n}function lt(e){return e}function ut(e,t){t===void 0&&(t=lt);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function dt(e){e===void 0&&(e={});var t=ut(null);return t.options=Ze({async:!0,ssr:!1},e),t}var ft=function(e){var t=e.sideCar,n=Qe(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return d.createElement(r,Ze({},n))};ft.isSideCarExport=!0;function pt(e,t){return e.useMedium(t),ft}var mt=dt(),ht=function(){},gt=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:ht,onWheelCapture:ht,onTouchMoveCapture:ht}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Qe(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=ct([n,t]),w=Ze(Ze({},x),i);return d.createElement(d.Fragment,null,u&&d.createElement(S,{sideCar:mt,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?d.cloneElement(d.Children.only(s),Ze(Ze({},w),{ref:C})):d.createElement(y,Ze({},w,{className:c,ref:C}),s))});gt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},gt.classNames={fullWidth:tt,zeroRight:et};var _t,vt=function(){if(_t)return _t;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function yt(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=vt();return t&&e.setAttribute(`nonce`,t),e}function bt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xt(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var St=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yt())&&(bt(t,n),xt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ct=function(){var e=St();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wt=function(){var e=Ct();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Tt={left:0,top:0,right:0,gap:0},Et=function(e){return parseInt(e||``,10)||0},Dt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Et(n),Et(r),Et(i)]},Ot=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Tt;var t=Dt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},kt=wt(),At=`data-scroll-locked`,jt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
11
|
+
.${nt} {
|
|
12
|
+
overflow: hidden ${r};
|
|
13
|
+
padding-right: ${s}px ${r};
|
|
14
|
+
}
|
|
15
|
+
body[${At}] {
|
|
16
|
+
overflow: hidden ${r};
|
|
17
|
+
overscroll-behavior: contain;
|
|
18
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
19
|
+
padding-left: ${i}px;
|
|
20
|
+
padding-top: ${a}px;
|
|
21
|
+
padding-right: ${o}px;
|
|
22
|
+
margin-left:0;
|
|
23
|
+
margin-top:0;
|
|
24
|
+
margin-right: ${s}px ${r};
|
|
25
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.${et} {
|
|
29
|
+
right: ${s}px ${r};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.${tt} {
|
|
33
|
+
margin-right: ${s}px ${r};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.${et} .${et} {
|
|
37
|
+
right: 0 ${r};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.${tt} .${tt} {
|
|
41
|
+
margin-right: 0 ${r};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
body[${At}] {
|
|
45
|
+
${rt}: ${s}px;
|
|
46
|
+
}
|
|
47
|
+
`},Mt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Nt=function(){d.useEffect(function(){return document.body.setAttribute(At,(Mt()+1).toString()),function(){var e=Mt()-1;e<=0?document.body.removeAttribute(At):document.body.setAttribute(At,e.toString())}},[])},Pt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Nt();var a=d.useMemo(function(){return Ot(i)},[i]);return d.createElement(kt,{styles:jt(a,!t,i,n?``:`!important`)})},Ft=!1;if(typeof window<`u`)try{var It=Object.defineProperty({},`passive`,{get:function(){return Ft=!0,!0}});window.addEventListener(`test`,It,It),window.removeEventListener(`test`,It,It)}catch{Ft=!1}var Lt=Ft?{passive:!1}:!1,Rt=function(e){return e.tagName===`TEXTAREA`},zt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Rt(e)&&n[t]===`visible`)},Bt=function(e){return zt(e,`overflowY`)},Vt=function(e){return zt(e,`overflowX`)},Ht=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Gt(e,r)){var i=Kt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ut=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Wt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Gt=function(e,t){return e===`v`?Bt(t):Vt(t)},Kt=function(e,t){return e===`v`?Ut(t):Wt(t)},qt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Jt=function(e,t,n,r,i){var a=qt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Kt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Gt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Yt=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xt=function(e){return[e.deltaX,e.deltaY]},Zt=function(e){return e&&`current`in e?e.current:e},Qt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$t=function(e){return`
|
|
48
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
49
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
50
|
+
`},en=0,tn=[];function nn(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(en++)[0],a=d.useState(wt)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=$e([e.lockRef.current],(e.shards||[]).map(Zt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Yt(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ht(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ht(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Jt(h,t,e,h===`h`?s:c,!0)},[]),c=d.useCallback(function(e){var n=e;if(!(!tn.length||tn[tn.length-1]!==a)){var r=`deltaY`in n?Xt(n):Yt(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Qt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Zt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=d.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:rn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=d.useCallback(function(e){n.current=Yt(e),r.current=void 0},[]),f=d.useCallback(function(t){l(t.type,Xt(t),t.target,s(t,e.lockRef.current))},[]),p=d.useCallback(function(t){l(t.type,Yt(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return tn.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,Lt),document.addEventListener(`touchmove`,c,Lt),document.addEventListener(`touchstart`,u,Lt),function(){tn=tn.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Lt),document.removeEventListener(`touchmove`,c,Lt),document.removeEventListener(`touchstart`,u,Lt)}},[]);var m=e.removeScrollBar,h=e.inert;return d.createElement(d.Fragment,null,h?d.createElement(a,{styles:$t(i)}):null,m?d.createElement(Pt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var an=pt(mt,nn),on=d.forwardRef(function(e,t){return d.createElement(gt,Ze({},e,{ref:t,sideCar:an}))});on.classNames=gt.classNames;var sn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},cn=new WeakMap,ln=new WeakMap,un={},dn=0,fn=function(e){return e&&(e.host||fn(e.parentNode))},pn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=fn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},mn=function(e,t,n,r){var i=pn(t,Array.isArray(e)?e:[e]);un[n]||(un[n]=new WeakMap);var a=un[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(cn.get(e)||0)+1,l=(a.get(e)||0)+1;cn.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ln.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),dn++,function(){o.forEach(function(e){var t=cn.get(e)-1,i=a.get(e)-1;cn.set(e,t),a.set(e,i),t||(ln.has(e)||e.removeAttribute(r),ln.delete(e)),i||e.removeAttribute(n)}),dn--,dn||(cn=new WeakMap,cn=new WeakMap,ln=new WeakMap,un={})}},hn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||sn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),mn(r,i,n,`aria-hidden`)):function(){return null}},gn=`Dialog`,[_n,vn]=N(gn),[yn,bn]=_n(gn),xn=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=d.useRef(null),c=d.useRef(null),[l,u]=ie({prop:r,defaultProp:i??!1,onChange:a,caller:gn});return(0,_.jsx)(yn,{scope:t,triggerRef:s,contentRef:c,contentId:fe(),titleId:fe(),descriptionId:fe(),open:l,onOpenChange:u,onOpenToggle:d.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};xn.displayName=gn;var Sn=`DialogTrigger`,Cn=d.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bn(Sn,n),a=m(t,i.triggerRef);return(0,_.jsx)(D.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Un(i.open),...r,ref:a,onClick:F(e.onClick,i.onOpenToggle)})});Cn.displayName=Sn;var wn=`DialogPortal`,[Tn,En]=_n(wn,{forceMount:void 0}),Dn=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=bn(wn,t);return(0,_.jsx)(Tn,{scope:t,forceMount:n,children:d.Children.map(r,e=>(0,_.jsx)(oe,{present:n||a.open,children:(0,_.jsx)(qe,{asChild:!0,container:i,children:e})}))})};Dn.displayName=wn;var On=`DialogOverlay`,kn=d.forwardRef((e,t)=>{let n=En(On,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bn(On,e.__scopeDialog);return a.modal?(0,_.jsx)(oe,{present:r||a.open,children:(0,_.jsx)(jn,{...i,ref:t})}):null});kn.displayName=On;var An=v(`DialogOverlay.RemoveScroll`),jn=d.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bn(On,n);return(0,_.jsx)(on,{as:An,allowPinchZoom:!0,shards:[i.contentRef],children:(0,_.jsx)(D.div,{"data-state":Un(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Mn=`DialogContent`,Nn=d.forwardRef((e,t)=>{let n=En(Mn,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bn(Mn,e.__scopeDialog);return(0,_.jsx)(oe,{present:r||a.open,children:a.modal?(0,_.jsx)(Pn,{...i,ref:t}):(0,_.jsx)(Fn,{...i,ref:t})})});Nn.displayName=Mn;var Pn=d.forwardRef((e,t)=>{let n=bn(Mn,e.__scopeDialog),r=d.useRef(null),i=m(t,n.contentRef,r);return d.useEffect(()=>{let e=r.current;if(e)return hn(e)},[]),(0,_.jsx)(In,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault())})}),Fn=d.forwardRef((e,t)=>{let n=bn(Mn,e.__scopeDialog),r=d.useRef(!1),i=d.useRef(!1);return(0,_.jsx)(In,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),In=d.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=bn(Mn,n),c=d.useRef(null),l=m(t,c);return Ye(),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Pe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,_.jsx)(Ce,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Un(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(qn,{titleId:s.titleId}),(0,_.jsx)(Yn,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Ln=`DialogTitle`,Rn=d.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bn(Ln,n);return(0,_.jsx)(D.h2,{id:i.titleId,...r,ref:t})});Rn.displayName=Ln;var zn=`DialogDescription`,Bn=d.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bn(zn,n);return(0,_.jsx)(D.p,{id:i.descriptionId,...r,ref:t})});Bn.displayName=zn;var Vn=`DialogClose`,Hn=d.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bn(Vn,n);return(0,_.jsx)(D.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});Hn.displayName=Vn;function Un(e){return e?`open`:`closed`}var Wn=`DialogTitleWarning`,[Gn,Kn]=M(Wn,{contentName:Mn,titleName:Ln,docsSlug:`dialog`}),qn=({titleId:e})=>{let t=Kn(Wn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
51
|
+
|
|
52
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
53
|
+
|
|
54
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Jn=`DialogDescriptionWarning`,Yn=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kn(Jn).contentName}}.`;return d.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Xn=xn,Zn=Dn,Qn=kn,$n=Nn,er=Rn,tr=Bn,nr=Hn;function rr(e){let t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ir(e){let[t,n]=d.useState(void 0);return ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var ar=[`top`,`right`,`bottom`,`left`],or=Math.min,sr=Math.max,cr=Math.round,lr=Math.floor,ur=e=>({x:e,y:e}),dr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fr(e,t,n){return sr(e,or(t,n))}function pr(e,t){return typeof e==`function`?e(t):e}function mr(e){return e.split(`-`)[0]}function hr(e){return e.split(`-`)[1]}function gr(e){return e===`x`?`y`:`x`}function _r(e){return e===`y`?`height`:`width`}function vr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yr(e){return gr(vr(e))}function br(e,t,n){n===void 0&&(n=!1);let r=hr(e),i=yr(e),a=_r(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=kr(o)),[o,kr(o)]}function xr(e){let t=kr(e);return[Sr(e),t,Sr(t)]}function Sr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Cr=[`left`,`right`],wr=[`right`,`left`],Tr=[`top`,`bottom`],Er=[`bottom`,`top`];function Dr(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wr:Cr:t?Cr:wr;case`left`:case`right`:return t?Tr:Er;default:return[]}}function Or(e,t,n,r){let i=hr(e),a=Dr(mr(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Sr)))),a}function kr(e){let t=mr(e);return dr[t]+e.slice(t.length)}function Ar(e){return{top:0,right:0,bottom:0,left:0,...e}}function jr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ar(e)}function Mr(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Nr(e,t,n){let{reference:r,floating:i}=e,a=vr(t),o=yr(t),s=_r(o),c=mr(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(hr(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Pr(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pr(t,e),p=jr(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Mr(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Mr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Fr=50,Ir=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Pr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Nr(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Fr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Nr(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Lr=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pr(e,t)||{};if(l==null)return{};let d=jr(u),f={x:n,y:r},p=yr(i),m=_r(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=or(d[_],T),D=or(d[v],T),O=E,ee=C-h[m]-D,k=C/2-h[m]/2+w,A=fr(O,k,ee),j=!c.arrow&&hr(i)!=null&&k!==A&&a.reference[m]/2-(k<O?E:D)-h[m]/2<0,M=j?k<O?k-O:k-ee:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Rr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mr(r),_=vr(o),v=mr(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[kr(o)]:xr(o)),x=p!==`none`;!d&&x&&b.push(...Or(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=br(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==vr(t))||T.every(e=>vr(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vr(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function zr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Br(e){return ar.some(t=>e[t]>=0)}var Vr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=pr(e,t);switch(i){case`referenceHidden`:{let e=zr(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Br(e)}}}case`escaped`:{let e=zr(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Br(e)}}}default:return{}}}}},Hr=new Set([`left`,`top`]);async function Ur(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mr(n),s=hr(n),c=vr(n)===`y`,l=Hr.has(o)?-1:1,u=a&&c?-1:1,d=pr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Wr=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ur(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Gr=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vr(mr(i)),p=gr(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=fr(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=fr(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Kr=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pr(e,t),u={x:n,y:r},d=vr(i),f=gr(d),p=u[f],m=u[d],h=pr(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Hr.has(mr(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},qr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=pr(e,t),u=await o.detectOverflow(t,l),d=mr(i),f=hr(i),p=vr(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=or(h-u[g],v),x=or(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=sr(u.left,0),t=sr(u.right,0),n=sr(u.top,0),r=sr(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:sr(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:sr(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Jr(){return typeof window<`u`}function Yr(e){return Qr(e)?(e.nodeName||``).toLowerCase():`#document`}function Xr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){return((Qr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Qr(e){return Jr()?e instanceof Node||e instanceof Xr(e).Node:!1}function $r(e){return Jr()?e instanceof Element||e instanceof Xr(e).Element:!1}function ei(e){return Jr()?e instanceof HTMLElement||e instanceof Xr(e).HTMLElement:!1}function ti(e){return!Jr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xr(e).ShadowRoot}function ni(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ri(e){return/^(table|td|th)$/.test(Yr(e))}function ii(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ai=/transform|translate|scale|rotate|perspective|filter/,oi=/paint|layout|strict|content/,si=e=>!!e&&e!==`none`,ci;function li(e){let t=$r(e)?pi(e):e;return si(t.transform)||si(t.translate)||si(t.scale)||si(t.rotate)||si(t.perspective)||!di()&&(si(t.backdropFilter)||si(t.filter))||ai.test(t.willChange||``)||oi.test(t.contain||``)}function ui(e){let t=hi(e);for(;ei(t)&&!fi(t);){if(li(t))return t;if(ii(t))return null;t=hi(t)}return null}function di(){return ci??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ci}function fi(e){return/^(html|body|#document)$/.test(Yr(e))}function pi(e){return Xr(e).getComputedStyle(e)}function mi(e){return $r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(Yr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ti(e)&&e.host||Zr(e);return ti(t)?t.host:t}function gi(e){let t=hi(e);return fi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ei(t)&&ni(t)?t:gi(t)}function _i(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gi(e),i=r===e.ownerDocument?.body,a=Xr(r);if(i){let e=vi(a);return t.concat(a,a.visualViewport||[],ni(r)?r:[],e&&n?_i(e):[])}else return t.concat(r,_i(r,[],n))}function vi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yi(e){let t=pi(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ei(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cr(n)!==a||cr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bi(e){return $r(e)?e:e.contextElement}function xi(e){let t=bi(e);if(!ei(t))return ur(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yi(t),o=(a?cr(n.width):n.width)/r,s=(a?cr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Si=ur(0);function Ci(e){let t=Xr(e);return!di()||!t.visualViewport?Si:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xr(e)?!1:t}function Ti(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bi(e),o=ur(1);t&&(r?$r(r)&&(o=xi(r)):o=xi(e));let s=wi(a,n,r)?Ci(a):ur(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Xr(a),t=r&&$r(r)?Xr(r):r,n=e,i=vi(n);for(;i&&r&&t!==n;){let e=xi(i),t=i.getBoundingClientRect(),r=pi(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Xr(i),i=vi(n)}}return Mr({width:u,height:d,x:c,y:l})}function Ei(e,t){let n=mi(e).scrollLeft;return t?t.left+n:Ti(Zr(e)).left+n}function Di(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ei(e,n),y:n.top+t.scrollTop}}function Oi(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zr(r),s=t?ii(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ur(1),u=ur(0),d=ei(r);if((d||!d&&!a)&&((Yr(r)!==`body`||ni(o))&&(c=mi(r)),d)){let e=Ti(r);l=xi(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Di(o,c):ur(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ki(e){return Array.from(e.getClientRects())}function Ai(e){let t=Zr(e),n=mi(e),r=e.ownerDocument.body,i=sr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=sr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ei(e),s=-n.scrollTop;return pi(r).direction===`rtl`&&(o+=sr(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ji=25;function Mi(e,t){let n=Xr(e),r=Zr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=di();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ei(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ji&&(a-=o)}else l<=ji&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ni(e,t){let n=Ti(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ei(e)?xi(e):ur(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pi(e,t,n){let r;if(t===`viewport`)r=Mi(e,n);else if(t===`document`)r=Ai(Zr(e));else if($r(t))r=Ni(t,n);else{let n=Ci(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Mr(r)}function Fi(e,t){let n=hi(e);return n===t||!$r(n)||fi(n)?!1:pi(n).position===`fixed`||Fi(n,t)}function Ii(e,t){let n=t.get(e);if(n)return n;let r=_i(e,[],!1).filter(e=>$r(e)&&Yr(e)!==`body`),i=null,a=pi(e).position===`fixed`,o=a?hi(e):e;for(;$r(o)&&!fi(o);){let t=pi(o),n=li(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ni(o)&&!n&&Fi(e,o))?r=r.filter(e=>e!==o):i=t,o=hi(o)}return t.set(e,r),r}function Li(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ii(t)?[]:Ii(t,this._c):[].concat(n),r],o=Pi(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Pi(t,a[e],i);s=sr(n.top,s),c=or(n.right,c),l=or(n.bottom,l),u=sr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ri(e){let{width:t,height:n}=yi(e);return{width:t,height:n}}function zi(e,t,n){let r=ei(t),i=Zr(t),a=n===`fixed`,o=Ti(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ur(0);function l(){c.x=Ei(i)}if(r||!r&&!a)if((Yr(t)!==`body`||ni(i))&&(s=mi(t)),r){let e=Ti(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Di(i,s):ur(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Bi(e){return pi(e).position===`static`}function Vi(e,t){if(!ei(e)||pi(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function Hi(e,t){let n=Xr(e);if(ii(e))return n;if(!ei(e)){let t=hi(e);for(;t&&!fi(t);){if($r(t)&&!Bi(t))return t;t=hi(t)}return n}let r=Vi(e,t);for(;r&&ri(r)&&Bi(r);)r=Vi(r,t);return r&&fi(r)&&Bi(r)&&!li(r)?n:r||ui(e)||n}var Ui=async function(e){let t=this.getOffsetParent||Hi,n=this.getDimensions,r=await n(e.floating);return{reference:zi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wi(e){return pi(e).direction===`rtl`}var Gi={convertOffsetParentRelativeRectToViewportRelativeRect:Oi,getDocumentElement:Zr,getClippingRect:Li,getOffsetParent:Hi,getElementRects:Ui,getClientRects:ki,getDimensions:Ri,getScale:xi,isElement:$r,isRTL:Wi};function Ki(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qi(e,t){let n=null,r,i=Zr(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=lr(d),h=lr(i.clientWidth-(u+f)),g=lr(i.clientHeight-(d+p)),_=lr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:sr(0,or(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ki(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Ji(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bi(e),u=i||a?[...l?_i(l):[],...t?_i(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?qi(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Ti(e):null;c&&g();function g(){let t=Ti(e);h&&!Ki(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Yi=Wr,Xi=Gr,Zi=Rr,Qi=qr,$i=Vr,ea=Lr,ta=Kr,na=(e,t,n)=>{let r=new Map,i={platform:Gi,...n},a={...i.platform,_c:r};return Ir(e,t,{...i,platform:a})},ra=typeof document<`u`?d.useLayoutEffect:function(){};function ia(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ia(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ia(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function aa(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oa(e,t){let n=aa(e);return Math.round(t*n)/n}function sa(e){let t=d.useRef(e);return ra(()=>{t.current=e}),t}function ca(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=d.useState(r);ia(p,r)||m(r);let[h,g]=d.useState(null),[_,v]=d.useState(null),y=d.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=d.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=d.useRef(null),w=d.useRef(null),T=d.useRef(u),D=c!=null,O=sa(c),ee=sa(i),k=sa(l),A=d.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};ee.current&&(e.platform=ee.current),na(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ia(T.current,t)&&(T.current=t,E.flushSync(()=>{f(t)}))})},[p,t,n,ee,k]);ra(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=d.useRef(!1);ra(()=>(j.current=!0,()=>{j.current=!1}),[]),ra(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(O.current)return O.current(x,S,A);A()}},[x,S,A,O,D]);let M=d.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=d.useMemo(()=>({reference:x,floating:S}),[x,S]),te=d.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=oa(N.floating,u.x),r=oa(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...aa(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:te}),[u,A,M,N,te])}var la=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ea({element:r.current,padding:i}).fn(n):r?ea({element:r,padding:i}).fn(n):{}}}},ua=(e,t)=>{let n=Yi(e);return{name:n.name,fn:n.fn,options:[e,t]}},da=(e,t)=>{let n=Xi(e);return{name:n.name,fn:n.fn,options:[e,t]}},fa=(e,t)=>({fn:ta(e).fn,options:[e,t]}),pa=(e,t)=>{let n=Zi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ma=(e,t)=>{let n=Qi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ha=(e,t)=>{let n=$i(e);return{name:n.name,fn:n.fn,options:[e,t]}},ga=(e,t)=>{let n=la(e);return{name:n.name,fn:n.fn,options:[e,t]}},_a=`Arrow`,va=d.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,_.jsx)(D.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,_.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});va.displayName=_a;var ya=va,ba=`Popper`,[xa,Sa]=N(ba),[Ca,wa]=xa(ba),Ta=e=>{let{__scopePopper:t,children:n}=e,[r,i]=d.useState(null);return(0,_.jsx)(Ca,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ta.displayName=ba;var Ea=`PopperAnchor`,Da=d.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=wa(Ea,n),o=d.useRef(null),s=m(t,o),c=d.useRef(null);return d.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,_.jsx)(D.div,{...i,ref:s})});Da.displayName=Ea;var Oa=`PopperContent`,[ka,Aa]=xa(Oa),ja=d.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,...v}=e,y=wa(Oa,n),[b,x]=d.useState(null),S=m(t,e=>x(e)),[C,w]=d.useState(null),T=ir(C),E=T?.width??0,O=T?.height??0,ee=r+(a===`center`?``:`-`+a),k=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},A=Array.isArray(l)?l:[l],j=A.length>0,M={padding:k,boundary:A.filter(Fa),altBoundary:j},{refs:N,floatingStyles:te,placement:P,isPositioned:F,middlewareData:re}=ca({strategy:`fixed`,placement:ee,whileElementsMounted:(...e)=>Ji(...e,{animationFrame:h===`always`}),elements:{reference:y.anchor},middleware:[ua({mainAxis:i+O,alignmentAxis:o}),c&&da({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?fa():void 0,...M}),c&&pa({...M}),ma({...M,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),C&&ga({element:C,padding:s}),Ia({arrowWidth:E,arrowHeight:O}),p&&ha({strategy:`referenceHidden`,...M})]}),[ie,ae]=La(P),I=he(g);ne(()=>{F&&I?.()},[F,I]);let L=re.arrow?.x,oe=re.arrow?.y,se=re.arrow?.centerOffset!==0,[ce,le]=d.useState();return ne(()=>{b&&le(window.getComputedStyle(b).zIndex)},[b]),(0,_.jsx)(`div`,{ref:N.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:F?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ce,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(` `),...re.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,_.jsx)(ka,{scope:n,placedSide:ie,onArrowChange:w,arrowX:L,arrowY:oe,shouldHideArrow:se,children:(0,_.jsx)(D.div,{"data-side":ie,"data-align":ae,...v,ref:S,style:{...v.style,animation:F?void 0:`none`}})})})});ja.displayName=Oa;var Ma=`PopperArrow`,Na={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Pa=d.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Aa(Ma,n),a=Na[i.placedSide];return(0,_.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,_.jsx)(ya,{...r,ref:t,style:{...r.style,display:`block`}})})});Pa.displayName=Ma;function Fa(e){return e!==null}var Ia=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=La(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function La(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ra=Ta,za=Da,Ba=ja,Va=Pa;function Ha(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ua=`Popover`,[Wa,Ga]=N(Ua,[Sa]),Ka=Sa(),[qa,Ja]=Wa(Ua),Ya=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Ka(t),c=d.useRef(null),[l,u]=d.useState(!1),[f,p]=ie({prop:r,defaultProp:i??!1,onChange:a,caller:Ua});return(0,_.jsx)(Ra,{...s,children:(0,_.jsx)(qa,{scope:t,contentId:fe(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:l,onCustomAnchorAdd:d.useCallback(()=>u(!0),[]),onCustomAnchorRemove:d.useCallback(()=>u(!1),[]),modal:o,children:n})})};Ya.displayName=Ua;var Xa=`PopoverAnchor`,Za=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Ja(Xa,n),a=Ka(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return d.useEffect(()=>(o(),()=>s()),[o,s]),(0,_.jsx)(za,{...a,...r,ref:t})});Za.displayName=Xa;var Qa=`PopoverTrigger`,$a=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Ja(Qa,n),a=Ka(n),o=m(t,i.triggerRef),s=(0,_.jsx)(D.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ho(i.open),...r,ref:o,onClick:F(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,_.jsx)(za,{asChild:!0,...a,children:s})});$a.displayName=Qa;var eo=`PopoverPortal`,[to,no]=Wa(eo,{forceMount:void 0}),ro=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Ja(eo,t);return(0,_.jsx)(to,{scope:t,forceMount:n,children:(0,_.jsx)(oe,{present:n||a.open,children:(0,_.jsx)(qe,{asChild:!0,container:i,children:r})})})};ro.displayName=eo;var io=`PopoverContent`,ao=d.forwardRef((e,t)=>{let n=no(io,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Ja(io,e.__scopePopover);return(0,_.jsx)(oe,{present:r||a.open,children:a.modal?(0,_.jsx)(so,{...i,ref:t}):(0,_.jsx)(co,{...i,ref:t})})});ao.displayName=io;var oo=v(`PopoverContent.RemoveScroll`),so=d.forwardRef((e,t)=>{let n=Ja(io,e.__scopePopover),r=d.useRef(null),i=m(t,r),a=d.useRef(!1);return d.useEffect(()=>{let e=r.current;if(e)return hn(e)},[]),(0,_.jsx)(on,{as:oo,allowPinchZoom:!0,children:(0,_.jsx)(lo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),co=d.forwardRef((e,t)=>{let n=Ja(io,e.__scopePopover),r=d.useRef(!1),i=d.useRef(!1);return(0,_.jsx)(lo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),lo=d.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Ja(io,n),p=Ka(n);return Ye(),(0,_.jsx)(Pe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,_.jsx)(Ce,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,_.jsx)(Ba,{"data-state":ho(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),uo=`PopoverClose`,fo=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Ja(uo,n);return(0,_.jsx)(D.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});fo.displayName=uo;var po=`PopoverArrow`,mo=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Ka(n);return(0,_.jsx)(Va,{...i,...r,ref:t})});mo.displayName=po;function ho(e){return e?`open`:`closed`}var go=Ya,_o=$a,vo=ro,yo=ao,bo=`Progress`,xo=100,[So,Co]=N(bo),[wo,To]=So(bo),Eo=d.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=ko,...o}=e;(i||i===0)&&!Mo(i)&&console.error(Po(`${i}`,`Progress`));let s=Mo(i)?i:xo;r!==null&&!No(r,s)&&console.error(Fo(`${r}`,`Progress`));let c=No(r,s)?r:null,l=jo(c)?a(c,s):void 0;return(0,_.jsx)(wo,{scope:n,value:c,max:s,children:(0,_.jsx)(D.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":jo(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":Ao(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});Eo.displayName=bo;var Do=`ProgressIndicator`,Oo=d.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=To(Do,n);return(0,_.jsx)(D.div,{"data-state":Ao(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Oo.displayName=Do;function ko(e,t){return`${Math.round(e/t*100)}%`}function Ao(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function jo(e){return typeof e==`number`}function Mo(e){return jo(e)&&!isNaN(e)&&e>0}function No(e,t){return jo(e)&&!isNaN(e)&&e<=t&&e>=0}function Po(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${xo}\`.`}function Fo(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
55
|
+
- a positive number
|
|
56
|
+
- less than the value passed to \`max\` (or ${xo} if no \`max\` prop is set)
|
|
57
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
58
|
+
|
|
59
|
+
Defaulting to \`null\`.`}var Io=Eo,Lo=Oo;function Ro(e,t){return d.useReducer((e,n)=>t[e][n]??e,e)}var zo=`ScrollArea`,[Bo,Vo]=N(zo),[Ho,Uo]=Bo(zo),Wo=d.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=d.useState(null),[l,u]=d.useState(null),[f,p]=d.useState(null),[h,g]=d.useState(null),[v,y]=d.useState(null),[b,x]=d.useState(0),[S,C]=d.useState(0),[w,T]=d.useState(!1),[E,O]=d.useState(!1),ee=m(t,e=>c(e)),k=me(i);return(0,_.jsx)(Ho,{scope:n,type:r,dir:k,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:f,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:w,onScrollbarXEnabledChange:T,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:O,onCornerWidthChange:x,onCornerHeightChange:C,children:(0,_.jsx)(D.div,{dir:k,...o,ref:ee,style:{position:`relative`,"--radix-scroll-area-corner-width":b+`px`,"--radix-scroll-area-corner-height":S+`px`,...e.style}})})});Wo.displayName=zo;var Go=`ScrollAreaViewport`,Ko=d.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Uo(Go,n),s=m(t,d.useRef(null),o.onViewportChange);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,_.jsx)(D.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,_.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});Ko.displayName=Go;var qo=`ScrollAreaScrollbar`,Jo=d.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Uo(qo,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return d.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,_.jsx)(Yo,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,_.jsx)(Xo,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,_.jsx)(Zo,{...r,ref:t,forceMount:n}):i.type===`always`?(0,_.jsx)(Qo,{...r,ref:t}):null});Jo.displayName=qo;var Yo=d.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Uo(qo,e.__scopeScrollArea),[a,o]=d.useState(!1);return d.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,_.jsx)(oe,{present:n||a,children:(0,_.jsx)(Zo,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),Xo=d.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Uo(qo,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=vs(()=>c(`SCROLL_END`),100),[s,c]=Ro(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return d.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),d.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,_.jsx)(oe,{present:n||s!==`hidden`,children:(0,_.jsx)(Qo,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:F(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:F(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),Zo=d.forwardRef((e,t)=>{let n=Uo(qo,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=d.useState(!1),s=e.orientation===`horizontal`,c=vs(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return ys(n.viewport,c),ys(n.content,c),(0,_.jsx)(oe,{present:r||a,children:(0,_.jsx)(Qo,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),Qo=d.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=Uo(qo,e.__scopeScrollArea),a=d.useRef(null),o=d.useRef(0),[s,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=ds(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function f(e,t){return ps(e,o.current,s,t)}return n===`horizontal`?(0,_.jsx)($o,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=ms(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,i.dir))}}):n===`vertical`?(0,_.jsx)(es,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=ms(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}}):null}),$o=d.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=Uo(qo,e.__scopeScrollArea),[o,s]=d.useState(),c=d.useRef(null),l=m(t,c,a.onScrollbarXChange);return d.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,_.jsx)(rs,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":fs(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),gs(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:us(o.paddingLeft),paddingEnd:us(o.paddingRight)}})}})}),es=d.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=Uo(qo,e.__scopeScrollArea),[o,s]=d.useState(),c=d.useRef(null),l=m(t,c,a.onScrollbarYChange);return d.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,_.jsx)(rs,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":fs(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),gs(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:us(o.paddingTop),paddingEnd:us(o.paddingBottom)}})}})}),[ts,ns]=Bo(qo),rs=d.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:f,...p}=e,h=Uo(qo,n),[g,v]=d.useState(null),y=m(t,e=>v(e)),b=d.useRef(null),x=d.useRef(``),S=h.viewport,C=r.content-r.viewport,w=he(u),T=he(c),E=vs(f,10);function O(e){b.current&&l({x:e.clientX-b.current.left,y:e.clientY-b.current.top})}return d.useEffect(()=>{let e=e=>{let t=e.target;g?.contains(t)&&w(e,C)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[S,g,C,w]),d.useEffect(T,[r,T]),ys(g,E),ys(h.content,E),(0,_.jsx)(ts,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:he(a),onThumbPointerUp:he(o),onThumbPositionChange:T,onThumbPointerDown:he(s),children:(0,_.jsx)(D.div,{...p,ref:y,style:{position:`absolute`,...p.style},onPointerDown:F(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),b.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,h.viewport&&(h.viewport.style.scrollBehavior=`auto`),O(e))}),onPointerMove:F(e.onPointerMove,O),onPointerUp:F(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=x.current,h.viewport&&(h.viewport.style.scrollBehavior=``),b.current=null})})})}),is=`ScrollAreaThumb`,as=d.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=ns(is,e.__scopeScrollArea);return(0,_.jsx)(oe,{present:n||i.hasThumb,children:(0,_.jsx)(os,{ref:t,...r})})}),os=d.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=Uo(is,n),o=ns(is,n),{onThumbPositionChange:s}=o,c=m(t,e=>o.onThumbChange(e)),l=d.useRef(void 0),u=vs(()=>{l.current&&=(l.current(),void 0)},100);return d.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=_s(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,_.jsx)(D.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:F(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:F(e.onPointerUp,o.onThumbPointerUp)})});as.displayName=is;var ss=`ScrollAreaCorner`,cs=d.forwardRef((e,t)=>{let n=Uo(ss,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,_.jsx)(ls,{...e,ref:t}):null});cs.displayName=ss;var ls=d.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=Uo(ss,n),[a,o]=d.useState(0),[s,c]=d.useState(0),l=!!(a&&s);return ys(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),ys(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,_.jsx)(D.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function us(e){return e?parseInt(e,10):0}function ds(e,t){let n=e/t;return isNaN(n)?0:n}function fs(e){let t=ds(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ps(e,t,n,r=`ltr`){let i=fs(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return hs([c,l],d)(e)}function ms(e,t,n=`ltr`){let r=fs(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Ha(e,n===`ltr`?[0,o]:[o*-1,0]);return hs([0,o],[0,s])(c)}function hs(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function gs(e,t){return e>0&&e<t}var _s=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function vs(e,t){let n=he(e),r=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),d.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ys(e,t){let n=he(t);ne(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var bs=Wo,xs=Ko,Ss=cs,Cs=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ws=[` `,`Enter`],Ts=`Select`,[Es,Ds,Os]=P(Ts),[ks,As]=N(Ts,[Os,Sa]),js=Sa(),[Ms,Ns]=ks(Ts),[Ps,Fs]=ks(Ts),Is=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:p,required:m,form:h}=e,g=js(t),[v,y]=d.useState(null),[b,x]=d.useState(null),[S,C]=d.useState(!1),w=me(l),[T,E]=ie({prop:r,defaultProp:i??!1,onChange:a,caller:Ts}),[D,O]=ie({prop:o,defaultProp:s,onChange:c,caller:Ts}),ee=d.useRef(null),k=v?h||!!v.closest(`form`):!0,[A,j]=d.useState(new Set),M=Array.from(A).map(e=>e.props.value).join(`;`);return(0,_.jsx)(Ra,{...g,children:(0,_.jsxs)(Ms,{required:m,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:fe(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:ee,disabled:p,children:[(0,_.jsx)(Es.Provider,{scope:t,children:(0,_.jsx)(Ps,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(e=>{j(t=>new Set(t).add(e))},[]),onNativeOptionRemove:d.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),k?(0,_.jsxs)(jc,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:f,value:D,onChange:e=>O(e.target.value),disabled:p,form:h,children:[D===void 0?(0,_.jsx)(`option`,{value:``}):null,Array.from(A)]},M):null]})})};Is.displayName=Ts;var Ls=`SelectTrigger`,Rs=d.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=js(n),o=Ns(Ls,n),s=o.disabled||r,c=m(t,o.onTriggerChange),l=Ds(n),u=d.useRef(`touch`),[f,p,h]=Nc(e=>{let t=l().filter(e=>!e.disabled),n=Pc(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),g=e=>{s||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,_.jsx)(za,{asChild:!0,...a,children:(0,_.jsx)(D.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Mc(o.value)?``:void 0,...i,ref:c,onClick:F(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:F(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:F(i.onKeyDown,e=>{let t=f.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&p(e.key),!(t&&e.key===` `)&&Cs.includes(e.key)&&(g(),e.preventDefault())})})})});Rs.displayName=Ls;var zs=`SelectValue`,Bs=d.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Ns(zs,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=m(t,c.onValueNodeChange);return ne(()=>{l(u)},[l,u]),(0,_.jsx)(D.span,{...s,ref:d,style:{pointerEvents:`none`},children:Mc(c.value)?(0,_.jsx)(_.Fragment,{children:o}):a})});Bs.displayName=zs;var Vs=`SelectIcon`,Hs=d.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,_.jsx)(D.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Hs.displayName=Vs;var Us=`SelectPortal`,Ws=e=>(0,_.jsx)(qe,{asChild:!0,...e});Ws.displayName=Us;var Gs=`SelectContent`,Ks=d.forwardRef((e,t)=>{let n=Ns(Gs,e.__scopeSelect),[r,i]=d.useState();if(ne(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?E.createPortal((0,_.jsx)(Js,{scope:e.__scopeSelect,children:(0,_.jsx)(Es.Slot,{scope:e.__scopeSelect,children:(0,_.jsx)(`div`,{children:e.children})})}),t):null}return(0,_.jsx)(Qs,{...e,ref:t})});Ks.displayName=Gs;var qs=10,[Js,Ys]=ks(Gs),Xs=`SelectContentImpl`,Zs=v(`SelectContent.RemoveScroll`),Qs=d.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:y,...b}=e,x=Ns(Gs,n),[S,C]=d.useState(null),[w,T]=d.useState(null),E=m(t,e=>C(e)),[D,O]=d.useState(null),[ee,k]=d.useState(null),A=Ds(n),[j,M]=d.useState(!1),N=d.useRef(!1);d.useEffect(()=>{if(S)return hn(S)},[S]),Ye();let te=d.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&w&&(w.scrollTop=0),n===r&&w&&(w.scrollTop=w.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,w]),P=d.useCallback(()=>te([D,S]),[te,D,S]);d.useEffect(()=>{j&&P()},[j,P]);let{onOpenChange:ne,triggerPointerDownPosRef:re}=x;d.useEffect(()=>{if(S){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():S.contains(n.target)||ne(!1),document.removeEventListener(`pointermove`,t),re.current=null};return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[S,ne,re]),d.useEffect(()=>{let e=()=>ne(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[ie,ae]=Nc(e=>{let t=A().filter(e=>!e.disabled),n=Pc(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),I=d.useCallback((e,t,n)=>{let r=!N.current&&!n;(x.value!==void 0&&x.value===t||r)&&(O(e),r&&(N.current=!0))},[x.value]),L=d.useCallback(()=>S?.focus(),[S]),oe=d.useCallback((e,t,n)=>{let r=!N.current&&!n;(x.value!==void 0&&x.value===t||r)&&k(e)},[x.value]),se=r===`popper`?nc:ec,ce=se===nc?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return(0,_.jsx)(Js,{scope:n,content:S,viewport:w,onViewportChange:T,itemRefCallback:I,selectedItem:D,onItemLeave:L,itemTextRefCallback:oe,focusSelectedItem:P,selectedItemText:ee,position:r,isPositioned:j,searchRef:ie,children:(0,_.jsx)(on,{as:Zs,allowPinchZoom:!0,children:(0,_.jsx)(Pe,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:F(i,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,_.jsx)(Ce,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,_.jsx)(se,{role:`listbox`,id:x.contentId,"data-state":x.open?`open`:`closed`,dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...ce,onPlaced:()=>M(!0),ref:E,style:{display:`flex`,flexDirection:`column`,outline:`none`,...b.style},onKeyDown:F(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ae(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>te(t)),e.preventDefault()}})})})})})})});Qs.displayName=Xs;var $s=`SelectItemAlignedPosition`,ec=d.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=Ns(Gs,n),o=Ys(Gs,n),[s,c]=d.useState(null),[l,u]=d.useState(null),f=m(t,e=>u(e)),p=Ds(n),h=d.useRef(!1),g=d.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=o,S=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&v&&y&&b){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-qs,d=Ha(a,[qs,Math.max(qs,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-qs,d=Ha(a,[qs,Math.max(qs,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=p(),c=window.innerHeight-qs*2,u=v.scrollHeight,d=window.getComputedStyle(l),f=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),_=parseInt(d.paddingBottom,10),x=f+m+u+_+g,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-qs,D=c-E,O=y.offsetHeight/2,ee=y.offsetTop+O,k=f+m+ee,A=x-k;if(k<=E){let e=o.length>0&&y===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-v.offsetTop-v.offsetHeight,n=k+Math.max(D,O+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&y===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,f+v.offsetTop+(e?w:0)+O)+A;s.style.height=t+`px`,v.scrollTop=k-E+v.offsetTop}s.style.margin=`${qs}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,l,v,y,b,a.dir,r]);ne(()=>S(),[S]);let[C,w]=d.useState();return ne(()=>{l&&w(window.getComputedStyle(l).zIndex)},[l]),(0,_.jsx)(rc,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:d.useCallback(e=>{e&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]),children:(0,_.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,_.jsx)(D.div,{...i,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});ec.displayName=$s;var tc=`SelectPopperPosition`,nc=d.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=qs,...a}=e,o=js(n);return(0,_.jsx)(Ba,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});nc.displayName=tc;var[rc,ic]=ks(Gs,{}),ac=`SelectViewport`,oc=d.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Ys(ac,n),o=ic(ac,n),s=m(t,a.onViewportChange),c=d.useRef(0);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,_.jsx)(Es.Slot,{scope:n,children:(0,_.jsx)(D.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:F(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-qs*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});oc.displayName=ac;var sc=`SelectGroup`,[cc,lc]=ks(sc),uc=d.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fe();return(0,_.jsx)(cc,{scope:n,id:i,children:(0,_.jsx)(D.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});uc.displayName=sc;var dc=`SelectLabel`,fc=d.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=lc(dc,n);return(0,_.jsx)(D.div,{id:i.id,...r,ref:t})});fc.displayName=dc;var pc=`SelectItem`,[mc,hc]=ks(pc),gc=d.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Ns(pc,n),c=Ys(pc,n),l=s.value===r,[u,f]=d.useState(a??``),[p,h]=d.useState(!1),g=m(t,e=>c.itemRefCallback?.(e,r,i)),v=fe(),y=d.useRef(`touch`),b=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,_.jsx)(mc,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:d.useCallback(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:(0,_.jsx)(Es.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,_.jsx)(D.div,{role:`option`,"aria-labelledby":v,"data-highlighted":p?``:void 0,"aria-selected":l&&p,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:F(o.onFocus,()=>h(!0)),onBlur:F(o.onBlur,()=>h(!1)),onClick:F(o.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:F(o.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:F(o.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:F(o.onPointerMove,e=>{y.current=e.pointerType,i?c.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:F(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(ws.includes(e.key)&&b(),e.key===` `&&e.preventDefault())})})})})});gc.displayName=pc;var _c=`SelectItemText`,vc=d.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=Ns(_c,n),s=Ys(_c,n),c=hc(_c,n),l=Fs(_c,n),[u,f]=d.useState(null),p=m(t,e=>f(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),h=u?.textContent,g=d.useMemo(()=>(0,_.jsx)(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return ne(()=>(v(g),()=>y(g)),[v,y,g]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(D.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?E.createPortal(a.children,o.valueNode):null]})});vc.displayName=_c;var yc=`SelectItemIndicator`,bc=d.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return hc(yc,n).isSelected?(0,_.jsx)(D.span,{"aria-hidden":!0,...r,ref:t}):null});bc.displayName=yc;var xc=`SelectScrollUpButton`,Sc=d.forwardRef((e,t)=>{let n=Ys(xc,e.__scopeSelect),r=ic(xc,e.__scopeSelect),[i,a]=d.useState(!1),o=m(t,r.onScrollButtonChange);return ne(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,_.jsx)(Tc,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Sc.displayName=xc;var Cc=`SelectScrollDownButton`,wc=d.forwardRef((e,t)=>{let n=Ys(Cc,e.__scopeSelect),r=ic(Cc,e.__scopeSelect),[i,a]=d.useState(!1),o=m(t,r.onScrollButtonChange);return ne(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,_.jsx)(Tc,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});wc.displayName=Cc;var Tc=d.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Ys(`SelectScrollButton`,n),o=d.useRef(null),s=Ds(n),c=d.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ne(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,_.jsx)(D.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:F(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:F(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:F(i.onPointerLeave,()=>{c()})})}),Ec=`SelectSeparator`,Dc=d.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,_.jsx)(D.div,{"aria-hidden":!0,...r,ref:t})});Dc.displayName=Ec;var Oc=`SelectArrow`,kc=d.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=js(n),a=Ns(Oc,n),o=Ys(Oc,n);return a.open&&o.position===`popper`?(0,_.jsx)(Va,{...i,...r,ref:t}):null});kc.displayName=Oc;var Ac=`SelectBubbleInput`,jc=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=d.useRef(null),a=m(r,i),o=rr(t);return d.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,_.jsx)(D.select,{...n,style:{...ee,...n.style},ref:a,defaultValue:t})});jc.displayName=Ac;function Mc(e){return e===``||e===void 0}function Nc(e){let t=he(e),n=d.useRef(``),r=d.useRef(0),i=d.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=d.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Pc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Fc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Fc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ic=Is,Lc=Rs,Rc=Bs,zc=Hs,Bc=Ws,Vc=Ks,Hc=oc,Uc=gc,Wc=vc,Gc=bc,Kc=Sc,qc=wc,Jc=`Separator`,Yc=`horizontal`,Xc=[`horizontal`,`vertical`],Zc=d.forwardRef((e,t)=>{let{decorative:n,orientation:r=Yc,...i}=e,a=Qc(r)?r:Yc,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,_.jsx)(D.div,{"data-orientation":a,...o,...i,ref:t})});Zc.displayName=Jc;function Qc(e){return Xc.includes(e)}var $c=Zc,[el,tl]=N(`Tooltip`,[Sa]),nl=Sa(),rl=`TooltipProvider`,il=700,al=`tooltip.open`,[ol,sl]=el(rl),cl=e=>{let{__scopeTooltip:t,delayDuration:n=il,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=d.useRef(!0),s=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,_.jsx)(ol,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:d.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};cl.displayName=rl;var ll=`Tooltip`,[ul,dl]=el(ll),fl=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=sl(ll,e.__scopeTooltip),l=nl(t),[u,f]=d.useState(null),p=fe(),m=d.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,v=d.useRef(!1),[y,b]=ie({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(al))):c.onClose(),a?.(e)},caller:ll}),x=d.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,b(!0)},[b]),C=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),w=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,b(!0),m.current=0},g)},[g,b]);return d.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,_.jsx)(Ra,{...l,children:(0,_.jsx)(ul,{scope:t,contentId:p,open:y,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:d.useCallback(()=>{h?C():(window.clearTimeout(m.current),m.current=0)},[C,h]),onOpen:S,onClose:C,disableHoverableContent:h,children:n})})};fl.displayName=ll;var pl=`TooltipTrigger`,ml=d.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=dl(pl,n),a=sl(pl,n),o=nl(n),s=m(t,d.useRef(null),i.onTriggerChange),c=d.useRef(!1),l=d.useRef(!1),u=d.useCallback(()=>c.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,_.jsx)(za,{asChild:!0,...o,children:(0,_.jsx)(D.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:F(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:F(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:F(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:F(e.onBlur,i.onClose),onClick:F(e.onClick,i.onClose)})})});ml.displayName=pl;var hl=`TooltipPortal`,[gl,_l]=el(hl,{forceMount:void 0}),vl=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=dl(hl,t);return(0,_.jsx)(gl,{scope:t,forceMount:n,children:(0,_.jsx)(oe,{present:n||a.open,children:(0,_.jsx)(qe,{asChild:!0,container:i,children:r})})})};vl.displayName=hl;var yl=`TooltipContent`,bl=d.forwardRef((e,t)=>{let n=_l(yl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=dl(yl,e.__scopeTooltip);return(0,_.jsx)(oe,{present:r||o.open,children:o.disableHoverableContent?(0,_.jsx)(Tl,{side:i,...a,ref:t}):(0,_.jsx)(xl,{side:i,...a,ref:t})})}),xl=d.forwardRef((e,t)=>{let n=dl(yl,e.__scopeTooltip),r=sl(yl,e.__scopeTooltip),i=d.useRef(null),a=m(t,i),[o,s]=d.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:f}=r,p=d.useCallback(()=>{s(null),f(!1)},[f]),h=d.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=kl(r,Ol(r,n.getBoundingClientRect())),a=Al(t.getBoundingClientRect());s(Ml([...i,...a])),f(!0)},[f]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&u){let e=e=>h(e,u),t=e=>h(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,h,p]),d.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!jl(n,o);r?p():i&&(p(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,p]),(0,_.jsx)(Tl,{...e,ref:a})}),[Sl,Cl]=el(ll,{isInside:!1}),wl=S(`TooltipContent`),Tl=d.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=dl(yl,n),l=nl(n),{onClose:u}=c;return d.useEffect(()=>(document.addEventListener(al,u),()=>document.removeEventListener(al,u)),[u]),d.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,_.jsx)(Ce,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,_.jsxs)(Ba,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,_.jsx)(wl,{children:r}),(0,_.jsx)(Sl,{scope:n,isInside:!0,children:(0,_.jsx)(j,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});bl.displayName=yl;var El=`TooltipArrow`,Dl=d.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=nl(n);return Cl(El,n).isInside?null:(0,_.jsx)(Va,{...i,...r,ref:t})});Dl.displayName=El;function Ol(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function kl(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Al(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function jl(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ml(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Nl(t)}function Nl(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Pl=cl,Fl=fl,Il=ml,Ll=vl,Rl=bl,zl=Dl,Bl=u();function Vl(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Vl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Hl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vl(e))&&(r&&(r+=` `),r+=t);return r}var Ul=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Wl=(e,t)=>({classGroupId:e,validator:t}),Gl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Kl=`-`,ql=[],Jl=`arbitrary..`,Yl=e=>{let t=Ql(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Zl(e);let n=e.split(Kl);return Xl(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ul(i,t):t:i||ql}return n[e]||ql}}},Xl=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Xl(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Kl):e.slice(t).join(Kl),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Zl=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Jl+r:void 0})(),Ql=e=>{let{theme:t,classGroups:n}=e;return $l(n,t)},$l=(e,t)=>{let n=Gl();for(let r in e){let i=e[r];eu(i,n,r,t)}return n},eu=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];tu(i,t,n,r)}},tu=(e,t,n,r)=>{if(typeof e==`string`){nu(e,t,n);return}if(typeof e==`function`){ru(e,t,n,r);return}iu(e,t,n,r)},nu=(e,t,n)=>{let r=e===``?t:au(t,e);r.classGroupId=n},ru=(e,t,n,r)=>{if(ou(e)){eu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Wl(n,e))},iu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];eu(o,au(t,a),n,r)}},au=(e,t)=>{let n=e,r=t.split(Kl),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Gl(),n.nextPart.set(t,i)),n=i}return n},ou=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,su=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},cu=`!`,lu=`:`,uu=[],du=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),fu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===lu){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(cu)?(c=s.slice(0,-1),l=!0):s.startsWith(cu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return du(t,l,c,u)};if(t){let e=t+lu,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):du(uu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},pu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},mu=e=>({cache:su(e.cacheSize),parseClassName:fu(e),sortModifiers:pu(e),...Yl(e)}),hu=/\s+/,gu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(hu),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+cu:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},_u=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=vu(n))&&(i&&(i+=` `),i+=r);return i},vu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=vu(e[r]))&&(n&&(n+=` `),n+=t);return n},yu=(e,...t)=>{let n,r,i,a,o=o=>(n=mu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=gu(e,n);return i(e,a),a};return a=o,(...e)=>a(_u(...e))},bu=[],xu=e=>{let t=t=>t[e]||bu;return t.isThemeGetter=!0,t},Su=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Tu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Eu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Du=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ou=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ku=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Au=e=>wu.test(e),ju=e=>!!e&&!Number.isNaN(Number(e)),Mu=e=>!!e&&Number.isInteger(Number(e)),Nu=e=>e.endsWith(`%`)&&ju(e.slice(0,-1)),Pu=e=>Tu.test(e),Fu=()=>!0,Iu=e=>Eu.test(e)&&!Du.test(e),Lu=()=>!1,Ru=e=>Ou.test(e),zu=e=>ku.test(e),Bu=e=>!R(e)&&!z(e),Vu=e=>nd(e,od,Lu),R=e=>Su.test(e),Hu=e=>nd(e,sd,Iu),Uu=e=>nd(e,cd,ju),Wu=e=>nd(e,ud,Fu),Gu=e=>nd(e,ld,Lu),Ku=e=>nd(e,id,Lu),qu=e=>nd(e,ad,zu),Ju=e=>nd(e,dd,Ru),z=e=>Cu.test(e),Yu=e=>rd(e,sd),Xu=e=>rd(e,ld),Zu=e=>rd(e,id),Qu=e=>rd(e,od),$u=e=>rd(e,ad),ed=e=>rd(e,dd,!0),td=e=>rd(e,ud,!0),nd=(e,t,n)=>{let r=Su.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rd=(e,t,n=!1)=>{let r=Cu.exec(e);return r?r[1]?t(r[1]):n:!1},id=e=>e===`position`||e===`percentage`,ad=e=>e===`image`||e===`url`,od=e=>e===`length`||e===`size`||e===`bg-size`,sd=e=>e===`length`,cd=e=>e===`number`,ld=e=>e===`family-name`,ud=e=>e===`number`||e===`weight`,dd=e=>e===`shadow`,fd=yu(()=>{let e=xu(`color`),t=xu(`font`),n=xu(`text`),r=xu(`font-weight`),i=xu(`tracking`),a=xu(`leading`),o=xu(`breakpoint`),s=xu(`container`),c=xu(`spacing`),l=xu(`radius`),u=xu(`shadow`),d=xu(`inset-shadow`),f=xu(`text-shadow`),p=xu(`drop-shadow`),m=xu(`blur`),h=xu(`perspective`),g=xu(`aspect`),_=xu(`ease`),v=xu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),z,R],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[z,R,c],T=()=>[Au,`full`,`auto`,...w()],E=()=>[Mu,`none`,`subgrid`,z,R],D=()=>[`auto`,{span:[`full`,Mu,z,R]},Mu,z,R],O=()=>[Mu,`auto`,z,R],ee=()=>[`auto`,`min`,`max`,`fr`,z,R],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[Au,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[Au,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[Au,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,z,R],F=()=>[...b(),Zu,Ku,{position:[z,R]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Qu,Vu,{size:[z,R]}],ie=()=>[Nu,Yu,Hu],ae=()=>[``,`none`,`full`,l,z,R],I=()=>[``,ju,Yu,Hu],L=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],se=()=>[ju,Nu,Zu,Ku],ce=()=>[``,`none`,m,z,R],le=()=>[`none`,ju,z,R],ue=()=>[`none`,ju,z,R],de=()=>[ju,z,R],fe=()=>[Au,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Pu],breakpoint:[Pu],color:[Fu],container:[Pu],"drop-shadow":[Pu],ease:[`in`,`out`,`in-out`],font:[Bu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Pu],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Pu],shadow:[Pu],spacing:[`px`,ju],text:[Pu],"text-shadow":[Pu],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Au,R,z,g]}],container:[`container`],columns:[{columns:[ju,R,z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Mu,`auto`,z,R]}],basis:[{basis:[Au,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ju,Au,`auto`,`initial`,`none`,R]}],grow:[{grow:[``,ju,z,R]}],shrink:[{shrink:[``,ju,z,R]}],order:[{order:[Mu,`first`,`last`,`none`,z,R]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...N()]}],"min-inline-size":[{"min-inline":[`auto`,...N()]}],"max-inline-size":[{"max-inline":[`none`,...N()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,Yu,Hu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,td,Wu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Nu,R]}],"font-family":[{font:[Xu,Gu,t]}],"font-features":[{"font-features":[R]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,z,R]}],"line-clamp":[{"line-clamp":[ju,`none`,z,Uu]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,z,R]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,z,R]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[ju,`from-font`,`auto`,z,Hu]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ju,`auto`,z,R]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,z,R]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,z,R]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Mu,z,R],radial:[``,z,R],conic:[Mu,z,R]},$u,qu]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ju,z,R]}],"outline-w":[{outline:[``,ju,Yu,Hu]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,ed,Ju]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,ed,Ju]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ju,Hu]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,ed,Ju]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ju,z,R]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ju]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ju]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,z,R]}],filter:[{filter:[``,`none`,z,R]}],blur:[{blur:ce()}],brightness:[{brightness:[ju,z,R]}],contrast:[{contrast:[ju,z,R]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ed,Ju]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,ju,z,R]}],"hue-rotate":[{"hue-rotate":[ju,z,R]}],invert:[{invert:[``,ju,z,R]}],saturate:[{saturate:[ju,z,R]}],sepia:[{sepia:[``,ju,z,R]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,z,R]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[ju,z,R]}],"backdrop-contrast":[{"backdrop-contrast":[ju,z,R]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ju,z,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ju,z,R]}],"backdrop-invert":[{"backdrop-invert":[``,ju,z,R]}],"backdrop-opacity":[{"backdrop-opacity":[ju,z,R]}],"backdrop-saturate":[{"backdrop-saturate":[ju,z,R]}],"backdrop-sepia":[{"backdrop-sepia":[``,ju,z,R]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,z,R]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ju,`initial`,z,R]}],ease:[{ease:[`linear`,`initial`,_,z,R]}],delay:[{delay:[ju,z,R]}],animate:[{animate:[`none`,v,z,R]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,z,R]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[z,R,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,z,R]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,z,R]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[ju,Yu,Hu,Uu]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function B(...e){return fd(Hl(e))}function pd({delayDuration:e=0,...t}){return(0,_.jsx)(Pl,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function md({...e}){return(0,_.jsx)(Fl,{"data-slot":`tooltip`,...e})}function hd({...e}){return(0,_.jsx)(Il,{"data-slot":`tooltip-trigger`,...e})}function gd({className:e,sideOffset:t=0,children:n,...r}){return(0,_.jsx)(Ll,{children:(0,_.jsxs)(Rl,{"data-slot":`tooltip-content`,sideOffset:t,className:B(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md border border-(--border-default) bg-(--bg-secondary) px-3 py-1.5 text-xs text-balance text-(--text-primary) shadow-lg fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,_.jsx)(zl,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-(--bg-secondary) fill-(--bg-secondary)`})]})})}var _d={zh:{brand:`Codemini`,live:`运行中`,idle:`空闲`,sending:`发送中`,thinking:`思考中`,streaming:`回复中`,tooling:`工具执行中`,inputPlaceholder:`输入消息或 / 命令...`,inputDisabled:`等待当前请求完成...`,inputPlanReviewDisabled:`请先在上方审阅计划,批准、修改或否决后再继续输入`,abort:`停止`,approveTitle:`确认操作`,approve:`允许`,deny:`拒绝`,deleteApproval:`确认删除`,runApproval:`确认执行命令`,planApproval:`确认执行计划`,reflectApproval:`确认保存技能`,toolRunning:`运行中`,toolDone:`完成`,toolError:`错误`,toolBlocked:`已阻止`,planTitle:`执行计划`,planDone:`完成`,planReviewTitle:`审阅计划`,planReviewSummary:`摘要`,planReviewSteps:`计划步骤`,planApprove:`批准执行`,planReject:`否决`,planEdit:`修改计划`,planEditPlaceholder:`描述你的修改意见...`,planSubmitFeedback:`提交反馈`,planStepCount:`个步骤`,planReviewStatus:`等待审阅`,planWaitingReview:`正在等待计划审阅…`,waitingResponse:`正在等待回复…`,skillRunning:`运行中`,skillDone:`完成`,skillError:`失败`,skillAuto:`自动技能`,contextUsage:`上下文使用`,fileChanges:`文件变更`,newChat:`新对话`,skills:`Skills`,souls:`Souls`,projects:`项目`,newSessionInProject:`在此项目中新建对话`,openCodeWiki:`打开 CodeWiki`,collapseProject:`折叠项目`,expandProject:`展开项目`,sessionActions:`会话操作`,deleteSession:`删除`,noSessions:`暂无对话`,about:`关于`,lightMode:`浅色`,darkMode:`深色`,switchToLightMode:`切换浅色模式`,switchToDarkMode:`切换深色模式`,settings:`设置`,deleteSessionConfirm:`删除会话?`,deleteSessionDescription:`会话「{{session}}」会从历史记录中移除,此操作不可撤销。`,settingsTitle:`设置`,cancel:`取消`,saveChanges:`保存更改`,gateway:`网关`,baseUrl:`接口地址`,apiKey:`API 密钥`,timeout:`超时 (ms)`,maxRetries:`最大重试`,model:`模型`,modelName:`模型名称`,fastModel:`快速模型`,maxContextTokens:`最大上下文 Tokens`,sdk:`SDK`,provider:`服务商`,execution:`执行`,mode:`模式`,maxSteps:`最大步数`,context:`上下文`,contextMaxTokens:`上下文 Token 预算`,preflightTrigger:`预压缩阈值 (%)`,hardLimit:`硬压缩阈值 (%)`,toolResultMaxChars:`工具结果字符上限`,microcompactEnabled:`微压缩`,microcompactKeepRecent:`微压缩保留数`,shell:`终端`,defaultShell:`默认 Shell`,ui:`界面`,uiLanguage:`界面语言`,replyLanguage:`回复语言`,backToTop:`回到顶部`,pendingItems:`排队中`,copyCode:`复制`,copied:`已复制`,connected:`已连接`,disconnected:`连接断开,正在重连...`,unknownProject:`未知项目`,emptyChat:`空对话`,messages:`条消息`,renderError:`渲染错误`,retry:`重试`,planReviewFirst:`请先在上方审阅计划,批准、修改或否决后再继续输入`,loading:`加载中`,sending:`发送`,updating:`更新中...`,updatedRestart:`已更新,请重启`,updateAvailable:`新版本可用,点击更新`,openSettings:`打开设置`,current:`当前`,sessions:`会话`,items:`项`,enabled:`已启用`,disabled:`已停用`,disable:`停用`,noMatches:`没有匹配结果`,generationDepthFast:`快速`,generationDepthStandard:`标准`,generationDepthDeep:`深度`,startingAnalysis:`正在启动项目需求分析`,preparingScan:`准备扫描代码、接口和项目结构`,generationFailed:`生成遇到问题`,generatingCodeWiki:`正在生成 CodeWiki`,stepsCompleted:`个步骤完成`,codewikiFailed:`CodeWiki 问答失败`,failedToLoad:`无法加载 CodeWiki 报告`,failedToStart:`无法启动 CodeWiki 生成`,failedToDelete:`无法删除 CodeWiki 报告`,currentProject:`当前项目`,generating:`生成中`,generateNew:`生成新的 CodeWiki`,report:`报告`,refreshReport:`刷新报告`,noReportYet:`还没有 requirements 报告。生成后会出现在这里。`,reportActions:`报告操作`,deleteReport:`删除`,loadingReport:`加载报告`,projectDocs:`基于 project-requirements 的项目文档`,generate:`生成`,noCodeWiki:`还没有 CodeWiki`,generateRequirements:`生成当前项目的 requirements`,reportWillShow:`报告后,这里会展示架构图、接口需求、流程和风险说明。`,reportLoadFailed:`报告加载失败。`,noQuestionsDuringGeneration:`CodeWiki 生成完成前暂不接受提问。`,tempReadOnlyQa:`临时只读问答,不会修改项目,也不会保存到会话历史。`,processingQuestion:`当前问题处理中`,canAskAboutProject:`可以问当前项目`,askAfterGeneration:`生成完成后再基于报告提问。`,exampleQuestions:`例如:主要业务流程是什么?哪些接口风险最高?`,answering:`正在回答...`,sendingQuestion:`发送问题`,deleteReportConfirm:`删除 CodeWiki 报告?`,deleteReportDescription:`报告「{{report}}」会从当前项目历史报告中移除,此操作不可撤销。`,executionMode:`执行模式`,autoMode:`自动`,autoModeDesc:`自动执行,复杂任务自动规划`,planMode:`计划`,planModeDesc:`仅规划不执行,审阅后再执行`,switchMode:`切换执行模式`,switchModeDisabled:`当前请求完成后可切换执行模式`,soulSwitch:`灵魂切换`,switchSoul:`切换灵魂`,builtin:`内置`,custom:`自定义`,askAnything:`可向 Codemini 询问任何事。输入 / 使用命令或技能`,addContext:`添加上下文`,switchWorkspace:`切换工作区`,name:`名称`,soulContent:`灵魂内容`,newSoul:`新建灵魂`,editSoul:`编辑灵魂`,soulEditorHint:`灵魂只影响回复语气,不应写入执行规则或工具策略。`,soulPlaceholder:`描述这个人格的语气、措辞和表达偏好...`,soulPanelHint:`选择默认人格;新的对话和后续请求会使用当前灵魂语气。`,noActiveSoul:`未选择灵魂`,searchSouls:`搜索灵魂名称...`,create:`创建`,save:`保存`,contentPreview:`- 内容预览`,close:`关闭`,addSoul:`添加灵魂`,noSouls:`暂无灵魂`,noSoulsHint:`创建一个自定义灵魂,用来固定 Codemini 的回复语气。`,activate:`激活`,edit:`编辑`,view:`查看`,delete:`删除`,deleting:`删除中`,globalScope:`全局`,projectScope:`项目`,enable:`启用`,addSkill:`+ 添加技能`,noSkills:`暂无技能`,noSkillsHint:`创建项目技能,把可复用工作流沉淀成 / 命令。`,skillLibrary:`技能库`,skillPanelHint:`技能会作为 / 命令或自动技能注入到 prompt,内置技能始终可用。`,newSkill:`新建技能`,editSkill:`编辑技能`,skillEditorHint:`技能适合沉淀稳定流程、检查清单和项目约定。`,searchSkills:`搜索技能名称...`,skillDescriptionPlaceholder:`这个技能适合什么时候使用...`,skillContent:`SKILL.md 内容`,description:`描述`,noDescription:`暂无描述`,noPreview:`暂无预览`,filter_all:`全部`,filter_enabled:`启用`,filter_builtin:`内置`,filter_custom:`自定义`,confirmDeleteSkill:`确定删除技能 "{{name}}"?`,confirmDeleteSoul:`确定删除灵魂 "{{name}}"?`,aboutTitle:`关于 Codemini`,installation:`安装`,startWebUI:`启动 Web UI`,startWebUIDesc:`启动后浏览器会自动打开 Web 界面,也可以手动访问终端中显示的地址。`,basicUsage:`基本使用`,chatUsage:`在输入框直接输入问题或指令,按 Enter 发送`,skillUsage:`输入 / 触发技能选择面板`,soulUsage:`点击输入框工具栏的灵魂按钮切换 AI 人格`,normalMode:`普通`,autoModeAbout:`自动`,modeUsage:`需确认工具调用,`,modeUsageAuto:`全自动执行`,workspace:`工作区`,workspaceUsage:`点击输入框的文件夹按钮切换项目目录`,configureModel:`配置模型`,configureModelDesc:`支持 OpenAI 兼容接口,可在设置中配置 API Key、Endpoint 等。`,selectProject:`选择项目`,enterOrBrowse:`输入或浏览项目路径...`,select:`选择`,noSubDirs:`无子目录`,language:`语言`,switchLanguage:`切换语言`,switchThemePalette:`切换主题配色`,themeDefault:`Default`,themeCatppuccin:`Catppuccin`,themeTokyoNight:`Tokyo Night`,themeOne:`One`,themeGithub:`GitHub`,themeVSCode:`VS Code`,buildInProject:`要在 {{project}} 中构建什么?`,gitStaged:`已暂存`,gitModified:`已修改`,gitUntracked:`未跟踪`,gitClean:`无变更`,gitDiffTitle:`Git 差异`,gitDiffNoChanges:`无变更`,gitDiffLoading:`加载差异...`,gitDiffStaged:`已暂存`,gitDiffModified:`已修改`,gitDiffDeleted:`已删除`,gitDiffUntracked:`未跟踪`,gitDiffNoDiffAvailable:`无差异内容`},en:{brand:`Codemini`,live:`LIVE`,idle:`IDLE`,sending:`SENDING`,thinking:`THINKING`,streaming:`STREAMING`,tooling:`TOOLING`,inputPlaceholder:`Type a message or / command...`,inputDisabled:`Waiting for current request to finish...`,inputPlanReviewDisabled:`Review the plan above before continuing`,abort:`Stop`,approveTitle:`Confirm Action`,approve:`Approve`,deny:`Deny`,deleteApproval:`Confirm Delete`,runApproval:`Confirm Run Command`,planApproval:`Confirm Plan`,reflectApproval:`Confirm Save Skill`,toolRunning:`Running`,toolDone:`Done`,toolError:`Error`,toolBlocked:`Blocked`,planTitle:`Execution Plan`,planDone:`Done`,planReviewTitle:`Review Plan`,planReviewSummary:`Summary`,planReviewSteps:`Plan Steps`,planApprove:`Approve`,planReject:`Reject`,planEdit:`Edit Plan`,planEditPlaceholder:`Describe your changes...`,planSubmitFeedback:`Submit Feedback`,planStepCount:`steps`,planReviewStatus:`Awaiting Review`,planWaitingReview:`Waiting for plan review…`,waitingResponse:`Waiting for response…`,skillRunning:`Running`,skillDone:`Done`,skillError:`Failed`,skillAuto:`Auto Skill`,contextUsage:`Context`,fileChanges:`File Changes`,newChat:`New Chat`,skills:`Skills`,souls:`Souls`,projects:`Projects`,newSessionInProject:`New Chat in Project`,openCodeWiki:`Open CodeWiki`,collapseProject:`Collapse Project`,expandProject:`Expand Project`,sessionActions:`Session Actions`,deleteSession:`Delete`,noSessions:`No conversations yet`,about:`About`,lightMode:`Light`,darkMode:`Dark`,switchToLightMode:`Switch to light mode`,switchToDarkMode:`Switch to dark mode`,settings:`Settings`,deleteSessionConfirm:`Delete Session?`,deleteSessionDescription:`Session "{{session}}" will be removed from history, this action cannot be undone.`,settingsTitle:`Settings`,cancel:`Cancel`,saveChanges:`Save Changes`,gateway:`Gateway`,baseUrl:`Base URL`,apiKey:`API Key`,timeout:`Timeout (ms)`,maxRetries:`Max Retries`,model:`Model`,modelName:`Model Name`,fastModel:`Fast Model`,maxContextTokens:`Max Context Tokens`,sdk:`SDK`,provider:`Provider`,execution:`Execution`,mode:`Mode`,maxSteps:`Max Steps`,context:`Context`,contextMaxTokens:`Context Token Budget`,preflightTrigger:`Preflight Trigger (%)`,hardLimit:`Hard Limit (%)`,toolResultMaxChars:`Tool Result Char Limit`,microcompactEnabled:`Micro-Compact`,microcompactKeepRecent:`Micro Keep Recent`,shell:`Shell`,defaultShell:`Default Shell`,ui:`UI`,uiLanguage:`UI Language`,replyLanguage:`Reply Language`,backToTop:`Back to top`,pendingItems:`Queued`,copyCode:`Copy`,copied:`Copied`,connected:`Connected`,disconnected:`Disconnected, reconnecting...`,unknownProject:`Unknown Project`,emptyChat:`Empty Chat`,messages:`messages`,renderError:`Render Error`,retry:`Retry`,planReviewFirst:`Please review the plan above, approve, modify, or reject before continuing`,loading:`Loading`,sending:`Send`,updating:`Updating...`,updatedRestart:`Updated, please restart`,updateAvailable:`new version available, click to update`,openSettings:`Open Settings`,current:`Current`,sessions:`Sessions`,items:`items`,enabled:`Enabled`,disabled:`Disabled`,disable:`Disable`,noMatches:`No matches`,generationDepthFast:`Fast`,generationDepthStandard:`Standard`,generationDepthDeep:`Deep`,startingAnalysis:`Starting project requirements analysis`,preparingScan:`Preparing to scan code, interfaces, and project structure`,generationFailed:`Generation encountered an issue`,generatingCodeWiki:`Generating CodeWiki`,stepsCompleted:`steps completed`,codewikiFailed:`CodeWiki Q&A failed`,failedToLoad:`Failed to load CodeWiki report`,failedToStart:`Failed to start CodeWiki generation`,failedToDelete:`Failed to delete CodeWiki report`,currentProject:`Current Project`,generating:`Generating`,generateNew:`Generate New CodeWiki`,report:`Report`,refreshReport:`Refresh Report`,noReportYet:`No requirements report yet. It will appear here after generation.`,reportActions:`Report Actions`,deleteReport:`Delete`,loadingReport:`Loading Report`,projectDocs:`Project documentation based on project-requirements`,generate:`Generate`,noCodeWiki:`No CodeWiki yet`,generateRequirements:`Generate requirements for the current project`,reportWillShow:`After generating the report, architecture diagrams, interface requirements, processes, and risk descriptions will be displayed here.`,reportLoadFailed:`Report failed to load.`,noQuestionsDuringGeneration:`Questions not accepted until CodeWiki generation is complete.`,tempReadOnlyQa:`Temporary read-only Q&A, will not modify the project or save to session history.`,processingQuestion:`Processing current question`,canAskAboutProject:`You can ask about the current project`,askAfterGeneration:`Ask questions based on the report after generation is complete.`,exampleQuestions:`For example: What is the main business process? Which interfaces have the highest risks?`,answering:`Answering...`,sendingQuestion:`Send Question`,deleteReportConfirm:`Delete CodeWiki Report?`,deleteReportDescription:`Report "{{report}}" will be removed from current project history reports, this action cannot be undone.`,executionMode:`Execution Mode`,autoMode:`Auto`,autoModeDesc:`Auto-execute, complex tasks auto-plan`,planMode:`Plan`,planModeDesc:`Plan only, review before execution`,switchMode:`Switch Execution Mode`,switchModeDisabled:`Can switch execution mode after current request completes`,soulSwitch:`Soul Switch`,switchSoul:`Switch Soul`,builtin:`Built-in`,custom:`Custom`,askAnything:`You can ask Codemini anything. Type / to use commands or skills`,addContext:`Add Context`,switchWorkspace:`Switch Workspace`,name:`Name`,soulContent:`Soul Content`,newSoul:`New Soul`,editSoul:`Edit Soul`,soulEditorHint:`Souls affect response tone only; avoid execution rules or tool policy here.`,soulPlaceholder:`Describe tone, phrasing, and personality preferences...`,soulPanelHint:`Choose the default personality. New prompts will use the active soul tone.`,noActiveSoul:`No soul selected`,searchSouls:`Search souls by name...`,create:`Create`,save:`Save`,contentPreview:`- Content Preview`,close:`Close`,addSoul:`Add Soul`,noSouls:`No souls yet`,noSoulsHint:`Create a custom soul to keep Codemini response tone consistent.`,activate:`Activate`,edit:`Edit`,view:`View`,delete:`Delete`,deleting:`Deleting...`,globalScope:`Global`,projectScope:`Project`,enable:`Enable`,addSkill:`Add Skill`,noSkills:`No skills yet`,noSkillsHint:`Create a project skill to turn reusable workflows into / commands.`,skillLibrary:`Skill Library`,skillPanelHint:`Skills can be invoked as / commands or injected automatically. Built-in skills are always available.`,newSkill:`New Skill`,editSkill:`Edit Skill`,skillEditorHint:`Skills are best for stable workflows, checklists, and project conventions.`,searchSkills:`Search skills by name...`,skillDescriptionPlaceholder:`When should this skill be used...`,skillContent:`SKILL.md Content`,description:`Description`,noDescription:`No description`,noPreview:`No preview`,filter_all:`All`,filter_enabled:`Enabled`,filter_builtin:`Built-in`,filter_custom:`Custom`,confirmDeleteSkill:`Delete skill "{{name}}"?`,confirmDeleteSoul:`Delete soul "{{name}}"?`,aboutTitle:`About Codemini`,installation:`Installation`,startWebUI:`Start Web UI`,startWebUIDesc:`After starting, the browser will automatically open the Web interface. You can also manually visit the address shown in the terminal.`,basicUsage:`Basic Usage`,chatUsage:`Type questions or instructions in the input box, press Enter to send`,skillUsage:`Type / to open the skill selection panel`,soulUsage:`Click the soul button in the input toolbar to switch AI personality`,normalMode:`Normal`,autoModeAbout:`Auto`,modeUsage:`requires confirming tool calls, `,modeUsageAuto:`executes everything automatically`,workspace:`Workspace`,workspaceUsage:`Click the folder button in the input box to switch project directory`,configureModel:`Configure Model`,configureModelDesc:`Supports OpenAI-compatible interfaces. Configure API Key, Endpoint, etc. in Settings.`,selectProject:`Select Project`,enterOrBrowse:`Enter or browse project path...`,select:`Select`,noSubDirs:`No subdirectories`,language:`Language`,switchLanguage:`Switch Language`,switchThemePalette:`Switch Theme Palette`,themeDefault:`Default`,themeCatppuccin:`Catppuccin`,themeTokyoNight:`Tokyo Night`,themeOne:`One`,themeGithub:`GitHub`,themeVSCode:`VS Code`,buildInProject:`What do you want to build in {{project}}?`,gitStaged:`Staged`,gitModified:`Modified`,gitUntracked:`Untracked`,gitClean:`Clean`,gitDiffTitle:`Git Diff`,gitDiffNoChanges:`No changes`,gitDiffLoading:`Loading diff...`,gitDiffStaged:`Staged`,gitDiffModified:`Modified`,gitDiffDeleted:`Deleted`,gitDiffUntracked:`Untracked`,gitDiffNoDiffAvailable:`No diff available`}},vd=`zh`,yd=localStorage.getItem(`codemini-ui-language`);yd&&_d[yd]&&(vd=yd);function bd(e){_d[e]&&(vd=e,localStorage.setItem(`codemini-ui-language`,e))}function V(e){return _d[vd][e]||_d.en[e]||e}function xd(){return vd}var Sd={"Content-Type":`application/json`};async function Cd(e,t={}){return await fetch(e,t)}async function wd(){return(await Cd(`/api/version`)).json()}async function Td(){return(await Cd(`/api/update`,{method:`POST`})).json()}async function Ed(){return(await Cd(`/api/state`)).json()}async function Dd(){return(await Cd(`/api/startup-events`)).json()}async function Od(){return(await Cd(`/api/history`)).json()}async function kd(){return(await Cd(`/api/sessions`)).json()}async function Ad(){return(await Cd(`/api/session/messages`)).json()}async function jd(){return(await Cd(`/api/session/ui-messages`)).json()}async function Md(e,t={}){return await Cd(`/api/submit`,{method:`POST`,headers:Sd,body:JSON.stringify({line:e,...t.readOnlyCodeWiki?{readOnlyCodeWiki:!0}:{}})})}async function Nd(){await Cd(`/api/abort`,{method:`POST`})}async function Pd(e){return(await Cd(`/api/execution-mode`,{method:`POST`,headers:Sd,body:JSON.stringify({mode:e})})).json()}async function Fd(e,t){await Cd(`/api/approval`,{method:`POST`,headers:Sd,body:JSON.stringify({id:e,approved:t})})}async function Id(e){return(await Cd(`/api/sessions/switch`,{method:`POST`,headers:Sd,body:JSON.stringify({sessionId:e})})).json()}async function Ld(e){return(await Cd(`/api/sessions/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function Rd(){return(await Cd(`/api/sessions/new`,{method:`POST`})).json()}async function zd(){return(await Cd(`/api/config`)).json()}async function Bd(e,t){await Cd(`/api/config/set`,{method:`POST`,headers:Sd,body:JSON.stringify({key:e,value:t})})}async function Vd(){return(await Cd(`/api/project`)).json()}async function Hd(){return(await Cd(`/api/git`)).json()}async function Ud(){return(await Cd(`/api/git-diff`)).json()}async function Wd(e){return(await Cd(`/api/git-batch`,{method:`POST`,headers:Sd,body:JSON.stringify({dirs:e})})).json()}async function Gd(e){return(await Cd(`/api/project/open`,{method:`POST`,headers:Sd,body:JSON.stringify({path:e})})).json()}async function Kd(e){return(await Cd(`/api/project/browse`,{method:`POST`,headers:Sd,body:JSON.stringify({dir:e})})).json()}async function qd(){return(await Cd(`/api/skills`)).json()}async function Jd(e){return(await Cd(`/api/skills/${encodeURIComponent(e)}/content`)).json()}async function Yd({name:e,description:t,content:n}){return(await Cd(`/api/skills/create`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e,description:t,content:n})})).json()}async function Xd(e,t){return(await Cd(`/api/skills/${encodeURIComponent(e)}/content`,{method:`PUT`,headers:Sd,body:JSON.stringify({content:t})})).json()}async function Zd(e){return(await Cd(`/api/skills/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function Qd(e,t){return(await Cd(`/api/skills/${encodeURIComponent(e)}/toggle`,{method:`POST`,headers:Sd,body:JSON.stringify({enabled:t})})).json()}async function $d(){return(await Cd(`/api/souls`)).json()}async function ef(e){return(await Cd(`/api/souls/${encodeURIComponent(e)}/content`)).json()}async function tf({name:e,content:t}){return(await Cd(`/api/souls/create`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e,content:t})})).json()}async function nf(e,t){return(await Cd(`/api/souls/${encodeURIComponent(e)}/content`,{method:`PUT`,headers:Sd,body:JSON.stringify({content:t})})).json()}async function rf(e){return(await Cd(`/api/souls/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function af(e){return(await Cd(`/api/souls/activate`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e})})).json()}async function of(){return(await Cd(`/api/codewiki/reports`)).json()}async function sf(e=`standard`){return(await Cd(`/api/codewiki/generate`,{method:`POST`,headers:Sd,body:JSON.stringify({depth:e})})).json()}async function cf({question:e,reportFile:t=``,onEvent:n}={}){let r=await Cd(`/api/codewiki/ask`,{method:`POST`,headers:Sd,body:JSON.stringify({question:e,reportFile:t})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e?.message||`CodeWiki 问答失败`)}if(!r.body)throw Error(`当前浏览器不支持流式响应`);let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{value:e,done:t}=await i.read();if(t)break;o+=a.decode(e,{stream:!0});let r=o.indexOf(`
|
|
60
|
+
`);for(;r!==-1;){let e=o.slice(0,r).trim();o=o.slice(r+1),e&&n?.(JSON.parse(e)),r=o.indexOf(`
|
|
61
|
+
`)}}o+=a.decode();let s=o.trim();s&&n?.(JSON.parse(s))}async function lf(e){return(await Cd(`/api/codewiki/report/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}var uf=(0,d.createContext)(null);function df(e){let t=String(e?.name||``).toLowerCase(),n=String(e?.summary||``).toLowerCase();return t.includes(`project_index`)||t.includes(`initializeprojectindex`)||n.includes(`project_index(`)||n.includes(`initialized `)&&n.includes(`/.codemini`)}function ff(){let e=window.location.pathname.replace(/\/+$/,``)||`/`,t=new URLSearchParams(window.location.search),n=e.match(/^\/chat\/([^/]+)$/);return n?{view:`chat`,sessionId:decodeURIComponent(n[1])}:e===`/sessions`?{view:`sessions`}:e===`/codewiki`?{view:`codewiki`,projectPath:t.get(`project`)||``}:{view:`chat`}}function pf(e,t,n={}){if(e===`sessions`)return`/sessions`;if(e===`codewiki`){let e=String(n.projectPath||``).trim();return e?`/codewiki?project=${encodeURIComponent(e)}`:`/codewiki`}return t?`/chat/${encodeURIComponent(t)}`:`/`}function mf(e,t,{replace:n=!1,projectPath:r=``}={}){let i=pf(e,t,{projectPath:r});if(`${window.location.pathname}${window.location.search}`===i)return;let a={view:e,sessionId:t||null,projectPath:r||null};n?window.history.replaceState(a,``,i):window.history.pushState(a,``,i)}var hf={stage:`idle`,busy:!1,currentView:`chat`,runtimeState:null,live:!1,stageLabel:``,messages:[],activeMsgId:null,pendingToolChanges:[],planSteps:[],pendingPlanApproval:null,approvalRequest:null,config:null,configOpen:!1,projectOpen:!1,skillsOpen:!1,soulsOpen:!1,aboutOpen:!1,gitDiffOpen:!1,sessions:[],projectCwd:null,history:[],skills:[],gitInfo:null,gitBatch:{},codewikiProjectPath:``,versionInfo:null,updateStatus:null};function gf(e){let t=String(e||``),n=t.match(/^\[Executing skill: \/([^\]\s]+)\]\n\n/);if(!n)return t;let r=`/${n[1]}`,i=t.match(/\nCurrent question:\n([\s\S]+)$/);return i?.[1]?.trim()?`${r} ${i[1].trim()}`:r}function _f(e,t,n){return e.map(e=>{if(e.type!==`tools`)return e;let r=e.cards.findIndex(e=>e.id===t);if(r===-1)return e;let i=[...e.cards];return i[r]=n(i[r]),{...e,cards:i}})}function vf(e,t){if(e.length===0)return[{type:`tools`,cards:[t]}];let n=e[e.length-1];return n.type===`tools`?[...e.slice(0,-1),{...n,cards:[...n.cards,t]}]:[...e,{type:`tools`,cards:[t]}]}function yf(e){return e.length===0?[{type:`text`,text:``,isStreaming:!1}]:e[e.length-1].type===`text`?e:[...e,{type:`text`,text:``,isStreaming:!1}]}function bf(e,t){let n=yf(e),r=n[n.length-1];return[...n.slice(0,-1),{...r,text:(r.text||``)+t,isStreaming:!0}]}function xf(e){return String(e||``).replace(/(?:^|\n)\[plan\]\s+Step\s+\d+\/\d+\s+->[^\n]*\n?/g,``)}function Sf(e,t){let n=new Set(Array.isArray(t)?t:[t]);return e.filter(e=>{if(n.has(e.transientKey))return!1;let t=String(e.text||``);return!(n.has(`plan-waiting-review`)&&(t.includes(`等待计划审阅`)||t.includes(`Waiting for plan review`))||n.has(`waiting-response`)&&(t.includes(`等待回复`)||t.includes(`Waiting for response`)))})}function Cf(e){let t=String(e||``);return t.includes(`Auto plan finished`)||t.includes(`Plan created and waiting for approval`)||t.includes(`Pending plan approval`)||t.includes(`Plan File:`)&&t.includes(`/yes`)}function wf(e){let t=String(e||``).trim().toLowerCase();return[`yes`,`y`,`/yes`,`/plan approve`,`approve`,`approved`,`no`,`n`,`/no`,`/reject`].includes(t)||t.startsWith(`/edit `)}function Tf(e){let t=String(e||``).trim().toLowerCase();return[`/yes`,`/plan approve`,`/no`,`/reject`].includes(t)||t.startsWith(`/edit `)}function Ef(e){return{id:`plan-step-${e.step}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:e.role||`general`,text:``,segments:[],skillBadges:[],fileChanges:[],timestamp:new Date().toISOString(),planStep:{step:e.step,total:e.total,role:e.role||`general`,title:e.title||``,status:`running`,summary:``}}}function Df(e){let t=String(e||``),n=[...t.matchAll(/^\[(DONE|FAILED|RUNNING)\]\s+([A-Za-z0-9_-]+):\s*(.*)$/gm)];return!n.length||n[0].index>t.slice(0,n[0].index).trim().length?null:n.map((e,r)=>{let i=n[r+1],a=e.index+e[0].length,o=i?i.index:t.length,s=String(e[1]||``).toLowerCase();return{step:r+1,total:n.length,status:s===`failed`?`failed`:s===`done`?`done`:`running`,role:String(e[2]||`general`).toLowerCase(),title:String(e[3]||``).trim(),body:t.slice(a,o).trim()}})}function Of(e,t){let n=e.role===`summarizer`;return{id:`plan-history-${Date.now()}-${t}-${e.step}`,role:e.role||`general`,segments:n&&e.body?[{type:`text`,text:e.body,isStreaming:!1}]:[],skillBadges:[],fileChanges:[],planStep:{step:e.step,total:e.total,role:e.role||`general`,title:e.title||``,status:e.status||`done`,summary:``}}}function kf(e,t){return{id:`plan-transcript-${Date.now()}-${t}-${e.step||0}`,role:e.role||`general`,segments:Array.isArray(e.segments)?e.segments:[],skillBadges:[],fileChanges:[],planStep:{step:e.step,total:e.total,role:e.role||`general`,title:e.title||``,status:e.status||`done`,summary:e.summary||``}}}function Af({children:e}){let[t,n]=(0,d.useState)(hf),r=(0,d.useRef)(t);r.current=t;let i=(0,d.useRef)(null),a=(0,d.useRef)([]),o=(0,d.useRef)(!1),s=(0,d.useRef)(new Map),c=(0,d.useRef)(null),l=(0,d.useRef)(null),u=(0,d.useCallback)(e=>{n(t=>({...t,...e}))},[]),f=(0,d.useCallback)(e=>{let t=e.id||`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,r=[];e.text&&r.push({type:`text`,text:e.text,isStreaming:e.isStreaming||!1});let i={...e,id:t,segments:r,skillBadges:[],fileChanges:[]};return n(e=>({...e,messages:[...e.messages,i]})),t},[]),p=(0,d.useCallback)(e=>{i.current=e,u({activeMsgId:e})},[u]),m=(0,d.useCallback)(async()=>{try{let e=await Ed(),t=e.cwd?.split(/[/\\]/).pop()||e.cwd||`...`,r=!!e.busy;return n(n=>({...n,runtimeState:e,projectCwd:t,pendingPlanApproval:e?.pendingPlanApproval||null,busy:r,live:r||n.live,stage:r?`thinking`:n.stage,stageLabel:r?V(`waitingResponse`):n.stageLabel,messages:e?.pendingPlanApproval?n.messages:Sf(n.messages,`plan-waiting-review`)})),e}catch{return null}},[u]),h=(0,d.useCallback)(async()=>{try{u({gitInfo:await Hd()})}catch{}},[u]),g=(0,d.useCallback)(async e=>{let t=[...new Set((e||[]).map(e=>e.projectDir).filter(Boolean))];if(t.length)try{u({gitBatch:await Wd(t)})}catch{}},[u]),v=(0,d.useCallback)(async()=>{try{let e=await Od();u({history:Array.isArray(e)?e:[]})}catch{}},[u]),y=(0,d.useCallback)(async()=>{try{let e=await kd(),t=Array.isArray(e)?e:[];u({sessions:t}),g(t)}catch{}},[u,g]),b=(0,d.useCallback)(async e=>{if(!e)return null;try{let t=await Ed();if(t?.cwd===e)return t;let n=await Gd(e);return n?.error?null:n}catch{return null}},[]),x=(0,d.useCallback)(async()=>{try{let e=await qd();u({skills:Array.isArray(e)?e:[]})}catch{}},[u]),S=(0,d.useCallback)(async()=>{try{let e=await Ad(),t=Array.isArray(e)?e:e.messages||[],n=e?.compact||null;if(!t.length){let e=await jd();Array.isArray(e)&&e.length&&u({messages:e});return}let r=[],i=null,a=n?.boundaryIndex,o=a==null;for(let e=0;e<t.length;e++){let s=t[e];if(!o&&e>=a&&(r.push({id:`msg-compact-divider-${Date.now()}`,role:`divider`,dividerType:`compact`,text:`以上内容已压缩 (${n.mode||``})`,timestamp:n.timestamp||new Date().toISOString()}),o=!0),s.role===`user`){if(Tf(s.content))continue;i=null;let e=gf(s.content||``);r.push({id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}-u${r.length}`,role:`you`,segments:[{type:`text`,text:e,isStreaming:!1}],skillBadges:[],fileChanges:[]})}else if(s.role===`assistant`){if(Array.isArray(s.planTranscript)&&s.planTranscript.length){i=null;for(let e of s.planTranscript)r.push(kf(e,r.length));continue}let e=Df(s.content);if(e?.length){i=null;let t=[...e].reverse().find(e=>e.role===`summarizer`)||e[e.length-1];r.push(Of({...t,step:1,total:1,role:t.role||`summarizer`},r.length));continue}i||(i={id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}-a${r.length}`,role:`general`,segments:[],skillBadges:[],fileChanges:[]},r.push(i)),s.content&&i.segments.push({type:`text`,text:s.content,isStreaming:!1}),s.toolCalls&&s.toolCalls.length&&i.segments.push({type:`tools`,cards:s.toolCalls.map(e=>({id:e.id,name:e.function?.name||e.name||`tool`,arguments:e.function?.arguments||e.arguments||{},status:e.status||`done`,durationMs:e.durationMs,summary:e.summary||``,result:``}))})}else if(s.role===`tool`&&i){let e=s.toolCallId||s.tool_call_id;if(!e)continue;for(let t of i.segments){if(t.type!==`tools`)continue;let n=t.cards.find(t=>t.id===e);if(n){s.toolSummary&&(n.summary=s.toolSummary),s.toolDurationMs!=null&&(n.durationMs=s.toolDurationMs),s.toolStatus===`error`&&(n.status=`error`),s.toolStatus===`blocked`&&(n.status=`blocked`),s.content&&(n.result=s.content);break}}}}u({messages:r})}catch{}},[u]),C=(0,d.useCallback)(e=>{if(!e?.type||df(e))return;let t=r.current,c=i.current;switch(e.type){case`connected`:break;case`assistant:start`:{if(t.currentView!==`chat`&&t.currentView!==`codewiki`&&u({currentView:`chat`}),n(e=>({...e,messages:Sf(e.messages,`waiting-response`)})),o.current){u({stage:`thinking`,busy:!0,live:!0,stageLabel:V(`thinking`)});break}let e=c;e||(e=f({role:`general`,timestamp:new Date().toISOString(),text:``,isStreaming:!1}),p(e)),u({stage:`thinking`,busy:!0,live:!0,stageLabel:V(`thinking`)});break}case`assistant:delta`:{let t=xf(e.text);c&&t&&n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,segments:bf(e.segments,t)}:e)})),u({stage:`streaming`,live:!0,stageLabel:V(`streaming`)});break}case`assistant:tool_call_delta`:break;case`assistant:response`:c&&n(t=>({...t,messages:t.messages.map(t=>{if(t.id!==c)return t;if(e.text){let n=xf(e.text),r=yf(t.segments),i=r.length-1;return{...t,segments:r.map((e,t)=>t===i&&e.type===`text`?{...e,text:n,isStreaming:!1}:e)}}return{...t,segments:t.segments.map(e=>e.type===`text`?{...e,isStreaming:!1}:e)}})}));break;case`tool:start`:if(u({stage:`tooling`,live:!0,stageLabel:V(`tooling`)}),c){let t={id:e.id,name:e.name,arguments:e.arguments,status:`running`,durationMs:null,summary:``,result:``};n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,segments:vf(e.segments,t)}:e)}))}break;case`tool:end`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?(e.fileChange&&(a.current=[...a.current,e.fileChange]),{...t,segments:_f(t.segments,e.id,t=>{let n={...t,status:`done`,durationMs:e.durationMs};return e.summary&&(n.summary=e.summary),n})}):t)}));break;case`tool:result`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?{...t,segments:_f(t.segments,e.id,t=>({...t,result:e.content||``}))}:t)}));break;case`tool:error`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?{...t,segments:_f(t.segments,e.id,t=>({...t,status:`error`,durationMs:e.durationMs,summary:e.summary||t.summary}))}:t)}));break;case`tool:blocked`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?{...t,segments:_f(t.segments,e.id,e=>({...e,status:`blocked`,summary:V(`toolBlocked`)}))}:t)}));break;case`system_tool:start`:f({role:`system`,text:`${e.name||`System`}: ${e.summary||``}`,timestamp:new Date().toISOString()});break;case`plan:steps`:{let t=(e.steps||[]).map((e,t)=>({index:e.index??t,title:e.title,role:e.role,status:`pending`}));o.current=!0,s.current=new Map,p(null),u({planSteps:t,pendingPlanApproval:null});break}case`plan:progress`:{let{step:t,status:r}=e;n(e=>({...e,planSteps:e.planSteps.map((e,n)=>n===t-1?{...e,status:r}:e)}));break}case`plan:step_start`:{o.current=!0,r.current.pendingPlanApproval&&u({pendingPlanApproval:null});let t=String(e.step),i=s.current.get(t);if(i)n(e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,planStep:{...e.planStep||{},status:`running`}}:e)}));else{let r=Ef(e);i=r.id,s.current.set(t,i),n(e=>({...e,messages:[...Sf(e.messages,`waiting-response`),r]}))}p(i),u({stage:`tooling`,busy:!0,live:!0,stageLabel:`${e.role||`agent`}: ${e.title||``}`.trim()});break}case`plan:step_done`:{let t=s.current.get(String(e.step));t&&n(n=>({...n,messages:n.messages.map(n=>n.id===t?{...n,segments:n.segments.map(e=>e.type===`text`?{...e,isStreaming:!1}:e),planStep:{...n.planStep||{},status:e.status||`done`,summary:e.summary||``}}:n)}));break}case`plan:pending_approval`:n(t=>({...t,messages:[...Sf(t.messages,[`plan-waiting-review`,`waiting-response`]).filter(e=>!Cf(e.text)),{id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:`system`,text:V(`planWaitingReview`),segments:[{type:`text`,text:V(`planWaitingReview`),isStreaming:!1}],skillBadges:[],fileChanges:[],transientKey:`plan-waiting-review`,timestamp:new Date().toISOString()}],pendingPlanApproval:{goal:e.goal,summary:e.summary,filePath:e.filePath,steps:e.steps||[]}}));break;case`plan:approval_cleared`:n(e=>({...e,pendingPlanApproval:null,messages:Sf(e.messages,`plan-waiting-review`)}));break;case`skill:start`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?{...t,skillBadges:[...t.skillBadges,{name:e.name,status:`running`}]}:t)}));break;case`skill:end`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?{...t,skillBadges:t.skillBadges.map(t=>t.name===e.name?{...t,status:`done`}:t)}:t)}));break;case`skill:error`:c&&n(t=>({...t,messages:t.messages.map(t=>t.id===c?{...t,skillBadges:t.skillBadges.map(t=>t.name===e.name?{...t,status:`error`}:t)}:t)}));break;case`skill:auto`:if(c){let t=(e.names||[]).join(`, `);n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,skillBadges:[...e.skillBadges,{name:t,status:`auto`}]}:e)}))}break;case`compact:auto`:f({role:`divider`,dividerType:`compact`,text:`以上内容已压缩 (${e.mode||``}, ${e.threshold||``}%)`,timestamp:new Date().toISOString()});break;case`dream:auto`:f({role:`system`,text:`Dream triggered...`,timestamp:new Date().toISOString()});break;case`dream:complete`:f({role:`system`,text:`Dream complete`,timestamp:new Date().toISOString()});break;case`approval:request`:u({approvalRequest:e});break;case`submit:done`:{let t=e.result||{};c&&a.current.length&&(n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,fileChanges:[...e.fileChanges,...a.current]}:e)})),a.current=[]),c&&n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,segments:e.segments.map(e=>e.type===`text`?{...e,isStreaming:!1}:e)}:e)})),t.type===`system`&&t.text&&!r.current.pendingPlanApproval&&!Cf(t.text)&&f({role:`system`,text:t.text,timestamp:new Date().toISOString()}),p(null),o.current=!1,s.current=new Map,n(e=>({...e,stage:`idle`,busy:!1,live:!1,stageLabel:``,messages:Sf(e.messages,r.current.pendingPlanApproval?`waiting-response`:[`waiting-response`,`plan-waiting-review`])})),v(),y();let i=r.current.runtimeState;i?.sessionId&&r.current.currentView===`chat`&&mf(`chat`,i.sessionId,{replace:!0});break}case`mode:changed`:{let t=e;u({runtimeState:{...r.current.runtimeState,mode:t.mode,...t}});break}case`runtime:state`:{let t=e.state||{};u({runtimeState:{...r.current.runtimeState,...t},pendingPlanApproval:t?.pendingPlanApproval||null,busy:!!t.busy,live:!!t.busy,stage:t.busy?r.current.stage:`idle`,stageLabel:t.busy?r.current.stageLabel:``});break}case`runtime:switched`:n(e=>({...e,messages:[],planSteps:[],pendingPlanApproval:null})),i.current=null,a.current=[],m(),h(),v(),S(),y(),r.current.currentView!==`codewiki`&&mf(`chat`,e.sessionId);break}},[f,u,v,y,m,S]),w=(0,d.useCallback)(()=>{c.current&&c.current.close();let e=new EventSource(`/api/events`);e.onmessage=e=>{try{C(JSON.parse(e.data))}catch(e){console.error(`SSE:`,e)}},e.onerror=()=>{e.close(),clearTimeout(l.current),l.current=setTimeout(w,3e3)},c.current=e},[C]);(0,d.useEffect)(()=>{(async()=>{let e=ff();if(u({currentView:e.view,codewikiProjectPath:e.view===`codewiki`?e.projectPath||``:r.current.codewikiProjectPath}),e.sessionId)try{(await Ed()).sessionId!==e.sessionId&&await Id(e.sessionId)}catch{}else e.view===`codewiki`&&e.projectPath&&await b(e.projectPath);try{let e=await Dd();for(let t of e)if(!(!t||df(t))&&(t.type===`system_tool`||t.type===`tool`)){let e=t.summary||``;(e||t.name)&&f({role:`system`,text:e?`${t.name}: ${e}`:t.name,timestamp:new Date().toISOString(),startupTodos:t.arguments?.todos})}}catch{}let t=await m();if(e.view===`chat`&&t?.sessionId)mf(`chat`,t.sessionId,{replace:!0});else if(e.view===`codewiki`){let n=e.projectPath||t?.cwd||``;u({currentView:`codewiki`,codewikiProjectPath:n}),n&&mf(`codewiki`,null,{replace:!0,projectPath:n})}await S(),v(),y(),x(),h();try{u({versionInfo:await wd()})}catch{}w()})();let e=async()=>{let e=ff();if(u({currentView:e.view,codewikiProjectPath:e.view===`codewiki`?e.projectPath||``:r.current.codewikiProjectPath}),e.sessionId)try{(await Ed()).sessionId!==e.sessionId&&(await Id(e.sessionId),n(e=>({...e,messages:[]})),await m(),await S(),y(),h())}catch{}else if(e.view===`codewiki`){e.projectPath&&await b(e.projectPath);let t=await m();u({currentView:`codewiki`,codewikiProjectPath:e.projectPath||t?.cwd||``}),y(),h()}};return window.addEventListener(`popstate`,e),()=>{c.current&&c.current.close(),clearTimeout(l.current),window.removeEventListener(`popstate`,e)}},[f,w,h,v,S,y,x,m,b,u]);let T={state:t,actions:{submit:async(e,t={})=>{if(!e.trim())return;r.current.currentView!==`chat`&&!t.stayInView&&u({currentView:`chat`});let i=!!r.current.pendingPlanApproval&&wf(e);i&&(o.current=!0),i||f({role:`you`,text:e,timestamp:new Date().toISOString()});let a=i?null:f({role:`system`,text:V(`waitingResponse`),timestamp:new Date().toISOString(),transientKey:`waiting-response`});u({busy:!0,live:!0,stage:`thinking`,stageLabel:V(`waitingResponse`)});try{let n=await(await Md(e,{readOnlyCodeWiki:t.readOnlyCodeWiki===!0})).json().catch(()=>({}));if(n?.error)throw Error(n.message||`Request failed`)}catch(e){i&&(o.current=!1),a&&n(e=>({...e,messages:e.messages.filter(e=>e.id!==a)})),f({role:`error`,text:`Failed: ${e.message}`,timestamp:new Date().toISOString()}),u({busy:!1,live:!1})}},abort:async()=>{try{await Nd()}catch{}},approve:async(e,t)=>{u({approvalRequest:null});try{await Fd(e,t)}catch{}},approvePlan:async(e,t)=>{if(r.current.pendingPlanApproval){o.current=e===`approve`,e===`reject`&&u({pendingPlanApproval:null}),u({busy:!0,live:!0,stage:`thinking`,stageLabel:V(`waitingResponse`)});try{let n=e===`approve`?`/yes`:e===`reject`?`/reject`:t?.trim()?`/edit ${t.trim()}`:``;if(!n){u({busy:!1,live:!1,stage:`idle`,stageLabel:``});return}let r=await(await Md(n)).json().catch(()=>({}));if(r?.error)throw Error(r.message||`Request failed`)}catch(e){o.current=!1,f({role:`error`,text:`Failed: ${e.message}`,timestamp:new Date().toISOString()}),u({busy:!1,live:!1,stage:`idle`,stageLabel:``})}}},switchSession:async e=>{try{(await Id(e)).ok&&(u({currentView:`chat`}),mf(`chat`,e),await m(),n(e=>({...e,messages:[]})),await S(),y(),h())}catch{}},deleteSession:async e=>{try{let t=e===r.current.runtimeState?.sessionId,i=await Ld(e);return i?.error?i:(n(t=>({...t,sessions:t.sessions.filter(t=>t.id!==e)})),t&&(u({currentView:`chat`}),i.sessionId&&mf(`chat`,i.sessionId,{replace:!0}),await m(),n(e=>({...e,messages:[]})),await S(),h()),await y(),i)}catch(e){return{error:!0,message:e.message}}},newSession:async()=>{try{let e=await Rd();e.ok&&(u({currentView:`chat`}),e.sessionId&&mf(`chat`,e.sessionId),await m(),n(e=>({...e,messages:[]})),y())}catch{}},openProject:async(e,t={})=>{try{let i=await Gd(e);if(i.ok){let a=t.view||`chat`,o=a===`codewiki`?i.cwd||e:r.current.codewikiProjectPath;u({currentView:a,projectOpen:!1,codewikiProjectPath:o}),a===`codewiki`?mf(`codewiki`,null,{projectPath:o}):i.sessionId&&mf(`chat`,i.sessionId),await m(),n(e=>({...e,messages:[]})),y(),h()}}catch{}},switchView:(e,t={})=>{let n=e===`codewiki`?t.projectPath||r.current.codewikiProjectPath||r.current.runtimeState?.cwd||``:r.current.codewikiProjectPath;if(u({currentView:e,codewikiProjectPath:n}),e===`sessions`&&mf(e),e===`codewiki`&&mf(e,null,{projectPath:n}),e===`chat`){let e=r.current.runtimeState;mf(`chat`,e?.sessionId)}},toggleTheme:()=>{let e=document.documentElement.dataset.theme===`dark`?`light`:`dark`;document.documentElement.dataset.theme=e,localStorage.setItem(`codemini-theme`,e)},setConfigOpen:e=>u({configOpen:e}),setProjectOpen:e=>u({projectOpen:e}),setSkillsOpen:e=>u({skillsOpen:e}),setSoulsOpen:e=>u({soulsOpen:e}),setAboutOpen:e=>u({aboutOpen:e}),setGitDiffOpen:e=>u({gitDiffOpen:e}),checkVersion:async()=>{try{u({versionInfo:await wd()})}catch{}},runUpdate:async()=>{u({updateStatus:`updating`});try{(await Td()).ok?u({updateStatus:`done`}):u({updateStatus:`error`})}catch{u({updateStatus:`error`})}}}};return(0,_.jsx)(uf.Provider,{value:T,children:e})}function jf(){let e=(0,d.useContext)(uf);if(!e)throw Error(`useApp must be used within AppProvider`);return e}var Mf=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Nf=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Pf=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ff=e=>{let t=Pf(e);return t.charAt(0).toUpperCase()+t.slice(1)},If={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Lf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Rf=(0,d.createContext)({}),zf=()=>(0,d.useContext)(Rf),Bf=(0,d.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=zf()??{},h=r??f?Number(n??u)*24/Number(t??l):n??u;return(0,d.createElement)(`svg`,{ref:c,...If,width:t??l??If.width,height:t??l??If.height,stroke:e??p,strokeWidth:h,className:Mf(`lucide`,m,i),...!a&&!Lf(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),H=(e,t)=>{let n=(0,d.forwardRef)(({className:n,...r},i)=>(0,d.createElement)(Bf,{ref:i,iconNode:t,className:Mf(`lucide-${Nf(Ff(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ff(e),n},Vf=H(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Hf=H(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Uf=H(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Wf=H(`book-open-text`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M16 12h2`,key:`7q9ll5`}],[`path`,{d:`M16 8h2`,key:`msurwy`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}],[`path`,{d:`M6 12h2`,key:`32wvfc`}],[`path`,{d:`M6 8h2`,key:`30oboj`}]]),Gf=H(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Kf=H(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),qf=H(`chart-no-axes-combined`,[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14v7`,key:`1g90b9`}],[`path`,{d:`M20 10v11`,key:`1iqoj0`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18v3`,key:`1yp0dc`}],[`path`,{d:`M8 14v7`,key:`n3cwzv`}]]),Jf=H(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Yf=H(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Xf=H(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Zf=H(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Qf=H(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),$f=H(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ep=H(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),tp=H(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),np=H(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),rp=H(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),ip=H(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ap=H(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),op=H(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),sp=H(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),cp=H(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),lp=H(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),up=H(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),dp=H(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),fp=H(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),pp=H(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),mp=H(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),hp=H(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),gp=H(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),_p=H(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),vp=H(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),yp=H(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),bp=H(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),xp=H(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Sp=H(`send-horizontal`,[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]]),Cp=H(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),wp=H(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Tp=H(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Ep=H(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Dp=H(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Op=H(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),kp=H(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Ap=H(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),jp=H(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Mp({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,_.jsx)($c,{"data-slot":`separator`,decorative:n,orientation:t,className:B(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function Np({...e}){return(0,_.jsx)(go,{"data-slot":`popover`,...e})}function Pp({...e}){return(0,_.jsx)(_o,{"data-slot":`popover-trigger`,...e})}function Fp({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,_.jsx)(vo,{children:(0,_.jsx)(yo,{"data-slot":`popover-content`,align:t,sideOffset:n,className:B(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}var Ip=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Lp=Hl,Rp=(e,t)=>n=>{if(t?.variants==null)return Lp(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ip(t)||Ip(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Lp(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},zp=Rp(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90`,outline:`border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 px-3.5 py-1.5 text-[13px] has-[>svg]:px-2.5`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1.5 rounded-md px-3 text-[13px] has-[>svg]:px-2`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-8`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Bp({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,_.jsx)(r?y:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:B(zp({variant:t,size:n,className:e})),...i})}function Vp({...e}){return(0,_.jsx)(Xn,{"data-slot":`dialog`,...e})}function Hp({...e}){return(0,_.jsx)(Zn,{"data-slot":`dialog-portal`,...e})}function Up({className:e,...t}){return(0,_.jsx)(Qn,{"data-slot":`dialog-overlay`,className:B(`fixed inset-0 z-50 bg-black/40 backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Wp({className:e,children:t,...n}){return(0,_.jsxs)(Hp,{"data-slot":`dialog-portal`,children:[(0,_.jsx)(Up,{}),(0,_.jsx)($n,{"data-slot":`dialog-content`,className:B(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border border-(--border-default) bg-(--bg-primary) text-(--text-primary) p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...n,children:t})]})}function Gp({className:e,showCloseButton:t=!0,children:n,...r}){return(0,_.jsxs)(`div`,{"data-slot":`dialog-header`,className:B(`flex flex-row items-center justify-between gap-2 text-center sm:text-left`,e),...r,children:[(0,_.jsx)(`div`,{className:`flex-1 min-w-0`,children:n}),t&&(0,_.jsxs)(nr,{"data-slot":`dialog-close`,className:`shrink-0 rounded-xs opacity-70 text-(--text-muted) transition-opacity hover:opacity-100 hover:text-(--text-primary) focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,_.jsx)(jp,{}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})}function Kp({className:e,showCloseButton:t=!1,children:n,...r}){return(0,_.jsxs)(`div`,{"data-slot":`dialog-footer`,className:B(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,_.jsx)(nr,{asChild:!0,children:(0,_.jsx)(Bp,{variant:`outline`,children:`Close`})})]})}function qp({className:e,...t}){return(0,_.jsx)(er,{"data-slot":`dialog-title`,className:B(`text-base font-semibold text-(--text-primary)`,e),...t})}function Jp({className:e,...t}){return(0,_.jsx)(tr,{"data-slot":`dialog-description`,className:B(`text-sm text-(--text-secondary)`,e),...t})}function Yp({open:e,title:t,description:n,confirmLabel:r,cancelLabel:i,loading:a=!1,onOpenChange:o,onConfirm:s}){return(0,_.jsx)(Vp,{open:e,onOpenChange:e=>!a&&o?.(e),children:(0,_.jsxs)(Wp,{className:`sm:max-w-[380px]`,children:[(0,_.jsxs)(Gp,{showCloseButton:!a,children:[(0,_.jsx)(qp,{children:t}),(0,_.jsx)(Jp,{className:`leading-6`,children:n})]}),(0,_.jsxs)(Kp,{children:[(0,_.jsx)(Bp,{type:`button`,variant:`outline`,disabled:a,onClick:()=>o?.(!1),children:i||V(`cancel`)}),(0,_.jsx)(Bp,{type:`button`,variant:`destructive`,disabled:a,onClick:s,children:a?V(`deleting`):r||V(`delete`)})]})]})})}function Xp(e){return e?.projectDir||`unknown`}function Zp(e){return!e||e===`unknown`?V(`unknownProject`):String(e).split(/[/\\]/).filter(Boolean).pop()||e}function Qp({size:e=14,className:t,...n}){return(0,_.jsx)(`svg`,{viewBox:`0 0 24 24`,width:e,height:e,fill:`currentColor`,"aria-hidden":`true`,className:t,...n,children:(0,_.jsx)(`path`,{d:`M12 .5C5.65.5.5 5.65.5 12c0 5.09 3.29 9.4 7.86 10.93.58.1.79-.25.79-.56v-2.18c-3.2.69-3.87-1.36-3.87-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.76 2.7 1.25 3.36.96.1-.75.4-1.25.73-1.54-2.55-.29-5.23-1.27-5.23-5.67 0-1.25.45-2.27 1.18-3.07-.12-.29-.51-1.46.11-3.03 0 0 .97-.31 3.16 1.17A10.98 10.98 0 0 1 12 6.07c.98 0 1.96.13 2.88.39 2.19-1.48 3.15-1.17 3.15-1.17.63 1.57.24 2.74.12 3.03.74.8 1.18 1.82 1.18 3.07 0 4.41-2.69 5.38-5.25 5.66.42.36.78 1.06.78 2.14v3.18c0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z`})})}var $p=[{id:`default`,labelKey:`themeDefault`,swatches:[`#0a0a0a`,`#f5f5f5`,`#60a5fa`]},{id:`catppuccin`,labelKey:`themeCatppuccin`,swatches:[`#1e1e2e`,`#cba6f7`,`#89b4fa`]},{id:`tokyonight`,labelKey:`themeTokyoNight`,swatches:[`#1a1b26`,`#7aa2f7`,`#bb9af7`]},{id:`one`,labelKey:`themeOne`,swatches:[`#282c34`,`#61afef`,`#c678dd`]},{id:`github`,labelKey:`themeGithub`,swatches:[`#ffffff`,`#0969da`,`#24292f`]},{id:`vscode`,labelKey:`themeVSCode`,swatches:[`#1e1e1e`,`#007acc`,`#d4d4d4`]}];function em({sessions:e,currentSessionId:t,onNewSession:n,onSwitchSession:r,onToggleTheme:i,onOpenSettings:a,onOpenSkills:o,onOpenSouls:s,onOpenAbout:c,gitBatch:l,versionInfo:u,onUpdate:f,updateStatus:p,currentView:m,onSwitchView:h,onOpenProject:g,onDeleteSession:v}){let[y,b]=(0,d.useState)(new Set),[x,S]=(0,d.useState)(null),[C,w]=(0,d.useState)(!1),[T,E]=(0,d.useState)(()=>typeof document>`u`?`default`:document.documentElement.dataset.palette||`default`),D=Array.isArray(e)?e:[],O=D.find(e=>e.id===t),ee=O?Xp(O):null,k=new Map;for(let e of D){let t=Xp(e);k.has(t)||k.set(t,[]),k.get(t).push(e)}let A=e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},j=typeof document<`u`&&document.documentElement.dataset.theme===`dark`,M=e=>{let t=$p.some(t=>t.id===e)?e:`default`;document.documentElement.dataset.palette=t,localStorage.setItem(`codemini-theme-palette`,t),window.dispatchEvent(new CustomEvent(`codemini-theme-palette-change`,{detail:{palette:t}})),E(t)},N=async(e,t)=>{if(e.stopPropagation(),t&&t!==`unknown`&&t!==ee&&g){await g(t,{view:`codewiki`});return}h?.(`codewiki`,{projectPath:t})},te=async(e,t)=>{if(e.stopPropagation(),!(!t||t===`unknown`)){if(t===ee){await n?.();return}await g?.(t,{view:`chat`})}};return(0,_.jsxs)(`aside`,{className:`w-[260px] shrink-0 flex flex-col bg-(--bg-secondary)`,children:[(0,_.jsxs)(`div`,{className:`shrink-0 px-2.5 pt-3 flex flex-col gap-0.5`,children:[(0,_.jsxs)(`button`,{className:`w-full border-0 bg-transparent flex items-center gap-2.5 h-[32px] px-2 rounded-lg cursor-pointer text-left text-[13px] hover:bg-(--bg-hover) text-(--text-primary)`,onClick:n,children:[(0,_.jsx)(_p,{size:15,strokeWidth:2,className:`text-(--text-secondary) shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:V(`newChat`)})]}),(0,_.jsxs)(`button`,{className:`w-full border-0 bg-transparent flex items-center gap-2.5 h-[32px] px-2 rounded-lg cursor-pointer text-left text-[13px] hover:bg-(--bg-hover) text-(--text-primary)`,onClick:o,children:[(0,_.jsx)(lp,{size:15,strokeWidth:2,className:`text-(--text-secondary) shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:V(`skills`)})]}),(0,_.jsxs)(`button`,{className:`w-full border-0 bg-transparent flex items-center gap-2.5 h-[32px] px-2 rounded-lg cursor-pointer text-left text-[13px] hover:bg-(--bg-hover) text-(--text-primary)`,onClick:s,children:[(0,_.jsx)(kp,{size:15,strokeWidth:2,className:`text-(--text-secondary) shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:V(`souls`)})]}),(0,_.jsx)(Mp,{className:`my-2 bg-(--border-default)`})]}),(0,_.jsxs)(`nav`,{className:`flex-1 min-h-0 flex flex-col px-2.5 pb-2 gap-0.5 overflow-y-auto`,style:{scrollbarWidth:`thin`},children:[Array.from(k.entries()).map(([e,n])=>{let i=y.has(e)||k.size===1,a=l?.[e],o=e===ee,s=e!==`unknown`;return(0,_.jsxs)(`div`,{children:[(0,_.jsxs)(`div`,{className:B(`w-full border-0 bg-transparent flex items-center gap-1 h-[28px] px-1.5 rounded-md text-left text-[12px] font-medium tracking-[0.2px] hover:bg-(--bg-hover)`,o?`text-(--text-primary)`:`text-(--text-muted) hover:text-(--text-secondary)`),title:e===`unknown`?``:e,children:[(0,_.jsxs)(`button`,{className:`min-w-0 flex-1 border-0 bg-transparent flex items-center gap-2 text-left text-inherit cursor-pointer`,onClick:()=>A(e),children:[(0,_.jsx)(ap,{size:13,className:`shrink-0`}),(0,_.jsx)(`span`,{className:`truncate flex-1`,children:Zp(e)})]}),s&&(0,_.jsx)(`button`,{type:`button`,className:`inline-flex size-6 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-(--text-muted) cursor-pointer hover:bg-(--bg-active) hover:text-(--text-primary)`,title:V(`newSessionInProject`),"aria-label":`${V(`newSessionInProject`)} ${Zp(e)}`,onClick:t=>te(t,e),children:(0,_.jsx)(_p,{size:13,strokeWidth:2.1})}),s&&(0,_.jsx)(`button`,{type:`button`,className:B(`inline-flex size-6 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-(--text-muted) cursor-pointer hover:bg-(--bg-active) hover:text-(--text-primary)`,m===`codewiki`&&o&&`bg-(--bg-active) text-(--text-primary)`),title:V(`openCodeWiki`),"aria-label":`${V(`openCodeWiki`)} ${Zp(e)}`,onClick:t=>N(t,e),children:(0,_.jsx)(Wf,{size:13,strokeWidth:1.9})}),a?.isGit&&(0,_.jsx)(Qp,{size:11,className:`shrink-0 text-(--text-muted)`}),(0,_.jsx)(`span`,{className:`text-[11px] px-2`,children:n.length}),(0,_.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent inline-flex size-5 shrink-0 items-center justify-center rounded-md text-inherit cursor-pointer hover:bg-(--bg-active)`,onClick:()=>A(e),"aria-label":V(i?`collapseProject`:`expandProject`),children:(0,_.jsx)(Yf,{size:13,className:B(`transition-transform`,!i&&`-rotate-90`)})})]}),i&&(0,_.jsx)(`div`,{className:`flex flex-col gap-1.5 py-1 pl-2`,children:n.slice(0,30).map(e=>(0,_.jsxs)(`div`,{onClick:()=>{e.id===t?m!==`chat`&&h?.(`chat`):r(e.id)},className:B(`group w-full border-0 bg-transparent flex items-center gap-2 h-[30px] px-2 rounded-md cursor-pointer text-left text-[13px] truncate`,e.id===t?`bg-(--bg-active) text-(--text-primary)`:`text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary)`),children:[(0,_.jsx)(`span`,{className:`truncate flex-1`,title:e.title||e.preview||(e.messageCount>0?`${e.messageCount} ${V(`messages`)}`:V(`emptyChat`)),children:e.title||e.preview||(e.messageCount>0?`${e.messageCount} ${V(`messages`)}`:V(`emptyChat`))}),e.updatedAt&&(0,_.jsx)(`span`,{className:`text-[11px] text-(--text-muted) shrink-0 tabular-nums`,children:new Date(e.updatedAt).toLocaleDateString(void 0,{year:`numeric`,month:`numeric`,day:`numeric`})}),(0,_.jsxs)(Np,{children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsx)(`button`,{type:`button`,className:`inline-flex size-6 shrink-0 items-center justify-center rounded-md text-(--text-muted) opacity-0 hover:bg-(--bg-active) hover:text-(--text-primary) group-hover:opacity-100 focus:opacity-100`,onClick:e=>e.stopPropagation(),"aria-label":V(`sessionActions`),children:(0,_.jsx)(tp,{size:14})})}),(0,_.jsx)(Fp,{align:`end`,className:`w-36 border-(--border-default) bg-(--bg-primary) p-1 text-(--text-primary)`,onClick:e=>e.stopPropagation(),children:(0,_.jsx)(`button`,{type:`button`,className:`w-full rounded-md px-2.5 py-2 text-left text-[13px] text-(--accent-red) hover:bg-(--accent-red-bg)`,onClick:()=>S(e),children:V(`deleteSession`)})})]})]},e.id))})]},e)}),D.length===0&&(0,_.jsx)(`div`,{className:`px-3 py-4 text-[12px] text-(--text-muted) text-center`,children:V(`noSessions`)})]}),(0,_.jsxs)(`div`,{className:`px-2.5 py-2 flex flex-col gap-0`,children:[(0,_.jsx)(Mp,{className:`my-2 bg-(--border-default)`}),u?.latest&&u.latest!==u.current&&(0,_.jsx)(`button`,{className:`w-full border-0 bg-(--bg-tertiary) rounded-md px-2.5 py-1.5 cursor-pointer text-[11px] text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary) flex items-center justify-center gap-1.5`,onClick:p===`updating`?void 0:f,disabled:p===`updating`,children:p===`updating`?(0,_.jsx)(_.Fragment,{children:V(`updating`)}):p===`done`?(0,_.jsx)(_.Fragment,{children:V(`updatedRestart`)}):(0,_.jsx)(_.Fragment,{children:V(`updateAvailable`)})}),(0,_.jsxs)(`div`,{className:`flex items-center justify-center gap-1`,children:[(0,_.jsx)(`button`,{className:`border-0 bg-transparent inline-flex items-center justify-center size-8 rounded-lg cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary) text-(--text-secondary)`,onClick:c,title:V(`about`),"aria-label":V(`about`),children:(0,_.jsx)(dp,{size:15,strokeWidth:1.8})}),(0,_.jsxs)(Np,{children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsx)(`button`,{className:`border-0 bg-transparent inline-flex items-center justify-center size-8 rounded-lg cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary) text-(--text-secondary)`,title:V(`switchThemePalette`),"aria-label":V(`switchThemePalette`),children:(0,_.jsx)(hp,{size:15,strokeWidth:1.8})})}),(0,_.jsx)(Fp,{align:`center`,side:`top`,className:`w-44 border-(--border-default) bg-(--bg-primary) p-1 text-(--text-primary)`,children:$p.map(e=>(0,_.jsxs)(`button`,{type:`button`,className:B(`w-full rounded-md px-2.5 py-2 text-left text-[13px] flex items-center gap-2 hover:bg-(--bg-hover)`,T===e.id&&`text-(--text-primary) font-medium`),onClick:()=>M(e.id),children:[(0,_.jsx)(`span`,{className:`flex shrink-0 -space-x-1`,children:e.swatches.map(e=>(0,_.jsx)(`span`,{className:`size-3 rounded-full border border-(--border-default)`,style:{backgroundColor:e}},e))}),(0,_.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:V(e.labelKey)}),T===e.id&&(0,_.jsx)(Jf,{size:13})]},e.id))})]}),(0,_.jsxs)(Np,{children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsx)(`button`,{className:`border-0 bg-transparent inline-flex items-center justify-center size-8 rounded-lg cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary) text-(--text-secondary)`,title:V(`switchLanguage`),"aria-label":V(`switchLanguage`),children:(0,_.jsx)(cp,{size:15,strokeWidth:1.8})})}),(0,_.jsx)(Fp,{align:`center`,side:`top`,className:`w-28 border-(--border-default) bg-(--bg-primary) p-1 text-(--text-primary)`,children:[`zh`,`en`].map(e=>(0,_.jsxs)(`button`,{type:`button`,className:B(`w-full rounded-md px-2.5 py-1.5 text-left text-[13px] flex items-center justify-between hover:bg-(--bg-hover)`,xd()===e&&`text-(--text-primary) font-medium`),onClick:()=>{xd()!==e&&(bd(e),window.location.reload())},children:[(0,_.jsx)(`span`,{children:e===`zh`?`中文`:`English`}),xd()===e&&(0,_.jsx)(Jf,{size:13})]},e))})]}),(0,_.jsx)(`button`,{className:`border-0 bg-transparent inline-flex items-center justify-center size-8 rounded-lg cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary) text-(--text-secondary)`,onClick:i,title:V(j?`lightMode`:`darkMode`),"aria-label":V(j?`switchToLightMode`:`switchToDarkMode`),children:j?(0,_.jsx)(mp,{size:15,strokeWidth:1.8}):(0,_.jsx)(Ep,{size:15,strokeWidth:1.8})}),(0,_.jsx)(`button`,{className:`border-0 bg-transparent inline-flex items-center justify-center size-8 rounded-lg cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary) text-(--text-secondary)`,onClick:a,title:V(`settings`),"aria-label":V(`settings`),children:(0,_.jsx)(Cp,{size:15,strokeWidth:1.8})})]})]}),(0,_.jsx)(Yp,{open:!!x,title:V(`deleteSessionConfirm`),description:x?V(`deleteSessionDescription`).replace(`{{session}}`,x.title||x.preview||x.id||``):``,loading:C,onOpenChange:e=>!e&&S(null),onConfirm:async()=>{if(!x)return;w(!0);let e=await v?.(x.id);w(!1),e?.error||S(null)}})]})}function tm(e){if(e==null||e<0)return``;if(e<1e3)return`${e}ms`;let t=e/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${Math.floor(t%60)}s`}function nm(e){let t=typeof e==`string`?new Date(e):e,n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`});return r?i:t.toLocaleDateString([],{month:`short`,day:`numeric`})+` `+i}var rm={read:`📖`,edit:`✏️`,write:`📝`,delete:`🗑️`,run:`⚙️`,grep:`🔍`,glob:`📂`,list:`📁`,web_fetch:`🌐`,web_search:`🔎`,default:`🔧`};function im(e){let t=String(e).match(/^(\w+)/);return t?t[1]:e}function am(e,t){if(!e)return``;let n=e;if(typeof e==`string`)try{n=JSON.parse(e)}catch{return e}if(typeof n!=`object`)return String(n);let r={read:`path`,edit:`path`,write:`path`,delete:`path`,run:`command`,grep:`pattern`,glob:`pattern`,list:`path`,web_fetch:`url`,web_search:`query`}[t];if(r&&n[r]!=null)return String(n[r]);for(let e of Object.values(n))if(typeof e==`string`&&e.length>0&&e.length<200)return e;return``}function om(e){if(typeof e!=`string`)return JSON.stringify(e,null,2);let t=e.trim();if(!t)return``;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return e}}var sm={running:`bg-[var(--accent-blue)] animate-pulse`,done:`bg-[var(--accent-green)]`,error:`bg-[var(--accent-red)]`,blocked:`bg-[var(--accent-orange)]`};function cm({card:e}){let[t,n]=(0,d.useState)(!1),r=im(e.name),i=rm[r]||rm.default,a=am(e.arguments,r),o=a&&!String(e.name).includes(`(`)?`${e.name}(${a})`:e.name,s=[];return e.arguments!=null&&e.arguments!==``&&s.push([`Arguments`,om(e.arguments)]),e.summary&&s.push([`Summary`,String(e.summary)]),e.result&&s.push([`Result`,om(e.result)]),(0,_.jsxs)(`div`,{className:B(`border border-[var(--border-default)] rounded-lg bg-[var(--bg-primary)] dark:bg-[var(--bg-secondary)] my-2 overflow-hidden`,e.status===`error`&&`border-[var(--accent-red)]/40`,e.status===`blocked`&&`border-[var(--accent-orange)]/40`),children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 cursor-pointer select-none text-[13px] hover:bg-[var(--bg-hover)]`,onClick:()=>n(!t),children:[t?(0,_.jsx)(Yf,{size:14}):(0,_.jsx)(Xf,{size:14}),(0,_.jsx)(`span`,{className:`w-[18px] h-[18px] flex items-center justify-center text-xs rounded shrink-0`,children:i}),(0,_.jsx)(`span`,{className:`font-mono text-xs font-semibold text-[var(--text-primary)] min-w-0 overflow-hidden text-ellipsis whitespace-nowrap flex-1`,children:o}),e.durationMs!=null&&(0,_.jsx)(`span`,{className:`text-[11px] text-[var(--text-muted)] font-mono ml-auto shrink-0`,children:tm(e.durationMs)}),(0,_.jsx)(`span`,{className:B(`w-1.5 h-1.5 rounded-full shrink-0`,sm[e.status]||`bg-[var(--muted)]`)})]}),t&&(0,_.jsx)(`div`,{className:`px-3 py-2.5 border-t border-[var(--border-default)]`,children:s.length===0?(0,_.jsx)(`div`,{className:`text-xs text-[var(--text-muted)]`,children:`No details yet`}):s.map(([e,t],n)=>(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`mt-2 mb-1 text-[10px] font-bold uppercase tracking-[0.4px] text-[var(--text-muted)]`,children:e}),(0,_.jsx)(`pre`,{className:`m-0 p-2 rounded bg-[var(--bg-tertiary)] text-[var(--text-primary)] font-mono text-xs leading-relaxed overflow-x-auto whitespace-pre-wrap break-words`,children:t})]},n))}),e.summary&&!t&&(0,_.jsx)(`div`,{className:`px-3 pb-2 text-xs text-[var(--text-secondary)]`,children:e.summary})]})}var lm=(function(e){if(e==null)return mm;if(typeof e==`function`)return pm(e);if(typeof e==`object`)return Array.isArray(e)?um(e):dm(e);if(typeof e==`string`)return fm(e);throw Error(`Expected function, string, or object as test`)});function um(e){let t=[],n=-1;for(;++n<e.length;)t[n]=lm(e[n]);return pm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function dm(e){let t=e;return pm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function fm(e){return pm(t);function t(t){return t&&t.type===e}}function pm(e){return t;function t(t,n,r){return!!(hm(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function mm(){return!0}function hm(e){return typeof e==`object`&&!!e&&`type`in e}function gm(e){return e}var _m=[],vm=`skip`;function ym(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=lm(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+gm(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=_m,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=bm(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function bm(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?_m:[e]}function xm(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ym(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Sm={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function Cm({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=Sm.indicator,imageBlockPolicy:c=Sm.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=Nm(e,t,n,r,i,a,o,s,c);km(l),xm(l,u)}}function wm(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function Tm(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var Em=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),Dm=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function Om(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=wm(e,n);if(!o||Dm.has(o.protocol)||!(Em.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=Tm(e);return o&&t.some(e=>{let t=wm(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function km(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)km(t)}}var Am=Symbol(`node-seen`);function jm(e,t,n){return t===Sm.remove?{type:`remove`}:t===Sm.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function Mm(e,t,n){if(t===Sm.remove)return{type:`remove`};if(t===Sm.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var Nm=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[Am])return!0;if(u.tagName===`a`){let n=Om(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[Am]=!0,xm(u,l),f&&typeof d==`number`){let e=jm(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[vm,d];f.children[d]=e.element}return vm}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=Om(u.properties.src,n,e,r,!0,i);if(t===null){if(u[Am]=!0,xm(u,l),f&&typeof d==`number`){let e=Mm(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[vm,d];f.children[d]=e.element}return vm}else return u.properties.src=t,!0}return!0};return l},Pm=typeof self==`object`?self:globalThis,Fm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Pm[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Pm[a](o),i)};return r},Im=e=>Fm(new Map,e)(0),Lm=``,{toString:Rm}={},{keys:zm}=Object,Bm=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Rm.call(e).slice(8,-1);switch(n){case`Array`:return[1,Lm];case`Object`:return[2,Lm];case`Date`:return[3,Lm];case`RegExp`:return[4,Lm];case`Map`:return[5,Lm];case`Set`:return[6,Lm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Vm=([e,t])=>e===0&&(t===`function`||t===`symbol`),Hm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Bm(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of zm(r))(e||!Vm(Bm(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Vm(Bm(n))||Vm(Bm(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Vm(Bm(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Um=(e,{json:t,lossy:n}={})=>{let r=[];return Hm(!(t||n),!!t,new Map,r)(e),r},Wm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Im(Um(e,t)):structuredClone(e):(e,t)=>Im(Um(e,t)),Gm=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Gm.prototype.normal={},Gm.prototype.property={},Gm.prototype.space=void 0;function Km(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Gm(n,r,t)}function qm(e){return e.toLowerCase()}var Jm=class{constructor(e,t){this.attribute=t,this.property=e}};Jm.prototype.attribute=``,Jm.prototype.booleanish=!1,Jm.prototype.boolean=!1,Jm.prototype.commaOrSpaceSeparated=!1,Jm.prototype.commaSeparated=!1,Jm.prototype.defined=!1,Jm.prototype.mustUseProperty=!1,Jm.prototype.number=!1,Jm.prototype.overloadedBoolean=!1,Jm.prototype.property=``,Jm.prototype.spaceSeparated=!1,Jm.prototype.space=void 0;var Ym=e({boolean:()=>Zm,booleanish:()=>Qm,commaOrSpaceSeparated:()=>nh,commaSeparated:()=>th,number:()=>U,overloadedBoolean:()=>$m,spaceSeparated:()=>eh}),Xm=0,Zm=rh(),Qm=rh(),$m=rh(),U=rh(),eh=rh(),th=rh(),nh=rh();function rh(){return 2**++Xm}var ih=Object.keys(Ym),ah=class extends Jm{constructor(e,t,n,r){let i=-1;if(super(e,t),oh(this,`space`,r),typeof n==`number`)for(;++i<ih.length;){let e=ih[i];oh(this,ih[i],(n&Ym[e])===Ym[e])}}};ah.prototype.defined=!0;function oh(e,t,n){n&&(e[t]=n)}function sh(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ah(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[qm(r)]=r,n[qm(a.attribute)]=r}return new Gm(t,n,e.space)}var ch=sh({properties:{ariaActiveDescendant:null,ariaAtomic:Qm,ariaAutoComplete:null,ariaBusy:Qm,ariaChecked:Qm,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:eh,ariaCurrent:null,ariaDescribedBy:eh,ariaDetails:null,ariaDisabled:Qm,ariaDropEffect:eh,ariaErrorMessage:null,ariaExpanded:Qm,ariaFlowTo:eh,ariaGrabbed:Qm,ariaHasPopup:null,ariaHidden:Qm,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:eh,ariaLevel:U,ariaLive:null,ariaModal:Qm,ariaMultiLine:Qm,ariaMultiSelectable:Qm,ariaOrientation:null,ariaOwns:eh,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Qm,ariaReadOnly:Qm,ariaRelevant:null,ariaRequired:Qm,ariaRoleDescription:eh,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Qm,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function lh(e,t){return t in e?e[t]:t}function uh(e,t){return lh(e,t.toLowerCase())}var dh=sh({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:th,acceptCharset:eh,accessKey:eh,action:null,allow:null,allowFullScreen:Zm,allowPaymentRequest:Zm,allowUserMedia:Zm,alt:null,as:null,async:Zm,autoCapitalize:null,autoComplete:eh,autoFocus:Zm,autoPlay:Zm,blocking:eh,capture:null,charSet:null,checked:Zm,cite:null,className:eh,cols:U,colSpan:null,content:null,contentEditable:Qm,controls:Zm,controlsList:eh,coords:U|th,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Zm,defer:Zm,dir:null,dirName:null,disabled:Zm,download:$m,draggable:Qm,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Zm,formTarget:null,headers:eh,height:U,hidden:$m,high:U,href:null,hrefLang:null,htmlFor:eh,httpEquiv:eh,id:null,imageSizes:null,imageSrcSet:null,inert:Zm,inputMode:null,integrity:null,is:null,isMap:Zm,itemId:null,itemProp:eh,itemRef:eh,itemScope:Zm,itemType:eh,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Zm,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:Zm,muted:Zm,name:null,nonce:null,noModule:Zm,noValidate:Zm,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Zm,optimum:U,pattern:null,ping:eh,placeholder:null,playsInline:Zm,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Zm,referrerPolicy:null,rel:eh,required:Zm,reversed:Zm,rows:U,rowSpan:U,sandbox:eh,scope:null,scoped:Zm,seamless:Zm,selected:Zm,shadowRootClonable:Zm,shadowRootDelegatesFocus:Zm,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Qm,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:Zm,useMap:null,value:Qm,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:eh,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Zm,declare:Zm,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:Zm,noHref:Zm,noShade:Zm,noWrap:Zm,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Qm,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Zm,disableRemotePlayback:Zm,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:uh}),fh=sh({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:nh,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:eh,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:Zm,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:th,g2:th,glyphName:th,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:nh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:eh,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nh,rev:nh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nh,requiredFeatures:nh,requiredFonts:nh,requiredFormats:nh,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:nh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nh,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:lh}),ph=sh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),mh=sh({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:uh}),hh=sh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),gh={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},_h=/[A-Z]/g,vh=/-[a-z]/g,yh=/^data[-\w.:]+$/i;function bh(e,t){let n=qm(t),r=t,i=Jm;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&yh.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(vh,Sh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!vh.test(e)){let n=e.replace(_h,xh);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ah}return new i(r,t)}function xh(e){return`-`+e.toLowerCase()}function Sh(e){return e.charAt(1).toUpperCase()}var Ch=Km([ch,dh,ph,mh,hh],`html`),wh=Km([ch,fh,ph,mh,hh],`svg`);function Th(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Eh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Dh=/[#.]/g;function Oh(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Dh.lastIndex=i;let e=Dh.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function kh(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ah(e){return e.join(` `).trim()}function jh(e,t,n){let r=n?Lh(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Oh(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Mh(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Nh(e,o.properties,t,n)}for(let e of a)Ph(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Mh(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Nh(e,t,n,r){let i=bh(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?kh(r):i.commaSeparated?Th(r):i.commaOrSpaceSeparated?kh(Th(r).join(` `)):Fh(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Ih(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Fh(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ph(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Ph(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Ph(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Fh(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||qm(n)===qm(t)))return!0}return n}function Ih(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Lh(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Rh=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),zh=jh(Ch,`div`),Bh=jh(wh,`g`,Rh);function Vh(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Hh(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Hh(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Hh(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
62
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Uh={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Wh={}.hasOwnProperty,Gh=Object.prototype;function Kh(e,t){let n=t||{};return qh({file:n.file||void 0,location:!1,schema:n.space===`svg`?wh:Ch,verbose:n.verbose||!1},e)}function qh(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Xh(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:Jh(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Vh(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},Xh(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Xh(e,r,n),n}default:return n=Yh(e,t),n}}function Jh(e,t){let n=-1,r=[];for(;++n<t.length;){let i=qh(e,t[n]);r.push(i)}return r}function Yh(e,t){let n=e.schema;e.schema=t.namespaceURI===Uh.svg?wh:Ch;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Wh.call(Gh,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Bh:zh)(t.tagName,i,Jh(e,t.childNodes));if(Xh(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Qh(r.startTag),o=r&&r.endTag&&Qh(r.endTag),s=qh(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function Xh(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Zh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Zh(e,t,n){let r=Qh(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Wh.call(n.attrs,i)&&(r[bh(e.schema,i).property]=Qh(n.attrs[i]));n.startTag;let a=Qh(n.startTag),o=n.endTag?Qh(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Qh(e){let t=$h({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=$h({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function $h(e){return e.line&&e.column?e:void 0}var eg={}.hasOwnProperty;function tg(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&eg.call(t,e)){let n=String(t[e]);i=eg.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var ng={},rg={}.hasOwnProperty,ig=tg(`type`,{handlers:{root:og,element:dg,text:lg,comment:ug,doctype:cg}});function ag(e,t){let n=(t||ng).space;return ig(e,n===`svg`?wh:Ch)}function og(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=pg(e.children,n,t),mg(e,n),n}function sg(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=pg(e.children,n,t),mg(e,n),n}function cg(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return mg(e,t),t}function lg(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return mg(e,t),t}function ug(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return mg(e,t),t}function dg(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=wh);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&rg.call(e.properties,a)){let t=fg(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Uh[o],childNodes:[],parentNode:null};return s.childNodes=pg(e.children,s,r),mg(e,s),e.tagName===`template`&&e.content&&(s.content=sg(e.content,r)),s}function fg(e,t,n){let r=bh(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Eh(n):Ah(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Uh[r.space]}return i}function pg(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=ig(e[r],n);a.parentNode=t,i.push(a)}return i}function mg(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var hg=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],gg=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),W;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(W||={});var _g={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function vg(e){return e>=55296&&e<=57343}function yg(e){return e>=56320&&e<=57343}function bg(e,t){return(e-55296)*1024+9216+t}function xg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Sg(e){return e>=64976&&e<=65007||gg.has(e)}var G;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(G||={});var Cg=65536,wg=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Cg,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(yg(t))return this.pos++,this._addGap(),bg(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,W.EOF;return this._err(G.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let n=this.html.charCodeAt(t);return n===W.CARRIAGE_RETURN?W.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let e=this.html.charCodeAt(this.pos);return e===W.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,W.LINE_FEED):e===W.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vg(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===W.LINE_FEED||e===W.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){xg(e)?this._err(G.controlCharacterInInputStream):Sg(e)&&this._err(G.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},Tg;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(Tg||={});function Eg(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Dg=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Og=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function kg(e){return e>=55296&&e<=57343||e>1114111?65533:Og.get(e)??e}var Ag;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Ag||={});var jg=32,Mg;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Mg||={});function Ng(e){return e>=Ag.ZERO&&e<=Ag.NINE}function Pg(e){return e>=Ag.UPPER_A&&e<=Ag.UPPER_F||e>=Ag.LOWER_A&&e<=Ag.LOWER_F}function Fg(e){return e>=Ag.UPPER_A&&e<=Ag.UPPER_Z||e>=Ag.LOWER_A&&e<=Ag.LOWER_Z||Ng(e)}function Ig(e){return e===Ag.EQUALS||Fg(e)}var Lg;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Lg||={});var Rg;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Rg||={});var zg=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Lg.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Rg.Strict}startEntity(e){this.decodeMode=e,this.state=Lg.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Lg.EntityStart:return e.charCodeAt(t)===Ag.NUM?(this.state=Lg.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Lg.NamedEntity,this.stateNamedEntity(e,t));case Lg.NumericStart:return this.stateNumericStart(e,t);case Lg.NumericDecimal:return this.stateNumericDecimal(e,t);case Lg.NumericHex:return this.stateNumericHex(e,t);case Lg.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|jg)===Ag.LOWER_X?(this.state=Lg.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Lg.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Ng(r)||Pg(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Ng(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ag.SEMI)this.consumed+=1;else if(this.decodeMode===Rg.Strict)return 0;return this.emitCodePoint(kg(this.result),this.consumed),this.errors&&(e!==Ag.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Mg.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=Bg(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Rg.Attribute&&(i===0||Ig(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Mg.VALUE_LENGTH)>>14,i!==0){if(a===Ag.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Rg.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Mg.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Mg.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Lg.NamedEntity:return this.result!==0&&(this.decodeMode!==Rg.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Lg.NumericDecimal:return this.emitNumericEntity(0,2);case Lg.NumericHex:return this.emitNumericEntity(0,3);case Lg.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Lg.EntityStart:return 0}}};function Bg(e,t,n,r){let i=(t&Mg.BRANCH_LENGTH)>>7,a=t&Mg.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var K;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(K||={});var Vg;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(Vg||={});var Hg;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Hg||={});var q;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(q||={});var J;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(J||={});var Ug=new Map([[q.A,J.A],[q.ADDRESS,J.ADDRESS],[q.ANNOTATION_XML,J.ANNOTATION_XML],[q.APPLET,J.APPLET],[q.AREA,J.AREA],[q.ARTICLE,J.ARTICLE],[q.ASIDE,J.ASIDE],[q.B,J.B],[q.BASE,J.BASE],[q.BASEFONT,J.BASEFONT],[q.BGSOUND,J.BGSOUND],[q.BIG,J.BIG],[q.BLOCKQUOTE,J.BLOCKQUOTE],[q.BODY,J.BODY],[q.BR,J.BR],[q.BUTTON,J.BUTTON],[q.CAPTION,J.CAPTION],[q.CENTER,J.CENTER],[q.CODE,J.CODE],[q.COL,J.COL],[q.COLGROUP,J.COLGROUP],[q.DD,J.DD],[q.DESC,J.DESC],[q.DETAILS,J.DETAILS],[q.DIALOG,J.DIALOG],[q.DIR,J.DIR],[q.DIV,J.DIV],[q.DL,J.DL],[q.DT,J.DT],[q.EM,J.EM],[q.EMBED,J.EMBED],[q.FIELDSET,J.FIELDSET],[q.FIGCAPTION,J.FIGCAPTION],[q.FIGURE,J.FIGURE],[q.FONT,J.FONT],[q.FOOTER,J.FOOTER],[q.FOREIGN_OBJECT,J.FOREIGN_OBJECT],[q.FORM,J.FORM],[q.FRAME,J.FRAME],[q.FRAMESET,J.FRAMESET],[q.H1,J.H1],[q.H2,J.H2],[q.H3,J.H3],[q.H4,J.H4],[q.H5,J.H5],[q.H6,J.H6],[q.HEAD,J.HEAD],[q.HEADER,J.HEADER],[q.HGROUP,J.HGROUP],[q.HR,J.HR],[q.HTML,J.HTML],[q.I,J.I],[q.IMG,J.IMG],[q.IMAGE,J.IMAGE],[q.INPUT,J.INPUT],[q.IFRAME,J.IFRAME],[q.KEYGEN,J.KEYGEN],[q.LABEL,J.LABEL],[q.LI,J.LI],[q.LINK,J.LINK],[q.LISTING,J.LISTING],[q.MAIN,J.MAIN],[q.MALIGNMARK,J.MALIGNMARK],[q.MARQUEE,J.MARQUEE],[q.MATH,J.MATH],[q.MENU,J.MENU],[q.META,J.META],[q.MGLYPH,J.MGLYPH],[q.MI,J.MI],[q.MO,J.MO],[q.MN,J.MN],[q.MS,J.MS],[q.MTEXT,J.MTEXT],[q.NAV,J.NAV],[q.NOBR,J.NOBR],[q.NOFRAMES,J.NOFRAMES],[q.NOEMBED,J.NOEMBED],[q.NOSCRIPT,J.NOSCRIPT],[q.OBJECT,J.OBJECT],[q.OL,J.OL],[q.OPTGROUP,J.OPTGROUP],[q.OPTION,J.OPTION],[q.P,J.P],[q.PARAM,J.PARAM],[q.PLAINTEXT,J.PLAINTEXT],[q.PRE,J.PRE],[q.RB,J.RB],[q.RP,J.RP],[q.RT,J.RT],[q.RTC,J.RTC],[q.RUBY,J.RUBY],[q.S,J.S],[q.SCRIPT,J.SCRIPT],[q.SEARCH,J.SEARCH],[q.SECTION,J.SECTION],[q.SELECT,J.SELECT],[q.SOURCE,J.SOURCE],[q.SMALL,J.SMALL],[q.SPAN,J.SPAN],[q.STRIKE,J.STRIKE],[q.STRONG,J.STRONG],[q.STYLE,J.STYLE],[q.SUB,J.SUB],[q.SUMMARY,J.SUMMARY],[q.SUP,J.SUP],[q.TABLE,J.TABLE],[q.TBODY,J.TBODY],[q.TEMPLATE,J.TEMPLATE],[q.TEXTAREA,J.TEXTAREA],[q.TFOOT,J.TFOOT],[q.TD,J.TD],[q.TH,J.TH],[q.THEAD,J.THEAD],[q.TITLE,J.TITLE],[q.TR,J.TR],[q.TRACK,J.TRACK],[q.TT,J.TT],[q.U,J.U],[q.UL,J.UL],[q.SVG,J.SVG],[q.VAR,J.VAR],[q.WBR,J.WBR],[q.XMP,J.XMP]]);function Wg(e){return Ug.get(e)??J.UNKNOWN}var Y=J,Gg={[K.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[K.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[K.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Kg=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]);new Set([q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT]);var X;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(X||={});var qg={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function Jg(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function Yg(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Xg(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function Zg(e){return Xg(e)||Yg(e)}function Qg(e){return Zg(e)||Jg(e)}function $g(e){return e+32}function e_(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function t_(e){return e_(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function n_(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:vg(e)?G.surrogateCharacterReference:Sg(e)?G.noncharacterCharacterReference:xg(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var r_=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=X.DATA,this.returnState=X.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new wg(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new zg(Dg,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=n_(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Tg.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Tg.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Tg.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Tg.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Eg(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Wg(e.tagName),e.type===Tg.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(G.endTagWithAttributes),e.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Tg.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Tg.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Tg.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Tg.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=e_(e)?Tg.WHITESPACE_CHARACTER:e===W.NULL?Tg.NULL_CHARACTER:Tg.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Tg.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Rg.Attribute:Rg.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===X.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case X.DATA:this._stateData(e);break;case X.RCDATA:this._stateRcdata(e);break;case X.RAWTEXT:this._stateRawtext(e);break;case X.SCRIPT_DATA:this._stateScriptData(e);break;case X.PLAINTEXT:this._statePlaintext(e);break;case X.TAG_OPEN:this._stateTagOpen(e);break;case X.END_TAG_OPEN:this._stateEndTagOpen(e);break;case X.TAG_NAME:this._stateTagName(e);break;case X.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case X.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case X.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case X.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case X.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case X.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case X.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case X.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case X.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case X.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case X.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case X.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case X.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case X.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case X.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case X.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case X.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case X.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case X.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case X.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case X.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case X.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case X.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case X.BOGUS_COMMENT:this._stateBogusComment(e);break;case X.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case X.COMMENT_START:this._stateCommentStart(e);break;case X.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case X.COMMENT:this._stateComment(e);break;case X.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case X.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case X.COMMENT_END:this._stateCommentEnd(e);break;case X.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case X.DOCTYPE:this._stateDoctype(e);break;case X.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case X.DOCTYPE_NAME:this._stateDoctypeName(e);break;case X.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case X.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case X.CDATA_SECTION:this._stateCdataSection(e);break;case X.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case X.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case X.CHARACTER_REFERENCE:this._stateCharacterReference();break;case X.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.TAG_OPEN;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitCodePoint(e);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case W.AMPERSAND:this._startCharacterReference();break;case W.LESS_THAN_SIGN:this.state=X.RCDATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.RAWTEXT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Zg(e))this._createStartTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.EXCLAMATION_MARK:this.state=X.MARKUP_DECLARATION_OPEN;break;case W.SOLIDUS:this.state=X.END_TAG_OPEN;break;case W.QUESTION_MARK:this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e);break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=X.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Zg(e))this._createEndTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.GREATER_THAN_SIGN:this._err(G.missingEndTagName),this.state=X.DATA;break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.tagName+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Yg(e)?$g(e):e)}}_stateRcdataLessThanSign(e){e===W.SOLIDUS?this.state=X.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Zg(e)?(this.state=X.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=X.BEFORE_ATTRIBUTE_NAME,!1;case W.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=X.SELF_CLOSING_START_TAG,!1;case W.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=X.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===W.SOLIDUS?this.state=X.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Zg(e)?(this.state=X.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case W.SOLIDUS:this.state=X.SCRIPT_DATA_END_TAG_OPEN;break;case W.EXCLAMATION_MARK:this.state=X.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=X.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Zg(e)?(this.state=X.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===W.SOLIDUS?this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Zg(e)?(this._emitChars(`<`),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Zg(e)?(this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(_g.SCRIPT,!1)&&t_(this.preprocessor.peek(_g.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<_g.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===W.SOLIDUS?(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(_g.SCRIPT,!1)&&t_(this.preprocessor.peek(_g.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<_g.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=X.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this._leaveAttrName(),this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._leaveAttrName(),this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Yg(e)?$g(e):e)}}_stateAfterAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.EQUALS_SIGN:this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:this.state=X.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case W.APOSTROPHE:this.state=X.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingAttributeValue),this.state=X.DATA,this.emitCurrentTagToken();break;default:this.state=X.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case W.APOSTROPHE:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.AMPERSAND:this._startCharacterReference();break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:case W.EQUALS_SIGN:case W.GRAVE_ACCENT:this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this._leaveAttrValue(),this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.missingWhitespaceBetweenAttributes),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case W.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=X.DATA,this.emitCurrentTagToken();break}case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.unexpectedSolidusInTag),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(_g.DASH_DASH,!0)?(this._createCommentToken(_g.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(_g.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(_g.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(_g.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(_g.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=X.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_START_DASH;break;case W.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.GREATER_THAN_SIGN:this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END_DASH;break;case W.LESS_THAN_SIGN:t.data+=`<`,this.state=X.COMMENT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case W.EXCLAMATION_MARK:t.data+=`!`,this.state=X.COMMENT_LESS_THAN_SIGN_BANG;break;case W.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=X.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=X.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==W.GREATER_THAN_SIGN&&e!==W.EOF&&this._err(G.nestedComment),this.state=X.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EXCLAMATION_MARK:this.state=X.COMMENT_END_BANG;break;case W.HYPHEN_MINUS:t.data+=`-`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:t.data+=`--!`,this.state=X.COMMENT_END_DASH;break;case W.GREATER_THAN_SIGN:this._err(G.incorrectlyClosedComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=X.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Yg(e))this._createDoctypeToken(String.fromCharCode($g(e))),this.state=X.DOCTYPE_NAME;else switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.NULL:this._err(G.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=X.DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=X.DATA;break}case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=X.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.AFTER_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.NULL:this._err(G.unexpectedNullCharacter),t.name+=`�`;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Yg(e)?$g(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(_g.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(_g.SYSTEM,!1)?this.state=X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.NULL:this._err(G.unexpectedNullCharacter);break;case W.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case W.RIGHT_SQUARE_BRACKET:this.state=X.CDATA_SECTION_BRACKET;break;case W.EOF:this._err(G.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===W.RIGHT_SQUARE_BRACKET?this.state=X.CDATA_SECTION_END:(this._emitChars(`]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA;break;case W.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(W.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Qg(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Qg(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},i_=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),a_=new Set([...i_,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),o_=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),s_=new Set([...o_,J.OL,J.UL]),c_=new Set([...o_,J.BUTTON]),l_=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),u_=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),d_=new Set([J.TR,J.TEMPLATE,J.HTML]),f_=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),p_=new Set([J.TABLE,J.TEMPLATE,J.HTML]),m_=new Set([J.TD,J.TH]),h_=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=J.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===J.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==K.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Kg,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(m_,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(p_,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(f_,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(d_,K.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===J.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===J.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case K.SVG:if(u_.has(r))return!1;break;case K.MATHML:if(l_.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,o_)}hasInListItemScope(e){return this.hasInDynamicScope(e,s_)}hasInButtonScope(e){return this.hasInDynamicScope(e,c_)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case K.HTML:if(Kg.has(t))return!0;if(o_.has(t))return!1;break;case K.SVG:if(u_.has(t))return!1;break;case K.MATHML:if(l_.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===K.HTML)switch(this.tagIDs[e]){case J.TBODY:case J.THEAD:case J.TFOOT:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.OPTION:case J.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&i_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&a_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&a_.has(this.currentTagId);)this.pop()}},g_=3,__;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(__||={});var v_={type:__.Marker},y_=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===__.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<g_)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<g_)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=g_&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(v_)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:__.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:__.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(v_);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===__.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===__.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===__.Element&&t.element===e)}},b_={createDocument(){return{nodeName:`#document`,mode:Hg.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};b_.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(b_.isTextNode(n)){n.value+=t;return}}b_.appendChild(e,b_.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&b_.isTextNode(r)?r.value+=t:b_.insertBefore(e,b_.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},x_=`html`,S_=`about:legacy-compat`,C_=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,w_=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),T_=[...w_,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],E_=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),D_=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],O_=[...D_,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function k_(e,t){return t.some(t=>e.startsWith(t))}function A_(e){return e.name===x_&&e.publicId===null&&(e.systemId===null||e.systemId===S_)}function j_(e){if(e.name!==x_)return Hg.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===C_)return Hg.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),E_.has(n))return Hg.QUIRKS;let e=t===null?T_:w_;if(k_(n,e))return Hg.QUIRKS;if(e=t===null?D_:O_,k_(n,e))return Hg.LIMITED_QUIRKS}return Hg.NO_QUIRKS}var M_={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},N_=`definitionurl`,P_=`definitionURL`,F_=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),I_=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:K.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:K.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:K.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:K.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:K.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:K.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:K.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:K.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:K.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:K.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:K.XMLNS}]]),L_=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),R_=new Set([J.B,J.BIG,J.BLOCKQUOTE,J.BODY,J.BR,J.CENTER,J.CODE,J.DD,J.DIV,J.DL,J.DT,J.EM,J.EMBED,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HR,J.I,J.IMG,J.LI,J.LISTING,J.MENU,J.META,J.NOBR,J.OL,J.P,J.PRE,J.RUBY,J.S,J.SMALL,J.SPAN,J.STRONG,J.STRIKE,J.SUB,J.SUP,J.TABLE,J.TT,J.U,J.UL,J.VAR]);function z_(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===Vg.COLOR||e===Vg.SIZE||e===Vg.FACE)||R_.has(t)}function B_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===N_){e.attrs[t].name=P_;break}}function V_(e){for(let t=0;t<e.attrs.length;t++){let n=F_.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function H_(e){for(let t=0;t<e.attrs.length;t++){let n=I_.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function U_(e){let t=L_.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Wg(e.tagName))}function W_(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function G_(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Vg.ENCODING){let t=n[e].value.toLowerCase();return t===M_.TEXT_HTML||t===M_.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function K_(e,t,n,r){return(!r||r===K.HTML)&&G_(e,t,n)||(!r||r===K.MATHML)&&W_(e,t)}var q_=`hidden`,J_=8,Y_=3,Z;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Z||={});var X_={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Z_=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),Q_={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:b_,onParseError:null},$_=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Q_,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new r_(this.options,this),this.activeFormattingElements=new y_(this.treeAdapter),this.fragmentContextID=n?Wg(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new h_(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Q_,...t};e??=n.treeAdapter.createElement(q.TEMPLATE,K.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,K.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===J.TEMPLATE&&i.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??X_,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,K.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=qg.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==K.HTML))switch(this.fragmentContextID){case J.TITLE:case J.TEXTAREA:this.tokenizer.state=qg.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=qg.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=qg.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=qg.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,K.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(q.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,J.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===Tg.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===J.SVG&&this.treeAdapter.getTagName(t)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===K.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===J.MGLYPH||e.tagID===J.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,K.HTML)}_processToken(e){switch(e.type){case Tg.CHARACTER:this.onCharacter(e);break;case Tg.NULL_CHARACTER:this.onNullCharacter(e);break;case Tg.COMMENT:this.onComment(e);break;case Tg.DOCTYPE:this.onDoctype(e);break;case Tg.START_TAG:this._processStartTag(e);break;case Tg.END_TAG:this.onEndTag(e);break;case Tg.EOF:this.onEof(e);break;case Tg.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return K_(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===__.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(J.P),this.openElements.popUntilTagNamePopped(J.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case J.TR:this.insertionMode=Z.IN_ROW;return;case J.TBODY:case J.THEAD:case J.TFOOT:this.insertionMode=Z.IN_TABLE_BODY;return;case J.CAPTION:this.insertionMode=Z.IN_CAPTION;return;case J.COLGROUP:this.insertionMode=Z.IN_COLUMN_GROUP;return;case J.TABLE:this.insertionMode=Z.IN_TABLE;return;case J.BODY:this.insertionMode=Z.IN_BODY;return;case J.FRAMESET:this.insertionMode=Z.IN_FRAMESET;return;case J.SELECT:this._resetInsertionModeForSelect(e);return;case J.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case J.HTML:this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return;case J.TD:case J.TH:if(e>0){this.insertionMode=Z.IN_CELL;return}break;case J.HEAD:if(e>0){this.insertionMode=Z.IN_HEAD;return}break}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===J.TEMPLATE)break;if(e===J.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(e){return Z_.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case J.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case J.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Gg[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_b(this,e);return}switch(this.insertionMode){case Z.INITIAL:fv(this,e);break;case Z.BEFORE_HTML:hv(this,e);break;case Z.BEFORE_HEAD:vv(this,e);break;case Z.IN_HEAD:Sv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tv(this,e);break;case Z.AFTER_HEAD:Ov(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:jv(this,e);break;case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ey(this,e);break;case Z.IN_TABLE_TEXT:zy(this,e);break;case Z.IN_COLUMN_GROUP:Ky(this,e);break;case Z.AFTER_BODY:cb(this,e);break;case Z.AFTER_AFTER_BODY:mb(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gb(this,e);return}switch(this.insertionMode){case Z.INITIAL:fv(this,e);break;case Z.BEFORE_HTML:hv(this,e);break;case Z.BEFORE_HEAD:vv(this,e);break;case Z.IN_HEAD:Sv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tv(this,e);break;case Z.AFTER_HEAD:Ov(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ey(this,e);break;case Z.IN_COLUMN_GROUP:Ky(this,e);break;case Z.AFTER_BODY:cb(this,e);break;case Z.AFTER_AFTER_BODY:mb(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){sv(this,e);return}switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:sv(this,e);break;case Z.IN_TABLE_TEXT:By(this,e);break;case Z.AFTER_BODY:cv(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:lv(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:dv(this,e);break;case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:this._err(e,G.misplacedDoctype);break;case Z.IN_TABLE_TEXT:By(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?yb(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:fv(this,e);break;case Z.BEFORE_HTML:pv(this,e);break;case Z.BEFORE_HEAD:gv(this,e);break;case Z.IN_HEAD:yv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Cv(this,e);break;case Z.AFTER_HEAD:Ev(this,e);break;case Z.IN_BODY:uy(this,e);break;case Z.IN_TABLE:Fy(this,e);break;case Z.IN_TABLE_TEXT:By(this,e);break;case Z.IN_CAPTION:Hy(this,e);break;case Z.IN_COLUMN_GROUP:Wy(this,e);break;case Z.IN_TABLE_BODY:qy(this,e);break;case Z.IN_ROW:Yy(this,e);break;case Z.IN_CELL:Zy(this,e);break;case Z.IN_SELECT:$y(this,e);break;case Z.IN_SELECT_IN_TABLE:tb(this,e);break;case Z.IN_TEMPLATE:rb(this,e);break;case Z.AFTER_BODY:ob(this,e);break;case Z.IN_FRAMESET:lb(this,e);break;case Z.AFTER_FRAMESET:db(this,e);break;case Z.AFTER_AFTER_BODY:pb(this,e);break;case Z.AFTER_AFTER_FRAMESET:hb(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?bb(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:fv(this,e);break;case Z.BEFORE_HTML:mv(this,e);break;case Z.BEFORE_HEAD:_v(this,e);break;case Z.IN_HEAD:bv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:wv(this,e);break;case Z.AFTER_HEAD:Dv(this,e);break;case Z.IN_BODY:Sy(this,e);break;case Z.TEXT:wy(this,e);break;case Z.IN_TABLE:Iy(this,e);break;case Z.IN_TABLE_TEXT:By(this,e);break;case Z.IN_CAPTION:Uy(this,e);break;case Z.IN_COLUMN_GROUP:Gy(this,e);break;case Z.IN_TABLE_BODY:Jy(this,e);break;case Z.IN_ROW:Xy(this,e);break;case Z.IN_CELL:Qy(this,e);break;case Z.IN_SELECT:eb(this,e);break;case Z.IN_SELECT_IN_TABLE:nb(this,e);break;case Z.IN_TEMPLATE:ib(this,e);break;case Z.AFTER_BODY:sb(this,e);break;case Z.IN_FRAMESET:ub(this,e);break;case Z.AFTER_FRAMESET:fb(this,e);break;case Z.AFTER_AFTER_BODY:mb(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Z.INITIAL:fv(this,e);break;case Z.BEFORE_HTML:hv(this,e);break;case Z.BEFORE_HEAD:vv(this,e);break;case Z.IN_HEAD:Sv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tv(this,e);break;case Z.AFTER_HEAD:Ov(this,e);break;case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:Cy(this,e);break;case Z.TEXT:Ty(this,e);break;case Z.IN_TABLE_TEXT:By(this,e);break;case Z.IN_TEMPLATE:ab(this,e);break;case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:uv(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===W.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:this._insertCharacters(e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:Av(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ey(this,e);break;case Z.IN_TABLE_TEXT:Ry(this,e);break;default:}}};function ev(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):xy(e,t),n}function tv(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function nv(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Y_;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=rv(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function rv(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function iv(e,t,n){let r=Wg(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===J.TEMPLATE&&i===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function av(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function ov(e,t){for(let n=0;n<J_;n++){let n=ev(e,t);if(!n)break;let r=tv(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=nv(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&iv(e,a,i),av(e,r,n)}}function sv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cv(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lv(e,t){e._appendCommentNode(t,e.document)}function uv(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function dv(e,t){e._setDocumentType(t);let n=t.forceQuirks?Hg.QUIRKS:j_(t);A_(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function fv(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Hg.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function pv(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):hv(e,t)}function mv(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&hv(e,t)}function hv(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function gv(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:vv(e,t)}}function _v(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?vv(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function vv(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function yv(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TITLE:e._switchToTextParsing(t,qg.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,qg.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,qg.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,qg.SCRIPT_DATA);break;case J.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Sv(e,t)}}function bv(e,t){switch(t.tagID){case J.HEAD:e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break;case J.BODY:case J.BR:case J.HTML:Sv(e,t);break;case J.TEMPLATE:xv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function xv(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==J.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function Sv(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function Cv(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:yv(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:Tv(e,t)}}function wv(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:Tv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Tv(e,t){let n=t.type===Tg.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function Ev(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.BODY:e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break;case J.FRAMESET:e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET;break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,J.HEAD),yv(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Ov(e,t)}}function Dv(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:Ov(e,t);break;case J.TEMPLATE:xv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Ov(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,kv(e,t)}function kv(e,t){switch(t.type){case Tg.CHARACTER:jv(e,t);break;case Tg.WHITESPACE_CHARACTER:Av(e,t);break;case Tg.COMMENT:sv(e,t);break;case Tg.START_TAG:uy(e,t);break;case Tg.END_TAG:Sy(e,t);break;case Tg.EOF:Cy(e,t);break;default:}}function Av(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function jv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Mv(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nv(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Pv(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET)}function Fv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Iv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Kg.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function Lv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Rv(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function zv(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===J.LI&&r===J.LI||(n===J.DD||n===J.DT)&&(r===J.DD||r===J.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==J.ADDRESS&&r!==J.DIV&&r!==J.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Bv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=qg.PLAINTEXT}function Vv(e,t){e.openElements.hasInScope(J.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function Hv(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(ov(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Uv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wv(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(ov(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Kv(e,t){e.treeAdapter.getDocumentMode(e.document)!==Hg.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function qv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jv(e){let t=Eg(e,Vg.TYPE);return t!=null&&t.toLowerCase()===q_}function Yv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Jv(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Xv(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function Zv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qv(e,t){t.tagName=q.IMG,t.tagID=J.IMG,qv(e,t)}function $v(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=qg.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function ey(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,qg.RAWTEXT)}function ty(e,t){e.framesetOk=!1,e._switchToTextParsing(t,qg.RAWTEXT)}function ny(e,t){e._switchToTextParsing(t,qg.RAWTEXT)}function ry(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function iy(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function ay(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function oy(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function sy(e,t){e._reconstructActiveFormattingElements(),B_(t),H_(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function cy(e,t){e._reconstructActiveFormattingElements(),V_(t),H_(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function ly(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function uy(e,t){switch(t.tagID){case J.I:case J.S:case J.B:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.SMALL:case J.STRIKE:case J.STRONG:Uv(e,t);break;case J.A:Hv(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:Iv(e,t);break;case J.P:case J.DL:case J.OL:case J.UL:case J.DIV:case J.DIR:case J.NAV:case J.MAIN:case J.MENU:case J.ASIDE:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.DETAILS:case J.ADDRESS:case J.ARTICLE:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:Fv(e,t);break;case J.LI:case J.DD:case J.DT:zv(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:qv(e,t);break;case J.HR:Zv(e,t);break;case J.RB:case J.RTC:ay(e,t);break;case J.RT:case J.RP:oy(e,t);break;case J.PRE:case J.LISTING:Lv(e,t);break;case J.XMP:ey(e,t);break;case J.SVG:cy(e,t);break;case J.HTML:Mv(e,t);break;case J.BASE:case J.LINK:case J.META:case J.STYLE:case J.TITLE:case J.SCRIPT:case J.BGSOUND:case J.BASEFONT:case J.TEMPLATE:yv(e,t);break;case J.BODY:Nv(e,t);break;case J.FORM:Rv(e,t);break;case J.NOBR:Wv(e,t);break;case J.MATH:sy(e,t);break;case J.TABLE:Kv(e,t);break;case J.INPUT:Yv(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:Xv(e,t);break;case J.IMAGE:Qv(e,t);break;case J.BUTTON:Vv(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:Gv(e,t);break;case J.IFRAME:ty(e,t);break;case J.SELECT:ry(e,t);break;case J.OPTION:case J.OPTGROUP:iy(e,t);break;case J.NOEMBED:case J.NOFRAMES:ny(e,t);break;case J.FRAMESET:Pv(e,t);break;case J.TEXTAREA:$v(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?ny(e,t):ly(e,t);break;case J.PLAINTEXT:Bv(e,t);break;case J.COL:case J.TH:case J.TD:case J.TR:case J.HEAD:case J.FRAME:case J.TBODY:case J.TFOOT:case J.THEAD:case J.CAPTION:case J.COLGROUP:break;default:ly(e,t)}}function dy(e,t){if(e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function fy(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,sb(e,t))}function py(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function my(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(J.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(J.FORM):n&&e.openElements.remove(n))}function hy(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function gy(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function _y(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vy(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yy(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function by(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function xy(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==J.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Sy(e,t){switch(t.tagID){case J.A:case J.B:case J.I:case J.S:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.NOBR:case J.SMALL:case J.STRIKE:case J.STRONG:ov(e,t);break;case J.P:hy(e);break;case J.DL:case J.UL:case J.OL:case J.DIR:case J.DIV:case J.NAV:case J.PRE:case J.MAIN:case J.MENU:case J.ASIDE:case J.BUTTON:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.ADDRESS:case J.ARTICLE:case J.DETAILS:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.LISTING:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:py(e,t);break;case J.LI:gy(e);break;case J.DD:case J.DT:_y(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:vy(e);break;case J.BR:by(e);break;case J.BODY:dy(e,t);break;case J.HTML:fy(e,t);break;case J.FORM:my(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:yy(e,t);break;case J.TEMPLATE:xv(e,t);break;default:xy(e,t)}}function Cy(e,t){e.tmplInsertionModeStack.length>0?ab(e,t):uv(e,t)}function wy(e,t){var n;t.tagID===J.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ty(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ey(e,t){if(e.openElements.currentTagId!==void 0&&Z_.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case Tg.CHARACTER:zy(e,t);break;case Tg.WHITESPACE_CHARACTER:Ry(e,t);break}else Ly(e,t)}function Dy(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function Oy(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function ky(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,Wy(e,t)}function Ay(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function jy(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,qy(e,t)}function My(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Ny(e,t){Jv(t)?e._appendElement(t,K.HTML):Ly(e,t),t.ackSelfClosing=!0}function Py(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fy(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:jy(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:yv(e,t);break;case J.COL:ky(e,t);break;case J.FORM:Py(e,t);break;case J.TABLE:My(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:Ay(e,t);break;case J.INPUT:Ny(e,t);break;case J.CAPTION:Dy(e,t);break;case J.COLGROUP:Oy(e,t);break;default:Ly(e,t)}}function Iy(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:xv(e,t);break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Ly(e,t)}}function Ly(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kv(e,t),e.fosterParentingEnabled=n}function Ry(e,t){e.pendingCharacterTokens.push(t)}function zy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function By(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ly(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Vy=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function Hy(e,t){let n=t.tagID;Vy.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,Fy(e,t)):uy(e,t)}function Uy(e,t){let n=t.tagID;switch(n){case J.CAPTION:case J.TABLE:e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,n===J.TABLE&&Iy(e,t));break;case J.BODY:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Sy(e,t)}}function Wy(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:yv(e,t);break;default:Ky(e,t)}}function Gy(e,t){switch(t.tagID){case J.COLGROUP:e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TEMPLATE:xv(e,t);break;case J.COL:break;default:Ky(e,t)}}function Ky(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function qy(e,t){switch(t.tagID){case J.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_ROW;break;case J.TH:case J.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,J.TR),e.insertionMode=Z.IN_ROW,Yy(e,t);break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Fy(e,t));break;default:Fy(e,t)}}function Jy(e,t){let n=t.tagID;switch(t.tagID){case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Iy(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:case J.TR:break;default:Iy(e,t)}}function Yy(e,t){switch(t.tagID){case J.TH:case J.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,qy(e,t));break;default:Fy(e,t)}}function Xy(e,t){switch(t.tagID){case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break;case J.TABLE:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jy(e,t));break;case J.TBODY:case J.TFOOT:case J.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(J.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jy(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:break;default:Iy(e,t)}}function Zy(e,t){let n=t.tagID;Vy.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),Yy(e,t)):uy(e,t)}function Qy(e,t){let n=t.tagID;switch(n){case J.TD:case J.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break;case J.TABLE:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xy(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:Sy(e,t)}}function $y(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.OPTGROUP:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.HR:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.INPUT:case J.KEYGEN:case J.TEXTAREA:case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),t.tagID!==J.SELECT&&e._processStartTag(t));break;case J.SCRIPT:case J.TEMPLATE:yv(e,t);break;default:}}function eb(e,t){switch(t.tagID){case J.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===J.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===J.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop();break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop();break;case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode());break;case J.TEMPLATE:xv(e,t);break;default:}}function tb(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$y(e,t)}function nb(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e.onEndTag(t)):eb(e,t)}function rb(e,t){switch(t.tagID){case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:yv(e,t);break;case J.CAPTION:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,Fy(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,Wy(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,qy(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Yy(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,uy(e,t)}}function ib(e,t){t.tagID===J.TEMPLATE&&xv(e,t)}function ab(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):uv(e,t)}function ob(e,t){t.tagID===J.HTML?uy(e,t):cb(e,t)}function sb(e,t){if(t.tagID===J.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===J.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else cb(e,t)}function cb(e,t){e.insertionMode=Z.IN_BODY,kv(e,t)}function lb(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.FRAMESET:e._insertElement(t,K.HTML);break;case J.FRAME:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.NOFRAMES:yv(e,t);break;default:}}function ub(e,t){t.tagID===J.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==J.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function db(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.NOFRAMES:yv(e,t);break;default:}}function fb(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function pb(e,t){t.tagID===J.HTML?uy(e,t):mb(e,t)}function mb(e,t){e.insertionMode=Z.IN_BODY,kv(e,t)}function hb(e,t){switch(t.tagID){case J.HTML:uy(e,t);break;case J.NOFRAMES:yv(e,t);break;default:}}function gb(e,t){t.chars=`�`,e._insertCharacters(t)}function _b(e,t){e._insertCharacters(t),e.framesetOk=!1}function vb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function yb(e,t){if(z_(t))vb(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?B_(t):r===K.SVG&&(U_(t),V_(t)),H_(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bb(e,t){if(t.tagID===J.P||t.tagID===J.BR){vb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===K.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR]);var xb=Cb(`end`),Sb=Cb(`start`);function Cb(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function wb(e){let t=Sb(e),n=xb(e);if(t&&n)return{start:t,end:n}}var Tb=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Eb=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),Db={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ob(e,t){let n=Hb(e),r=tg(`type`,{handlers:{root:Ab,element:jb,text:Mb,comment:Fb,doctype:Nb,raw:Ib},unknown:Lb}),i={parser:n?new $_(Db):$_.getFragmentParser(void 0,Db),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Rb(i,Sb());let a=Kh(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&xm(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function kb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Ab(e,t){kb(e.children,t)}function jb(e,t){Bb(e,t),kb(e.children,t),Vb(e,t)}function Mb(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:Tg.CHARACTER,chars:e.value,location:Ub(e)};Rb(t,Sb(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Nb(e,t){let n={type:Tg.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Ub(e)};Rb(t,Sb(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Pb(e,t){t.stitches=!0;let n=Wb(e);`children`in e&&`children`in n&&(n.children=Ob({type:`root`,children:e.children},t.options).children),Fb({type:`comment`,value:{stitch:n}},t)}function Fb(e,t){let n=e.value,r={type:Tg.COMMENT,data:n,location:Ub(e)};Rb(t,Sb(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ib(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,zb(t,Sb(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Tb,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Lb(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Pb(n,t);else{let e=``;throw Eb.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function Rb(e,t){zb(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=qg.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function zb(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Bb(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===qg.PLAINTEXT)return;Rb(t,Sb(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Uh.html;i===Uh.html&&n===`svg`&&(i=Uh.svg);let a=ag({...e,children:[]},{space:i===Uh.svg?`svg`:`html`}),o={type:Tg.START_TAG,tagName:n,tagID:Wg(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Ub(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Vb(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hg.includes(n)||t.parser.tokenizer.state===qg.PLAINTEXT)return;Rb(t,xb(e));let r={type:Tg.END_TAG,tagName:n,tagID:Wg(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ub(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===qg.RCDATA||t.parser.tokenizer.state===qg.RAWTEXT||t.parser.tokenizer.state===qg.SCRIPT_DATA)&&(t.parser.tokenizer.state=qg.DATA)}function Hb(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Ub(e){let t=Sb(e)||{line:void 0,column:void 0,offset:void 0},n=xb(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Wb(e){return`children`in e?Wm({...e,children:[]}):Wm(e)}function Gb(e){return function(t,n){return Ob(t,{...e,file:n})}}var Kb=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],qb={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Kb,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Kb],h2:[[`className`,`sr-only`]],img:[...Kb,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Kb,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Kb],table:[...Kb],ul:[...Kb,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Jb={}.hasOwnProperty;function Yb(e,t){let n={type:`root`,children:[]},r=Xb({schema:t?{...qb,...t}:qb,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Xb(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Zb(e,n);case`doctype`:return Qb(e,n);case`element`:return $b(e,n);case`root`:return ex(e,n);case`text`:return tx(e,n);default:}}}function Zb(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return cx(r,t),r}}function Qb(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return cx(e,t),e}}function $b(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=nx(e,t.children),i=rx(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Jb.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return cx(o,t),o}function ex(e,t){let n={type:`root`,children:nx(e,t.children)};return cx(n,t),n}function tx(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return cx(n,t),n}function nx(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Xb(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function rx(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Jb.call(r,n)?r[n]:void 0,o=r&&Jb.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(Jb.call(s,l)){let t=s[l],n=ix(e,lx(a,l),l,t);n??=ix(e,lx(o,l),l,t),n!=null&&(c[l]=n)}if(i&&Jb.call(i,n)){let e=i[n];for(l in e)Jb.call(e,l)&&!Jb.call(c,l)&&(c[l]=e[l])}return c}function ix(e,t,n,r){return t?Array.isArray(r)?ax(e,t,n,r):ox(e,t,n,r):void 0}function ax(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=ox(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function ox(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&sx(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function sx(e,t,n){let r=e.schema.protocols&&Jb.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function cx(e,t){let n=wb(t);t.data&&(e.data=Wm(t.data)),n&&(e.position=n)}function lx(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function ux(e){return function(t){return Yb(t,e)}}function dx(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var fx=Cx(/[A-Za-z]/),px=Cx(/[\dA-Za-z]/),mx=Cx(/[#-'*+\--9=?A-Z^-~]/);function hx(e){return e!==null&&(e<32||e===127)}var gx=Cx(/\d/),_x=Cx(/[\dA-Fa-f]/),vx=Cx(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function yx(e){return e!==null&&(e<0||e===32)}function bx(e){return e===-2||e===-1||e===32}var xx=Cx(/\p{P}|\p{S}/u),Sx=Cx(/\s/);function Cx(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wx(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Tx(e,t,n){let r=lm((n||{}).ignore||[]),i=Ex(t),a=-1;for(;++a<i.length;)ym(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Ex(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Dx(e[0]),Ox(e[1])])}return t}function Dx(e){return typeof e==`string`?new RegExp(wx(e),`g`):e}function Ox(e){return typeof e==`function`?e:function(){return e}}var kx=`phrasing`,Ax=[`autolink`,`link`,`image`,`label`];function jx(){return{transforms:[zx],enter:{literalAutolink:Nx,literalAutolinkEmail:Px,literalAutolinkHttp:Px,literalAutolinkWww:Px},exit:{literalAutolink:Rx,literalAutolinkEmail:Lx,literalAutolinkHttp:Fx,literalAutolinkWww:Ix}}}function Mx(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:kx,notInConstruct:Ax},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:kx,notInConstruct:Ax},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:kx,notInConstruct:Ax}]}}function Nx(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Px(e){this.config.enter.autolinkProtocol.call(this,e)}function Fx(e){this.config.exit.autolinkProtocol.call(this,e)}function Ix(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Lx(e){this.config.exit.autolinkEmail.call(this,e)}function Rx(e){this.exit(e)}function zx(e){Tx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Bx],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Vx]],{ignore:[`link`,`linkReference`]})}function Bx(e,t,n,r,i){let a=``;if(!Wx(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Hx(n)))return!1;let o=Ux(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Vx(e,t,n,r){return!Wx(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Hx(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ux(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=dx(e,`(`),a=dx(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Wx(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Sx(n)||xx(n))&&(!t||n!==47)}function Gx(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}tS.peek=eS;function Kx(){this.buffer()}function qx(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Jx(){this.buffer()}function Yx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Xx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gx(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zx(e){this.exit(e)}function Qx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gx(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $x(e){this.exit(e)}function eS(){return`[`}function tS(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function nS(){return{enter:{gfmFootnoteCallString:Kx,gfmFootnoteCall:qx,gfmFootnoteDefinitionLabelString:Jx,gfmFootnoteDefinition:Yx},exit:{gfmFootnoteCallString:Xx,gfmFootnoteCall:Zx,gfmFootnoteDefinitionLabelString:Qx,gfmFootnoteDefinition:$x}}}function rS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tS},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
63
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?aS:iS))),s(),o}}function iS(e,t,n){return t===0?e:aS(e,t,n)}function aS(e,t,n){return(n?``:` `)+e}var oS=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];dS.peek=fS;function sS(){return{canContainEols:[`delete`],enter:{strikethrough:lS},exit:{strikethrough:uS}}}function cS(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:oS}],handlers:{delete:dS}}}function lS(e){this.enter({type:`delete`,children:[]},e)}function uS(e){this.exit(e)}function dS(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function fS(){return`~`}function pS(e){return e.length}function mS(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||pS,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=hS(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=gS(r[d]);else{let e=gS(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
64
|
+
`)}function hS(e){return e==null?``:String(e)}function gS(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function _S(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),vS);return i(),o}function vS(e,t,n){return`>`+(n?``:` `)+e}function yS(e,t){return bS(e,t.inConstruct,!0)&&!bS(e,t.notInConstruct,!1)}function bS(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function xS(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
65
|
+
`&&yS(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
66
|
+
`}function SS(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function CS(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function wS(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function TS(e,t,n,r){let i=wS(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(CS(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,ES);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(SS(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
67
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
68
|
+
`),a&&(u+=s.move(a+`
|
|
69
|
+
`)),u+=s.move(c),l(),u}function ES(e,t,n){return(n?``:` `)+e}function DS(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function OS(e,t,n,r){let i=DS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
70
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function kS(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function AS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function jS(e){if(e===null||yx(e)||Sx(e))return 1;if(xx(e))return 2}function MS(e,t,n){let r=jS(e),i=jS(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}NS.peek=PS;function NS(e,t,n,r){let i=kS(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=MS(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=AS(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=MS(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+AS(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function PS(e,t,n){return n.options.emphasis||`*`}var FS={};function IS(e,t){let n=t||FS;return LS(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function LS(e,t,n){if(zS(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return RS(e.children,t,n)}return Array.isArray(e)?RS(e,t,n):``}function RS(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=LS(e[i],t,n);return r.join(``)}function zS(e){return!!(e&&typeof e==`object`)}function BS(e,t){let n=!1;return xm(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&IS(e)&&(t.options.setext||n))}function VS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(BS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
71
|
+
`,after:`
|
|
72
|
+
`});return r(),t(),o+`
|
|
73
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
74
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
75
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=AS(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}HS.peek=US;function HS(e){return e.value||``}function US(){return`<`}WS.peek=GS;function WS(e,t,n,r){let i=DS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function GS(){return`!`}KS.peek=qS;function KS(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function qS(){return`!`}JS.peek=YS;function JS(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function YS(){return"`"}function XS(e,t){let n=IS(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ZS.peek=QS;function ZS(e,t,n,r){let i=DS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(XS(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function QS(e,t,n){return XS(e,n)?`<`:`[`}$S.peek=eC;function $S(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function eC(){return`[`}function tC(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nC(e){let t=tC(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function rC(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function iC(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function aC(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?rC(n):tC(n),s=e.ordered?o===`.`?`)`:`.`:nC(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),iC(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function oC(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sC(e,t,n,r){let i=oC(n),a=n.bulletCurrent||tC(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function cC(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var lC=lm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function uC(e,t,n,r){return(e.children.some(function(e){return lC(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function dC(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}fC.peek=pC;function fC(e,t,n,r){let i=dC(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=MS(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=AS(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=MS(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+AS(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function pC(e,t,n){return n.options.strong||`*`}function mC(e,t,n,r){return n.safe(e.value,r)}function hC(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function gC(e,t,n){let r=(iC(n)+(n.options.ruleSpaces?` `:``)).repeat(hC(n));return n.options.ruleSpaces?r.slice(0,-1):r}var _C={blockquote:_S,break:xS,code:TS,definition:OS,emphasis:NS,hardBreak:xS,heading:VS,html:HS,image:WS,imageReference:KS,inlineCode:JS,link:ZS,linkReference:$S,list:aC,listItem:sC,paragraph:cC,root:uC,strong:fC,text:mC,thematicBreak:gC},vC=document.createElement(`i`);function yC(e){let t=`&`+e+`;`;vC.innerHTML=t;let n=vC.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function bC(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var xC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function SC(e){return e.replace(xC,CC)}function CC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return bC(n.slice(t?2:1),t?16:10)}return yC(n)||e}function wC(){return{enter:{table:TC,tableData:kC,tableHeader:kC,tableRow:DC},exit:{codeText:AC,table:EC,tableData:OC,tableHeader:OC,tableRow:OC}}}function TC(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function EC(e){this.exit(e),this.data.inTable=void 0}function DC(e){this.enter({type:`tableRow`,children:[]},e)}function OC(e){this.exit(e)}function kC(e){this.enter({type:`tableCell`,children:[]},e)}function AC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jC(e,t){return t===`|`?t:e}function MC(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
76
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
77
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return mS(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=_C.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function NC(){return{exit:{taskListCheckValueChecked:FC,taskListCheckValueUnchecked:FC,paragraph:IC}}}function PC(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:LC}}}function FC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function IC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function LC(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=_C.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function RC(){return[jx(),nS(),sS(),wC(),NC()]}function zC(e){return{extensions:[Mx(),rS(e),cS(),MC(e),PC()]}}function BC(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function VC(e,t){return e.length>0?(BC(e,e.length,0,t),e):t}var HC={}.hasOwnProperty;function UC(e){let t={},n=-1;for(;++n<e.length;)WC(t,e[n]);return t}function WC(e,t){let n;for(n in t){let r=(HC.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){HC.call(r,a)||(r[a]=[]);let e=i[a];GC(r[a],Array.isArray(e)?e:e?[e]:[])}}}function GC(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);BC(e,0,0,r)}var KC={tokenize:ow,partial:!0},qC={tokenize:sw,partial:!0},JC={tokenize:cw,partial:!0},YC={tokenize:lw,partial:!0},XC={tokenize:uw,partial:!0},ZC={name:`wwwAutolink`,tokenize:iw,previous:dw},QC={name:`protocolAutolink`,tokenize:aw,previous:fw},$C={name:`emailAutolink`,tokenize:rw,previous:pw},ew={};function tw(){return{text:ew}}for(var nw=48;nw<123;)ew[nw]=$C,nw++,nw===58?nw=65:nw===91&&(nw=97);ew[43]=$C,ew[45]=$C,ew[46]=$C,ew[95]=$C,ew[72]=[$C,QC],ew[104]=[$C,QC],ew[87]=[$C,ZC],ew[119]=[$C,ZC];function rw(e,t,n){let r=this,i,a;return o;function o(t){return!mw(t)||!pw.call(r,r.previous)||hw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return mw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(XC,u,l)(t):t===45||t===95||px(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&fx(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function iw(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!dw.call(r,r.previous)||hw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(KC,e.attempt(qC,e.attempt(JC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function aw(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&fw.call(r,r.previous)&&!hw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(fx(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||hx(t)||yx(t)||Sx(t)||xx(t)?n(t):e.attempt(qC,e.attempt(JC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ow(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function sw(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(YC,c,s)(t):t===null||yx(t)||Sx(t)||t!==45&&xx(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function cw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(YC,t,a)(o):o===null||yx(o)||Sx(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function lw(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||yx(o)||Sx(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||yx(e)||Sx(e)?t(e):r(e)}function a(e){return fx(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):fx(t)?(e.consume(t),o):n(t)}}function uw(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return px(e)?n(e):t(e)}}function dw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yx(e)}function fw(e){return!fx(e)}function pw(e){return!(e===47||mw(e))}function mw(e){return e===43||e===45||e===46||e===95||px(e)}function hw(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function gw(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&px(e.charCodeAt(n+1))&&px(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function _w(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var vw={name:`attention`,resolveAll:yw,tokenize:bw};function yw(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};xw(d,-c),xw(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=VC(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=VC(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=VC(l,_w(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=VC(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=VC(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,BC(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function bw(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=jS(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=jS(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function xw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Sw={name:`autolink`,tokenize:Cw};function Cw(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return fx(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||px(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||px(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||hx(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):mx(t)?(e.consume(t),l):n(t)}function u(e){return px(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||px(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function ww(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return bx(r)?(e.enter(n),s(r)):t(r)}function s(r){return bx(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Tw={partial:!0,tokenize:Ew};function Ew(e,t,n){return r;function r(t){return bx(t)?ww(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var Dw={continuation:{tokenize:kw},exit:Aw,name:`blockQuote`,tokenize:Ow};function Ow(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return bx(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function kw(e,t,n){let r=this;return i;function i(t){return bx(t)?ww(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Dw,t,n)(r)}}function Aw(e){e.exit(`blockQuote`)}var jw={name:`characterEscape`,tokenize:Mw};function Mw(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return vx(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Nw={name:`characterReference`,tokenize:Pw};function Pw(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=px,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=_x,u):(e.enter(`characterReferenceValue`),a=7,o=gx,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===px&&!yC(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Fw={partial:!0,tokenize:Rw},Iw={concrete:!0,name:`codeFenced`,tokenize:Lw};function Lw(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),bx(t)?ww(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Fw,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):bx(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ww(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&bx(t)?ww(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(Fw,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),bx(t)?ww(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),bx(t)?ww(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Rw(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var zw={name:`codeIndented`,tokenize:Vw},Bw={partial:!0,tokenize:Hw};function Vw(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),ww(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Q(t)?e.attempt(Bw,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Hw(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):ww(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Q(e)?i(e):n(e)}}var Uw={name:`codeText`,previous:Gw,resolve:Ww,tokenize:Kw};function Ww(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Gw(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Kw(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var qw=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Jw(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Jw(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Jw(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Jw(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Jw(this.left,t.reverse())}}};function Jw(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Yw(e){let t={},n=-1,r,i,a,o,s,c,l,u=new qw(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Xw(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return BC(e,0,1/0,u.slice(0)),!l}function Xw(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Zw={resolve:$w,tokenize:eT},Qw={partial:!0,tokenize:tT};function $w(e){return Yw(e),e}function eT(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(Qw,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function tT(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ww(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function nT(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||hx(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||yx(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||hx(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function rT(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!bx(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function iT(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ww(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function aT(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):bx(i)?ww(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var oT={name:`definition`,tokenize:cT},sT={partial:!0,tokenize:lT};function cT(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return rT.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Gx(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return yx(t)?aT(e,l)(t):l(t)}function l(t){return nT(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(sT,d,d)(t)}function d(t){return bx(t)?ww(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function lT(e,t,n){return r;function r(t){return yx(t)?aT(e,i)(t):n(t)}function i(t){return iT(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return bx(t)?ww(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var uT={name:`hardBreakEscape`,tokenize:dT};function dT(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var fT={name:`headingAtx`,resolve:pT,tokenize:mT};function pT(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},BC(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function mT(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||yx(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):bx(n)?ww(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||yx(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var hT=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),gT=[`pre`,`script`,`style`,`textarea`],_T={concrete:!0,name:`htmlFlow`,resolveTo:bT,tokenize:xT},vT={partial:!0,tokenize:CT},yT={partial:!0,tokenize:ST};function bT(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xT(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):fx(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):fx(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return fx(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||yx(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&gT.includes(l)?(i=1,r.interrupt?t(s):O(s)):hT.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||px(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return bx(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||fx(t)?(e.consume(t),b):bx(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||px(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):bx(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):bx(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||yx(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||bx(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):bx(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(vT,ne,ee)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(yT,k,ne)(t)}function k(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||Q(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),P):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return gT.includes(n)?(e.consume(t),F):O(t)}return fx(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function ST(e,t,n){let r=this;return i;function i(t){return Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function CT(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Tw,t,n)}}var wT={name:`htmlText`,tokenize:TT};function TT(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):fx(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):fx(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):Q(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return fx(t)?(e.consume(t),S):n(t)}function S(t){return t===45||px(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,M(t)):bx(t)?(e.consume(t),C):j(t)}function w(t){return t===45||px(t)?(e.consume(t),w):t===47||t===62||yx(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||fx(t)?(e.consume(t),E):Q(t)?(o=T,M(t)):bx(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||px(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,M(t)):bx(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):Q(t)?(o=O,M(t)):bx(t)?(e.consume(t),O):(e.consume(t),k)}function ee(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):Q(t)?(o=ee,M(t)):(e.consume(t),ee)}function k(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||yx(t)?T(t):(e.consume(t),k)}function A(e){return e===47||e===62||yx(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return bx(t)?ww(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var ET={name:`labelEnd`,resolveAll:AT,resolveTo:jT,tokenize:MT},DT={tokenize:NT},OT={tokenize:PT},kT={tokenize:FT};function AT(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&BC(e,0,e.length,n),e}function jT(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=VC(s,e.slice(a+1,a+r+3)),s=VC(s,[[`enter`,u,t]]),s=VC(s,_w(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=VC(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=VC(s,e.slice(o+1)),s=VC(s,[[`exit`,c,t]]),BC(e,a,e.length,s),e}function MT(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Gx(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(DT,u,o?u:d)(t):t===91?e.attempt(OT,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(kT,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function NT(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return yx(t)?aT(e,a)(t):a(t)}function a(t){return t===41?u(t):nT(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return yx(t)?aT(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?iT(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return yx(t)?aT(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function PT(e,t,n){let r=this;return i;function i(t){return rT.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Gx(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function FT(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var IT={name:`labelStartImage`,resolveAll:ET.resolveAll,tokenize:LT};function LT(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var RT={name:`labelStartLink`,resolveAll:ET.resolveAll,tokenize:zT};function zT(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var BT={name:`lineEnding`,tokenize:VT};function VT(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ww(e,t,`linePrefix`)}}var HT={name:`thematicBreak`,tokenize:UT};function UT(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),bx(t)?ww(e,s,`whitespace`)(t):s(t))}}var WT={continuation:{tokenize:JT},exit:XT,name:`list`,tokenize:qT},GT={partial:!0,tokenize:ZT},KT={partial:!0,tokenize:YT};function qT(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:gx(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(HT,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return gx(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Tw,r.interrupt?n:u,e.attempt(GT,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return bx(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function JT(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Tw,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ww(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!bx(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(KT,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ww(e,e.attempt(WT,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function YT(e,t,n){let r=this;return ww(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function XT(e){e.exit(this.containerState.type)}function ZT(e,t,n){let r=this;return ww(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!bx(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var QT={name:`setextUnderline`,resolveTo:$T,tokenize:eE};function $T(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function eE(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),bx(t)?ww(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var tE={tokenize:lE,partial:!0};function nE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:oE,continuation:{tokenize:sE},exit:cE}},text:{91:{name:`gfmFootnoteCall`,tokenize:aE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:rE,resolveTo:iE}}}}function rE(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Gx(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function iE(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function aE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||yx(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Gx(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return yx(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function oE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||yx(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Gx(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return yx(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ww(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function sE(e,t,n){return e.check(Tw,t,e.attempt(tE,t,n))}function cE(e){e.exit(`gfmFootnoteDefinition`)}function lE(e,t,n){let r=this;return ww(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function uE(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&BC(o,o.length,0,_w(s,e.slice(r+1,n),t)),BC(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),BC(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=jS(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=jS(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var dE=class{constructor(){this.map=[]}add(e,t,n){fE(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function fE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function pE(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function mE(){return{flow:{null:{name:`table`,tokenize:hE,resolveAll:gE}}}}function hE(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):bx(t)?ww(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||yx(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,bx(t)?ww(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return bx(t)?ww(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return bx(t)?ww(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):bx(n)?ww(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||yx(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function gE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new dE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(vE(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=_E(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=_E(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=_E(f,t,o,i,n,d)):(o[0]=o[1],d=_E(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&vE(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=pE(t.events,n))}return e}function _E(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},yE(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=yE(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=yE(t.events,n[2]),a=yE(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},yE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function vE(e,t,n,r,i){let a=[],o=yE(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function yE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var bE={name:`tasklistCheck`,tokenize:SE};function xE(){return{text:{91:bE}}}function SE(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return yx(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):bx(r)?e.check({tokenize:CE},t,n)(r):n(r)}}function CE(e,t,n){return ww(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function wE(e){return UC([tw(),nE(),uE(e),mE(),xE()])}var TE={};function EE(e){let t=this,n=e||TE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(wE(n)),a.push(RC()),o.push(zC(n))}var DE=Object.defineProperty,OE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,AE=Object.getOwnPropertySymbols,jE=Object.prototype.hasOwnProperty,ME=Object.prototype.propertyIsEnumerable,NE=(e,t,n)=>t in e?DE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PE=(e,t)=>{for(var n in t||={})jE.call(t,n)&&NE(e,n,t[n]);if(AE)for(var n of AE(t))ME.call(t,n)&&NE(e,n,t[n]);return e},FE=(e,t)=>OE(e,kE(t)),IE=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]===`\\`&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},LE=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},RE=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]===`\\`&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!LE(e,n)&&(t+=1)}return t},zE=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},BE=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,VE=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(BE,(t,n,r,i)=>IE(e,i)?t:`${n}\\>${r}`),HE=/(\*\*)([^*]*\*?)$/,UE=/(__)([^_]*?)$/,WE=/(\*\*\*)([^*]*?)$/,GE=/(\*)([^*]*?)$/,KE=/(_)([^_]*?)$/,qE=/(`)([^`]*?)$/,JE=/(~~)([^~]*?)$/,YE=/^[\s_~*`]*$/,XE=/^[\s]*[-*+][\s]+$/,ZE=/[\p{L}\p{N}_]/u,QE=/^```[^`\n]*```?$/,$E=/^\*{4,}$/,eD=/(__)([^_]+)_$/,tD=/(~~)([^~]+)~$/,nD=/~~/g,rD=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:ZE.test(e)},iD=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},aD=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},oD=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},sD=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
78
|
+
`)return!1}return!1},cD=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?sD(e,t):!1;if(e[n]===`
|
|
79
|
+
`)return!1}return!1},lD=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1<e.length?e[n+1]:``;return t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===`
|
|
80
|
+
`)return!1}return!1},uD=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
|
|
81
|
+
`){r=n+1;break}let i=e.length;for(let n=t;n<e.length;n+=1)if(e[n]===`
|
|
82
|
+
`){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},dD=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&oD(e,t)?!0:n!==`*`&&r===`*`?(t<e.length-2?e[t+2]:``)!==`*`:!!(n===`*`||n&&r&&rD(n)&&rD(r)||(!n||n===` `||n===` `||n===`
|
|
83
|
+
`)&&(!r||r===` `||r===` `||r===`
|
|
84
|
+
`)),fD=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`*`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;dD(e,i,a,o)||(t+=1)}return t},pD=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&oD(e,t)||cD(e,t)||lD(e,t)||n===`_`||r===`_`||n&&r&&rD(n)&&rD(r)),mD=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`_`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;pD(e,i,a,o)||(t+=1)}return t},hD=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},gD=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`*`&&r+1<e.length&&e[r+1]===`*`&&(t+=1,r+=1)}return t},_D=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`_`&&r+1<e.length&&e[r+1]===`_`&&(t+=1,r+=1)}return t},vD=(e,t,n)=>{if(!t||YE.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
85
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return XE.test(a)&&t.includes(`
|
|
86
|
+
`)?!0:uD(e,n,`*`)},yD=e=>{let t=e.match(HE);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return IE(e,r)||zE(e,r)||vD(e,n,r)?e:gD(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},bD=(e,t,n)=>{if(!t||YE.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
87
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return XE.test(a)&&t.includes(`
|
|
88
|
+
`)?!0:uD(e,n,`_`)},xD=e=>{let t=e.match(UE);if(!t){let t=e.match(eD);if(t){let n=e.lastIndexOf(t[1]);if(!(IE(e,n)||zE(e,n))&&_D(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return IE(e,r)||zE(e,r)||bD(e,n,r)?e:_D(e)%2==1?`${e}__`:e},SD=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`*`&&e[n-1]!==`*`&&e[n+1]!==`*`&&e[n-1]!==`\\`&&!oD(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if((!t||t===` `||t===` `||t===`
|
|
89
|
+
`)&&(!r||r===` `||r===` `||r===`
|
|
90
|
+
`)||t&&r&&rD(t)&&rD(r))continue;return n}}return-1},CD=e=>{if(!e.match(GE))return e;let t=SD(e);if(t===-1||IE(e,t)||zE(e,t))return e;let n=e.substring(t+1);return!n||YE.test(n)?e:fD(e)%2==1?`${e}*`:e},wD=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`_`&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!oD(e,n)&&!cD(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&rD(t)&&rD(r))continue;return n}}return-1},TD=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
91
|
+
`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},ED=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(gD(t)%2!=1)return null;let n=t.indexOf(`**`),r=wD(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},DD=e=>{if(!e.match(KE))return e;let t=wD(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||YE.test(n)||IE(e,t)||zE(e,t))return e;if(mD(e)%2==1){let t=ED(e);return t===null?TD(e):t}return e},OD=e=>{let t=gD(e),n=fD(e);return t%2==0&&n%2==0},kD=(e,t,n)=>!t||YE.test(t)||IE(e,n)||zE(e,n)?!0:uD(e,n,`*`),AD=e=>{if($E.test(e))return e;let t=e.match(WE);if(!t)return e;let n=t[2];return kD(e,n,e.lastIndexOf(t[1]))?e:hD(e)%2==1?OD(e)?e:`${e}***`:e},jD=/<[a-zA-Z/][^>]*$/,MD=e=>{let t=e.match(jD);return!t||t.index===void 0||IE(e,t.index)?e:e.substring(0,t.index).trimEnd()},ND=e=>!e.match(QE)||e.includes(`
|
|
92
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,PD=e=>(e.match(/```/g)||[]).length%2==1,FD=e=>{let t=ND(e);if(t!==null)return t;let n=e.match(qE);if(n&&!PD(e)){let t=n[2];if(!t||YE.test(t))return e;if(RE(e)%2==1)return`${e}\``}return e},ID=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",LD=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!ID(e,r)&&(n=!n),!n&&e[r]===`$`&&e[r+1]===`$`&&(t+=1,r+=1);return t},RD=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]===`\\`){r+=1;continue}if(e[r]==="`"&&!ID(e,r)){n=!n;continue}!n&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:t+=1)}return t},zD=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
|
|
93
|
+
`,t)!==-1&&!e.endsWith(`
|
|
94
|
+
`)?`${e}
|
|
95
|
+
$$`:`${e}$$`},BD=e=>LD(e)%2==0?e:zD(e),VD=e=>RD(e)%2==1?`${e}$`:e,HD=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=iD(e,t);if(r===-1||IE(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},UD=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!IE(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=aD(e,n);if(t===-1)return n;if(t+1<e.length&&e[t+1]===`(`){let r=e.indexOf(`)`,t+2);r!==-1&&(n=r)}}return t},WD=(e,t,n)=>{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=UD(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(aD(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=UD(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},GD=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!IE(e,n)){let r=HD(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!IE(e,n)){let r=WD(e,n,t);if(r!==null)return r}return e},KD=/^-{1,2}$/,qD=/^[\s]*-{1,2}[\s]+$/,JD=/^={1,2}$/,YD=/^[\s]*={1,2}[\s]+$/,XD=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(`
|
|
96
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(KD.test(i)&&!n.match(qD)){let t=r.split(`
|
|
97
|
+
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(JD.test(i)&&!n.match(YD)){let t=r.split(`
|
|
98
|
+
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},ZD=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),QD=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(ZD,(t,n)=>IE(e,n)?t:`\\~`),$D=e=>{let t=e.match(JE);if(t){let n=t[2];if(!n||YE.test(n))return e;let r=e.lastIndexOf(t[1]);if(IE(e,r)||zE(e,r))return e;if(e.match(nD)?.length%2==1)return`${e}~~`}else{let t=e.match(tD);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(IE(e,n)||zE(e,n))return e;if(e.match(nD)?.length%2==1)return`${e}~`}}return e},eO=e=>e!==!1,tO=e=>e===!0,nO={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},rO=[{handler:{name:`singleTilde`,handle:QD,priority:nO.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:VE,priority:nO.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:MD,priority:nO.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:XD,priority:nO.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:GD,priority:nO.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:AD,priority:nO.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:yD,priority:nO.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:xD,priority:nO.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:CD,priority:nO.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:DD,priority:nO.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:FD,priority:nO.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:$D,priority:nO.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:BD,priority:nO.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:VD,priority:nO.INLINE_KATEX},optionKey:`inlineKatex`}],iO=e=>{let t=e?.linkMode??`protocol`;return rO.filter(({handler:t,optionKey:n})=>t.name===`links`?eO(e?.links)||eO(e?.images):t.name===`inlineKatex`?tO(e?.inlineKatex):eO(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:FE(PE({},e),{handle:e=>GD(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},aO=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=iO(t),i=(t?.handlers??[]).map(e=>({handler:FE(PE({},e),{priority:e.priority??nO.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n},oO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cO={};function lO(e,t){return((t||cO).jsx?sO:oO).test(e)}var uO=/[ \t\n\f\r]/g;function dO(e){return typeof e==`object`?e.type===`text`?fO(e.value):!1:fO(e)}function fO(e){return e.replace(uO,``)===``}var pO=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
99
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),mO=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(pO());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),hO=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),gO=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(mO()),r=hO();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function _O(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?yO(e.position):`start`in e||`end`in e?yO(e):`line`in e||`column`in e?vO(e):``}function vO(e){return bO(e&&e.line)+`:`+bO(e&&e.column)}function yO(e){return vO(e&&e.start)+`-`+vO(e&&e.end)}function bO(e){return e&&typeof e==`number`?e:1}var xO=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=_O(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};xO.prototype.file=``,xO.prototype.name=``,xO.prototype.reason=``,xO.prototype.message=``,xO.prototype.stack=``,xO.prototype.column=void 0,xO.prototype.line=void 0,xO.prototype.ancestors=void 0,xO.prototype.cause=void 0,xO.prototype.fatal=void 0,xO.prototype.place=void 0,xO.prototype.ruleId=void 0,xO.prototype.source=void 0;var SO=t(gO(),1),CO={}.hasOwnProperty,wO=new Map,TO=/[A-Z]/g,EO=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),DO=new Set([`td`,`th`]),OO=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function kO(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=BO(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=zO(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?wh:Ch,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=AO(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function AO(e,t,n){if(t.type===`element`)return jO(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return MO(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return PO(e,t,n);if(t.type===`mdxjsEsm`)return NO(e,t);if(t.type===`root`)return FO(e,t,n);if(t.type===`text`)return IO(e,t)}function jO(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=wh,e.schema=i),e.ancestors.push(t);let a=KO(e,t.tagName,!1),o=VO(e,t),s=UO(e,t);return EO.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!dO(e):!0})),LO(e,o,a,t),RO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function MO(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}qO(e,t.position)}function NO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qO(e,t.position)}function PO(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=wh,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:KO(e,t.name,!0),o=HO(e,t),s=UO(e,t);return LO(e,o,a,t),RO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function FO(e,t,n){let r={};return RO(r,UO(e,t)),e.create(t,e.Fragment,r,n)}function IO(e,t){return t.value}function LO(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function RO(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function zO(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function BO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Sb(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function VO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&CO.call(t.properties,i)){let a=WO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&DO.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function HO(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else qO(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else qO(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function UO(e,t){let n=[],r=-1,i=e.passKeys?new Map:wO;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=AO(e,a,o);s!==void 0&&n.push(s)}return n}function WO(e,t,n){let r=bh(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Eh(n):Ah(n)),r.property===`style`){let t=typeof n==`object`?n:GO(e,String(n));return e.stylePropertyNameCase===`css`&&(t=JO(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?gh[r.property]||r.property:r.attribute,n]}}function GO(e,t){try{return(0,SO.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new xO("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=OO+`#cannot-parse-style-attribute`,r}}function KO(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=lO(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=lO(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return CO.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);qO(e)}function qO(e,t){let n=new xO("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=OO+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function JO(e){let t={},n;for(n in e)CO.call(e,n)&&(t[YO(n)]=e[n]);return t}function YO(e){let t=e.replace(TO,XO);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function XO(e){return`-`+e.toLowerCase()}var ZO={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},QO={tokenize:$O};function $O(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ww(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ek={tokenize:nk},tk={tokenize:rk};function nk(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return BC(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tk,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(tk,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;BC(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function rk(e,t,n){return ww(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var ik={tokenize:ak};function ak(e){let t=this,n=e.attempt(Tw,r,e.attempt(this.parser.constructs.flowInitial,i,ww(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Zw,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ok={resolveAll:uk()},sk=lk(`string`),ck=lk(`text`);function lk(e){return{resolveAll:uk(e===`text`?dk:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function uk(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function dk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var fk=e({attentionMarkers:()=>bk,contentInitial:()=>mk,disable:()=>xk,document:()=>pk,flow:()=>gk,flowInitial:()=>hk,insideSpan:()=>yk,string:()=>_k,text:()=>vk}),pk={42:WT,43:WT,45:WT,48:WT,49:WT,50:WT,51:WT,52:WT,53:WT,54:WT,55:WT,56:WT,57:WT,62:Dw},mk={91:oT},hk={[-2]:zw,[-1]:zw,32:zw},gk={35:fT,42:HT,45:[QT,HT],60:_T,61:QT,95:HT,96:Iw,126:Iw},_k={38:Nw,92:jw},vk={[-5]:BT,[-4]:BT,[-3]:BT,33:IT,38:Nw,42:vw,60:[Sw,wT],91:RT,92:[uT,jw],93:ET,95:vw,96:Uw},yk={null:[vw,ok]},bk={null:[42,95]},xk={null:[]};function Sk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=VC(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=_w(a,l.events,l),l.events):[]}function f(e,t){return wk(p(e),t)}function p(e){return Ck(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&BC(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ck(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function wk(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
100
|
+
`;break;case-3:o=`\r
|
|
101
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Tk(e){let t={constructs:UC([fk,...(e||{}).extensions||[]]),content:n(QO),defined:[],document:n(ek),flow:n(ik),lazy:{},string:n(sk),text:n(ck)};return t;function n(e){return n;function n(n){return Sk(t,e,n)}}}function Ek(e){for(;!Yw(e););return e}var Dk=/[\0\t\n\r]/g;function Ok(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Dk.lastIndex=u,c=Dk.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var kk={}.hasOwnProperty;function Ak(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),jk(n)(Ek(Tk(n).document().write(Ok()(e,t,!0))))}function jk(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:I,characterReference:L,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(A),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(k),htmlTextData:E,image:c(M),label:te,labelText:N,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Nk(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];kk.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Fk).call(a,void 0,e[0])}for(r.position={start:Mk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Mk(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Mk(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Fk).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+_O({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Mk(e.end)}function u(){return IS(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gx(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:Mk(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Mk(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Mk(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=SC(t),n.identifier=Gx(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gx(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function I(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=bC(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=yC(t);let i=this.stack[this.stack.length-1];i.value+=r}function L(e){let t=this.stack.pop();t.position.end=Mk(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function Mk(e){return{line:e.line,column:e.column,offset:e.offset}}function Nk(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Nk(e,r):Pk(e,r)}}function Pk(e,t){let n;for(n in t)if(kk.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Fk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+_O({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_O({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+_O({start:t.start,end:t.end})+`) is still open`)}function Ik(e){let t=this;t.parser=n;function n(n){return Ak(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Lk(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Rk(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
102
|
+
`}]}function zk(e,t){let n=t.value?t.value+`
|
|
103
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Bk(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vk(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hk(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=gw(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Uk(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wk(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gk(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Kk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gk(e,t);let i={src:gw(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function qk(e,t){let n={src:gw(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Jk(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Yk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gk(e,t);let i={href:gw(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Xk(e,t){let n={href:gw(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zk(e,t,n){let r=e.all(t),i=n?Qk(n):$k(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
104
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
105
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Qk(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=$k(n[r])}return t}function $k(e){return e.spread??e.children.length>1}function eA(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function tA(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nA(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rA(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iA(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Sb(t.children[1]),o=xb(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function aA(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function oA(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var sA=9,cA=32;function lA(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(uA(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(uA(t.slice(i),i>0,!1)),a.join(``)}function uA(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===sA||t===cA;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===sA||t===cA;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function dA(e,t){let n={type:`text`,value:lA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fA(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var pA={blockquote:Lk,break:Rk,code:zk,delete:Bk,emphasis:Vk,footnoteReference:Hk,heading:Uk,html:Wk,imageReference:Kk,image:qk,inlineCode:Jk,linkReference:Yk,link:Xk,listItem:Zk,list:eA,paragraph:tA,root:nA,strong:rA,table:iA,tableCell:oA,tableRow:aA,text:dA,thematicBreak:fA,toml:mA,yaml:mA,definition:mA,footnoteDefinition:mA};function mA(){}function hA(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function gA(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function _A(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||hA,r=e.options.footnoteBackLabel||gA,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=gw(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Wm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
106
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
107
|
+
`}]}}var vA={}.hasOwnProperty,yA={};function bA(e,t){let n=t||yA,r=new Map,i=new Map,a={all:s,applyData:SA,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...pA,...n.handlers},one:o,options:n,patch:xA,wrap:wA};return xm(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(vA.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Wm(n);return r.children=a.all(e),r}return Wm(e)}return(a.options.unknownHandler||CA)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=TA(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=TA(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function xA(e,t){e.position&&(t.position=wb(e))}function SA(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Wm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function CA(e,t){let n=t.data||{},r=`value`in t&&!(vA.call(n,`hProperties`)||vA.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wA(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
108
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
109
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
110
|
+
`}),n}function TA(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function EA(e,t){let n=bA(e,t),r=n.one(e,void 0),i=_A(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
111
|
+
`},i)),a}function DA(e,t){return e&&`run`in e?async function(n,r){let i=EA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return EA(n,{file:r,...e||t})}}function OA(e){if(e)throw e}var kA=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function AA(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function jA(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?MA(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function MA(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var NA={basename:PA,dirname:FA,extname:IA,join:LA,sep:`/`};function PA(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);BA(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function FA(e){if(BA(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function IA(e){BA(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function LA(...e){let t=-1,n;for(;++t<e.length;)BA(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:RA(n)}function RA(e){BA(e);let t=e.codePointAt(0)===47,n=zA(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function zA(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function BA(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var VA={cwd:HA};function HA(){return`/`}function UA(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function WA(e){if(typeof e==`string`)e=new URL(e);else if(!UA(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return GA(e)}function GA(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var KA=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],qA=class{constructor(e){let t;t=e?UA(e)?{path:e}:typeof e==`string`||ZA(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:VA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<KA.length;){let e=KA[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)KA.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?NA.basename(this.path):void 0}set basename(e){YA(e,`basename`),JA(e,`basename`),this.path=NA.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?NA.dirname(this.path):void 0}set dirname(e){XA(this.basename,`dirname`),this.path=NA.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?NA.extname(this.path):void 0}set extname(e){if(JA(e,`extname`),XA(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=NA.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){UA(e)&&(e=WA(e)),YA(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?NA.basename(this.path,this.extname):void 0}set stem(e){YA(e,`stem`),JA(e,`stem`),this.path=NA.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new xO(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function JA(e,t){if(e&&e.includes(NA.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+NA.sep+"`")}function YA(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function XA(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function ZA(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var QA=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),$A=t(kA(),1),ej={}.hasOwnProperty,tj=new class e extends QA{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=jA()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,$A.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(ij(`data`,this.frozen),this.namespace[e]=t,this):ej.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ij(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=sj(e),n=this.parser||this.Parser;return nj(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nj(`process`,this.parser||this.Parser),rj(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=sj(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);lj(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),nj(`processSync`,this.parser||this.Parser),rj(`processSync`,this.compiler||this.Compiler),this.process(e,r),oj(`processSync`,`process`,t),n;function r(e,r){t=!0,OA(e),n=r}}run(e,t,n){aj(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=sj(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),oj(`runSync`,`run`,n),r;function i(e,t){OA(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=sj(t),r=this.compiler||this.Compiler;return rj(`stringify`,r),aj(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(ij(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,$A.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];AA(o)&&AA(r)&&(r=(0,$A.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function nj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function rj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function ij(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function aj(e){if(!AA(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function oj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function sj(e){return cj(e)?e:new qA(e)}function cj(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function lj(e){return typeof e==`string`||uj(e)}function uj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function dj(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var fj=dj();function pj(e){fj=e}var mj={exec:()=>null};function hj(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_j.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var gj=(()=>{try{return!0}catch{return!1}})(),_j={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},vj=/^(?:[ \t]*(?:\n|$))+/,yj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bj=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xj=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cj=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,wj=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Tj=hj(wj).replace(/bull/g,Cj).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Ej=hj(wj).replace(/bull/g,Cj).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Dj=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Oj=/^[^\n]+/,kj=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Aj=hj(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,kj).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jj=hj(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cj).getRegex(),Mj=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Nj=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pj=hj(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Nj).replace(`tag`,Mj).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fj=hj(Dj).replace(`hr`,xj).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Mj).getRegex(),Ij={blockquote:hj(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Fj).getRegex(),code:yj,def:Aj,fences:bj,heading:Sj,hr:xj,html:Pj,lheading:Tj,list:jj,newline:vj,paragraph:Fj,table:mj,text:Oj},Lj=hj(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,xj).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Mj).getRegex(),Rj={...Ij,lheading:Ej,table:Lj,paragraph:hj(Dj).replace(`hr`,xj).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Lj).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Mj).getRegex()},zj={...Ij,html:hj(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Nj).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mj,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:hj(Dj).replace(`hr`,xj).replace(`heading`,` *#{1,6} *[^
|
|
112
|
+
]`).replace(`lheading`,Tj).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Bj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hj=/^( {2,}|\\)\n(?!\s*$)/,Uj=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wj=/[\p{P}\p{S}]/u,Gj=/[\s\p{P}\p{S}]/u,Kj=/[^\s\p{P}\p{S}]/u,qj=hj(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Gj).getRegex(),Jj=/(?!~)[\p{P}\p{S}]/u,Yj=/(?!~)[\s\p{P}\p{S}]/u,Xj=/(?:[^\s\p{P}\p{S}]|~)/u,Zj=hj(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,gj?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Qj=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,$j=hj(Qj,`u`).replace(/punct/g,Wj).getRegex(),eM=hj(Qj,`u`).replace(/punct/g,Jj).getRegex(),tM=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,nM=hj(tM,`gu`).replace(/notPunctSpace/g,Kj).replace(/punctSpace/g,Gj).replace(/punct/g,Wj).getRegex(),rM=hj(tM,`gu`).replace(/notPunctSpace/g,Xj).replace(/punctSpace/g,Yj).replace(/punct/g,Jj).getRegex(),iM=hj(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Kj).replace(/punctSpace/g,Gj).replace(/punct/g,Wj).getRegex(),aM=hj(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Wj).getRegex(),oM=hj(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Kj).replace(/punctSpace/g,Gj).replace(/punct/g,Wj).getRegex(),sM=hj(/\\(punct)/,`gu`).replace(/punct/g,Wj).getRegex(),cM=hj(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),lM=hj(Nj).replace(`(?:-->|$)`,`-->`).getRegex(),uM=hj(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,lM).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dM=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,fM=hj(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,dM).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pM=hj(/^!?\[(label)\]\[(ref)\]/).replace(`label`,dM).replace(`ref`,kj).getRegex(),mM=hj(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,kj).getRegex(),hM=hj(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,pM).replace(`nolink`,mM).getRegex(),gM=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_M={_backpedal:mj,anyPunctuation:sM,autolink:cM,blockSkip:Zj,br:Hj,code:Vj,del:mj,delLDelim:mj,delRDelim:mj,emStrongLDelim:$j,emStrongRDelimAst:nM,emStrongRDelimUnd:iM,escape:Bj,link:fM,nolink:mM,punctuation:qj,reflink:pM,reflinkSearch:hM,tag:uM,text:Uj,url:mj},vM={..._M,link:hj(/^!?\[(label)\]\((.*?)\)/).replace(`label`,dM).getRegex(),reflink:hj(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,dM).getRegex()},yM={..._M,emStrongRDelimAst:rM,emStrongLDelim:eM,delLDelim:aM,delRDelim:oM,url:hj(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,gM).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:hj(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,gM).getRegex()},bM={...yM,br:hj(Hj).replace(`{2,}`,`*`).getRegex(),text:hj(yM.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},xM={normal:Ij,gfm:Rj,pedantic:zj},SM={normal:_M,gfm:yM,breaks:bM,pedantic:vM},CM={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},wM=e=>CM[e];function TM(e,t){if(t){if(_j.escapeTest.test(e))return e.replace(_j.escapeReplace,wM)}else if(_j.escapeTestNoEncode.test(e))return e.replace(_j.escapeReplaceNoEncode,wM);return e}function EM(e){try{e=encodeURI(e).replace(_j.percentDecode,`%`)}catch{return null}return e}function DM(e,t){let n=e.replace(_j.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_j.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(_j.slashPipe,`|`);return n}function OM(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function kM(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function AM(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function jM(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function MM(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
113
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
114
|
+
`)}var NM=class{options;rules;lexer;constructor(e){this.options=e||fj}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:OM(e,`
|
|
115
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=MM(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=OM(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:OM(t[0],`
|
|
116
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=OM(t[0],`
|
|
117
|
+
`).split(`
|
|
118
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
119
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
120
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
121
|
+
${s}`:s,r=r?`${r}
|
|
122
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
123
|
+
`+e.join(`
|
|
124
|
+
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
125
|
+
`+e.join(`
|
|
126
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
127
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=AM(t[2].split(`
|
|
128
|
+
`,1)[0],t[1].length),l=e.split(`
|
|
129
|
+
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
130
|
+
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
|
131
|
+
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
132
|
+
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
133
|
+
`+l}u=!l.trim(),r+=p+`
|
|
134
|
+
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=DM(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
135
|
+
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(DM(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
136
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=OM(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=kM(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),jM(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return jM(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},PM=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||fj,this.options.tokenizer=this.options.tokenizer||new NM,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:_j,block:xM.normal,inline:SM.normal};this.options.pedantic?(t.block=xM.pedantic,t.inline=SM.pedantic):this.options.gfm&&(t.block=xM.gfm,this.options.breaks?t.inline=SM.breaks:t.inline=SM.gfm),this.tokenizer.rules=t}static get rules(){return{block:xM,inline:SM}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(_j.carriageReturn,`
|
|
137
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(_j.tabCharGlobal,` `).replace(_j.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
138
|
+
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
139
|
+
`)?``:`
|
|
140
|
+
`)+r.raw,n.text+=`
|
|
141
|
+
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
142
|
+
`)?``:`
|
|
143
|
+
`)+r.raw,n.text+=`
|
|
144
|
+
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
|
|
145
|
+
`)?``:`
|
|
146
|
+
`)+r.raw,a.text+=`
|
|
147
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
148
|
+
`)?``:`
|
|
149
|
+
`)+r.raw,n.text+=`
|
|
150
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},FM=class{options;parser;constructor(e){this.options=e||fj}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(_j.notSpaceStart)?.[0],i=e.replace(_j.endingNewline,``)+`
|
|
151
|
+
`;return r?`<pre><code class="language-`+TM(r)+`">`+(n?i:TM(i,!0))+`</code></pre>
|
|
152
|
+
`:`<pre><code>`+(n?i:TM(i,!0))+`</code></pre>
|
|
153
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
154
|
+
${this.parser.parse(e)}</blockquote>
|
|
155
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
156
|
+
`}hr(e){return`<hr>
|
|
157
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
158
|
+
`+r+`</`+i+`>
|
|
159
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
160
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
161
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
162
|
+
<thead>
|
|
163
|
+
`+t+`</thead>
|
|
164
|
+
`+r+`</table>
|
|
165
|
+
`}tablerow({text:e}){return`<tr>
|
|
166
|
+
${e}</tr>
|
|
167
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
168
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${TM(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=EM(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+TM(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=EM(e);if(i===null)return TM(n);e=i;let a=`<img src="${e}" alt="${TM(n)}"`;return t&&(a+=` title="${TM(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:TM(e.text)}},IM=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},LM=class e{options;renderer;textRenderer;constructor(e){this.options=e||fj,this.options.renderer=this.options.renderer||new FM,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new IM}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},RM=class{options;block;constructor(e){this.options=e||fj}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?PM.lex:PM.lexInline}provideParser(e=this.block){return e?LM.parse:LM.parseInline}},zM=new class{defaults=dj();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=LM;Renderer=FM;TextRenderer=IM;Lexer=PM;Tokenizer=NM;Hooks=RM;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new FM(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new NM(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new RM;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];RM.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&RM.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return PM.lex(e,t??this.defaults)}parser(e,t){return LM.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?PM.lex:PM.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?LM.parse:LM.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?PM.lex:PM.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?LM.parse:LM.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
169
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+TM(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function BM(e,t){return zM.parse(e,t)}BM.options=BM.setOptions=function(e){return zM.setOptions(e),BM.defaults=zM.defaults,pj(BM.defaults),BM},BM.getDefaults=dj,BM.defaults=fj,BM.use=function(...e){return zM.use(...e),BM.defaults=zM.defaults,pj(BM.defaults),BM},BM.walkTokens=function(e,t){return zM.walkTokens(e,t)},BM.parseInline=zM.parseInline,BM.Parser=LM,BM.parser=LM.parse,BM.Renderer=FM,BM.TextRenderer=IM,BM.Lexer=PM,BM.lexer=PM.lex,BM.Tokenizer=NM,BM.Hooks=RM,BM.parse=BM,BM.options,BM.setOptions,BM.use,BM.walkTokens,BM.parseInline,LM.parse,PM.lex;var VM=`modulepreload`,HM=function(e){return`/`+e},UM={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=HM(t,n),t in UM)return;UM[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:VM,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},WM=300,GM=`300px`,KM=500;function qM(e={}){let{immediate:t=!1,debounceDelay:n=WM,rootMargin:r=GM,idleTimeout:i=KM}=e,[a,o]=(0,d.useState)(!1),s=(0,d.useRef)(null),c=(0,d.useRef)(null),l=(0,d.useRef)(null),u=(0,d.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),f=(0,d.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),p=(0,d.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,d.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(p(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(p(l.current),null)},u=e=>{l.current=f(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=f(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},d=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?d(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&p(l.current),h.disconnect()}},[t,n,r,i,p,f]),{shouldRender:a,containerRef:s}}var JM=/\s/,YM=/^\s+$/,XM=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),ZM=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,QM=e=>e.some(e=>ZM(e)&&XM.has(e.tagName)),$M=e=>{let t=[],n=``,r=!1;for(let i of e){let e=JM.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},eN=e=>{let t=[],n=``;for(let r of e)JM.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},tN=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},nN=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(QM(t))return vm;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?eN(c):$M(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,YM.test(e))return{type:`text`,value:e};let r=u>0&&t<u,a=r?0:i.newIndex++*n.stagger;return tN(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...d),s+d.length},rN=0;function iN(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`,stagger:e?.stagger??40},n={prevContentLength:0,lastRenderCharCount:0},r=rN++,i=()=>e=>{let r={count:0,newIndex:0};ym(e,`text`,(e,i)=>nN(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,`name`,{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}iN();var aN=(0,d.createContext)(!1),oN=()=>(0,d.useContext)(aN),sN=(...e)=>fd(Hl(e)),cN=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},lN=e=>e?(...t)=>cN(e,fd(Hl(t))):sN,uN=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},dN=(0,d.createContext)(sN),fN=()=>(0,d.useContext)(dN),pN=sN(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),mN=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},hN=(0,d.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=fN(),c=(0,d.useMemo)(()=>s(pN),[s]),l=(0,d.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,mN(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,_.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,_.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,_.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,_.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?`
|
|
170
|
+
`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,_.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),gN=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,_.jsx)(`div`,{className:fN()(`my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i}),_N=(0,d.createContext)({code:``}),vN=()=>(0,d.useContext)(_N),yN=({language:e})=>{let t=fN();return(0,_.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,_.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},bN=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
171
|
+
`;)t--;return e.slice(0,t)},xN=(0,d.lazy)(()=>$(()=>import(`./highlighted-body-OFNGDK62-CDUecv8k.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1]))),SN=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=fN(),l=(0,d.useMemo)(()=>bN(e),[e]),u=(0,d.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(`
|
|
172
|
+
`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,_.jsx)(_N.Provider,{value:{code:e},children:(0,_.jsxs)(gN,{isIncomplete:i,language:t,children:[(0,_.jsx)(yN,{language:t}),r?(0,_.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,_.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,_.jsx)(d.Suspense,{fallback:(0,_.jsx)(hN,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,_.jsx)(xN,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},CN={CheckIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,_.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,_.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,_.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,_.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,_.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},wN=(0,d.createContext)(CN),TN=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1},EN=({icons:e,children:t})=>{let n=(0,d.useRef)(e),r=(0,d.useRef)(e?{...CN,...e}:CN);TN(n.current,e)||(n.current=e,r.current=e?{...CN,...e}:CN);let i=r.current;return(0,_.jsx)(wN.Provider,{value:i,children:t})},DN=()=>(0,d.useContext)(wN),ON={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},kN=(0,d.createContext)(ON),AN=()=>(0,d.useContext)(kN),jN=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=fN(),[c,l]=(0,d.useState)(!1),u=(0,d.useRef)(0),{code:f}=vN(),{isAnimating:p}=(0,d.useContext)(LF),m=AN(),h=a??f,g=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(h),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,d.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let v=DN(),y=c?v.CheckIcon:v.CopyIcon;return(0,_.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:p,onClick:g,title:m.copyCode,type:`button`,...o,children:r??(0,_.jsx)(y,{size:14})})},MN={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},NN=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=fN(),{code:c}=vN(),{isAnimating:l}=(0,d.useContext)(LF),u=AN(),f=DN(),p=a??c,m=`file.${n&&n in MN?MN[n]:`txt`}`;return(0,_.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{uN(m,p,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,_.jsx)(f.DownloadIcon,{size:14})})},PN=()=>{let{Loader2Icon:e}=DN(),t=fN();return(0,_.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,_.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,_.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,_.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},FN=/\.[^/.]+$/,IN=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=DN(),c=fN(),l=(0,d.useRef)(null),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(!1),h=AN(),g=o.width!=null||o.height!=null,v=(u||g)&&!p,y=p&&!g;(0,d.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;f(t),m(!t)}},[]);let b=(0,d.useCallback)(e=>{f(!0),m(!1),i?.(e)},[i]),x=(0,d.useCallback)(e=>{f(!1),m(!0),a?.(e)},[a]),S=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(FN,``)}.${i}`}uN(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,_.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,_.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,y&&`hidden`,t),"data-streamdown":`image`,onError:x,onLoad:b,ref:l,src:n,...o}),y&&(0,_.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:h.imageNotAvailable}),(0,_.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),v&&(0,_.jsx)(`button`,{className:c(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:S,title:h.downloadImage,type:`button`,children:(0,_.jsx)(s,{size:14})})]}):null},LN=0,RN=()=>{LN+=1,LN===1&&(document.body.style.overflow=`hidden`)},zN=()=>{LN=Math.max(0,LN-1),LN===0&&(document.body.style.overflow=``)},BN=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=DN(),c=fN(),[l,u]=(0,d.useState)(!1),f=AN(),p=(0,d.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),m=(0,d.useCallback)(()=>{r(),n()},[r,n]);return(0,d.useEffect)(()=>{if(t){RN();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),zN()}}},[t,n]),t?(0,_.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,_.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,_.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:f.close,type:`button`,children:(0,_.jsx)(s,{size:16})}),(0,_.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,_.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,_.jsx)(o,{size:20}),(0,_.jsx)(`span`,{children:f.openExternalLink})]}),(0,_.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:f.externalLinkWarning})]}),(0,_.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,_.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,_.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:p,type:`button`,children:l?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(i,{size:14}),(0,_.jsx)(`span`,{children:f.copied})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(a,{size:14}),(0,_.jsx)(`span`,{children:f.copyLink})]})}),(0,_.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:m,type:`button`,children:[(0,_.jsx)(o,{size:14}),(0,_.jsx)(`span`,{children:f.openLink})]})]})]})}):null},VN=(0,d.createContext)(null),HN=()=>(0,d.useContext)(VN),UN=()=>HN()?.code??null,WN=()=>HN()?.mermaid??null,GN=e=>{var t;let n=HN();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},KN=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),qN=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=fN(),[s,c]=(0,d.useState)(!1),l=(0,d.useRef)(null),{isAnimating:u}=(0,d.useContext)(LF),f=DN(),p=WN(),m=AN(),h=async t=>{try{if(t===`mmd`){uN(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!p){a?.(Error(`Mermaid plugin not available`));return}let n=p.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){uN(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){uN(`diagram.png`,await KN(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,d.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,_.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,_.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:m.downloadDiagram,type:`button`,children:t??(0,_.jsx)(f.DownloadIcon,{size:14})}),s?(0,_.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,_.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>h(`svg`),title:m.downloadDiagramAsSvg,type:`button`,children:m.mermaidFormatSvg}),(0,_.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>h(`png`),title:m.downloadDiagramAsPng,type:`button`,children:m.mermaidFormatPng}),(0,_.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>h(`mmd`),title:m.downloadDiagramAsMmd,type:`button`,children:m.mermaidFormatMmd})]}):null]})},JN=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=DN(),c=fN(),[l,u]=(0,d.useState)(!1),{isAnimating:f,controls:p}=(0,d.useContext)(LF),m=AN(),h=(()=>{if(typeof p==`boolean`)return p;let e=p.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),g=()=>{u(!l)};return(0,d.useEffect)(()=>{if(l){RN();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),zN()}}},[l]),(0,d.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:f,onClick:g,title:m.viewFullscreen,type:`button`,...a,children:(0,_.jsx)(o,{size:14})}),l?(0,E.createPortal)((0,_.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:g,onKeyDown:e=>{e.key===`Escape`&&g()},role:`button`,tabIndex:0,children:[(0,_.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:g,title:m.exitFullscreen,type:`button`,children:(0,_.jsx)(s,{size:20})}),(0,_.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,_.jsx)(VF,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:h})})]}),document.body):null]})},YN=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},XN=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
|
|
173
|
+
`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
|
|
174
|
+
`)},ZN=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
|
|
175
|
+
`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
|
|
176
|
+
`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
|
|
177
|
+
`)},QN=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},$N=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>QN(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]=`---`;r[i]=`| ${a.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?QN(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>QN(e)).join(` | `)} |`,i+=1;return r.join(`
|
|
178
|
+
`)},eP=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=fN(),[o,s]=(0,d.useState)(!1),[c,l]=(0,d.useState)(!1),u=(0,d.useRef)(null),f=(0,d.useRef)(0),{isAnimating:p}=(0,d.useContext)(LF),m=AN(),h=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=YN(t),o=({csv:XN,tsv:ZN,md:$N}[e]||$N)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),f.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,d.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(f.current)}},[]);let g=DN(),v=c?g.CheckIcon:g.CopyIcon;return(0,_.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,_.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:p,onClick:()=>s(!o),title:m.copyTable,type:`button`,children:e??(0,_.jsx)(v,{height:14,width:14})}),o?(0,_.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,_.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>h(`md`),title:m.copyTableAsMarkdown,type:`button`,children:m.tableFormatMarkdown}),(0,_.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>h(`csv`),title:m.copyTableAsCsv,type:`button`,children:m.tableFormatCsv}),(0,_.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>h(`tsv`),title:m.copyTableAsTsv,type:`button`,children:m.tableFormatTsv})]}):null]})},tP=({children:e,className:t,onDownload:n,onError:r})=>{let i=fN(),[a,o]=(0,d.useState)(!1),s=(0,d.useRef)(null),{isAnimating:c}=(0,d.useContext)(LF),l=AN(),u=DN(),f=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=YN(t),a=e===`csv`?XN(i):$N(i);uN(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,d.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,_.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,_.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,_.jsx)(u.DownloadIcon,{size:14})}),a?(0,_.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,_.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>f(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,_.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>f(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},nP=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=DN(),o=fN(),[s,c]=(0,d.useState)(!1),{isAnimating:l}=(0,d.useContext)(LF),u=AN(),f=()=>{c(!0)},p=()=>{c(!1)};return(0,d.useEffect)(()=>{if(s){RN();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),zN()}}},[s]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:f,title:u.viewFullscreen,type:`button`,children:(0,_.jsx)(i,{size:14})}),s?(0,E.createPortal)((0,_.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:p,onKeyDown:e=>{e.key===`Escape`&&p()},role:`dialog`,children:(0,_.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,_.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,_.jsx)(eP,{}):null,r?(0,_.jsx)(tP,{}):null,(0,_.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:p,title:u.exitFullscreen,type:`button`,children:(0,_.jsx)(a,{size:20})})]}),(0,_.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,_.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},rP=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=fN(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,_.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,_.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,_.jsx)(eP,{}):null,l?(0,_.jsx)(tP,{}):null,u?(0,_.jsx)(nP,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,_.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,_.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},iP=/startLine=(\d+)/,aP=/\bnoLineNumbers\b/,oP=(0,d.lazy)(()=>$(()=>import(`./mermaid-GHXKKRXX-BWSxGKNn.js`).then(e=>({default:e.Mermaid})),[])),sP=/language-([^\s]+)/;function cP(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function lP(e,t){return e.className===t.className&&cP(e.node,t.node)}var uP=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,dP=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},fP=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},pP=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},mP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`ol`,{className:fN()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>lP(e,t));mP.displayName=`MarkdownOl`;var hP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`li`,{className:fN()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&cP(e.node,t.node));hP.displayName=`MarkdownLi`;var gP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`ul`,{className:fN()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>lP(e,t));gP.displayName=`MarkdownUl`;var _P=(0,d.memo)(({className:e,node:t,...n})=>(0,_.jsx)(`hr`,{className:fN()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>lP(e,t));_P.displayName=`MarkdownHr`;var vP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`span`,{className:fN()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>lP(e,t));vP.displayName=`MarkdownStrong`;var yP=(0,d.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=fN(),{linkSafety:o}=(0,d.useContext)(LF),[s,c]=(0,d.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,d.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),f=(0,d.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),p=(0,d.useCallback)(()=>{c(!1)},[]),m={url:n??``,isOpen:s,onClose:p,onConfirm:f};return o!=null&&o.enabled&&n?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(m):(0,_.jsx)(BN,{...m})]}):(0,_.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>lP(e,t)&&e.href===t.href);yP.displayName=`MarkdownA`;var bP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h1`,{className:fN()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>lP(e,t));bP.displayName=`MarkdownH1`;var xP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h2`,{className:fN()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>lP(e,t));xP.displayName=`MarkdownH2`;var SP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h3`,{className:fN()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>lP(e,t));SP.displayName=`MarkdownH3`;var CP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h4`,{className:fN()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>lP(e,t));CP.displayName=`MarkdownH4`;var wP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h5`,{className:fN()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>lP(e,t));wP.displayName=`MarkdownH5`;var TP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h6`,{className:fN()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>lP(e,t));TP.displayName=`MarkdownH6`;var EP=(0,d.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,d.useContext)(LF);return(0,_.jsx)(rP,{className:t,showControls:uP(i,`table`),showCopy:dP(i,`copy`),showDownload:dP(i,`download`),showFullscreen:dP(i,`fullscreen`),...r,children:e})},(e,t)=>lP(e,t));EP.displayName=`MarkdownTable`;var DP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`thead`,{className:fN()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>lP(e,t));DP.displayName=`MarkdownThead`;var OP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`tbody`,{className:fN()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>lP(e,t));OP.displayName=`MarkdownTbody`;var kP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`tr`,{className:fN()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>lP(e,t));kP.displayName=`MarkdownTr`;var AP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`th`,{className:fN()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>lP(e,t));AP.displayName=`MarkdownTh`;var jP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`td`,{className:fN()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>lP(e,t));jP.displayName=`MarkdownTd`;var MP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`blockquote`,{className:fN()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>lP(e,t));MP.displayName=`MarkdownBlockquote`;var NP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`sup`,{className:fN()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>lP(e,t));NP.displayName=`MarkdownSup`;var PP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`sub`,{className:fN()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>lP(e,t));PP.displayName=`MarkdownSub`;var FP=(0,d.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,d.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,d.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,d.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,d.isValidElement)(e))return e;if(e.type===mP){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,_.jsx)(`section`,{className:t,...r,children:i}):null}return(0,_.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>lP(e,t));FP.displayName=`MarkdownSection`;var IP=(0,d.memo)(({node:e,className:t,children:n,...r})=>{let i=fN(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,d.useContext)(LF),l=WN(),u=oN(),f=(t?.match(sP))?.at(1)??``,p=GN(f);if(a)return(0,_.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let m=e?.properties?.metastring,h=m?.match(iP),g=h?Number.parseInt(h[1],10):void 0,v=g!==void 0&&g>=1?g:void 0,y=!(m&&aP.test(m))&&c!==!1,b=``;if((0,d.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?b=n.props.children:typeof n==`string`&&(b=n),p){let e=p.component;return(0,_.jsx)(d.Suspense,{fallback:(0,_.jsx)(PN,{}),children:(0,_.jsx)(e,{code:b,isIncomplete:u,language:f,meta:m})})}if(f===`mermaid`&&l){let e=uP(s,`mermaid`),n=pP(s,`download`),r=pP(s,`copy`),a=pP(s,`fullscreen`),c=pP(s,`panZoom`),l=e&&(n||r||a);return(0,_.jsx)(d.Suspense,{fallback:(0,_.jsx)(PN,{}),children:(0,_.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,_.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,_.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,_.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,_.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,_.jsx)(qN,{chart:b,config:o?.config}):null,r?(0,_.jsx)(jN,{code:b}):null,a?(0,_.jsx)(JN,{chart:b,config:o?.config}):null]})}):null,(0,_.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,_.jsx)(oP,{chart:b,config:o?.config,showControls:c})})]})})}let x=uP(s,`code`),S=fP(s,`download`),C=fP(s,`copy`);return(0,_.jsx)(SN,{className:t,code:b,isIncomplete:u,language:f,lineNumbers:y,startLine:v,children:x?(0,_.jsxs)(_.Fragment,{children:[S?(0,_.jsx)(NN,{code:b,language:f}):null,C?(0,_.jsx)(jN,{}):null]}):null})},(e,t)=>e.className===t.className&&cP(e.node,t.node));IP.displayName=`MarkdownCode`;var LP=(0,d.memo)(IN,(e,t)=>e.className===t.className&&cP(e.node,t.node));LP.displayName=`MarkdownImg`;var RP=(0,d.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,d.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,_.jsx)(_.Fragment,{children:e})}return(0,_.jsx)(`p`,{...n,children:e})},(e,t)=>lP(e,t));RP.displayName=`MarkdownParagraph`;var zP={ol:mP,li:hP,ul:gP,hr:_P,strong:vP,a:yP,h1:bP,h2:xP,h3:SP,h4:CP,h5:wP,h6:TP,table:EP,thead:DP,tbody:OP,tr:kP,th:AP,td:jP,blockquote:MP,code:IP,img:LP,pre:({children:e})=>(0,d.isValidElement)(e)?(0,d.cloneElement)(e,{"data-block":`true`}):e,sup:NP,sub:PP,p:RP,section:FP},BP=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,VP=/\p{L}/u;function HP(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(BP.test(e))return`rtl`;if(VP.test(e))return`ltr`}return`ltr`}var UP=/^[ \t]{0,3}(`{3,}|~{3,})/,WP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,GP=e=>{let t=e.split(`
|
|
179
|
+
`),n=null,r=0;for(let e of t){let t=UP.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},KP=e=>{let t=e.split(`
|
|
180
|
+
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&WP.test(t))return!0}return!1},qP=()=>e=>{xm(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},JP=[],YP={allowDangerousHtml:!0},XP=new WeakMap,ZP=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=XP.get(e);n||(n=e.name,XP.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=XP.get(r);e||(e=r.name,XP.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},QP=e=>{let t=$P(e),n=e.children||``;return oF(t.runSync(t.parse(n),n),e)},$P=e=>{let t=ZP.get(e);if(t)return t;let n=tF(e);return ZP.set(e,n),n},eF=e=>e.some(e=>Array.isArray(e)?e[0]===Gb:e===Gb),tF=e=>{let t=e.rehypePlugins||JP,n=e.remarkPlugins||JP,r=eF(t)?n:[...n,qP],i=e.remarkRehypeOptions?{...YP,...e.remarkRehypeOptions}:YP;return tj().use(Ik).use(r).use(DA,i).use(t)},nF=e=>e,rF=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},iF=(e,t)=>{for(let n in ZO)if(Object.hasOwn(ZO,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=ZO[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},aF=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},oF=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||nF;xm(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return rF(c,s,a,e.value),s;if(e.type===`element`&&(iF(e,t),aF(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return kO(e,{Fragment:_.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0})},sF=/\[\^[\w-]{1,200}\](?!:)/,cF=/\[\^[\w-]{1,200}\]:/,lF=/<(\w+)[\s>]/,uF=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),dF=new Map,fF=new Map,pF=e=>{let t=e.toLowerCase(),n=dF.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return dF.set(t,r),r},mF=e=>{let t=e.toLowerCase(),n=fF.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return fF.set(t,r),r},hF=(e,t)=>{if(uF.has(t.toLowerCase()))return 0;let n=e.match(pF(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},gF=(e,t)=>{let n=e.match(mF(t));return n?n.length:0},_F=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},vF=e=>{let t=sF.test(e),n=cF.test(e);if(t||n)return[e];let r=PM.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=hF(t,e),o=gF(t,e);for(let t=0;t<r;t+=1)a.push(e);for(let t=0;t<o;t+=1)a.length>0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match(lF);if(e){let n=e[1];hF(t,n)>gF(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(_F(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},yF=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(`
|
|
181
|
+
|
|
182
|
+
`))return t+n+r;let i=n.replace(/\n\n/g,`
|
|
183
|
+
<!---->
|
|
184
|
+
`);return`${t}${(i.startsWith(`
|
|
185
|
+
`)?``:`
|
|
186
|
+
`)+i+(i.endsWith(`
|
|
187
|
+
`)?``:`
|
|
188
|
+
`)}${r}
|
|
189
|
+
|
|
190
|
+
`})}return n},bF=/([\\`*_~[\]|])/g,xF=e=>e.replace(bF,`\\$1`),SF=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+xF(n).replace(/\n\n/g,` `)+r)}return n},CF=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(CF).join(``):``,wF=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));xm(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=CF(e);e.children=t?[{type:`text`,value:t}]:[]}})},TF=()=>e=>{xm(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},EF=/^[ \t]*<[\w!/?-]/,DF=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,OF=e=>typeof e!=`string`||e.length===0||!EF.test(e)?e:e.replace(DF,`$1`),kF={...qb,protocols:{...qb.protocols,href:[...qb.protocols?.href??[],`tel`]},attributes:{...qb.attributes,code:[...qb.attributes?.code??[],`metastring`]}},AF={raw:Gb,sanitize:[ux,kF],harden:[Cm,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},jF={gfm:[EE,{}],codeMeta:TF},MF=Object.values(AF),NF=Object.values(jF),PF={block:` ▋`,circle:` ●`},FF=[`github-light`,`github-dark`],IF={enabled:!0},LF=(0,d.createContext)({shikiTheme:FF,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:IF}),RF=(0,d.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?OF(e):e,l=(0,_.jsx)(QP,{...s,children:c});return(0,_.jsx)(aN.Provider,{value:i,children:a?(0,_.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});RF.displayName=`Block`;var zF=(0,d.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=MF,remarkPlugins:s=NF,className:c,shikiTheme:l=FF,mermaid:u,controls:f=!0,isAnimating:p=!1,animated:m,BlockComponent:h=RF,parseMarkdownIntoBlocksFn:g=vF,caret:v,plugins:y,remend:b,linkSafety:x=IF,lineNumbers:S=!0,allowedTags:C,literalTagContent:w,translations:T,icons:E,prefix:D,onAnimationStart:O,onAnimationEnd:ee,...k})=>{let A=(0,d.useId)(),[j,M]=(0,d.useTransition)(),N=(0,d.useMemo)(()=>lN(D),[D]),te=(0,d.useRef)(null),P=(0,d.useRef)(O),F=(0,d.useRef)(ee);P.current=O,F.current=ee,(0,d.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=te.current;if(te.current=p,i===null){p&&((e=P.current)==null||e.call(P));return}p&&!i?(n=P.current)==null||n.call(P):!p&&i&&((r=F.current)==null||r.call(F))},[p,t]);let ne=(0,d.useMemo)(()=>C?Object.keys(C):[],[C]),re=(0,d.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?aO(e,b):e;return w&&w.length>0&&(n=SF(n,w)),ne.length>0&&(n=yF(n,ne)),n},[e,t,r,b,ne,w]),ie=(0,d.useMemo)(()=>g(re),[re,g]),[ae,I]=(0,d.useState)(ie);(0,d.useEffect)(()=>{t===`streaming`&&!le?M(()=>{I(ie)}):I(ie)},[ie,t]);let L=t===`streaming`?ae:ie,oe=(0,d.useMemo)(()=>n===`auto`?L.map(HP):void 0,[L,n]),se=(0,d.useMemo)(()=>L.map((e,t)=>`${A}-${t}`),[L.length,A]),ce=(0,d.useMemo)(()=>m===!0?`true`:m?JSON.stringify(m):``,[m]),le=(0,d.useMemo)(()=>ce?ce===`true`?iN():iN(m):null,[ce]),ue=(0,d.useMemo)(()=>({shikiTheme:(y?.code)?.getThemes()??l,controls:f,isAnimating:p,lineNumbers:S,mode:t,mermaid:u,linkSafety:x}),[l,f,p,S,t,u,x,y?.code]),de=(0,d.useMemo)(()=>({...ON,...T}),[(0,d.useMemo)(()=>T?JSON.stringify(T):``,[T])]),fe=(0,d.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...zP,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,d.createElement)(t,n):null:(0,d.createElement)(e,n)}return n},[a]),pe=(0,d.useMemo)(()=>{let e=[];return y!=null&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsBefore]),e=[...e,...s],y!=null&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(e=[...e,y.math.remarkPlugin]),e},[s,y?.math,y?.cjk]),me=(0,d.useMemo)(()=>{let e=o;if(C&&Object.keys(C).length>0&&o===MF){let t={...kF,tagNames:[...kF.tagNames??[],...Object.keys(C)],attributes:{...kF.attributes,...C}};e=[AF.raw,[ux,t],AF.harden]}return w&&w.length>0&&(e=[...e,[wF,w]]),y!=null&&y.math&&(e=[...e,y.math.rehypePlugin]),le&&p&&(e=[...e,le.rehypePlugin]),e},[o,y?.math,le,p,C,w]),he=(0,d.useMemo)(()=>{if(!p||L.length===0)return!1;let e=L.at(-1);return GP(e)||KP(e)},[p,L]),ge=(0,d.useMemo)(()=>v&&p&&!he?{"--streamdown-caret":`"${PF[v]}"`}:void 0,[v,p,he]);return t===`static`?(0,_.jsx)(kN.Provider,{value:de,children:(0,_.jsx)(VN.Provider,{value:y??null,children:(0,_.jsx)(LF.Provider,{value:ue,children:(0,_.jsx)(EN,{icons:E,children:(0,_.jsx)(dN.Provider,{value:N,children:(0,_.jsx)(`div`,{className:N(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?HP(re):n,children:(0,_.jsx)(QP,{components:fe,rehypePlugins:me,remarkPlugins:pe,...k,children:re})})})})})})}):(0,_.jsx)(kN.Provider,{value:de,children:(0,_.jsx)(VN.Provider,{value:y??null,children:(0,_.jsx)(LF.Provider,{value:ue,children:(0,_.jsx)(EN,{icons:E,children:(0,_.jsx)(dN.Provider,{value:N,children:(0,_.jsxs)(`div`,{className:N(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,v&&!he?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:ge,children:[L.length===0&&v&&p&&(0,_.jsx)(`span`,{}),L.map((e,t)=>{let a=t===L.length-1,o=p&&a&&GP(e);return(0,_.jsx)(h,{animatePlugin:le,components:fe,content:e,dir:oe?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:me,remarkPlugins:pe,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...k},se[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);zF.displayName=`Streamdown`;var BF=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=DN(),f=fN(),p=(0,d.useRef)(null),m=(0,d.useRef)(null),[h,g]=(0,d.useState)(o),[v,y]=(0,d.useState)({x:0,y:0}),[b,x]=(0,d.useState)(!1),[S,C]=(0,d.useState)({x:0,y:0}),[w,T]=(0,d.useState)({x:0,y:0}),E=(0,d.useCallback)(e=>{g(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),D=(0,d.useCallback)(()=>{E(i)},[E,i]),O=(0,d.useCallback)(()=>{E(-i)},[E,i]),ee=(0,d.useCallback)(()=>{g(o),y({x:0,y:0})},[o]),k=(0,d.useCallback)(e=>{e.preventDefault(),E(e.deltaY>0?-i:i)},[E,i]),A=(0,d.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;x(!0),C({x:e.clientX,y:e.clientY}),T(v);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[v]),j=(0,d.useCallback)(e=>{if(!b)return;e.preventDefault();let t=e.clientX-S.x,n=e.clientY-S.y;y({x:w.x+t,y:w.y+n})},[b,S,w]),M=(0,d.useCallback)(e=>{x(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,d.useEffect)(()=>{let e=p.current;if(e)return e.addEventListener(`wheel`,k,{passive:!1}),()=>{e.removeEventListener(`wheel`,k)}},[k]),(0,d.useEffect)(()=>{let e=m.current;if(e&&b)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,j,{passive:!1}),e.addEventListener(`pointerup`,M),e.addEventListener(`pointercancel`,M),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,j),e.removeEventListener(`pointerup`,M),e.removeEventListener(`pointercancel`,M)}},[b,j,M]),(0,_.jsxs)(`div`,{className:f(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:p,style:{cursor:b?`grabbing`:`grab`},children:[a?(0,_.jsxs)(`div`,{className:f(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,_.jsx)(`button`,{className:f(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:h>=r,onClick:D,title:`Zoom in`,type:`button`,children:(0,_.jsx)(l,{size:16})}),(0,_.jsx)(`button`,{className:f(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:h<=n,onClick:O,title:`Zoom out`,type:`button`,children:(0,_.jsx)(u,{size:16})}),(0,_.jsx)(`button`,{className:f(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:ee,title:`Reset zoom and pan`,type:`button`,children:(0,_.jsx)(c,{size:16})})]}):null,(0,_.jsx)(`div`,{className:f(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:A,ref:m,role:`application`,style:{transform:`translate(${v.x}px, ${v.y}px) scale(${h})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},VF=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=fN(),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(!1),[u,f]=(0,d.useState)(``),[p,m]=(0,d.useState)(``),[h,g]=(0,d.useState)(0),{mermaid:v}=(0,d.useContext)(LF),y=WN(),b=v?.errorComponent,{shouldRender:x,containerRef:S}=qM({immediate:r});if((0,d.useEffect)(()=>{if(x){if(!y){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=y.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);f(a),m(a)}catch(e){p||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,h,x,y]),!(x||u||p))return(0,_.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:S});if(c&&!u&&!p)return(0,_.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:S,children:(0,_.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,_.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,_.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!p)return b?(0,_.jsx)(`div`,{ref:S,children:(0,_.jsx)(b,{chart:e,error:o,retry:()=>g(e=>e+1)})}):(0,_.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:S,children:[(0,_.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,_.jsxs)(`details`,{className:a(`mt-2`),children:[(0,_.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,_.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let C=u||p;return(0,_.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:S,children:(0,_.jsx)(BF,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,_.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:C},role:`img`})})})},HF=Object.defineProperty,UF=Object.getOwnPropertyDescriptor,WF=Object.getOwnPropertyNames,GF=Object.prototype.hasOwnProperty,KF=(e,t)=>{let n={};for(var r in e)HF(n,r,{get:e[r],enumerable:!0});return t||HF(n,Symbol.toStringTag,{value:`Module`}),n},qF=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=WF(t),a=0,o=i.length,s;a<o;a++)s=i[a],!GF.call(e,s)&&s!==n&&HF(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=UF(t,s))||r.enumerable});return e},JF=(e,t,n)=>(qF(e,t,`default`),n&&qF(n,t,`default`)),YF=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-9R7RjkQK.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>$(()=>import(`./actionscript-3-CNowah7a.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-D5HmrmpD.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-DlSp9HPG.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4,5])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-B29Ypg6B.js`),__vite__mapDeps([6,2,1,3,4,5,7])))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-D37U8o0r.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-CszkG4lQ.js`),[]))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-BASZ7uB_.js`),__vite__mapDeps([8,4,1,3,5,9,10,11])))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-Ajt9gmC_.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-DpGk8XWf.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-BdDORSgx.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-DGLRM3OU.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-l-XABzN2.js`),__vite__mapDeps([12,4,1,5,9,13,14,15])))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-B-J9te9x.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-CZ8CAKmi.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>$(()=>import(`./bat-fNtaIqKE.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-9imagnS2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-QTBYpUPn.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-CzFWvn9u.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-DLWEubga.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-VVa6lZ01.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-B3_bxlV2.js`),__vite__mapDeps([16,4,1,17,3,5,9,18,10,11])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-D3u1l2dW.js`),__vite__mapDeps([19,20])))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-CgTSul4N.js`).then(e=>e.n),__vite__mapDeps([21,1])))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-SmmwBAzR.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-DVNAI4pJ.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-CoQzhJ_o.js`),__vite__mapDeps([22,23])))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-BJs8u8xG.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DpYoDXXl.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-CdseusyP.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-D_kesMA-.js`),__vite__mapDeps([24,3,1,4,5,11])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-5EAeZxPo.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-OkUuMGe9.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-DF15_0rk.js`),__vite__mapDeps([25,5,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-DCRDlc4V.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>$(()=>import(`./coq-acwo70uY.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-Cudwe5mG.js`).then(e=>e.n),__vite__mapDeps([26,1,27,21,28,18])))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-DV9Nijjb.js`),__vite__mapDeps([29,21,1,4,3,5,30,18])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-Cqz84DXU.js`),[]))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-Dr0v2l-V.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-CqpUSPyF.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-D4-Hq7Jx.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-CXMVfSpG.js`),[]))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-Cc_KoyiC.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-BIyV3H7V.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-DtoJMuz5.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-BkIJ2CMP.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-RUsawely.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-CDpVZYy7.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-DWnlamm2.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-MNBsfIGU.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-BosfXYh1.js`),__vite__mapDeps([31,17,3,1,4,5,15])))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-Dw_vsdUl.js`),__vite__mapDeps([32,3,1,4,5])))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-DPfFNNkG.js`),__vite__mapDeps([33,27,1,21])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-CVlPXEEa.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-DZuoCU5t.js`),__vite__mapDeps([34,3,1,4,5,35,21,26,27,28,18,36,37,14,15,38,39,30,10,11,40])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-CqHCISqs.js`),__vite__mapDeps([41,42])))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-BsP4yvxI.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-CimYqIk1.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-O-Iic89O.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-60ZQAHDk.js`),__vite__mapDeps([43,44])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-BVNtEstX.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-Ch5ZVinn.js`),__vite__mapDeps([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-CqNLhJW1.js`),__vite__mapDeps([46,47,48])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-D-FJCTl3.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-Czvzt8dR.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-Mnf_jXpg.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DzkYuFEO.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-CSWECvqq.js`),__vite__mapDeps([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-MUvuytPe.js`),__vite__mapDeps([51,30,1])))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-MAXpOqqF.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-HDDEErW7.js`),__vite__mapDeps([52,4,1,3,5,15])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-Dq0_BflX.js`),__vite__mapDeps([53,4,1,3,5,15])))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-C4rvog10.js`).then(e=>e.n),__vite__mapDeps([27,1,21])))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-BNADkWgR.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-BRQvwTQM.js`),[]))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-D6k5URxL.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-Dg0Ewf8Q.js`).then(e=>e.n),__vite__mapDeps([36,1,5,37,14,15])))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CxG1cXrE.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-DjE76gIx.js`),__vite__mapDeps([54,3,1,4,5,18])))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-DyIc_iO2.js`).then(e=>e.n),__vite__mapDeps([38,1,4,5])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-DQ4X08Zf.js`),__vite__mapDeps([55,4,1,3,5,40])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-BZ8bGMYA.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-1eAUKQ0B.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-DQqvKq2I.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-DNWMSWLN.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Df5oFh9i.js`),[]))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-GfHBuoLs.js`).then(e=>e.n),__vite__mapDeps([3,1,4,5])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-ChSmSZXY.js`),__vite__mapDeps([17,3,1,4,5])))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-DMTBhQm8.js`),__vite__mapDeps([56,36,1,5,37,14,15,9,30,10,11])))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-XIpACwjS.js`),__vite__mapDeps([57,58,36,1,5,37,14,15,10,11])))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-PnV_FpS-.js`),__vite__mapDeps([59,60])))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-DaILHjW8.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-BA6_JyKt.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-DqXMcqXm.js`),[]))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-Ds1cyVrp.js`).then(e=>e.n),__vite__mapDeps([11,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-Cx8CXBJR.js`).then(e=>e.n),__vite__mapDeps([5,1])))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-8ATGhxJO.js`),__vite__mapDeps([61,3,1,4,5])))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-CSsYnr7O.js`),__vite__mapDeps([62,5,1])))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-CY14kIzN.js`).then(e=>e.n),__vite__mapDeps([9,1])))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-Cus7zL-r.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-RzqrtWTz.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CLcLUtvq.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet--7yRuAzt.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-Cid5Rr2Y.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-DmH5dwMF.js`).then(e=>e.n),__vite__mapDeps([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-vjG00jwO.js`),__vite__mapDeps([63,26,1,27,21,28,18,5,23,64])))},{id:`just`,name:`Just`,import:(()=>$(()=>import(`./just-C7G3KFgN.js`),__vite__mapDeps([65,5,1,66,4,3,18,10,11,23,35,21,26,27,28,36,37,14,15,38,39,30,40])))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-D2MbAIKj.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-fpq87Jdo.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-B1r4va-8.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-D8-NgtPj.js`),__vite__mapDeps([67,68,64,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-B9Xp-kaJ.js`),[]))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-BKjOc0Gl.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-D2m0XXrV.js`),__vite__mapDeps([69,4,1,3,5,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-XDy97SdL.js`),[]))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-tjGJZ7jx.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-rCQwad-6.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-BeSXusec.js`).then(e=>e.n),__vite__mapDeps([39,1,21])))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-C0wE4YeK.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-DZENZd8z.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-CbgVmtS5.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-DPnRthJQ.js`),__vite__mapDeps([70,4,1,71,7,15])))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-BJwkjxyL.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-BLdFHYKv.js`),__vite__mapDeps([72,17,3,1,4,5,42,40])))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-BvkytFG9.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-Ctx7uNrT.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-ByaU0dEX.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-CqhYERP_.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-C4BfwLm6.js`),[]))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-DOj5FawL.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-CDHYPJWr.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-c8YCPRRb.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-o7ZjyFmf.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-u-hq5m-a.js`),__vite__mapDeps([75,39,1,21])))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-B5b6_jZr.js`),__vite__mapDeps([76,21,1,4,27,3,5,42,10,11])))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-Csr5leD-.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell-IZVQdI7Z.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-DD1i5sf2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-CtzOCe2w.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-BlMDMjEj.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-CoWSDSNi.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-D3gRRPUh.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-G3gJIkHz.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-DdF12AsD.js`),__vite__mapDeps([66,4,1,3,5,18,10,11])))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-CyQZnE0l.js`),__vite__mapDeps([77,4,1,3,5,9,18,10,11])))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-DdsryWcC.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-C2yEtnCG.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-Dy7ytuR1.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-CjLVWIyd.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-DiNtjF5e.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-iC4Ra9LJ.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>$(()=>import(`./powershell-Ch2YpFAx.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-HWctQCpn.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-DHAsH4Hf.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-mTghX89X.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-HwoxZo9M.js`),__vite__mapDeps([78,4,1,3,5])))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-D1Zcnrr5.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-s82m5f0Y.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-BhsI1K6K.js`),[]))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-CysuucQ6.js`),__vite__mapDeps([79,5,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-Bzkc2Njy.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-CKbozdtF.js`),[]))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-BKej5r_k.js`).then(e=>e.n),__vite__mapDeps([64,1])))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-CUDoXUwy.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-XPAjN9OU.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-ZpEr_C9H.js`),__vite__mapDeps([80,81,3,1,4,5])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-B0B_plbq.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-CK-1EP63.js`).then(e=>e.n),__vite__mapDeps([28,1])))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-DhoFe2Y7.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-CKx_Jisq.js`),[]))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-qyvgw9vu.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-Dy_ItAfo.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-CjO4XFKz.js`),__vite__mapDeps([82,83,26,1,27,21,28,18,17,3,4,5,23,35,36,37,14,15,38,39,30,10,11,40])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-CZgIYPlP.js`),__vite__mapDeps([35,21,1,26,27,28,18,4,36,5,37,14,15,38,3,39,30,10,11,40])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-CNEVkiWF.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-DPGT0TjQ.js`),__vite__mapDeps([84,18,1])))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-D2nye32F.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-B8greAnE.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-Ci_aquns.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-YARKxu2i.js`).then(e=>e.n),__vite__mapDeps([7,1,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-D4tJqBiC.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-JWcsxey4.js`),__vite__mapDeps([85,86])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-CxhArCCJ.js`).then(e=>e.n),__vite__mapDeps([30,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-DYmuifdt.js`),__vite__mapDeps([87,30,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>$(()=>import(`./smalltalk-BwSireXb.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-CIUlntDs.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-7iHZG9Jz.js`),__vite__mapDeps([88,3,1,4,5])))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-BGRSvFxd.js`),__vite__mapDeps([89,90])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-DueVPk5k.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-Q6zkgi_w.js`).then(e=>e.n),__vite__mapDeps([18,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-DKIMErlp.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-lXN9BRaz.js`),__vite__mapDeps([91,18,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-oqceM0yt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-l0SGzwOs.js`),__vite__mapDeps([92,5,1])))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-BM89dRu0.js`),__vite__mapDeps([93,4,1,5,13,15])))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-foA31xPc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-CCSGcM60.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BymS_eIJ.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-Ccc0122j.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-o38sfjeU.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-DISPE-5Q.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-D1GoDFsp.js`),__vite__mapDeps([94,4,1,95,5])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-V85Kewcz.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-CxEkh6NI.js`),__vite__mapDeps([68,64,1])))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-uEjeW8NC.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-B88Nbzcl.js`),__vite__mapDeps([96,4,1,27,21,3,5,18,15,10,11])))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-DjGwUc04.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-5O-M05V0.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-PTxTluYn.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-B3Kws0Fb.js`),__vite__mapDeps([97,4,1,5,77,3,9,18,10,11,23,35,21,26,27,28,36,37,14,15,38,39,30,40,7])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-hRweav8r.js`).then(e=>e.n),__vite__mapDeps([15,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-N7-U_jBZ.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-DSQh9HII.js`),[]))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-obK6h_YW.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-DXa9jSo-.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>$(()=>import(`./vb-DEPbtYq-.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-Bs-185hK.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-CBukgB2Z.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-C1cRY0x6.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-CT36qSUr.js`),__vite__mapDeps([98,4,1,17,3,5,9,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-bJyjqZnI.js`),__vite__mapDeps([99,5,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-BLqV15Pm.js`),__vite__mapDeps([100,4,1,5,71,13,7,101])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-BxVot6rR.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-o5uYkU9G.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-MnC4h24X.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BgfkHnVi.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-DCOnP3yk.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-5UDEI7sp.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-vvgPlu2n.js`),[]))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-DyJ3D9rW.js`).then(e=>e.n),__vite__mapDeps([10,1,11])))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-BOsdDgv_.js`),__vite__mapDeps([102,10,1,11])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-C-G727Y6.js`).then(e=>e.n),__vite__mapDeps([40,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BPjqX0BY.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-Bd91oU8r.js`),[]))}],XF=Object.fromEntries(YF.map(e=>[e.id,e.import])),ZF=Object.fromEntries(YF.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),QF={...XF,...ZF},$F=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>$(()=>import(`./andromeeda-i_b3g2bn.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>$(()=>import(`./aurora-x-DdfqxvM_.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>$(()=>import(`./ayu-dark-BdNJk5qF.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>$(()=>import(`./ayu-light-DkLNbAkT.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>$(()=>import(`./ayu-mirage-BoyGjGHX.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-frappe-DXCXlnyU.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>$(()=>import(`./catppuccin-latte-BXW2qYGv.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-macchiato--32cesHH.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-mocha-BBRFilGN.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>$(()=>import(`./dark-plus-C0kLyDb3.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>$(()=>import(`./dracula-QP8aKUFB.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>$(()=>import(`./dracula-soft-BNzyYlRI.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>$(()=>import(`./everforest-dark-DSK976eP.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>$(()=>import(`./everforest-light-BkaBVm1r.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>$(()=>import(`./github-dark-C98YWDhk.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>$(()=>import(`./github-dark-default-CDGuVkyn.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>$(()=>import(`./github-dark-dimmed-CarTohA3.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>$(()=>import(`./github-dark-high-contrast-CsjOICAd.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>$(()=>import(`./github-light-D17m3GP4.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>$(()=>import(`./github-light-default-DiMoa1ZI.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>$(()=>import(`./github-light-high-contrast-DGwHD8Ty.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-hard-Cnb1fzry.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-medium-Cu5j8v_d.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-soft-BghHDwrM.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-hard-BUhLUxUB.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-medium-GXeiXGL9.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-soft-pTZgKx7j.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>$(()=>import(`./horizon-BCbhfxa1.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>$(()=>import(`./horizon-bright-CXcxBcih.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>$(()=>import(`./houston-DHnjBE42.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-dragon-BxDDNs-7.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>$(()=>import(`./kanagawa-lotus-BQyifewU.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-wave-BsJGVIZT.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>$(()=>import(`./laserwave-CrjhMkHv.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>$(()=>import(`./light-plus-DFt9HI_B.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>$(()=>import(`./material-theme-YhiuxyiP.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>$(()=>import(`./material-theme-darker-CKeuyK7B.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>$(()=>import(`./material-theme-lighter-C56RzTfM.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>$(()=>import(`./material-theme-ocean-DUos8xKe.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>$(()=>import(`./material-theme-palenight-CZBKx4B1.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>$(()=>import(`./min-dark-BA-rwgF3.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>$(()=>import(`./min-light-DHUVhXnm.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>$(()=>import(`./monokai-D3MyQCxG.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>$(()=>import(`./night-owl-NHZjGVLB.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>$(()=>import(`./night-owl-light-DcKosvl7.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>$(()=>import(`./nord-DomFMWpF.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>$(()=>import(`./one-dark-pro-DWENJxB_.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>$(()=>import(`./one-light-CEeF6aqP.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>$(()=>import(`./plastic-CwUA_4-2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>$(()=>import(`./poimandres-u68WOWhl.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>$(()=>import(`./red-8aRo80UF.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-R3f76h4_.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>$(()=>import(`./rose-pine-dawn-BS09rtpK.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-moon-B4Q4DiPG.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>$(()=>import(`./slack-dark-BcN7KJ02.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>$(()=>import(`./slack-ochin-D4iInQ9w.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>$(()=>import(`./snazzy-light-B45TfPsv.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>$(()=>import(`./solarized-dark-8yYW1wLs.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>$(()=>import(`./solarized-light-BY3Hr0Ud.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>$(()=>import(`./synthwave-84-B002ZU4p.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>$(()=>import(`./tokyo-night-BLn5KNCP.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>$(()=>import(`./vesper-B7BneC5G.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>$(()=>import(`./vitesse-black-D3_12zni.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>$(()=>import(`./vitesse-dark-B_iF7INE.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>$(()=>import(`./vitesse-light-DbrrMtxY.js`),[]))}].map(e=>[e.id,e.import])),eI=e({createOnigurumaEngine:()=>OI,getDefaultWasmLoader:()=>DI,loadWasm:()=>xI,setDefaultWasmLoader:()=>EI}),tI=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function nI(){return 2147483648}function rI(){return typeof performance<`u`?performance.now():Date.now()}var iI=(e,t)=>e+(t-e%t)%t;async function aI(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=nI();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,iI(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:rI,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var oI=Object.defineProperty,sI=(e,t,n)=>t in e?oI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cI=(e,t,n)=>sI(e,typeof t==`symbol`?t:t+``,n),lI=null;function uI(e){throw new tI(e.UTF8ToString(e.getLastOnigError()))}var dI=class e{constructor(t){cI(this,`utf16Length`),cI(this,`utf8Length`),cI(this,`utf16Value`),cI(this,`utf8Value`),cI(this,`utf16OffsetToUtf8`),cI(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},fI=class e{constructor(t){if(cI(this,`id`,++e.LAST_ID),cI(this,`_onigBinding`),cI(this,`content`),cI(this,`utf16Length`),cI(this,`utf8Length`),cI(this,`utf16OffsetToUtf8`),cI(this,`utf8OffsetToUtf16`),cI(this,`ptr`),!lI)throw new tI(`Must invoke loadWasm first.`);this._onigBinding=lI,this.content=t;let n=new dI(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=lI.omalloc(1e4),e._sharedPtrInUse=!0,lI.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(lI)}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===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};cI(fI,`LAST_ID`,0),cI(fI,`_sharedPtr`,0),cI(fI,`_sharedPtrInUse`,!1);var pI=fI,mI=class{constructor(e){if(cI(this,`_onigBinding`),cI(this,`_ptr`),!lI)throw new tI(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new dI(e[r]);t[r]=i.createString(lI),n[r]=i.utf8Length}let r=lI.omalloc(4*e.length);lI.HEAPU32.set(t,r/4);let i=lI.omalloc(4*e.length);lI.HEAPU32.set(n,i/4);let a=lI.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)lI.ofree(t[n]);lI.ofree(i),lI.ofree(r),a===0&&uI(lI),this._onigBinding=lI,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new pI(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function hI(e){return typeof e.instantiator==`function`}function gI(e){return typeof e.default==`function`}function _I(e){return e.data!==void 0}function vI(e){return typeof Response<`u`&&e instanceof Response}function yI(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var bI;function xI(e){if(bI)return bI;async function t(){lI=await aI(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),hI(n)?n=await n.instantiator(t):gI(n)?n=await n.default(t):(_I(n)&&(n=n.data),vI(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await CI(n)(t):await wI(n)(t):yI(n)||n instanceof WebAssembly.Module?n=await SI(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await SI(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return bI=t(),bI}function SI(e){return t=>WebAssembly.instantiate(e,t)}function CI(e){return t=>WebAssembly.instantiateStreaming(e,t)}function wI(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var TI;function EI(e){TI=e}function DI(){return TI}async function OI(e){return e&&await xI(e),{createScanner(e){return new mI(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new pI(e)}}}var kI=KF({});JF(kI,eI);var AI=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function jI(e){return MI(e)}function MI(e){return Array.isArray(e)?NI(e):e instanceof RegExp?e:typeof e==`object`?PI(e):e}function NI(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=MI(e[n]);return t}function PI(e){let t={};for(let n in e)t[n]=MI(e[n]);return t}function FI(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function II(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?II(e.substring(0,e.length-1)):e.substr(~t+1)}var LI=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,RI=class{static hasCaptures(e){return e===null?!1:(LI.lastIndex=0,LI.test(e))}static replaceCaptures(e,t,n){return e.replace(LI,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function zI(e,t){return e<t?-1:+(e>t)}function BI(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=zI(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function VI(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function HI(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var UI=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},WI=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(YI(e),t)}static createFromParsedTheme(e,t){return QI(e,t)}_cachedMatchRoot=new UI(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>KI(e.parent,t.parentScopes));return n?new JI(n.fontStyle,n.foreground,n.background):null}},GI=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function KI(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!qI(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function qI(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var JI=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function YI(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&VI(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&VI(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new XI(l,u,e,o,s,c)}}return n}var XI=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},ZI=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(ZI||{});function QI(e,t){e.sort((e,t)=>{let n=zI(e.scope,t.scope);return n!==0||(n=BI(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new $I(t),o=new JI(n,a.getId(r),a.getId(i)),s=new nL(new tL(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new WI(a,o,s)}var $I=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},eL=Object.freeze([]),tL=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||eL,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},nL=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),tL.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(BI(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new tL(e,t,n,r,i))}},rL=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,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(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=aL(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function iL(e){return e}function aL(e){return e}function oL(e,t){let n=[],r=cL(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(sL(i)){let e=[];do e.push(i),i=r.next();while(sL(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function sL(e){return!!e&&!!e.match(/[\w\.:]+/)}function cL(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function lL(e){typeof e.dispose==`function`&&e.dispose()}var uL=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},dL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},fL=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},pL=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new uL(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new fL;for(let n of e)mL(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof uL){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function mL(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof uL?gL({baseGrammar:a,selfGrammar:i},r):hL(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new uL(e))}function hL(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];_L([r],t,n)}}function gL(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&_L(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&_L(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function _L(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?FI({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&_L(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=CL(i);switch(a.kind){case 0:gL({...t,selfGrammar:t.baseGrammar},n);break;case 1:gL(t,n);break;case 2:hL(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?hL(a.ruleName,i,n):gL(i,n)}else a.kind===4?n.add(new dL(a.scopeName,a.ruleName)):n.add(new uL(a.scopeName));break}}}var vL=class{kind=0},yL=class{kind=1},bL=class{constructor(e){this.ruleName=e}kind=2},xL=class{constructor(e){this.scopeName=e}kind=3},SL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function CL(e){if(e===`$base`)return new vL;if(e===`$self`)return new yL;let t=e.indexOf(`#`);return t===-1?new xL(e):t===0?new bL(e.substring(1)):new SL(e.substring(0,t),e.substring(t+1))}var wL=/\\(\d+)/,TL=/\\(\d+)/g,EL=-1,DL=-2;function OL(e){return e}function kL(e){return e}var AL=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=RI.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=RI.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${II(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:RI.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:RI.replaceCaptures(this._contentName,e,t)}},jL=class extends AL{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},ML=class extends AL{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new LL(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new RL,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},NL=class extends AL{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new RL,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},PL=class extends AL{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new LL(i,this.id),this.beginCaptures=a,this._end=new LL(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new RL;for(let t of this.patterns)e.getRule(t).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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},FL=class extends AL{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new LL(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new LL(o,DL),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new RL;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new RL,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},IL=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new jL(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ML(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=FI({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new NL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new FL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new PL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=CL(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof NL||e instanceof PL||e instanceof FL)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},LL=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=wL.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return TL.lastIndex=0,this.source.replace(TL,(e,t)=>HI(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},RL=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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(),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(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new zL(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new zL(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},zL=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
191
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},BL=class{constructor(e,t){this.languageId=e,this.tokenType=t}},VL=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new BL(e,8),this._embeddedLanguagesMatcher=new HL(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new BL(0,0);_getBasicScopeAttributes=new UI(e=>new BL(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},HL=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>HI(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var UL=!1,WL=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function GL(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=KL(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new WL(i,!0);f()}return new WL(i,!1);function f(){let o=qL(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===EL){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),$L(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof PL){let r=o;$L(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof FL){let r=o;$L(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if($L(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function KL(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof FL&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ZL(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==DL){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),$L(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function qL(e,t,n,r,i,a){let o=JL(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=YL(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function JL(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=XL(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function YL(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=XL(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function XL(e,t,n,r,i){return UL?{ruleScanner:e.compile(t,n),findOptions:QL(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ZL(e,t,n,r,i){return UL?{ruleScanner:e.compileWhile(t,n),findOptions:QL(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function QL(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function $L(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.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,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));GL(e,p,n&&d.start===0,d.start,f,i,!1,0),lL(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new eR(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var eR=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function tR(e,t,n,r,i,a,o,s){return new aR(e,t,n,r,i,a,o,s)}function nR(e,t,n,r,i){let a=oL(t,rR),o=IL.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function rR(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(iR(t[r],e))return n=r+1,!0;return!1})}function iR(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var aR=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new VL(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=oR(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=oL(e,rR);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)nR(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&nR(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(OL(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[kL(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=oR(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=IL.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===cR.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=rL.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?sR.createRootAndLookUpScopeName(a,r,this):sR.createRoot(`unknown`,r),t=new cR(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
192
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new uR(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=GL(this,a,i,0,t,s,!0,r);return lL(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function oR(e,t){return e=jI(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var sR=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=GI.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new GI(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new GI(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),rL.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},cR=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?sR.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:kL(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=sR.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,OL(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,sR.fromExtension(r,n.contentNameScopesList))}},lR=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):oL(e,rR).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>oL(e,rR).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},uR=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=rL.set(n,0,iL(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=rL.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},dR=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,tR(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},fR=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new dR(WI.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(WI.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new lR(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new pL(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},pR=cR.NULL;function mR(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function hR(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function gR(e){return Array.isArray(e)?e:[e]}async function _R(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function vR(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function yR(e){return e===`ansi`||vR(e)}function bR(e){return e===`none`}function xR(e){return bR(e)}function SR(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var CR={light:`#333333`,dark:`#bbbbbb`},wR={light:`#fffffe`,dark:`#1e1e1e`},TR=`__shiki_resolved`;function ER(e){if(e?.[TR])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?CR.light:CR.dark,n||=t.type===`light`?wR.light:wR.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,TR,{enumerable:!1,writable:!1,value:!0}),t}async function DR(e){return Array.from(new Set((await Promise.all(e.filter(e=>!yR(e)).map(async e=>await _R(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function OR(e){return(await Promise.all(e.map(async e=>xR(e)?null:ER(await _R(e))))).filter(e=>!!e)}function kR(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new AI(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var AR=class extends fR{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=ER(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=WI.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=kR(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new AI(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return 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);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},jR=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},MR=0;function NR(e){MR+=1,e.warnings!==!1&&MR>=10&&MR%10==0&&console.warn(`[Shiki] ${MR} 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 t=!1;if(!e.engine)throw new AI("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(ER),i=new AR(new jR(e.engine,n),r,n,e.langAlias),a;function o(t){return kR(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new AI(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new AI(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await DR(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await OR(e))}function g(){if(t)throw new AI(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--MR)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function PR(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([OR(e.themes||[]),DR(e.langs||[]),e.engine]);return NR({...e,themes:t,langs:n,engine:r})}var FR=new WeakMap;function IR(e,t){FR.set(e,t)}function LR(e){return FR.get(e)}var RR=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(gR(n).map(e=>[e,pR])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return zR(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function zR(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function BR(e,t){if(!(e instanceof RR))throw new AI(`Invalid grammar state`);return e.getInternalStack(t)}function VR(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(vR(e.resolveLangAlias(n.lang||`text`))||bR(r))return SR(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new AI(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new AI(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return UR(t,o,i,a,n)}function HR(...e){if(e.length===2)return LR(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(vR(i)||bR(a))throw new AI(`Plain language does not have grammar state`);if(i===`ansi`)throw new AI(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new RR(WR(n,c,o,s,r).stateStack,c.name,o.name)}function UR(e,t,n,r,i){let a=WR(e,t,n,r,i),o=new RR(a.stateStack,t.name,n.name);return IR(a.tokens,o),a.tokens}function WR(e,t,n,r,i){let a=mR(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=SR(e),l=i.grammarState?BR(i.grammarState,n.name)??pR:i.grammarContextCode==null?pR:WR(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=hR(r[rL.getForeground(s)],a),l=rL.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?GR(t.scopes):KR(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function GR(e){return e.map(e=>({scopeName:e}))}function KR(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:YR(e,i,t.slice(0,r))}}return n}function qR(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function JR(e,t,n){if(!qR(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)qR(e[r],n[i])&&--r,--i;return r===-1}function YR(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(JR(e,t,n)){r.push(a);break}return r}function XR(e,t,n,r=VR){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:LR(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=ZR(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new RR(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&IR(s,c),s}function ZR(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var QR=/["&'<>`]/g,$R=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ez=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tz=/[|\\{}()[\]^$+*?.]/g,nz=new WeakMap;function rz(e,t){if(e=e.replace(t.subset?iz(t.subset):QR,r),t.subset||t.escapeOnly)return e;return e.replace($R,n).replace(ez,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function iz(e){let t=nz.get(e);return t||(t=az(e),nz.set(e,t)),t}function az(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(tz,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var oz=/[\dA-Fa-f]/;function sz(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!oz.test(String.fromCharCode(t))?r:r+`;`}var cz=/\d/;function lz(e,t,n){let r=`&#`+String(e);return n&&t&&!cz.test(String.fromCharCode(t))?r:r+`;`}var uz=`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`.split(`.`),dz={nbsp:`\xA0`,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:`€`},fz=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],pz={}.hasOwnProperty,mz={},hz;for(hz in dz)pz.call(dz,hz)&&(mz[dz[hz]]=hz);var gz=/[^\dA-Za-z]/;function _z(e,t,n,r){let i=String.fromCharCode(e);if(pz.call(mz,i)){let e=mz[i],a=`&`+e;return n&&uz.includes(e)&&!fz.includes(e)&&(!r||t&&t!==61&&gz.test(String.fromCharCode(t)))?a:a+`;`}return``}function vz(e,t,n){let r=sz(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=_z(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=lz(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function yz(e,t){return rz(e,Object.assign({format:vz},t))}var bz=/^>|^->|<!--|-->|--!>|<!-$/g,xz=[`>`],Sz=[`<`,`>`];function Cz(e,t,n,r){return r.settings.bogusComments?`<?`+yz(e.value,Object.assign({},r.settings.characterReferences,{subset:xz}))+`>`:`<!--`+e.value.replace(bz,i)+`-->`;function i(e){return yz(e,Object.assign({},r.settings.characterReferences,{subset:Sz}))}}function wz(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var Tz=Oz(1),Ez=Oz(-1),Dz=[];function Oz(e){return t;function t(t,n,r){let i=t?t.children:Dz,a=(n||0)+e,o=i[a];if(!r)for(;o&&dO(o);)a+=e,o=i[a];return o}}var kz={}.hasOwnProperty;function Az(e){return t;function t(t,n,r){return kz.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var jz=Az({body:Pz,caption:Mz,colgroup:Mz,dd:Rz,dt:Lz,head:Mz,html:Nz,li:Iz,optgroup:Bz,option:Vz,p:Fz,rp:zz,rt:zz,tbody:Uz,td:Kz,tfoot:Wz,th:Kz,thead:Hz,tr:Gz});function Mz(e,t,n){let r=Tz(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&dO(r.value.charAt(0)))}function Nz(e,t,n){let r=Tz(n,t);return!r||r.type!==`comment`}function Pz(e,t,n){let r=Tz(n,t);return!r||r.type!==`comment`}function Fz(e,t,n){let r=Tz(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Iz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Lz(e,t,n){let r=Tz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Rz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function zz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Bz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Vz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Hz(e,t,n){let r=Tz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Uz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Wz(e,t,n){return!Tz(n,t)}function Gz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Kz(e,t,n){let r=Tz(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var qz=Az({body:Xz,colgroup:Zz,head:Yz,html:Jz,tbody:Qz});function Jz(e){let t=Tz(e,-1);return!t||t.type!==`comment`}function Yz(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Xz(e){let t=Tz(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&dO(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Zz(e,t,n){let r=Ez(n,t),i=Tz(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&jz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Qz(e,t,n){let r=Ez(n,t),i=Tz(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&jz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var $z={name:[[`
|
|
193
|
+
\f\r &/=>`.split(``),`
|
|
194
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
195
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
196
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
197
|
+
\f\r &>`.split(``),`\0
|
|
198
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
199
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
200
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function eB(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=wh);let l=tB(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!qz(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!jz(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function tB(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=nB(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function nB(e,t,n){let r=bh(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=yz(r.attribute,Object.assign({},e.settings.characterReferences,{subset:$z.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Eh:Ah)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=yz(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:$z.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&dx(n,o)>dx(n,e.alternative)&&(o=e.alternative),s=o+yz(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?$z.single:$z.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var rB=[`<`,`&`];function iB(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:yz(e.value,Object.assign({},r.settings.characterReferences,{subset:rB}))}function aB(e,t,n,r){return r.settings.allowDangerousHtml?e.value:iB(e,t,n,r)}function oB(e,t,n,r){return r.all(e)}var sB=tg(`type`,{invalid:cB,unknown:lB,handlers:{comment:Cz,doctype:wz,element:eB,raw:aB,root:oB,text:iB}});function cB(e){throw Error("Expected node, not `"+e+"`")}function lB(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var uB={},dB={},fB=[];function pB(e,t){let n=t||uB,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:mB,all:hB,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||hg,characterReferences:n.characterReferences||dB,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?wh:Ch,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function mB(e,t,n){return sB(e,t,n,this)}function hB(e){let t=[],n=e&&e.children||fB,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function gB(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function _B(e){let t=SR(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function vB(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var yB=`light-dark()`,bB=[`color`,`background-color`];function xB(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function SB(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?xB(e,t):e})):e}function CB(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>wB(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&bB.includes(a))if(r===yB&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new AI('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function wB(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&ZI.Italic&&(t[`font-style`]=`italic`),e.fontStyle&ZI.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&ZI.Underline&&n.push(`underline`),e.fontStyle&ZI.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function TB(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function EB(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=_B(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new AI(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new AI(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new AI(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));DB(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return SB(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new AI(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=OB(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new AI(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new AI(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&gB(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function DB(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new AI(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new AI(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function OB(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(OB).join(``):``}var kB=[EB()];function AB(e){let t=jB(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...kB]}function jB(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var MB=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],NB={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function PB(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function FB(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function IB(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)NB[r]&&t.push({type:`setDecoration`,value:NB[r]});else if(r<=29){let e=NB[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:MB[r-30]}});else if(r===38){let n=FB(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:MB[r-40]}});else if(r===48){let n=FB(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:MB[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:MB[r-100+8]}})}return t}function LB(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=PB(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=IB(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var RB={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 zB(e=RB){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<MB.length;e++)r.push(t(MB[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var BB={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 VB(e,t,n){let r=mR(e,n),i=SR(t),a=zB(Object.fromEntries(MB.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||BB[t]]}))),o=LB();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=hR(i,r),o=hR(o,r),n.decorations.has(`dim`)&&(i=HB(i));let s=ZI.None;return n.decorations.has(`bold`)&&(s|=ZI.Bold),n.decorations.has(`italic`)&&(s|=ZI.Italic),n.decorations.has(`underline`)&&(s|=ZI.Underline),n.decorations.has(`strikethrough`)&&(s|=ZI.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function HB(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function UB(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!vR(r)&&!bR(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return VB(r,t,n)}return VR(e,t,n)}function WB(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new AI("`themes` option must not be empty");let p=XR(e,t,n,UB);if(c=LR(p),l&&yB!==l&&!f.find(e=>e.color===l))throw new AI(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>CB(e,h,u,l,d))),c&&IR(a,c);let g=f.map(e=>mR(e.theme,n));i=GB(f,m,g,u,l,`fg`,d),r=GB(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=mR(n.theme,n);a=UB(e,t,n);let l=e.getTheme(n.theme);r=hR(l.bg,s),i=hR(l.fg,s),o=l.name,c=LR(a)}else throw new AI("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function GB(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=hR(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===yB&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new AI('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${hR(t[r][a],n[r])||`inherit`}, ${hR(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function KB(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>KB(e,t,n),codeToTokens:(t,n)=>WB(e,t,n)}){let i=t;for(let e of AB(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=WB(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=JB(a):d===`never`&&(a=YB(a)),f&&(a=XB(a));let p={...r,get source(){return i}};for(let e of AB(n))a=e.tokens?.call(p,a)||a;return qB(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function qB(e,t,n,r=LR(e)){let i=AB(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:gB,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
201
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=TB(a.htmlStyle||wB(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&IR(m,r),m}function JB(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&ZI.Underline||i.fontStyle&ZI.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function YB(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function XB(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=TB(e.htmlStyle||wB(e)),i=TB(n.htmlStyle||wB(n)),a=e.fontStyle&&(e.fontStyle&ZI.Underline||e.fontStyle&ZI.Strikethrough),o=n.fontStyle&&(n.fontStyle&ZI.Underline||n.fontStyle&ZI.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var ZB=pB;function QB(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>KB(e,t,n),codeToTokens:(t,n)=>WB(e,t,n)},i=ZB(KB(e,t,n,r));for(let e of AB(n))i=e.postprocess?.call(r,i,n)||i;return i}async function $B(e){let t=await PR(e);return{getLastGrammarState:(...e)=>HR(t,...e),codeToTokensBase:(e,n)=>UB(t,e,n),codeToTokensWithThemes:(e,n)=>XR(t,e,n),codeToTokens:(e,n)=>WB(t,e,n),codeToHast:(e,n)=>KB(t,e,n),codeToHtml:(e,n)=>QB(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function eV(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,yR(n))return[];let r=t[n];if(!r)throw new AI(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(xR(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new AI(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await $B({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function tV(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function nV(e,t){let n=tV(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var rV=eV({langs:QF,themes:$F,engine:()=>(0,kI.createOnigurumaEngine)($(()=>import(`./wasm-BNTPmfEI.js`),[]))}),{codeToHtml:iV,codeToHast:aV,codeToTokens:oV,codeToTokensBase:sV,codeToTokensWithThemes:cV,getSingletonHighlighter:lV,getLastGrammarState:uV}=nV(rV,{guessEmbeddedLanguages:vB});function dV(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function fV(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var pV=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),mV=String.raw;function hV(e,t){if(e==null)throw Error(t??`Value expected`);return e}var gV=mV`\[\^?`,_V=`c.? | C(?:-.?)?|${mV`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${mV`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${mV`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${mV`o\{[^\}]*\}?`}|${mV`\d{1,3}`}`,vV=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,yV=new RegExp(mV`
|
|
202
|
+
\\ (?:
|
|
203
|
+
${_V}
|
|
204
|
+
| [gk]<[^>]*>?
|
|
205
|
+
| [gk]'[^']*'?
|
|
206
|
+
| .
|
|
207
|
+
)
|
|
208
|
+
| \( (?:
|
|
209
|
+
\? (?:
|
|
210
|
+
[:=!>({]
|
|
211
|
+
| <[=!]
|
|
212
|
+
| <[^>]*>
|
|
213
|
+
| '[^']*'
|
|
214
|
+
| ~\|?
|
|
215
|
+
| #(?:[^)\\]|\\.?)*
|
|
216
|
+
| [^:)]*[:)]
|
|
217
|
+
)?
|
|
218
|
+
| \*[^\)]*\)?
|
|
219
|
+
)?
|
|
220
|
+
| (?:${vV.source})+
|
|
221
|
+
| ${gV}
|
|
222
|
+
| .
|
|
223
|
+
`.replace(/\s+/g,``),`gsu`),bV=new RegExp(mV`
|
|
224
|
+
\\ (?:
|
|
225
|
+
${_V}
|
|
226
|
+
| .
|
|
227
|
+
)
|
|
228
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
229
|
+
| ${gV}
|
|
230
|
+
| &&
|
|
231
|
+
| .
|
|
232
|
+
`.replace(/\s+/g,``),`gsu`);function xV(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=ZV(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(yV.lastIndex=0;s=yV.exec(e);){let t=SV(a,e,s[0],yV.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(yV.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?$V(e,u):e).flat(),flags:r}}function SV(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=CV(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:DV(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:VV(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:OV(n)}}if(a===`K`)return{token:FV(`keep`,n)};if(a===`N`||a===`R`)return{token:PV(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:PV(`any`,n)};if(a===`X`)return{token:PV(`text_segment`,n)};let e=TV(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:KV(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:GV(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:RV(`group`,n)};if(n===`(?>`)return{token:RV(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:RV(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:RV(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:RV(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:LV(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
233
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:PV(`dot`,n)}:n===`^`||n===`$`?{token:DV(e.singleline?{"^":mV`\A`,$:mV`\Z`}[n]:n,n)}:n===`|`?{token:EV(n)}:vV.test(n)?{tokens:eH(n)}:{token:kV(dV(n),n)}}function CV(e,t,n){let r=[NV(t[1]===`^`,t)],i=1,a;for(bV.lastIndex=n;a=bV.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(NV(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(kV(93,e));else if(i--,r.push(AV(e)),!i)break}else{let t=wV(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:bV.lastIndex||e.length}}function wV(e){if(e[0]===`\\`)return TV(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!pV.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return PV(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?jV(e):e===`&&`?MV(e):kV(dV(e),e)}function TV(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return WV(e);if(`dDhHsSwW`.includes(n))return JV(e);if(e.startsWith(mV`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return YV(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return kV(dV(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return kV(QV(e),e);if(UV.has(n))return kV(UV.get(n),e);if(/\d/.test(n))return IV(t,e);if(e===`\\`)throw Error(mV`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return kV(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function EV(e){return{type:`Alternator`,raw:e}}function DV(e,t){return{type:`Assertion`,kind:e,raw:t}}function OV(e){return{type:`Backreference`,raw:e}}function kV(e,t){return{type:`Character`,value:e,raw:t}}function AV(e){return{type:`CharacterClassClose`,raw:e}}function jV(e){return{type:`CharacterClassHyphen`,raw:e}}function MV(e){return{type:`CharacterClassIntersector`,raw:e}}function NV(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function PV(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function FV(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:hV(n.flags),raw:t}}function IV(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function LV(e){return{type:`GroupClose`,raw:e}}function RV(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function zV(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function BV(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function VV(e){return{type:`Subroutine`,raw:e}}var HV=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),UV=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function WV(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return kV(dV(t.toUpperCase())-64,e)}function GV(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=XV(n),o=XV(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),FV(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,RV(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function KV(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=HV.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return zV(l,r??null,i?.split(`,`)??null,e)}function qV(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return BV(t,n,r,e)}function JV(e){let t=e[1].toLowerCase();return PV({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function YV(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return PV(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function XV(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function ZV(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function QV(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function $V(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[OV(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(mV`Octal encoded byte above 177 unsupported "${n}"`)}else r=dV(t);a.push(kV(r,(e===0?`\\`:``)+t))}return a}function eH(e){let t=[],n=new RegExp(vV,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(qV(e.slice(0,-1)));continue}}}t.push(qV(e))}return t}function tH(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function nH(e){return rH.has(e.type)}var rH=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function iH(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=xV(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return mH();case`Assertion`:return aH(n);case`Backreference`:return oH(n,a);case`Character`:return vH(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return sH(n,a,t);case`CharacterClassOpen`:return cH(n,a,t);case`CharacterSet`:return lH(n,a);case`Directive`:return SH(n.kind,{flags:n.flags});case`GroupOpen`:return uH(n,a,t);case`NamedCallout`:return EH(n.kind,n.tag,n.arguments);case`Quantifier`:return dH(n,a);case`Subroutine`:return fH(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=kH(CH(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(mV`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(mV`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function aH({kind:e}){return hH(hV({"^":`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`}[e],`Unexpected assertion kind "${e}"`),{negate:e===mV`\B`||e===mV`\Y`})}function oH({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,gH(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return gH(r)}return i(+r)}function sH(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),bH(o,e);throw Error(`Invalid character class range`)}return vH(dV(`-`))}function cH({negate:e},t,n){let{tokens:r,walk:i}=t,a=[yH()],o=r[t.nextIndex],s=BH(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(yH()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=BH(r[t.nextIndex],o)}let c=yH({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function lH({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=zH(n);if(pV.has(r)&&!o?.has(r))e=`posix`,n=r;else return jH(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?DH(n,{negate:t}):xH(e,{negate:t})}function uH(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=MH(e),l=c.type===`AbsenceFunction`,u=IH(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&fV(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=VH(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(mH()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(FH(t)||t.type===`CapturingGroup`)throw Error(e)}else if(FH(t)||IH(t)&&t.negate)throw Error(e)}}f=VH(r[t.nextIndex])}return t.nextIndex++,c}function dH({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!nH(a))throw Error(`Quantifier requires a repeatable token`);let o=OH(e,t,n,a);return i.body.pop(),o}function fH({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=AH(i);return r.push(o),o}function pH(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:NH(t?.body)}}function mH(e){return{type:`Alternative`,body:PH(e?.body)}}function hH(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function gH(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function _H(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!LH(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:NH(t?.body)}}function vH(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function yH(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:PH(e?.body)}}function bH(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function xH(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function SH(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:hV(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function CH(e){return{type:`Flags`,...e}}function wH(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:NH(e?.body)}}function TH(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:NH(e?.body)}}function EH(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function DH(e,t){let n=!!t?.negate;if(!pV.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function OH(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function kH(e,t){return{type:`Regex`,body:NH(t?.body),flags:e}}function AH(e){return{type:`Subroutine`,ref:e}}function jH(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(zH(e));if(!r){if(n.normalizeUnknownPropertyNames)r=RH(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(mV`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function MH({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return pH(`repeater`);case`atomic`:return wH({atomic:!0});case`capturing`:return _H(i,{name:n});case`group`:return wH({flags:e});case`lookahead`:case`lookbehind`:return TH({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function NH(e){if(e===void 0)e=[mH()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function PH(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function FH(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function IH(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function LH(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function RH(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function zH(e){return e.replace(/[- _]+/g,``).toLowerCase()}function BH(e,t){let n=t;return hV(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function VH(e){return hV(e,`Unclosed group`)}function HH(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){UH(c).splice(Math.max(0,WH(s)+l),1),l--,u=!0},removeAllNextSiblings(){return UH(c).splice(WH(s)+1)},removeAllPrevSiblings(){let e=WH(s)+l;return l-=e,UH(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,WH(s)+l)]=e:hV(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(UH(c).splice(Math.max(0,WH(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,WH(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function UH(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function WH(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var GH=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function KH(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function qH(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var JH=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function YH(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===JH.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?JH.CHAR_CLASS:JH.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function XH(e,t,n,r){YH(e,t,n,r)}function ZH(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===JH.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function QH(e,t,n){return!!ZH(e,t,0,n)}function $H(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var eU=new RegExp(String.raw`(?<noncapturingStart>${GH})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function tU(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(eU.lastIndex=Number.isNaN(c)?0:c+7;f=eU.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),KH(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=YH(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},JH.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var nU=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,rU=new RegExp(String.raw`
|
|
234
|
+
\\(?: \d+
|
|
235
|
+
| c[A-Za-z]
|
|
236
|
+
| [gk]<[^>]+>
|
|
237
|
+
| [pPu]\{[^\}]+\}
|
|
238
|
+
| u[A-Fa-f\d]{4}
|
|
239
|
+
| x[A-Fa-f\d]{2}
|
|
240
|
+
)
|
|
241
|
+
| \((?: \? (?: [:=!>]
|
|
242
|
+
| <(?:[=!]|[^>]+>)
|
|
243
|
+
| [A-Za-z\-]+:
|
|
244
|
+
| \(DEFINE\)
|
|
245
|
+
))?
|
|
246
|
+
| (?<qBase>${nU})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
247
|
+
| \\?.
|
|
248
|
+
`.replace(/\s+/g,``),`gsu`);function iU(e){if(!RegExp(`${nU}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(rU.lastIndex=0;o=rU.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=qH(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}rU.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var aU=String.raw,oU=aU`\(\?R=(?<rDepth>[^\)]+)\)|${aU`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,sU=aU`\(\?<(?![=!])(?<captureName>[^>]+)>`,cU=aU`${sU}|(?<unnamed>\()(?!\?)`,lU=new RegExp(aU`${sU}|${oU}|\(\?|\\?.`,`gsu`),uU=`Cannot use multiple overlapping recursions`;function dU(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(oU,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&QH(e,aU`\(\?\(DEFINE\)`,JH.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=QH(e,aU`\\[1-9]`,JH.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(lU.lastIndex=0;f=lU.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(fU(m),l)throw Error(uU);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(lU.lastIndex);if(QH(s,oU,JH.DEFAULT))throw Error(uU);let c=m-1;e=pU(t,s,c,!1,n,a,d),i=gU(i,t,c,a.length,0,d);break}else if(h){fU(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(uU);break}if(!u)throw Error(aU`Recursive \g cannot be used outside the referenced group "${r===`external`?h:aU`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=$H(e,p);if(o&&QH(m,aU`${sU}|\((?!\?)`,JH.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=pU(_,v,b,!0,n,a,d);i=gU(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,lU.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),lU.lastIndex),s.set(p,lU.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),lU.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function fU(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function pU(e,t,n,r,i,a,o){let s=new Set;r&&XH(e+t,sU,({groups:{captureName:e}})=>{s.add(e)},JH.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${mU(`(?:${e}`,`forward`,...c)}(?:)${mU(`${t})`,`backward`,...c)}${t}`}function mU(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=YH(e,aU`${cU}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),hU(i,n),s?e:`(?<${t}${l}>`}return aU`\k<${c}${l}>`},JH.DEFAULT)}return c}function hU(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function gU(e,t,n,r,i,a){if(e.size&&r){let o=0;XH(t,cU,()=>o++,JH.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var _U=String.fromCodePoint,vU=String.raw,yU={},bU=globalThis.RegExp;yU.flagGroups=(()=>{try{new bU(`(?i:)`)}catch{return!1}return!0})(),yU.unicodeSets=(()=>{try{new bU(`[[]]`,`v`)}catch{return!1}return!0})(),yU.bugFlagVLiteralHyphenIsRange=yU.unicodeSets?(()=>{try{new bU(vU`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,yU.bugNestedClassIgnoresNegation=yU.unicodeSets&&new bU(`[[^a]]`,`v`).test(`a`);function xU(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function SU(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function CU(e,t){return TU[e]>=TU[t]}function wU(e,t){if(e==null)throw Error(t??`Value expected`);return e}var TU={ES2025:2025,ES2024:2024,ES2018:2018},EU={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function DU(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!EU[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=yU.flagGroups?`ES2025`:yU.unicodeSets?`ES2024`:`ES2018`),t}var OU=`[ -\r ]`,kU=new Set([_U(304),_U(305)]),AU=vU`[\p{L}\p{M}\p{N}\p{Pc}]`;function jU(e){if(kU.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=FU.get(n),a=NU.get(n),o=PU.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var MU=new Map(`C Other
|
|
249
|
+
Cc Control cntrl
|
|
250
|
+
Cf Format
|
|
251
|
+
Cn Unassigned
|
|
252
|
+
Co Private_Use
|
|
253
|
+
Cs Surrogate
|
|
254
|
+
L Letter
|
|
255
|
+
LC Cased_Letter
|
|
256
|
+
Ll Lowercase_Letter
|
|
257
|
+
Lm Modifier_Letter
|
|
258
|
+
Lo Other_Letter
|
|
259
|
+
Lt Titlecase_Letter
|
|
260
|
+
Lu Uppercase_Letter
|
|
261
|
+
M Mark Combining_Mark
|
|
262
|
+
Mc Spacing_Mark
|
|
263
|
+
Me Enclosing_Mark
|
|
264
|
+
Mn Nonspacing_Mark
|
|
265
|
+
N Number
|
|
266
|
+
Nd Decimal_Number digit
|
|
267
|
+
Nl Letter_Number
|
|
268
|
+
No Other_Number
|
|
269
|
+
P Punctuation punct
|
|
270
|
+
Pc Connector_Punctuation
|
|
271
|
+
Pd Dash_Punctuation
|
|
272
|
+
Pe Close_Punctuation
|
|
273
|
+
Pf Final_Punctuation
|
|
274
|
+
Pi Initial_Punctuation
|
|
275
|
+
Po Other_Punctuation
|
|
276
|
+
Ps Open_Punctuation
|
|
277
|
+
S Symbol
|
|
278
|
+
Sc Currency_Symbol
|
|
279
|
+
Sk Modifier_Symbol
|
|
280
|
+
Sm Math_Symbol
|
|
281
|
+
So Other_Symbol
|
|
282
|
+
Z Separator
|
|
283
|
+
Zl Line_Separator
|
|
284
|
+
Zp Paragraph_Separator
|
|
285
|
+
Zs Space_Separator
|
|
286
|
+
ASCII
|
|
287
|
+
ASCII_Hex_Digit AHex
|
|
288
|
+
Alphabetic Alpha
|
|
289
|
+
Any
|
|
290
|
+
Assigned
|
|
291
|
+
Bidi_Control Bidi_C
|
|
292
|
+
Bidi_Mirrored Bidi_M
|
|
293
|
+
Case_Ignorable CI
|
|
294
|
+
Cased
|
|
295
|
+
Changes_When_Casefolded CWCF
|
|
296
|
+
Changes_When_Casemapped CWCM
|
|
297
|
+
Changes_When_Lowercased CWL
|
|
298
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
299
|
+
Changes_When_Titlecased CWT
|
|
300
|
+
Changes_When_Uppercased CWU
|
|
301
|
+
Dash
|
|
302
|
+
Default_Ignorable_Code_Point DI
|
|
303
|
+
Deprecated Dep
|
|
304
|
+
Diacritic Dia
|
|
305
|
+
Emoji
|
|
306
|
+
Emoji_Component EComp
|
|
307
|
+
Emoji_Modifier EMod
|
|
308
|
+
Emoji_Modifier_Base EBase
|
|
309
|
+
Emoji_Presentation EPres
|
|
310
|
+
Extended_Pictographic ExtPict
|
|
311
|
+
Extender Ext
|
|
312
|
+
Grapheme_Base Gr_Base
|
|
313
|
+
Grapheme_Extend Gr_Ext
|
|
314
|
+
Hex_Digit Hex
|
|
315
|
+
IDS_Binary_Operator IDSB
|
|
316
|
+
IDS_Trinary_Operator IDST
|
|
317
|
+
ID_Continue IDC
|
|
318
|
+
ID_Start IDS
|
|
319
|
+
Ideographic Ideo
|
|
320
|
+
Join_Control Join_C
|
|
321
|
+
Logical_Order_Exception LOE
|
|
322
|
+
Lowercase Lower
|
|
323
|
+
Math
|
|
324
|
+
Noncharacter_Code_Point NChar
|
|
325
|
+
Pattern_Syntax Pat_Syn
|
|
326
|
+
Pattern_White_Space Pat_WS
|
|
327
|
+
Quotation_Mark QMark
|
|
328
|
+
Radical
|
|
329
|
+
Regional_Indicator RI
|
|
330
|
+
Sentence_Terminal STerm
|
|
331
|
+
Soft_Dotted SD
|
|
332
|
+
Terminal_Punctuation Term
|
|
333
|
+
Unified_Ideograph UIdeo
|
|
334
|
+
Uppercase Upper
|
|
335
|
+
Variation_Selector VS
|
|
336
|
+
White_Space space
|
|
337
|
+
XID_Continue XIDC
|
|
338
|
+
XID_Start XIDS`.split(/\s/).map(e=>[zH(e),e])),NU=new Map([[`s`,_U(383)],[_U(383),`s`]]),PU=new Map([[_U(223),_U(7838)],[_U(107),_U(8490)],[_U(229),_U(8491)],[_U(969),_U(8486)]]),FU=new Map([RU(453),RU(456),RU(459),RU(498),...zU(8072,8079),...zU(8088,8095),...zU(8104,8111),RU(8124),RU(8140),RU(8188)]),IU=new Map([[`alnum`,vU`[\p{Alpha}\p{Nd}]`],[`alpha`,vU`\p{Alpha}`],[`ascii`,vU`\p{ASCII}`],[`blank`,vU`[\p{Zs}\t]`],[`cntrl`,vU`\p{Cc}`],[`digit`,vU`\p{Nd}`],[`graph`,vU`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,vU`\p{Lower}`],[`print`,vU`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,vU`[\p{P}\p{S}]`],[`space`,vU`\p{space}`],[`upper`,vU`\p{Upper}`],[`word`,vU`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,vU`\p{AHex}`]]);function LU(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function RU(e){let t=_U(e);return[t.toLowerCase(),t]}function zU(e,t){return LU(e,t).map(e=>RU(e))}var BU=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function VU(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};GU(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:CU(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};HH(e,HU,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return HH(e,UU,a),HH(e,WU,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var HU={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=wH();e.body[0].body.push(TH({negate:!0,body:r}),jH(`Any`));let i=wH();i.body[0].body.push(OH(`greedy`,0,1/0,e)),n(uW(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];SU(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=QU(t.get(e));if(n){let t=wH({flags:n});t.body[0].body=e.body,e.body=[uW(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(uW(TH({body:[mH({body:[hH(`string_end`)]}),mH({body:[vH(10)]})]}),t));else if(c===`line_start`)o(uW(sW(vU`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&iW(e))o(uW(TH({negate:!0}),t));else if(d)throw Error(vU`Uses "\G" in a way that requires a subclass`);else o(lW(hH(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(uW(sW(vU`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${AU})(?!${AU})|(?<!${AU})(?=${AU}))`,n=`(?:(?<=${AU})(?=${AU})|(?<!${AU})(?!${AU}))`;o(uW(sW(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!oW(n)&&(n=ZU(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!oW(r)&&(r=ZU(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(uW(yH({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(lW(xH(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(uW(cW(sW(OU),l),t));return}if(s&&(c===`word`||u===`word`)){n(lW(xH(`word`,{negate:l}),t));return}if(c===`any`)n(lW(jH(`Any`),t));else if(c===`digit`)n(lW(jH(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(vU`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=vU`\p{RI}{2}|${e}(?:\u200D${e})*`;n(uW(sW(vU`(?>\r\n|${i?vU`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(lW(jH(`AHex`,{negate:l}),t));else if(c===`newline`)n(uW(sW(l?`[^
|
|
339
|
+
]`:`(?>\r
|
|
340
|
+
?|[
|
|
341
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${_U(e.codePointAt(0)-1)}${_U(e.codePointAt(2)+1)}-\u{10FFFF}`),n(uW(sW(`[${e}]`),t))}else n(uW(cW(sW(IU.get(u)),l),t));else if(c===`property`)MU.has(zH(u))||(e.key=`sc`);else if(c===`space`)n(lW(jH(`space`,{negate:l}),t));else if(c===`word`)n(uW(cW(sW(AU),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=wH({flags:c});e.body[0].body=o(),i(uW(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&tH(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(vU`Uses "\K" in a way that's unsupported`);let o=TH({behind:!0});o.body[0].body=a(),i(uW(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(uW(TH({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=wH();t.body[0].body.push(e.body),e.body=uW(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=tW(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(vU`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!oW(n)&&(n=ZU(n,t),e.ref=n)}},UU={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=lW(YU(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&SU(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=SU(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=xU(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?YU(0):JU(o,r.groupOriginByCopy,null),l=c;if(!s){let e=QU(XU(o,e=>e.type===`Group`&&!!e.flags)),t=e?xU(r.globalFlags,e):r.globalFlags;KU(t,r.currentFlags)||(l=wH({flags:$U(t)}),l.body[0].body.push(c))}n(uW(l,t),{traverse:!s})}},WU={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>qU(t,e));i.length?i.length>1?n(uW(wH({atomic:!0,body:i.reverse().map(e=>mH({body:[gH(e.number)]}))}),t)):e.ref=i[0].number:n(uW(TH({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=_H();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function GU(e){HH(e,{"*"({node:e,parent:t}){e.parent=t}})}function KU(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function qU(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=eW(n.parent);for(let r of t){if(r===n)break;if(r===e||nW(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function JU(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=JU(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function YU(e){let t=AH(e);return t.isRecursive=!0,t}function XU(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function ZU(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function QU(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function $U({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function eW(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function tW(e){let t=e.find(e=>e.kind===`search_start`||aW(e,{negate:!1})||!rW(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=tW(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function nW(e,t){let n=eW(e)??[];for(let e of n)if(e===t||nW(e,t))return!0;return!1}function rW({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function iW(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function aW(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&tH(e.body[0],{type:`Assertion`,kind:`search_start`})}function oW(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function sW(e,t){let n=iH(e,{...t,unicodePropertyMap:MU}).body;return n.length>1||n[0].body.length>1?wH({body:n}):n[0].body[0]}function cW(e,t){return e.negate=t,e}function lW(e,t){return e.parent=t,e}function uW(e,t){return GU(e),e.parent=t,e}function dW(e,t){let n=DU(t),r=CU(n.target,`ES2024`),i=CU(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];HH(e,fW,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,wU(pW[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&SU(f._captureTransfers,e.transferTo,[]).push(t)}),f}var fW={"*":{enter({node:e},t){if(TW(e)){let n=t.getCurrentModI();t.pushModI(e.flags?xU({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){TW(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){yW(_U(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),bW(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&BU.has(e.value)&&t.setHasCasedChar()}},pW={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?vU`\B`:vU`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=_U(e),r=xW(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&yW(n)){let e=jU(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);yU.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(DW)&&(o=[vH(45),...o.filter(e=>!DW(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||yU.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=wH(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=mH({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(yU.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=xW(n,i),o=xW(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&SW(bW(e)).forEach(e=>{s.add(Array.isArray(e)?`${xW(e[0],i)}-${xW(e[1],i)}`:xW(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:vU`[^\n]`;if(e===`digit`)return t?vU`\D`:vU`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&BU.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?vU`\P`:vU`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?vU`\W`:vU`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=xU(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${CW(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+wW(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:vU`\g<${t}&R=${r}>`}},mW=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),hW=new Set([`-`,`\\`,`]`,`^`,`[`]),gW=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),_W=new Map([[9,vU`\t`],[10,vU`\n`],[11,vU`\v`],[12,vU`\f`],[13,vU`\r`],[8232,vU`\u2028`],[8233,vU`\u2029`],[65279,vU`\uFEFF`]]),vW=/^\p{Cased}$/u;function yW(e){return vW.test(e)}function bW(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=_U(e);if(!yW(t))continue;let o=jU(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function xW(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(_W.has(e))return _W.get(e);if(e<32||e>126&&e<160||e>262143||t&&EW(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?gW:hW:mW,a=_U(e);return(i.has(a)?`\\`:``)+a}function SW(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function CW(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function wW({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function TW({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function EW(e){return e>47&&e<58}function DW({type:e,value:t}){return e===`Character`&&t===45}var OW=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=AW(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(kW(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=jW(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function kW(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function AW(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)SU(n,t,{}).transferTo=e;return n}function jW(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function MW(e,t){let n=NW(e,t);return n.options?new OW(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function NW(e,t){let n=DU(t),r=VU(iH(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:MU}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=dW(r,n),a=dU(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=tU(iU(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var PW=[`github-light`,`github-dark`,`catppuccin-latte`,`catppuccin-mocha`,`tokyo-night`,`one-light`,`one-dark-pro`,`github-light-default`,`github-dark-default`,`light-plus`,`dark-plus`],FW=null,IW=null;function LW(){return IW?Promise.resolve(IW):(FW||=rV({themes:PW,langs:[]}).then(e=>(IW=e,e)),FW)}var RW=new Set;typeof window<`u`&&window.addEventListener(`codemini-theme-palette-change`,()=>{FW=null,IW=null,RW.clear()});async function zW(e){if(!e||RW.has(e))return;let t=await LW();try{t.getLoadedLanguages().includes(e)||await t.loadLanguage(e),RW.add(e)}catch{RW.add(e)}}function BW(){return LW().catch(()=>{}),{name:`shiki`,type:`code-highlighter`,getThemes:()=>PW,getSupportedLanguages:()=>IW?IW.getLoadedLanguages():[],supportsLanguage:e=>IW?IW.getLoadedLanguages().includes(e):!1,highlight:(e,t)=>{let{code:n,language:r}=e;return HW(n,r)||(zW(r).then(()=>{t&&t(HW(n,r)||VW(n))}),VW(n))}}}function VW(e){return{fg:void 0,bg:void 0,rootStyle:void 0,tokens:String(e??``).split(/\r?\n/).map(e=>[{content:e}])}}function HW(e,t){if(!IW)return null;try{if(!IW.getLoadedLanguages().includes(t))return null;let n=IW.codeToTokens(e,{lang:t,themes:UW(),defaultColor:!1});return{fg:n.fg,bg:n.bg,rootStyle:n.rootStyle,tokens:n.tokens}}catch{return null}}function UW(){if(typeof document>`u`)return{light:`github-light`,dark:`github-dark`};let e=document.documentElement.dataset.palette||`default`;return e===`catppuccin`?{light:`catppuccin-latte`,dark:`catppuccin-mocha`}:e===`tokyonight`?{light:`github-light`,dark:`tokyo-night`}:e===`one`?{light:`one-light`,dark:`one-dark-pro`}:e===`github`?{light:`github-light-default`,dark:`github-dark-default`}:e===`vscode`?{light:`light-plus`,dark:`dark-plus`}:{light:`github-light`,dark:`github-dark`}}var WW=BW(),GW=class extends d.Component{state={hasError:!1,retryCount:0};retryTimer=null;static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){console.warn(`Streamdown render failed; retrying with markdown renderer.`,e),!(this.state.retryCount>=2)&&(clearTimeout(this.retryTimer),this.retryTimer=window.setTimeout(()=>{this.setState(e=>({hasError:!1,retryCount:e.retryCount+1}))},80))}componentDidUpdate(e){(e.fallbackText!==this.props.fallbackText||e.resetKey!==this.props.resetKey)&&(this.state.hasError||this.state.retryCount)&&(clearTimeout(this.retryTimer),this.setState({hasError:!1,retryCount:0}))}componentWillUnmount(){clearTimeout(this.retryTimer)}render(){return this.state.hasError?(0,_.jsx)(`div`,{className:`msg-body whitespace-pre-wrap text-(--text-primary)`,children:this.props.fallbackText}):this.props.children}};function KW({text:e,streaming:t,className:n}){let r=typeof e==`string`?e:String(e||``);if(!r)return null;let i=t?`streaming`:`static`;return(0,_.jsx)(GW,{fallbackText:r,resetKey:i,children:(0,_.jsx)(`div`,{className:B(`msg-body`,t&&`streaming-cursor`,n),children:(0,_.jsx)(zF,{mode:i,isAnimating:t,parseIncompleteMarkdown:!0,showLineNumbers:!1,plugins:{code:WW},controls:{tables:!0,codeBlocks:!0,mermaid:{display:!0,wrap:!0}},children:r})})})}function qW({todos:e}){return e?.length?(0,_.jsx)(`div`,{className:`space-y-1 mt-2`,children:e.map((e,t)=>{let n=e.status===`completed`?`✓`:e.status===`in_progress`?`●`:``;return(0,_.jsxs)(`div`,{className:B(`flex items-center gap-2 text-[13px] py-0.5`,e.status===`completed`&&`text-(--accent-green)`,e.status===`in_progress`&&`text-(--accent-blue)`,e.status===`pending`&&`text-(--muted-foreground)`),children:[(0,_.jsx)(`span`,{className:`w-4 text-center shrink-0`,children:n}),(0,_.jsx)(`span`,{children:e.content||e.activeForm})]},t)})}):null}var JW={you:{badge:`bg-(--accent-blue-bg) text-(--accent-blue)`,label:`You`},general:{badge:`bg-(--accent-green-bg) text-(--accent-green)`,label:`General`},coder:{badge:`bg-(--accent-green-bg) text-(--accent-green)`,label:`Coder`},advisor:{badge:`bg-(--accent-blue-bg) text-(--accent-blue)`,label:`Advisor`},planner:{badge:`bg-(--accent-purple-bg) text-(--accent-purple)`,label:`Planner`},reviewer:{badge:`bg-(--accent-orange-bg) text-(--accent-orange)`,label:`Reviewer`},tester:{badge:`bg-(--accent-blue-bg) text-(--accent-blue)`,label:`Tester`},summarizer:{badge:`bg-(--accent-cyan-bg) text-(--accent-cyan)`,label:`Summarizer`},system:{badge:`bg-(--muted) text-(--muted-foreground)`,label:`System`},error:{badge:`bg-(--accent-red-bg) text-(--accent-red)`,label:`Error`},pending:{badge:`bg-(--accent-cyan-bg) text-(--accent-cyan)`,label:`Pending`}},YW={running:`bg-(--accent-blue-bg) text-(--accent-blue)`,done:`bg-(--accent-green-bg) text-(--accent-green)`,error:`bg-(--accent-red-bg) text-(--accent-red)`,auto:`bg-(--accent-purple-bg) text-(--accent-purple)`},XW=3;function ZW(e){let t=String(e||``);return t===`Dream triggered...`?{status:`running`,title:`Dream started`,description:`Auto memory consolidation is running in the background.`}:t===`Dream complete`?{status:`done`,title:`Dream complete`,description:`Memory consolidation finished.`}:t.startsWith(`Dream done`)?{status:`done`,title:t,description:`Memory inbox and stale buckets were consolidated.`}:t.startsWith(`Dream failed:`)?{status:`error`,title:`Dream failed`,description:t.slice(13).trim()||`Unknown error.`}:null}function QW({notice:e}){let t=e.status===`running`?fp:e.status===`error`?$f:Qf;return(0,_.jsx)(`div`,{className:`py-2 px-6`,children:(0,_.jsx)(`div`,{className:`max-w-[860px] mx-auto flex justify-center`,children:(0,_.jsxs)(`div`,{className:B(`inline-flex max-w-full items-center gap-2 rounded-lg border px-3 py-2 text-left text-xs shadow-sm`,e.status===`error`?`border-(--accent-red)/30 bg-(--accent-red-bg) text-(--accent-red)`:`border-(--border-default) bg-(--bg-secondary) text-(--text-secondary)`),children:[(0,_.jsx)(t,{size:14,className:B(`shrink-0`,e.status===`running`&&`animate-spin text-(--accent-cyan)`,e.status===`done`&&`text-(--accent-green)`)}),(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsx)(`div`,{className:`font-medium text-(--text-primary) truncate`,children:e.title}),e.description&&(0,_.jsx)(`div`,{className:`mt-0.5 text-(--text-muted) truncate`,children:e.description})]})]})})})}function $W({cards:e}){let[t,n]=(0,d.useState)(!1),r=e.length,i=r>XW&&!t,a=r-XW,o=i?e.slice(r-XW):e;return(0,_.jsxs)(`div`,{className:`space-y-2 my-2`,children:[i&&a>0&&(0,_.jsxs)(`button`,{type:`button`,className:`block w-full py-1.5 px-3 text-[11px] text-(--accent-blue) cursor-pointer text-left bg-transparent border-0`,onClick:()=>n(!0),children:[`+`,a,` more tool calls`]}),o.map(e=>(0,_.jsx)(cm,{card:e},e.id)),t&&r>XW&&(0,_.jsxs)(`button`,{type:`button`,className:`block w-full py-1.5 px-3 text-[11px] text-(--accent-blue) cursor-pointer text-left bg-transparent border-0`,onClick:()=>n(!1),children:[`Collapse `,a,` older tool calls`]})]})}function eG(e){let t=[],n=[],r=()=>{n.length>0&&(t.push({type:`tools`,cards:n}),n=[])};for(let i of e)i.type===`tools`?n.push(...i.cards):i.type===`text`&&i.text&&(r(),t.push({type:`text`,text:i.text,isStreaming:i.isStreaming}));return r(),t}function tG({text:e,skills:t=[]}){let n=String(e||``).match(/^(\/([A-Za-z0-9_-]+))(\s+[\s\S]*)?$/);if(!n)return(0,_.jsx)(KW,{text:e,streaming:!1});let[,r,i,a=``]=n;if(i===`dream`)return(0,_.jsxs)(`div`,{className:`msg-body whitespace-pre-wrap text-(--text-primary)`,children:[(0,_.jsxs)(md,{children:[(0,_.jsx)(hd,{asChild:!0,children:(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-(--accent-cyan-bg) px-1.5 py-0.5 text-(--accent-cyan) font-mono text-[0.92em] cursor-help align-baseline`,children:[(0,_.jsx)(mp,{size:13}),r]})}),(0,_.jsxs)(gd,{side:`top`,sideOffset:8,className:`max-w-75 px-4 py-3 leading-relaxed whitespace-normal`,children:[(0,_.jsx)(`div`,{className:`font-semibold mb-1.5`,children:`Dream`}),(0,_.jsx)(`div`,{className:`text-(--text-secondary)`,children:`Consolidates memory inbox entries and stale memory buckets. It can run manually with /dream or automatically when the inbox threshold is reached.`})]})]}),a]});let o=t.find(e=>e.name===i);return o?(0,_.jsxs)(`div`,{className:`msg-body whitespace-pre-wrap text-(--text-primary)`,children:[(0,_.jsxs)(md,{children:[(0,_.jsx)(hd,{asChild:!0,children:(0,_.jsx)(`span`,{className:`inline-flex items-center rounded-md bg-(--accent-purple-bg) px-1.5 py-0.5 text-accent-purple font-mono text-[0.92em] cursor-help align-baseline`,children:r})}),(0,_.jsxs)(gd,{side:`top`,sideOffset:8,className:`max-w-75 px-4 py-3 leading-relaxed whitespace-normal`,children:[(0,_.jsx)(`div`,{className:`font-semibold mb-1.5`,children:o.name}),(0,_.jsx)(`div`,{className:`text-(--text-secondary)`,children:o.description||`No description`})]})]}),a]}):(0,_.jsx)(KW,{text:e,streaming:!1})}function nG({message:e,skills:t=[]}){let{role:n,segments:r,skillBadges:i,fileChanges:a,startupTodos:o,text:s,timestamp:c,planStep:l}=e,u=JW[n]||JW.general,f=c?nm(c):``,p=(0,d.useMemo)(()=>eG(r||[]),[r]);if(n===`divider`)return(0,_.jsx)(`div`,{className:`py-3 px-6 text-center`,children:(0,_.jsxs)(`div`,{className:`max-w-[860px] mx-auto relative`,children:[(0,_.jsx)(`div`,{className:`border-t border-border`}),(0,_.jsx)(`span`,{className:`text-xs text-(--text-muted) bg-(--bg-primary) px-2 absolute -top-2.5 left-1/2 -translate-x-1/2 whitespace-nowrap`,children:text||`以上内容已压缩`})]})});if(n===`system`){let e=ZW(s);return e?(0,_.jsx)(QW,{notice:e}):s?.includes(`等待计划审阅`)||s?.includes(`Waiting for plan review`)?null:(0,_.jsx)(`div`,{className:`py-2 px-6 text-xs text-(--text-muted) text-center`,children:(0,_.jsxs)(`div`,{className:`max-w-[860px] mx-auto px-3 py-1`,children:[s,o&&(0,_.jsx)(qW,{todos:o})]})})}let m=n===`you`&&(s||r?.filter(e=>e.type===`text`).map(e=>e.text).join(``))||``;return(0,_.jsx)(`div`,{className:B(`py-2 my-[22px]`,n===`you`&&`flex justify-end`),children:n===`you`?(0,_.jsxs)(`div`,{className:`w-fit max-w-full bg-(--bg-tertiary) rounded-2xl px-4 py-3`,children:[m&&(0,_.jsx)(tG,{text:m,skills:t}),o&&(0,_.jsx)(qW,{todos:o})]}):(0,_.jsxs)(`div`,{children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[(0,_.jsx)(`span`,{className:B(`inline-flex items-center px-2 py-px rounded-full text-[11px] font-semibold uppercase tracking-[0.3px]`,u.badge),children:u.label}),f&&(0,_.jsx)(`span`,{className:`text-[11px] text-(--text-muted)`,children:f})]}),p.map((e,t)=>e.type===`text`?(0,_.jsx)(KW,{text:e.text,streaming:e.isStreaming},`t-${t}-${e.isStreaming?`s`:`d`}`):e.type===`tools`?(0,_.jsx)($W,{cards:e.cards},`tg-${t}`):null),l&&p.length===0&&l.status!==`done`&&l.status!==`failed`&&(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) inline-flex items-center gap-1.5`,children:[(0,_.jsx)(`span`,{className:`inline-block size-1 rounded-full bg-(--accent-blue) animate-pulse`}),(0,_.jsx)(`span`,{children:`等待工具调用或模型输出…`})]}),i?.length>0&&(0,_.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:i.map((e,t)=>(0,_.jsx)(`span`,{className:B(`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium`,YW[e.status]),children:e.status===`auto`?`${V(`skillAuto`)}: ${e.name}`:`${e.name} - ${V(`skill`+e.status.charAt(0).toUpperCase()+e.status.slice(1))}`},t))}),a?.length>0&&(0,_.jsxs)(`div`,{className:`mt-2 border border-(--border-default) rounded-lg bg-(--bg-secondary) p-3`,children:[(0,_.jsx)(`div`,{className:`text-xs font-semibold text-(--text-secondary) mb-1`,children:V(`fileChanges`)}),a.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-xs py-0.5 font-mono`,children:[(0,_.jsx)(`span`,{className:B(`text-[10px] font-semibold px-[5px] py-px rounded`,{edit:`bg-(--accent-blue-bg) text-(--accent-blue)`,create:`bg-(--accent-green-bg) text-(--accent-green)`,delete:`bg-(--accent-red-bg) text-(--accent-red)`}[e.action]||`bg-(--muted) text-(--text-muted)`),children:e.action?.toUpperCase()}),(0,_.jsx)(`span`,{className:`truncate flex-1 text-(--text-primary)`,children:e.path}),e.linesAdded!=null&&(0,_.jsxs)(`span`,{className:`text-(--accent-green) text-[11px]`,children:[`+`,e.linesAdded]}),e.linesRemoved!=null&&(0,_.jsxs)(`span`,{className:`text-(--accent-red) text-[11px]`,children:[`-`,e.linesRemoved]})]},t))]})]})})}function rG({messages:e,projectCwd:t,skills:n=[],gitInfo:r}){let i=(0,d.useRef)(null),[a,o]=(0,d.useState)(!0),[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight<80;o(t),c(e.scrollTop>400),u(!t&&e.scrollTop>100)};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},[]),(0,d.useEffect)(()=>{a&&i.current&&requestAnimationFrame(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)})},[e,a]),(0,_.jsxs)(`div`,{className:`flex-1 relative overflow-hidden`,children:[e.length===0&&(0,_.jsxs)(`div`,{className:`absolute left-1/2 top-[38%] -translate-x-1/2 -translate-y-1/2 w-[min(760px,calc(100%-48px))] text-center pointer-events-none`,children:[(0,_.jsx)(`h1`,{className:`text-[clamp(24px,2.4vw,36px)] font-medium leading-tight tracking-normal`,children:V(`buildInProject`).replace(`{{project}}`,t||`qurio-coder`)}),r?.isGit&&(0,_.jsxs)(`div`,{className:`mt-4 flex items-center justify-center gap-3 text-[13px] text-(--text-muted)`,children:[(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,_.jsx)(op,{size:13}),(0,_.jsx)(`span`,{children:r.branch})]}),r.dirty?(0,_.jsxs)(_.Fragment,{children:[r.staged>0&&(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-green-600 dark:text-green-400`,children:[(0,_.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-current`}),V(`gitStaged`),` `,r.staged]}),r.modified>0&&(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-amber-600 dark:text-amber-400`,children:[(0,_.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-current`}),V(`gitModified`),` `,r.modified]}),r.untracked>0&&(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,_.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-current`}),V(`gitUntracked`),` `,r.untracked]})]}):(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,_.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-emerald-500`}),V(`gitClean`)]})]})]}),(0,_.jsx)(`div`,{ref:i,className:`h-full overflow-y-auto py-[44px_0_28px] scroll-smooth`,style:{scrollbarWidth:`thin`},children:(0,_.jsx)(`div`,{className:`w-[min(960px,calc(100%-96px))] mx-auto`,children:e.map(e=>(0,_.jsx)(nG,{message:e,skills:n},e.id))})}),(0,_.jsxs)(`div`,{className:`absolute right-7 bottom-[220px] flex flex-col gap-2 z-20`,children:[s&&(0,_.jsx)(`button`,{className:`w-9 h-9 rounded-full bg-(--bg-input) border border-(--border-default) cursor-pointer flex items-center justify-center text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary) animate-in fade-in-0 zoom-in-95`,style:{boxShadow:`var(--shadow-default)`},onClick:()=>i.current?.scrollTo({top:0,behavior:`smooth`}),children:(0,_.jsx)(Uf,{size:16})}),l&&(0,_.jsx)(`button`,{className:`w-9 h-9 rounded-full bg-(--bg-input) border border-(--border-default) cursor-pointer flex items-center justify-center text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary) animate-in fade-in-0 zoom-in-95`,style:{boxShadow:`var(--shadow-default)`},onClick:()=>{o(!0),i.current?.scrollTo({top:i.current.scrollHeight,behavior:`smooth`})},children:(0,_.jsx)(Hf,{size:16})})]})]})}var iG=new Set([`superpowers-lite`]);function aG(){return[{value:`auto`,label:V(`autoMode`),desc:V(`autoModeDesc`)},{value:`plan`,label:V(`planMode`),desc:V(`planModeDesc`)}]}var oG=[{name:`dream`,insert:`/dream `,icon:mp,description:`Run memory consolidation now. Auto dream still runs in the background when needed.`},{name:`compact`,insert:`/compact `,icon:Vf,description:`Compress the current conversation context while keeping the useful working summary.`},{name:`memory`,insert:`/memory `,icon:ep,description:`Inspect or manage remembered project and user context.`},{name:`capture`,insert:`/capture `,icon:Kf,description:`Capture an explicit note into the memory inbox for later consolidation.`},{name:`inbox`,insert:`/inbox `,icon:up,description:`Review pending memory inbox entries.`},{name:`reflect`,insert:`/reflect `,icon:Tp,description:`Draft or update a reusable skill from the current workflow.`},{name:`retry`,insert:`/retry `,icon:bp,description:`Retry the last assistant turn.`}],sG=new Set(oG.map(e=>e.name));function cG({current:e,disabled:t=!1}){let[n,r]=(0,d.useState)(!1),[i,a]=(0,d.useState)(!1),o=aG(),s=o.find(t=>t.value===e)||o[0],c=async n=>{if(!(n===e||i||t)){a(!0);try{let e=await Pd(n);if(e?.error)throw Error(e.message||`Failed to switch mode`)}catch{}finally{a(!1)}r(!1)}};return(0,_.jsxs)(Np,{open:n,onOpenChange:e=>!t&&r(e),children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsxs)(`button`,{type:`button`,className:B(`border-0 bg-transparent text-(--text-muted) w-auto px-2 h-[30px] rounded-lg inline-flex items-center justify-center gap-1 shrink-0 cursor-pointer text-[12px] whitespace-nowrap hover:bg-(--bg-hover) hover:text-(--text-primary)`,(i||t)&&`opacity-50 pointer-events-none`),disabled:t,title:V(t?`switchModeDisabled`:`switchMode`),children:[(0,_.jsx)(wp,{size:14}),(0,_.jsx)(`span`,{className:`truncate`,children:s.label}),(0,_.jsx)(Yf,{size:11})]})}),(0,_.jsxs)(Fp,{side:`top`,align:`start`,sideOffset:6,className:`w-56 p-1 rounded-lg bg-(--bg-primary) border border-(--border-default) shadow-lg`,children:[(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) px-2 py-1.5 font-medium`,children:V(`executionMode`)}),(0,_.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:o.map(n=>(0,_.jsxs)(`button`,{disabled:t||i,className:B(`w-full border-0 rounded-md px-2 py-1.5 text-left text-[12px] cursor-pointer flex items-center gap-2`,(t||i)&&`opacity-50 cursor-not-allowed`,e===n.value?`bg-(--bg-active) text-(--text-primary) font-medium`:`bg-transparent text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary)`),onClick:()=>c(n.value),children:[(0,_.jsx)(`span`,{className:`shrink-0`,children:n.label}),(0,_.jsx)(`span`,{className:`text-[10px] text-(--text-muted) min-w-0 text-right leading-4`,children:n.desc})]},n.value))})]})]})}function lG(){let[e,t]=(0,d.useState)([]),[n,r]=(0,d.useState)(``),[i,a]=(0,d.useState)(!1),o=(0,d.useCallback)(async()=>{try{let e=await $d(),n=Array.isArray(e)?e:[];t(n);let i=n.find(e=>e.active);r(i?i.name:``)}catch{}},[]);(0,d.useEffect)(()=>{o()},[o]);let s=async e=>{await af(e),r(e),a(!1),o()};return(0,_.jsxs)(Np,{open:i,onOpenChange:a,children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsxs)(`button`,{type:`button`,className:`border-0 bg-transparent text-(--text-muted) w-auto px-2 h-[30px] rounded-lg inline-flex items-center justify-center gap-1 shrink-0 cursor-pointer text-[12px] whitespace-nowrap hover:bg-(--bg-hover) hover:text-(--text-primary)`,title:V(`soulSwitch`),children:[(0,_.jsx)(`span`,{className:`truncate max-w-[60px]`,children:n||`default`}),(0,_.jsx)(Yf,{size:11})]})}),(0,_.jsxs)(Fp,{side:`top`,align:`start`,sideOffset:6,className:`w-52 p-1 rounded-lg bg-(--bg-primary) border border-(--border-default) shadow-lg`,children:[(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) px-2 py-1.5 font-medium`,children:V(`switchSoul`)}),(0,_.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.map(e=>(0,_.jsxs)(`button`,{className:B(`w-full border-0 rounded-md px-2 py-1.5 text-left text-[12px] cursor-pointer flex items-center gap-2`,e.active?`bg-(--bg-active) text-(--text-primary) font-medium`:`bg-transparent text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary)`),onClick:()=>s(e.name),children:[(0,_.jsx)(`span`,{className:`truncate flex-1`,children:e.name}),(0,_.jsx)(`span`,{className:`text-[10px] text-(--text-muted) shrink-0`,children:e.scope===`builtin`?V(`builtin`):V(`custom`)})]},`${e.scope}-${e.name}`))})]})]})}function uG({query:e,onSelect:t,visible:n}){let[r,i]=(0,d.useState)([]),[a,o]=(0,d.useState)(null);(0,d.useEffect)(()=>{n&&qd().then(e=>{i(Array.isArray(e)?e.filter(e=>e.enabled!==!1&&!iG.has(e.name)&&!sG.has(e.name)):[])}).catch(()=>{})},[n]);let s=e.trim().toLowerCase(),c=(0,d.useMemo)(()=>oG.filter(e=>!s||e.name.includes(s)||e.description.toLowerCase().includes(s)).map(e=>({...e,kind:`action`,key:`action-${e.name}`})),[s]),l=(0,d.useMemo)(()=>r.filter(e=>!s||e.name.toLowerCase().includes(s)||(e.description||``).toLowerCase().includes(s)).map(e=>({name:e.name,insert:`/${e.name} `,icon:lp,description:e.description||`Manual skill`,kind:`skill`,key:`skill-${e.name}`})),[r,s]);if(!n)return null;let u=c.length>0||l.length>0,f=(e,n)=>n.length?(0,_.jsxs)(`div`,{className:`py-1`,children:[(0,_.jsx)(`div`,{className:`px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.45px] text-(--text-muted)`,children:e}),(0,_.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:n.map(e=>{let n=e.icon,r=a===e.key;return(0,_.jsxs)(`button`,{className:B(`w-full border-0 rounded-md px-2.5 py-2 text-left cursor-pointer grid grid-cols-[22px_minmax(96px,180px)_minmax(0,1fr)_auto] items-start gap-2 text-[12px] transition-colors`,r?`bg-(--bg-hover) text-(--text-primary)`:`bg-transparent text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary)`),onClick:()=>t(e.insert),onMouseEnter:()=>o(e.key),onMouseLeave:()=>o(null),children:[(0,_.jsx)(`span`,{className:B(`mt-0.5 inline-flex size-5 items-center justify-center rounded-md transition-colors`,e.kind===`action`?`bg-(--accent-cyan-bg) text-(--accent-cyan)`:`bg-(--accent-purple-bg) text-(--accent-purple)`,!r&&`opacity-80`),children:(0,_.jsx)(n,{size:12})}),(0,_.jsxs)(`span`,{className:`truncate font-medium leading-5 font-mono`,children:[`/`,e.name]}),(0,_.jsx)(`span`,{className:`text-(--text-muted) text-[11px] leading-5 overflow-hidden`,style:{display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`},children:e.description}),(0,_.jsx)(`span`,{className:B(`mt-0.5 rounded-full border px-1.5 py-0.5 text-[10px] uppercase leading-none`,e.kind===`action`?`border-(--accent-cyan)/25 text-(--accent-cyan)`:`border-(--accent-purple)/25 text-(--accent-purple)`),children:e.kind})]},e.key)})})]}):null;return(0,_.jsxs)(`div`,{className:`absolute bottom-full left-0 right-0 mb-1.5 max-h-[360px] overflow-y-auto rounded-xl border border-(--border-default) bg-(--bg-primary) shadow-lg z-50 animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,style:{scrollbarWidth:`thin`},children:[(0,_.jsxs)(`div`,{className:`px-2.5 py-1.5 text-[11px] text-(--text-muted) font-medium flex items-center gap-1.5 border-b border-(--border-default)`,children:[(0,_.jsx)(Tp,{size:11}),`Commands`]}),!u&&(0,_.jsx)(`div`,{className:`px-2.5 py-5 text-[12px] text-(--text-muted) text-center`,children:`No matching commands`}),f(`Actions`,c),c.length>0&&l.length>0&&(0,_.jsx)(`div`,{className:`mx-2.5 h-px bg-(--border-default)`}),f(`Skills`,l)]})}function dG({onSubmit:e,onAbort:t,busy:n,disabled:r=!1,disabledReason:i=``,runtimeState:a,history:o,onCompletionRequest:s,onOpenProject:c,projectCwd:l}){let[u,f]=(0,d.useState)(``),[p,m]=(0,d.useState)([]),[h,g]=(0,d.useState)(-1),[v,y]=(0,d.useState)(``),[b,x]=(0,d.useState)(!1),[S,C]=(0,d.useState)(``),w=(0,d.useRef)(null),T=(a||{}).mode||`normal`,E=n||r;(0,d.useEffect)(()=>{o&&o.length&&p.length===0&&m([...o].reverse())},[o]),(0,d.useEffect)(()=>{E&&x(!1)},[E]);let D=(0,d.useCallback)(()=>{let t=u.trim();!t||E||(e(t),f(``),x(!1),g(-1),w.current&&(w.current.style.height=`auto`))},[u,E,e]),O=(0,d.useCallback)(e=>{if(e.key===`Enter`&&!e.shiftKey){if(b){e.preventDefault();return}e.preventDefault(),D();return}if(b&&e.key===`Escape`){e.preventDefault(),x(!1);return}if(e.key===`ArrowUp`&&p.length>0&&!b){e.preventDefault(),h===-1&&y(u);let t=Math.min(h+1,p.length-1);g(t),f(p[t]);return}if(e.key===`ArrowDown`&&h!==-1&&!b){e.preventDefault();let t=h-1;g(t),f(t<0?v:p[t]);return}e.key===`Tab`&&e.preventDefault()},[u,p,h,v,D,b]),ee=(0,d.useCallback)(e=>{let t=e.target.value;f(t),e.target.style.height=`auto`,e.target.style.height=Math.min(e.target.scrollHeight,160)+`px`,t===`/`?(x(!0),C(``)):t.startsWith(`/`)&&!t.includes(` `)?(x(!0),C(t.slice(1))):x(!1),t.startsWith(`/`)&&s&&s(t)},[s]);return(0,_.jsxs)(`div`,{className:`w-full relative`,children:[(0,_.jsx)(uG,{query:S,onSelect:(0,d.useCallback)(e=>{f(e),x(!1),w.current?.focus()},[]),visible:b}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 p-[12px_14px_10px] border border-(--border-strong) rounded-2xl bg-(--bg-input)`,style:{boxShadow:`var(--shadow-default)`},children:[(0,_.jsx)(`div`,{className:`flex min-h-[32px]`,children:(0,_.jsx)(`textarea`,{ref:w,value:u,onChange:ee,onKeyDown:O,placeholder:n?V(`inputDisabled`):r?i||V(`inputDisabled`):V(`askAnything`),disabled:E,rows:1,className:`flex-1 resize-none border-0 outline-none bg-transparent text-(--text-primary) min-h-[32px] max-h-[160px] p-0 leading-[1.5] text-[14px] placeholder:text-(--text-muted) disabled:opacity-50 disabled:cursor-not-allowed`,style:{height:`auto`}})}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 min-h-[30px] flex-wrap`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,_.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent text-(--text-muted) min-w-[30px] h-[30px] rounded-lg inline-flex items-center justify-center shrink-0 cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary)`,title:V(`addContext`),children:(0,_.jsx)(_p,{size:16})}),(0,_.jsxs)(`button`,{type:`button`,className:`border-0 bg-transparent text-(--text-muted) w-auto px-2 h-[30px] rounded-lg inline-flex items-center justify-center gap-1.5 shrink-0 cursor-pointer text-[12px] whitespace-nowrap hover:bg-(--bg-hover) hover:text-(--text-primary)`,title:V(`switchWorkspace`),onClick:c,children:[(0,_.jsx)(ap,{size:13,className:`shrink-0`}),(0,_.jsx)(`span`,{className:`truncate max-w-[80px]`,children:l||`...`}),(0,_.jsx)(Yf,{size:11})]}),(0,_.jsx)(cG,{current:T,disabled:E}),(0,_.jsx)(lG,{})]}),(0,_.jsx)(`div`,{className:`flex items-center gap-1.5 ml-auto`,children:n?(0,_.jsx)(`button`,{type:`button`,className:`border-0 text-(--accent-red) min-w-[32px] h-[32px] rounded-full inline-flex items-center justify-center shrink-0 cursor-pointer bg-(--accent-red-bg) hover:opacity-80`,onClick:t,title:V(`abort`),children:(0,_.jsx)(pp,{size:14})}):(0,_.jsx)(`button`,{type:`button`,className:B(`border-0 min-w-[34px] w-[34px] h-[34px] rounded-full inline-flex items-center justify-center shrink-0 cursor-pointer transition-all`,u.trim()&&!E?`bg-(--text-primary) text-(--bg-primary) hover:opacity-90`:`bg-(--text-muted)/30 text-(--bg-primary) cursor-not-allowed`),onClick:D,disabled:!u.trim()||E,title:V(`sending`),children:(0,_.jsx)(Uf,{size:16})})})]})]})]})}var fG={thinking:`bg-(--accent-blue)`,streaming:`bg-(--accent-green)`,tooling:`bg-(--accent-orange)`,live:`bg-(--accent-cyan)`};function pG({runtimeState:e,live:t,stageLabel:n}){let r=e||{};r.mode;let i=r.currentContextTokens||0,a=r.maxContextTokens||0,o=a?Math.round(i/a*100):0,s=o<40?`bg-(--accent-green)`:o<75?`bg-(--accent-orange)`:`bg-(--accent-red)`,c=Object.keys(fG).find(e=>(n||``).includes(e))||`live`;return(0,_.jsxs)(`div`,{className:`flex items-center gap-3 flex-1 min-w-0 text-[12px] text-(--text-muted) overflow-hidden`,children:[(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,_.jsx)(Gf,{size:13,className:`shrink-0 opacity-70`}),(0,_.jsx)(`span`,{children:r.model?.toUpperCase()||`-`})]}),(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,_.jsx)(vp,{size:13,className:`shrink-0 opacity-70`}),(0,_.jsx)(`span`,{children:r.sdkProvider?.toUpperCase()||`-`})]}),a>0&&(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,_.jsx)(qf,{size:13,className:`shrink-0 opacity-70`}),(0,_.jsx)(`span`,{children:`CTX`}),(0,_.jsx)(`span`,{className:`w-12 h-1 bg-(--muted) rounded-full overflow-hidden`,children:(0,_.jsx)(`span`,{className:B(`block h-full rounded-full transition-all`,s),style:{width:`${o}%`}})}),(0,_.jsxs)(`span`,{children:[o,`%`]})]}),(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 ml-auto whitespace-nowrap`,children:[(0,_.jsx)(`span`,{className:B(`w-1.5 h-1.5 rounded-full shrink-0`,t?fG[c]:`bg-(--text-muted)`,t&&`animate-pulse`)}),(0,_.jsx)(`span`,{children:t?n:V(`idle`)})]})]})}function mG({className:e,value:t,...n}){return(0,_.jsx)(Io,{"data-slot":`progress`,className:B(`relative h-2 w-full overflow-hidden rounded-full bg-primary/20`,e),...n,children:(0,_.jsx)(Lo,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})})}function hG(){return[{value:`fast`,label:V(`generationDepthFast`)},{value:`standard`,label:V(`generationDepthStandard`)},{value:`deep`,label:V(`generationDepthDeep`)}]}function gG(e){if(!e)return``;try{return new Intl.DateTimeFormat(`zh-CN`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}).format(new Date(e))}catch{return``}}function _G(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?``:t<1024?`${t} B`:t<1024*1024?`${Math.round(t/1024)} KB`:`${(t/1024/1024).toFixed(1)} MB`}function vG(e,t){let n=Array.isArray(e)?e:[];if(!n.length)return{done:0,total:0,pct:8,label:t||V(`startingAnalysis`),detail:V(`preparingScan`)};let r=n.filter(e=>e.status===`done`).length,i=n.find(e=>e.status===`failed`),a=n.find(e=>e.status===`running`)||n.find(e=>e.status===`in_progress`)||n.find(e=>e.status===`pending`)||n[n.length-1];return{done:r,total:n.length,pct:Math.max(8,Math.round(r/n.length*100)),label:i?V(`generationFailed`):a?.title||t||V(`generatingCodeWiki`),detail:i?i.title:`${r}/${n.length} ${V(`stepsCompleted`)}${a?.role?` · ${a.role.toUpperCase()}`:``}`}}function yG({steps:e,stageLabel:t,compact:n=!1}){let r=vG(e,t);return(0,_.jsxs)(`div`,{className:B(`rounded-lg border border-(--border-default) bg-(--bg-primary) p-3 text-left`,n?`mt-3`:`mt-5 w-full max-w-md`),children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`span`,{className:`truncate text-[12px] font-medium text-(--text-primary)`,children:r.label}),r.total>0&&(0,_.jsxs)(`span`,{className:`shrink-0 text-[11px] text-(--text-muted)`,children:[r.done,`/`,r.total]})]}),(0,_.jsx)(mG,{value:r.pct,className:`mt-2 h-1.5`}),(0,_.jsx)(`p`,{className:`mt-2 truncate text-[11px] text-(--text-muted)`,children:r.detail})]})}function bG(e,t){if(!Array.isArray(e)||e.length===0)return[{type:`tools`,cards:[t]}];let n=e[e.length-1];return n.type===`tools`?[...e.slice(0,-1),{...n,cards:[...n.cards,t]}]:[...e,{type:`tools`,cards:[t]}]}function xG(e,t,n){return(Array.isArray(e)?e:[]).map(e=>{if(e.type!==`tools`)return e;let r=e.cards.findIndex(e=>e.id===t);if(r===-1)return e;let i=[...e.cards];return i[r]=n(i[r]),{...e,cards:i}})}function SG(e){let t=Array.isArray(e)?e:[];return t.length===0?[{type:`text`,text:``,isStreaming:!1}]:t[t.length-1].type===`text`?t:[...t,{type:`text`,text:``,isStreaming:!1}]}function CG(e,t){let n=String(t||``);if(!n)return Array.isArray(e)?e:[];let r=SG(e),i=r[r.length-1];return[...r.slice(0,-1),{...i,text:`${i.text||``}${n}`,isStreaming:!0}]}function wG(e,t){let n=SG(e),r=n.length-1;return n.map((e,n)=>n===r&&e.type===`text`?{...e,text:t,isStreaming:!1}:e)}function TG(e){return(Array.isArray(e)?e:[]).map(e=>e.type===`text`?{...e,isStreaming:!1}:e)}function EG(e,t){switch(t?.type){case`assistant:delta`:return{...e,segments:CG(e.segments,t.text)};case`assistant:response`:return{...e,segments:t.text?wG(e.segments,t.text):TG(e.segments)};case`tool:start`:return{...e,segments:bG(e.segments,{id:t.id,name:t.name,arguments:t.arguments,status:`running`,durationMs:null,summary:``,result:``})};case`tool:result`:return{...e,segments:xG(e.segments,t.id,e=>({...e,result:t.content||e.result||``}))};case`tool:end`:return{...e,segments:xG(e.segments,t.id,e=>({...e,status:`done`,durationMs:t.durationMs,summary:t.summary||e.summary||``}))};case`tool:error`:return{...e,segments:xG(e.segments,t.id,e=>({...e,status:`error`,durationMs:t.durationMs,summary:t.summary||e.summary||``}))};case`tool:blocked`:return{...e,segments:xG(e.segments,t.id,e=>({...e,status:`blocked`,summary:e.summary||`Tool blocked`}))};case`codewiki:done`:return{...e,loading:!1,segments:TG(e.segments)};case`codewiki:error`:return{...e,role:`error`,loading:!1,segments:[{type:`text`,text:t.message||V(`codewikiFailed`),isStreaming:!1}]};default:return e}}function DG({projectCwd:e,projectKey:t,busy:n,planSteps:r=[],stageLabel:i=``}){let[a,o]=(0,d.useState)([]),[s,c]=(0,d.useState)(``),[l,u]=(0,d.useState)(!0),[f,p]=(0,d.useState)(!1),[m,h]=(0,d.useState)(``),[g,v]=(0,d.useState)(!1),[y,b]=(0,d.useState)(``),[x,S]=(0,d.useState)(``),[C,w]=(0,d.useState)(!1),[T,E]=(0,d.useState)(null),[D,O]=(0,d.useState)(!1),[ee,k]=(0,d.useState)(`standard`),[A,j]=(0,d.useState)([]),[M,N]=(0,d.useState)(!1),te=(0,d.useRef)(null),P=(0,d.useMemo)(()=>a.find(e=>e.file===s)||null,[a,s]),F=P?`/api/codewiki/report/${encodeURIComponent(P.file)}`:``,ne=(0,d.useCallback)(async({preferNewest:e=!1}={})=>{u(!0),h(``);try{let t=await of(),n=[...Array.isArray(t?.reports)?t.reports:[]].sort((e,t)=>new Date(t.mtime||0)-new Date(e.mtime||0));o(n),c(t=>e&&n[0]?n[0].file:n.some(e=>e.file===t)?t:n[0]?.file||``)}catch(e){h(e?.message||V(`failedToLoad`))}finally{u(!1)}},[]);(0,d.useEffect)(()=>{o([]),c(``),v(!1),b(``),S(``),j([]),N(!1),ne({preferNewest:!0})},[ne,t]),(0,d.useEffect)(()=>{let e=te.current;e&&requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight})},[A,M]),(0,d.useEffect)(()=>{f&&n&&w(!0)},[n,f]),(0,d.useEffect)(()=>{!f||n||!C||(ne({preferNewest:!0}),p(!1),w(!1))},[n,f,ne,C]);let re=async()=>{if(!(n||f)){h(``),p(!0),w(!1);try{let e=await sf(ee);e?.error&&(p(!1),h(e.message||V(`failedToStart`)))}catch(e){p(!1),h(e?.message||V(`failedToStart`))}}},ie=async e=>{e.preventDefault();let t=y.trim();if(!t||I||M)return;let n=Date.now(),r=`cw-assistant-${n}`;S(t),b(``),h(``),j(e=>[...e,{id:`cw-user-${n}`,role:`you`,text:t,segments:[{type:`text`,text:t,isStreaming:!1}],timestamp:new Date().toISOString()},{id:r,role:`general`,text:``,segments:[],timestamp:new Date().toISOString(),loading:!0}]),N(!0);try{await cf({question:t,reportFile:P?.file||``,onEvent:e=>{j(t=>t.map(t=>t.id===r?EG(t,e):t))}})}catch(e){j(t=>t.map(t=>t.id===r?{...t,role:`error`,loading:!1,segments:[{type:`text`,text:e?.message||V(`codewikiFailed`),isStreaming:!1}]}:t))}finally{N(!1)}},ae=async()=>{if(T){O(!0),h(``);try{let e=await lf(T.file);e?.error?h(e.message||V(`failedToDelete`)):(E(null),v(!1),await ne({preferNewest:!1}))}catch(e){h(e?.message||V(`failedToDelete`))}finally{O(!1)}}},I=n||f,L=I||M;return(0,_.jsxs)(`div`,{className:`flex-1 min-h-0 bg-(--bg-primary) rounded-[18px] border border-(--border-default) border-b-0 overflow-hidden my-1 mx-1`,children:[(0,_.jsxs)(`div`,{className:`grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)_420px] max-xl:grid-cols-[220px_minmax(0,1fr)] max-lg:grid-cols-1`,children:[(0,_.jsxs)(`aside`,{className:`border-r border-(--border-default) bg-(--bg-secondary) min-h-0 flex flex-col max-lg:hidden`,children:[(0,_.jsxs)(`div`,{className:`p-4 border-b border-(--border-default)`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-(--text-primary)`,children:[(0,_.jsx)(Wf,{size:18}),(0,_.jsx)(`span`,{className:`font-semibold text-[15px]`,children:`CodeWiki`})]}),(0,_.jsx)(`p`,{className:`mt-2 text-[12px] leading-5 text-(--text-muted) truncate`,title:e||``,children:e||V(`currentProject`)}),(0,_.jsx)(`div`,{className:`mt-4 grid grid-cols-3 gap-1 rounded-lg border border-(--border-default) bg-(--bg-primary) p-1`,children:hG().map(e=>(0,_.jsx)(`button`,{type:`button`,className:B(`h-7 rounded-md text-[12px] text-(--text-muted) hover:bg-(--bg-hover) hover:text-(--text-primary) disabled:cursor-not-allowed disabled:opacity-60`,ee===e.value&&`bg-(--bg-active) text-(--text-primary)`),disabled:I,onClick:()=>k(e.value),children:e.label},e.value))}),(0,_.jsxs)(`button`,{className:`mt-3 w-full h-9 rounded-lg border border-(--border-default) bg-(--bg-primary) text-[13px] text-(--text-primary) inline-flex items-center justify-center gap-2 hover:bg-(--bg-hover) disabled:cursor-not-allowed disabled:opacity-60`,onClick:re,disabled:I,children:[f?(0,_.jsx)(fp,{size:15,className:`animate-spin`}):(0,_.jsx)(Tp,{size:15}),V(f?`generating`:`generateNew`)]}),f&&(0,_.jsx)(yG,{steps:r,stageLabel:i,compact:!0})]}),(0,_.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3`,children:[(0,_.jsx)(`span`,{className:`text-[12px] font-medium text-(--text-muted)`,children:V(`report`)}),(0,_.jsx)(`button`,{className:`inline-flex size-7 items-center justify-center rounded-md text-(--text-muted) hover:bg-(--bg-hover) hover:text-(--text-primary)`,onClick:()=>ne({preferNewest:!0}),title:V(`refreshReport`),"aria-label":V(`refreshReport`),children:(0,_.jsx)(yp,{size:14})})]}),(0,_.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-2 pb-4`,children:[l&&(0,_.jsxs)(`div`,{className:`px-3 py-6 text-[12px] text-(--text-muted) inline-flex items-center gap-2`,children:[(0,_.jsx)(fp,{size:14,className:`animate-spin`}),V(`loadingReport`)]}),!l&&a.length===0&&(0,_.jsx)(`div`,{className:`mx-2 rounded-lg border border-dashed border-(--border-default) px-3 py-4 text-[12px] leading-5 text-(--text-muted)`,children:V(`noReportYet`)}),(0,_.jsx)(`div`,{className:`flex flex-col gap-1`,children:a.map(e=>(0,_.jsxs)(`div`,{className:B(`group w-full rounded-lg px-3 py-2 text-left hover:bg-(--bg-hover) cursor-pointer`,s===e.file&&`bg-(--bg-active)`),onClick:()=>{c(e.file),v(!1)},children:[(0,_.jsxs)(`span`,{className:`flex items-start gap-2 text-[13px] text-(--text-primary)`,children:[(0,_.jsx)(ip,{size:14,className:`shrink-0 mt-0.5 text-(--text-muted)`}),(0,_.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.file}),(0,_.jsxs)(Np,{children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsx)(`button`,{type:`button`,className:`inline-flex size-6 shrink-0 items-center justify-center rounded-md text-(--text-muted) opacity-0 hover:bg-(--bg-active) hover:text-(--text-primary) group-hover:opacity-100 focus:opacity-100`,onClick:e=>e.stopPropagation(),"aria-label":V(`reportActions`),children:(0,_.jsx)(tp,{size:14})})}),(0,_.jsx)(Fp,{align:`end`,className:`w-36 border-(--border-default) bg-(--bg-primary) p-1 text-(--text-primary)`,onClick:e=>e.stopPropagation(),children:(0,_.jsx)(`button`,{type:`button`,className:`w-full rounded-md px-2.5 py-2 text-left text-[13px] text-(--accent-red) hover:bg-(--accent-red-bg)`,onClick:()=>E(e),children:V(`deleteReport`)})})]})]}),(0,_.jsxs)(`span`,{className:`mt-1 block truncate pl-6 text-[11px] text-(--text-muted)`,children:[gG(e.mtime),_G(e.size)?` · ${_G(e.size)}`:``]})]},e.file))})]})]}),(0,_.jsxs)(`main`,{className:`min-w-0 min-h-0 flex flex-col bg-(--bg-primary)`,children:[m&&(0,_.jsxs)(`div`,{className:`mx-5 mt-4 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-[12px] text-red-400 inline-flex items-center gap-2`,children:[(0,_.jsx)(Zf,{size:14}),m]}),(0,_.jsx)(`div`,{className:`flex-1 min-h-0 p-4`,children:!P&&!l?(0,_.jsxs)(`div`,{className:`h-full min-h-[420px] rounded-xl border border-dashed border-(--border-default) bg-(--bg-secondary) flex flex-col items-center justify-center text-center px-8`,children:[(0,_.jsx)(Wf,{size:34,className:`text-(--text-muted)`}),(0,_.jsx)(`h2`,{className:`mt-4 text-[18px] font-semibold text-(--text-primary)`,children:V(`noCodeWiki`)}),(0,_.jsx)(`p`,{className:`mt-2 max-w-md text-[13px] leading-6 text-(--text-muted)`,children:V(`reportWillShow`)}),(0,_.jsxs)(`button`,{className:`mt-5 h-10 rounded-lg bg-(--text-primary) px-4 text-[13px] font-medium text-(--bg-primary) inline-flex items-center gap-2 disabled:cursor-not-allowed disabled:opacity-60`,onClick:re,disabled:I,children:[f?(0,_.jsx)(fp,{size:16,className:`animate-spin`}):(0,_.jsx)(Tp,{size:16}),V(f?`generating`:`generateNew`)]}),(0,_.jsx)(`div`,{className:`mt-3 grid w-full max-w-xs grid-cols-3 gap-1 rounded-lg border border-(--border-default) bg-(--bg-primary) p-1`,children:hG().map(e=>(0,_.jsx)(`button`,{type:`button`,className:B(`h-7 rounded-md text-[12px] text-(--text-muted) hover:bg-(--bg-hover) hover:text-(--text-primary) disabled:cursor-not-allowed disabled:opacity-60`,ee===e.value&&`bg-(--bg-active) text-(--text-primary)`),disabled:I,onClick:()=>k(e.value),children:e.label},e.value))}),f&&(0,_.jsx)(yG,{steps:r,stageLabel:i})]}):(0,_.jsx)(`div`,{className:`h-full min-h-[420px] overflow-hidden rounded-xl border border-(--border-default) bg-(--bg-secondary)`,children:g?(0,_.jsxs)(`div`,{className:`h-full flex flex-col items-center justify-center px-8 text-center`,children:[(0,_.jsx)(Zf,{size:28,className:`text-(--text-muted)`}),(0,_.jsx)(`p`,{className:`mt-3 text-[13px] text-(--text-secondary)`,children:V(`reportLoadFailed`)}),(0,_.jsx)(`button`,{className:`mt-4 h-8 rounded-md border border-(--border-default) px-3 text-[12px] text-(--text-primary) hover:bg-(--bg-hover)`,onClick:()=>v(!1),children:V(`retry`)})]}):P?(0,_.jsx)(`iframe`,{title:`CodeWiki ${P.file}`,src:F,sandbox:`allow-scripts`,className:`h-full w-full border-0 bg-white`,onLoad:()=>v(!1),onError:()=>v(!0)},P.file):(0,_.jsxs)(`div`,{className:`h-full flex items-center justify-center text-[13px] text-(--text-muted)`,children:[(0,_.jsx)(fp,{size:16,className:`mr-2 animate-spin`}),V(`loading`)]})})})]}),(0,_.jsxs)(`aside`,{className:`border-l border-(--border-default) bg-(--bg-secondary) min-h-0 flex flex-col max-xl:hidden`,children:[(0,_.jsx)(`div`,{className:`p-4 border-b border-(--border-default)`,children:(0,_.jsx)(`p`,{className:`mt-2 text-[12px] leading-5 text-(--text-muted)`,children:V(f?`noQuestionsDuringGeneration`:`tempReadOnlyQa`)})}),(0,_.jsx)(`div`,{ref:te,className:`flex-1 min-h-0 overflow-y-auto px-4 py-3`,children:A.length===0?(0,_.jsxs)(`div`,{className:`rounded-xl border border-(--border-default) bg-(--bg-primary) p-4`,children:[(0,_.jsx)(`p`,{className:`text-[13px] font-medium text-(--text-primary)`,children:V(f?`generatingCodeWiki`:M||n?`processingQuestion`:`canAskAboutProject`)}),(0,_.jsx)(`p`,{className:`mt-2 text-[12px] leading-5 text-(--text-muted)`,children:f?V(`askAfterGeneration`):x||V(`exampleQuestions`)})]}):(0,_.jsx)(`div`,{className:`flex flex-col`,children:A.map(e=>(0,_.jsxs)(`div`,{children:[(0,_.jsx)(nG,{message:e}),e.loading&&(!e.segments||e.segments.length===0)&&(0,_.jsxs)(`div`,{className:`mt-[-12px] mb-3 ml-1 inline-flex items-center gap-2 rounded-xl border border-(--border-default) bg-(--bg-primary) px-3 py-2 text-[12px] text-(--text-muted)`,children:[(0,_.jsx)(fp,{size:14,className:`animate-spin`}),V(`answering`)]})]},e.id))})}),(0,_.jsx)(`form`,{className:`p-4 border-t border-(--border-default)`,onSubmit:ie,children:(0,_.jsxs)(`div`,{className:`flex items-center gap-2 rounded-full border border-(--border-default) bg-(--bg-primary) px-3 py-2`,children:[(0,_.jsx)(`input`,{value:y,onChange:e=>b(e.target.value),placeholder:f?V(`generatingCodeWiki`):M||n?V(`answering`):`Ask about this repository`,disabled:L,className:`min-w-0 flex-1 border-0 bg-transparent text-[13px] text-(--text-primary) outline-none placeholder:text-(--text-muted) disabled:opacity-60`}),(0,_.jsx)(`button`,{type:`submit`,className:`inline-flex size-7 items-center justify-center rounded-full text-(--text-muted) hover:bg-(--bg-hover) hover:text-(--text-primary) disabled:cursor-not-allowed disabled:opacity-50`,disabled:L||!y.trim(),"aria-label":V(`sendingQuestion`),children:M?(0,_.jsx)(fp,{size:15,className:`animate-spin`}):(0,_.jsx)(Sp,{size:15})})]})})]})]}),(0,_.jsx)(Yp,{open:!!T,title:V(`deleteReportConfirm`),description:V(`deleteReportDescription`).replace(`{{report}}`,T?.title||T?.file||``),loading:D,onOpenChange:e=>!e&&E(null),onConfirm:ae})]})}function OG(e,t){return e===`delete`?`delete`:e===`run`?`run`:t?.planApproval?`plan`:t?.reflectApproval?`reflect`:`generic`}function kG(e){if(!e)return{};try{let t=typeof e==`string`?JSON.parse(e):e;return{...t,_raw:JSON.stringify(t)}}catch{return{_raw:String(e)}}}function AG({label:e,value:t}){return(0,_.jsxs)(`div`,{className:`flex gap-3 py-1.5`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-muted) w-20 shrink-0`,children:e}),(0,_.jsx)(`span`,{className:`text-[13px] font-mono break-all text-(--text-primary)`,children:String(t)})]})}function jG({variant:e,args:t,details:n}){if(e===`delete`){let e=kG(t);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(AG,{label:`File`,value:e.path||e.name||`-`}),(0,_.jsx)(AG,{label:`Type`,value:e.type||`file`})]})}return e===`run`?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(AG,{label:`Command`,value:kG(t).command||`-`}),n?.risk&&(0,_.jsx)(AG,{label:`Risk`,value:n.risk}),n?.description&&(0,_.jsx)(AG,{label:`Info`,value:n.description})]}):e===`plan`?(0,_.jsxs)(_.Fragment,{children:[n?.title&&(0,_.jsx)(`p`,{className:`text-sm mb-2`,children:n.title}),n?.steps&&(0,_.jsx)(`ol`,{className:`list-decimal list-inside space-y-1`,children:n.steps.map((e,t)=>(0,_.jsxs)(`li`,{className:`text-sm`,children:[e.role||``,`: `,e.title||``]},t))})]}):e===`reflect`?(0,_.jsxs)(_.Fragment,{children:[n?.scope&&(0,_.jsx)(AG,{label:`Scope`,value:n.scope}),n?.skillName&&(0,_.jsx)(AG,{label:`Skill`,value:n.skillName}),n?.targetPath&&(0,_.jsx)(AG,{label:`Path`,value:n.targetPath})]}):(0,_.jsx)(AG,{label:`Tool`,value:kG(t)._raw||`-`})}function MG({request:e,open:t,onDecision:n}){if(!e)return null;let{id:r,toolName:i,displayName:a,arguments:o,details:s}=e,c=OG(i,s);return(0,_.jsx)(Vp,{open:t,onOpenChange:e=>{e||n(r,!1)},children:(0,_.jsxs)(Wp,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Gp,{children:(0,_.jsx)(qp,{children:{delete:V(`deleteApproval`),run:V(`runApproval`),plan:V(`planApproval`),reflect:V(`reflectApproval`),generic:V(`approveTitle`)}[c]||V(`approveTitle`)})}),(0,_.jsx)(`div`,{className:`py-2`,children:(0,_.jsx)(jG,{variant:c,args:o,details:s})}),(0,_.jsxs)(Kp,{className:`gap-2`,children:[(0,_.jsx)(Bp,{variant:`outline`,onClick:()=>n(r,!1),children:V(`deny`)}),(0,_.jsx)(Bp,{onClick:()=>n(r,!0),children:V(`approve`)})]})]})})}var NG=Rp(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function PG({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,_.jsx)(n?y:`span`,{"data-slot":`badge`,"data-variant":t,className:B(NG({variant:t}),e),...r})}function FG({className:e,...t}){return(0,_.jsx)(`textarea`,{"data-slot":`textarea`,className:B(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}var IG={planner:`bg-(--accent-purple-bg) text-(--accent-purple)`,coder:`bg-(--accent-green-bg) text-(--accent-green)`,reviewer:`bg-(--accent-orange-bg) text-(--accent-orange)`,tester:`bg-(--accent-blue-bg) text-(--accent-blue)`,advisor:`bg-(--accent-blue-bg) text-(--accent-blue)`,summarizer:`bg-(--accent-cyan-bg) text-(--accent-cyan)`};function LG({steps:e}){if(!e?.length)return null;let t=e.filter(e=>e.status===`done`).length,n=t===e.length,r=Math.round(t/e.length*100);return(0,_.jsxs)(`div`,{className:`border border-(--border-default) rounded-lg p-3 my-2 max-w-3xl mx-auto bg-(--bg-secondary)`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary)`,children:V(`planTitle`)}),(0,_.jsx)(PG,{className:B(`text-[11px]`,n?`bg-(--accent-green-bg) text-(--accent-green)`:`bg-(--accent-blue-bg) text-(--accent-blue)`),children:n?V(`planDone`):`${t}/${e.length}`})]}),(0,_.jsx)(mG,{value:r,className:`h-1.5 mb-3`}),(0,_.jsx)(`div`,{className:`space-y-1.5`,children:e.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,_.jsx)(`span`,{className:B(`w-5 h-5 rounded-full flex items-center justify-center text-[11px] font-medium shrink-0`,e.status===`done`&&`bg-(--accent-green-bg) text-(--accent-green)`,e.status===`failed`&&`bg-(--accent-red-bg) text-(--accent-red)`,e.status===`running`&&`bg-(--accent-blue-bg) text-(--accent-blue)`,e.status===`pending`&&`bg-(--muted) text-(--muted-foreground)`),children:e.status===`done`?`✓`:e.status===`failed`?`✗`:e.status===`running`?`▶`:e.index+1}),(0,_.jsx)(PG,{variant:`outline`,className:B(`text-[11px] px-1.5 py-0`,IG[e.role]||`bg-(--muted) text-(--muted-foreground)`),children:e.role?.toUpperCase()}),(0,_.jsx)(`span`,{className:`truncate text-(--text-secondary)`,children:e.title})]},t))})]})}function RG({plan:e,onAction:t,disabled:n=!1}){let[r,i]=(0,d.useState)(!1),[a,o]=(0,d.useState)(``);if(!e)return null;let s=Array.isArray(e.steps)?e.steps:[];return(0,_.jsxs)(`div`,{className:`border border-(--border-default) rounded-lg p-3 max-w-3xl mx-auto bg-(--bg-secondary) space-y-2.5`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary)`,children:V(`planReviewTitle`)}),(0,_.jsx)(PG,{className:`text-[11px] bg-(--accent-orange-bg) text-(--accent-orange)`,children:V(`planReviewStatus`)})]}),(0,_.jsx)(`p`,{className:`text-[13px] text-(--text-secondary) leading-relaxed`,children:e.goal}),e.summary&&(0,_.jsx)(`p`,{className:`text-[12px] text-(--text-muted) leading-relaxed`,children:e.summary}),(0,_.jsx)(`div`,{className:`space-y-1.5`,children:s.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,_.jsx)(`span`,{className:`w-5 h-5 rounded-full bg-(--muted) text-(--muted-foreground) flex items-center justify-center text-[11px] font-medium shrink-0`,children:t+1}),(0,_.jsx)(PG,{variant:`outline`,className:B(`text-[11px] px-1.5 py-0 shrink-0`,IG[e.role||``]||`bg-(--muted) text-(--muted-foreground)`),children:String(e.role||`step`).toUpperCase()}),(0,_.jsx)(`span`,{className:`truncate text-(--text-secondary)`,children:e.title})]},t))}),r&&(0,_.jsx)(FG,{value:a,onChange:e=>o(e.target.value),placeholder:V(`planEditPlaceholder`),className:`min-h-[64px] text-[13px]`,autoFocus:!0}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,_.jsx)(Bp,{variant:`destructive`,size:`xs`,disabled:n,onClick:()=>t(`reject`),children:V(`planReject`)}),(0,_.jsx)(Bp,{variant:`outline`,size:`xs`,disabled:n||r&&!a.trim(),onClick:()=>{r?(a.trim()&&t(`edit`,a),a.trim()&&(i(!1),o(``))):i(!0)},children:V(r?`planSubmitFeedback`:`planEdit`)}),(0,_.jsx)(Bp,{size:`xs`,disabled:n,onClick:()=>t(`approve`),children:V(`planApprove`)})]})]})}function zG({className:e,type:t,...n}){return(0,_.jsx)(`input`,{type:t,"data-slot":`input`,className:B(`h-8 w-full min-w-0 rounded-md border border-(--border-default) bg-transparent px-3 py-1 text-[13px] transition-colors outline-none placeholder:text-(--text-muted) disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-(--text-secondary) focus-visible:ring-0`,e),...n})}function BG({...e}){return(0,_.jsx)(Ic,{"data-slot":`select`,...e})}function VG({...e}){return(0,_.jsx)(Rc,{"data-slot":`select-value`,...e})}function HG({className:e,size:t,children:n,...r}){return(0,_.jsxs)(Lc,{"data-slot":`select-trigger`,"data-size":t,className:B(`flex w-fit items-center justify-between gap-2 rounded-md border border-(--border-default) bg-transparent px-3 py-1 text-[13px] whitespace-nowrap transition-colors outline-none focus-visible:border-(--text-secondary) focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-(--text-muted) h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-(--text-muted)`,e),...r,children:[n,(0,_.jsx)(zc,{asChild:!0,children:(0,_.jsx)(Yf,{className:`size-3.5 opacity-50`})})]})}function UG({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,_.jsx)(Bc,{children:(0,_.jsxs)(Vc,{"data-slot":`select-content`,className:B(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border border-(--border-default) bg-(--bg-primary) text-(--text-primary) shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,_.jsx)(GG,{}),(0,_.jsx)(Hc,{className:B(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,_.jsx)(KG,{})]})})}function WG({className:e,children:t,...n}){return(0,_.jsxs)(Uc,{"data-slot":`select-item`,className:B(`relative flex w-full cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-[13px] outline-hidden select-none hover:bg-(--bg-hover) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-(--text-muted) *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,_.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,_.jsx)(Gc,{children:(0,_.jsx)(Jf,{className:`size-4`})})}),(0,_.jsx)(Wc,{children:t})]})}function GG({className:e,...t}){return(0,_.jsx)(Kc,{"data-slot":`select-scroll-up-button`,className:B(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,_.jsx)(Yf,{className:`size-4 rotate-180`})})}function KG({className:e,...t}){return(0,_.jsx)(qc,{"data-slot":`select-scroll-down-button`,className:B(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,_.jsx)(Yf,{className:`size-4`})})}function qG(e,t){return t.split(`.`).reduce((e,t)=>e?.[t],e)}function JG({open:e,onOpenChange:t}){let n=[{title:V(`gateway`),keys:[{path:`gateway.base_url`,label:V(`baseUrl`),placeholder:`http://127.0.0.1:8000/v1`},{path:`gateway.api_key`,label:V(`apiKey`),type:`password`,placeholder:`sk-...`},{path:`gateway.timeout_ms`,label:V(`timeout`),type:`number`},{path:`gateway.max_retries`,label:V(`maxRetries`),type:`number`}]},{title:V(`sdk`),keys:[{path:`sdk.provider`,label:V(`provider`),options:[`openai-compatible`,`anthropic`]}]},{title:V(`model`),keys:[{path:`model.name`,label:V(`modelName`),placeholder:`gpt-4.1-mini`},{path:`model.fast_name`,label:V(`fastModel`),placeholder:`fallback to Model Name when empty`},{path:`model.max_context_tokens`,label:V(`maxContextTokens`),type:`number`}]},{title:V(`execution`),keys:[{path:`execution.mode`,label:V(`mode`),options:[`auto`,`plan`]},{path:`execution.max_steps`,label:V(`maxSteps`),type:`number`},{path:`ui.reply_language`,label:V(`replyLanguage`),options:[`zh`,`en`]}]},{title:V(`context`),keys:[{path:`context.preflight_trigger_pct`,label:V(`preflightTrigger`),type:`number`,placeholder:`60`},{path:`context.hard_limit_pct`,label:V(`hardLimit`),type:`number`,placeholder:`98`},{path:`context.tool_result_max_chars`,label:V(`toolResultMaxChars`),type:`number`,placeholder:`12000`},{path:`context.microcompact_enabled`,label:V(`microcompactEnabled`),options:[`true`,`false`]},{path:`context.microcompact_keep_recent`,label:V(`microcompactKeepRecent`),type:`number`,placeholder:`5`}]},{title:V(`shell`),keys:[{path:`shell.default`,label:V(`defaultShell`),options:[`bash`,`powershell`,`zsh`,`cmd`]}]}],[r,i]=(0,d.useState)(null),[a,o]=(0,d.useState)({});(0,d.useEffect)(()=>{e&&zd().then(e=>{i(e),o({})}).catch(()=>{})},[e]);let s=(e,t)=>{o(n=>({...n,[e]:t}))},c=e=>e in a?a[e]:r?String(qG(r,e)??``):``,l=Object.keys(a).length>0;return(0,_.jsx)(Vp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[640px] max-h-[80vh] flex flex-col`,children:[(0,_.jsx)(Gp,{className:`shrink-0`,children:(0,_.jsx)(qp,{children:V(`settingsTitle`)})}),(0,_.jsx)(`div`,{className:`space-y-5 py-1 overflow-y-auto flex-1 min-h-0`,children:n.map((e,t)=>(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-[13px] font-semibold text-(--text-secondary) mb-2.5 uppercase tracking-[0.3px]`,children:e.title}),(0,_.jsx)(`div`,{className:`space-y-2.5`,children:e.keys.map(e=>(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-32 shrink-0`,children:e.label}),e.options?(0,_.jsxs)(BG,{value:c(e.path),onValueChange:t=>s(e.path,t),children:[(0,_.jsx)(HG,{className:`flex-1 h-8 text-[13px]`,children:(0,_.jsx)(VG,{})}),(0,_.jsx)(UG,{children:e.options.map(e=>(0,_.jsx)(WG,{value:e,children:e},e))})]}):(0,_.jsx)(zG,{type:e.type||`text`,value:c(e.path),onChange:t=>s(e.path,t.target.value),placeholder:e.placeholder||``,className:`flex-1 h-8 text-[13px]`})]},e.path))}),t<n.length-1&&(0,_.jsx)(Mp,{className:`mt-4 bg-(--border-default)`})]},e.title))}),(0,_.jsxs)(Kp,{className:`gap-2 shrink-0`,children:[(0,_.jsx)(Bp,{variant:`outline`,onClick:()=>t(!1),className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(Bp,{onClick:async()=>{try{for(let[e,t]of Object.entries(a))await Bd(e,n.flatMap(e=>e.keys).find(t=>t.path===e)?.type===`number`?Number(t):t);o({}),t(!1)}catch(e){console.error(`Config save failed:`,e)}},disabled:!l,className:`text-[13px]`,children:V(`saveChanges`)})]})]})})}function YG({className:e,children:t,...n}){return(0,_.jsxs)(bs,{"data-slot":`scroll-area`,className:B(`relative`,e),...n,children:[(0,_.jsx)(xs,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,_.jsx)(XG,{}),(0,_.jsx)(Ss,{})]})}function XG({className:e,orientation:t=`vertical`,...n}){return(0,_.jsx)(Jo,{"data-slot":`scroll-area-scrollbar`,orientation:t,className:B(`flex touch-none p-px transition-colors select-none`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,e),...n,children:(0,_.jsx)(as,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}function ZG({open:e,onOpenChange:t,onOpenProject:n}){let[r,i]=(0,d.useState)(``),[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)(``);(0,d.useEffect)(()=>{e&&Vd().then(e=>{i(e.cwd||``),c(e.cwd||`/`),l(e.cwd||`/`)}).catch(()=>{})},[e]);let l=async e=>{try{o(await Kd(e)),c(e)}catch{}},u=()=>{let e=r.trim();e&&(t(!1),n(e))},f=(s||``).replace(/\\/g,`/`),p=f.startsWith(`/`),m=f.split(`/`).filter(Boolean);return(0,_.jsx)(Vp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Wp,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Gp,{children:(0,_.jsx)(qp,{children:V(`selectProject`)})}),(0,_.jsxs)(`div`,{className:`flex gap-2`,children:[(0,_.jsx)(zG,{value:r,onChange:e=>i(e.target.value),placeholder:V(`enterOrBrowse`),onKeyDown:e=>e.key===`Enter`&&u(),className:`flex-1 h-8 text-[13px]`}),(0,_.jsx)(Bp,{onClick:u,className:`text-[13px] h-8`,children:V(`select`)})]}),(0,_.jsxs)(`div`,{className:`border border-(--border-default) rounded-lg overflow-hidden`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-1 text-[12px] px-3 py-2 border-b border-(--border-default) bg-(--bg-secondary) flex-wrap text-(--text-secondary)`,children:m.map((e,t)=>{let n=(p?`/`:``)+m.slice(0,t+1).join(`/`);return(0,_.jsxs)(`span`,{className:`flex items-center gap-1`,children:[t>0&&(0,_.jsx)(`span`,{className:`text-(--text-muted)`,children:`/`}),(0,_.jsx)(`button`,{onClick:()=>{i(n),l(n)},className:B(`hover:underline cursor-pointer border-0 bg-transparent`,t===m.length-1?`text-(--text-primary) font-medium`:`text-(--accent-blue)`),children:e})]},t)})}),(0,_.jsx)(YG,{className:`h-[240px]`,children:a&&(0,_.jsxs)(`div`,{className:`p-2`,children:[m.length>0&&(0,_.jsx)(`button`,{className:`w-full text-left px-2 py-1.5 text-[13px] hover:bg-(--bg-hover) rounded cursor-pointer flex items-center gap-2 border-0 bg-transparent text-(--text-secondary)`,onClick:()=>{let e=(p?`/`:``)+m.slice(0,-1).join(`/`);i(e),l(e)},children:(0,_.jsx)(`span`,{children:`..`})}),(a.dirs||[]).map(e=>(0,_.jsxs)(`button`,{className:`w-full text-left px-2 py-1.5 text-[13px] hover:bg-(--bg-hover) rounded cursor-pointer flex items-center gap-2 border-0 bg-transparent text-(--text-secondary)`,onClick:()=>{i(e.path),l(e.path)},children:[(0,_.jsx)(`span`,{className:`flex-1 truncate`,children:e.name}),e.isGit&&(0,_.jsx)(`span`,{className:`text-[11px] text-(--text-muted) bg-(--bg-tertiary) px-1.5 py-0.5 rounded`,children:`git`})]},e.path)),!(a.dirs||[]).length&&!a.error&&(0,_.jsx)(`div`,{className:`text-center text-[12px] text-(--text-muted) py-4`,children:V(`noSubDirs`)})]})})]})]})})}var QG=[`all`,`enabled`,`builtin`,`custom`];function $G({checked:e,onClick:t,title:n}){return(0,_.jsx)(`button`,{type:`button`,onClick:t,title:n,"aria-pressed":e,className:B(`relative h-5 w-9 rounded-full border shadow-inner transition-colors`,e?`border-(--text-primary) bg-(--text-primary)`:`border-(--border-strong) bg-(--bg-hover)`),children:(0,_.jsx)(`span`,{className:B(`absolute left-0.5 top-0.5 size-3.5 rounded-full transition-transform`,e?`bg-(--bg-primary)`:`bg-(--text-muted)`,e?`translate-x-4`:`translate-x-0`)})})}function eK(e){return V(e===`builtin`?`builtin`:e===`global`?`globalScope`:`projectScope`)}function tK(e){return e?.scope===`builtin`}function nK(e){return tK(e)||e?.enabled!==!1}function rK({skill:e,onSave:t,onCancel:n}){let[r,i]=(0,d.useState)(e?.name||``),[a,o]=(0,d.useState)(e?.description||``),[s,c]=(0,d.useState)(``),[l,u]=(0,d.useState)(!1),f=!e;return(0,d.useEffect)(()=>{if(i(e?.name||``),o(e?.description||``),!e){c(``);return}u(!0),Jd(e.name).then(e=>c(e.content||``)).catch(()=>{}).finally(()=>u(!1))},[e]),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-[13px] font-medium text-(--text-primary)`,children:V(f?`newSkill`:`editSkill`)}),(0,_.jsx)(`div`,{className:`mt-0.5 text-[11px] text-(--text-muted)`,children:V(`skillEditorHint`)})]}),(0,_.jsx)(PG,{variant:`outline`,className:`rounded-md px-1.5 py-0 text-[10px]`,children:f?V(`projectScope`):eK(e.scope)})]}),(0,_.jsxs)(`div`,{className:`grid gap-3`,children:[(0,_.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,_.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:V(`name`)}),(0,_.jsx)(zG,{value:r,onChange:e=>i(e.target.value),disabled:!f,placeholder:`my-skill`,className:`h-8 text-[13px]`})]}),f&&(0,_.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,_.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:V(`description`)}),(0,_.jsx)(zG,{value:a,onChange:e=>o(e.target.value),placeholder:V(`skillDescriptionPlaceholder`),className:`h-8 text-[13px]`})]}),(0,_.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,_.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:V(`skillContent`)}),l?(0,_.jsxs)(`div`,{className:`rounded-md border border-(--border-default) py-8 text-center text-[12px] text-(--text-muted)`,children:[V(`loading`),`...`]}):(0,_.jsx)(FG,{value:s,onChange:e=>c(e.target.value),className:`min-h-[240px] resize-y text-[13px] font-mono leading-5`,placeholder:`---
|
|
342
|
+
name: my-skill
|
|
343
|
+
description: ...
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
Skill instructions...`})]})]}),(0,_.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,_.jsx)(Bp,{variant:`outline`,onClick:n,size:`sm`,children:V(`cancel`)}),(0,_.jsx)(Bp,{onClick:async()=>{f?await Yd({name:r,description:a,content:s}):await Xd(e.name,s),t()},disabled:l||!s.trim()||f&&!r.trim(),size:`sm`,children:V(f?`create`:`save`)})]})]})}function iK({skill:e,open:t,onSave:n,onOpenChange:r}){return(0,_.jsx)(Vp,{open:t,onOpenChange:r,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[760px] max-h-[86vh] flex flex-col overflow-hidden`,children:[(0,_.jsx)(Gp,{className:`shrink-0`,children:(0,_.jsx)(qp,{children:V(e?`editSkill`:`newSkill`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,_.jsx)(rK,{skill:e,onSave:n,onCancel:()=>r(!1)})})]})})}function aK({skill:e,open:t,onOpenChange:n}){let[r,i]=(0,d.useState)(``),[a,o]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{!t||!e||(o(!0),Jd(e.name).then(e=>i(e.content||``)).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,_.jsx)(Vp,{open:t,onOpenChange:n,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[720px] max-h-[82vh] flex flex-col overflow-hidden`,children:[(0,_.jsx)(Gp,{className:`shrink-0`,children:(0,_.jsxs)(qp,{children:[e?.name,` `,V(`contentPreview`)]})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:a?(0,_.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[V(`loading`),`...`]}):(0,_.jsx)(`pre`,{className:`rounded-lg bg-(--bg-secondary) p-3 text-[13px] whitespace-pre-wrap break-words font-mono leading-5`,children:r})}),(0,_.jsx)(Kp,{className:`shrink-0`,children:(0,_.jsx)(Bp,{variant:`outline`,onClick:()=>n(!1),size:`sm`,children:V(`close`)})})]})})}function oK(){let[e,t]=(0,d.useState)([]),[n,r]=(0,d.useState)(!0),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(``),[u,f]=(0,d.useState)(`all`),p=(0,d.useCallback)(async()=>{r(!0);try{let e=await qd();t(Array.isArray(e)?e:[])}catch{}r(!1)},[]);(0,d.useEffect)(()=>{p()},[p]);let m=async(e,t)=>{await Qd(e,t),p()},h=async e=>{await Zd(e),p()},g=()=>{a(null),p()};e.filter(nK).length,e.filter(e=>!tK(e)).length;let v=(0,d.useMemo)(()=>{let t=c.trim().toLowerCase();return e.filter(e=>u===`enabled`&&!nK(e)||u===`builtin`&&e.scope!==`builtin`||u===`custom`&&e.scope===`builtin`?!1:t?e.name.toLowerCase().includes(t):!0)},[e,c,u]);return n?(0,_.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[V(`loading`),`...`]}):(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`rounded-lg border border-(--border-default) bg-(--bg-secondary) p-3`,children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(rp,{size:14,className:`text-(--text-muted)`}),(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary)`,children:V(`skillLibrary`)})]}),(0,_.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:V(`skillPanelHint`)})]}),(0,_.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,_.jsxs)(Bp,{onClick:()=>a(`new`),size:`sm`,children:[(0,_.jsx)(_p,{size:13}),V(`addSkill`)]})})]})}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,_.jsxs)(`div`,{className:`relative flex-1`,children:[(0,_.jsx)(xp,{size:13,className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-(--text-muted)`}),(0,_.jsx)(zG,{value:c,onChange:e=>l(e.target.value),placeholder:V(`searchSkills`),className:`h-8 pl-8 text-[13px]`})]}),(0,_.jsx)(`div`,{className:`flex shrink-0 rounded-md border border-(--border-default) p-0.5`,children:QG.map(e=>(0,_.jsx)(Bp,{type:`button`,variant:u===e?`secondary`:`ghost`,size:`xs`,onClick:()=>f(e),className:`px-2`,children:V(`filter_${e}`)},e))})]}),(0,_.jsx)(Mp,{className:`bg-(--border-default)`}),e.length===0&&!i&&(0,_.jsxs)(`div`,{className:`rounded-lg border border-dashed border-(--border-default) py-8 text-center`,children:[(0,_.jsx)(`div`,{className:`text-[13px] text-(--text-primary)`,children:V(`noSkills`)}),(0,_.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:V(`noSkillsHint`)})]}),e.length>0&&v.length===0&&(0,_.jsx)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:V(`noMatches`)}),(0,_.jsx)(`div`,{className:`grid max-h-[420px] gap-2 overflow-y-auto pr-1`,children:v.map(e=>{let t=nK(e);return(0,_.jsx)(`div`,{className:B(`rounded-lg border p-3 transition-colors`,t?`border-(--border-default) bg-(--bg-primary) hover:bg-(--bg-hover)`:`border-(--border-default) bg-(--bg-secondary) opacity-75`),children:(0,_.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,_.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,_.jsx)(`span`,{className:`truncate text-[13px] font-medium text-(--text-primary)`,children:e.name}),(0,_.jsx)(PG,{variant:tK(e)?`secondary`:`outline`,className:`h-4 rounded-md px-1.5 py-0 text-[10px]`,children:eK(e.scope)}),(0,_.jsx)(PG,{variant:t?`outline`:`secondary`,className:`h-4 rounded-md px-1.5 py-0 text-[10px]`,children:V(t?`enabled`:`disabled`)}),e.version&&e.version!==`0.0.0`&&(0,_.jsxs)(`span`,{className:`text-[10px] text-(--text-muted)`,children:[`v`,e.version]})]}),(0,_.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] leading-4 text-(--text-muted)`,children:e.description||V(`noDescription`)})]}),(0,_.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,_.jsx)(Bp,{variant:`ghost`,size:`icon-xs`,onClick:()=>s(e),title:V(`view`),children:(0,_.jsx)(np,{size:13})}),!tK(e)&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)($G,{checked:t,onClick:()=>m(e.name,!t),title:V(t?`disable`:`enable`)}),(0,_.jsx)(Bp,{variant:`ghost`,size:`icon-xs`,onClick:()=>a(e),title:V(`edit`),children:(0,_.jsx)(gp,{size:13})}),(0,_.jsx)(Bp,{variant:`ghost`,size:`icon-xs`,onClick:()=>{confirm(V(`confirmDeleteSkill`).replace(`{{name}}`,e.name))&&h(e.name)},title:V(`delete`),className:`text-(--accent-red) hover:text-(--accent-red)`,children:(0,_.jsx)(Op,{size:13})})]})]})]})},e.name)})}),(0,_.jsx)(aK,{skill:o,open:!!o,onOpenChange:e=>{e||s(null)}}),(0,_.jsx)(iK,{skill:i===`new`?null:i,open:!!i,onSave:g,onOpenChange:e=>{e||a(null)}})]})}function sK({open:e,onOpenChange:t}){return(0,_.jsx)(Vp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[800px] max-h-[86vh] overflow-hidden flex flex-col`,children:[(0,_.jsx)(Gp,{children:(0,_.jsx)(qp,{children:V(`skills`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,_.jsx)(oK,{})})]})})}var cK=[`all`,`builtin`,`custom`];function lK({checked:e,onClick:t,title:n}){return(0,_.jsx)(`button`,{type:`button`,onClick:t,title:n,"aria-pressed":e,className:B(`relative h-5 w-9 rounded-full border shadow-inner transition-colors`,e?`border-(--text-primary) bg-(--text-primary)`:`border-(--border-strong) bg-(--bg-hover)`),children:(0,_.jsx)(`span`,{className:B(`absolute left-0.5 top-0.5 size-3.5 rounded-full transition-transform`,e?`bg-(--bg-primary)`:`bg-(--text-muted)`,e?`translate-x-4`:`translate-x-0`)})})}function uK(e){return V(e===`builtin`?`builtin`:`custom`)}function dK({soul:e,onSave:t,onCancel:n}){let[r,i]=(0,d.useState)(e?.name||``),[a,o]=(0,d.useState)(``),[s,c]=(0,d.useState)(!1),l=!e;return(0,d.useEffect)(()=>{if(i(e?.name||``),!e){o(``);return}c(!0),ef(e.name).then(e=>o(e.content||``)).catch(()=>{}).finally(()=>c(!1))},[e]),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-[13px] font-medium text-(--text-primary)`,children:V(l?`newSoul`:`editSoul`)}),(0,_.jsx)(`div`,{className:`mt-0.5 text-[11px] text-(--text-muted)`,children:V(`soulEditorHint`)})]}),(0,_.jsx)(PG,{variant:`outline`,className:`rounded-md px-1.5 py-0 text-[10px]`,children:l?V(`custom`):uK(e.scope)})]}),(0,_.jsxs)(`div`,{className:`grid gap-3`,children:[(0,_.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,_.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:V(`name`)}),(0,_.jsx)(zG,{value:r,onChange:e=>i(e.target.value),disabled:!l,placeholder:`my-soul`,className:`h-8 text-[13px]`})]}),(0,_.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,_.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:V(`soulContent`)}),s?(0,_.jsxs)(`div`,{className:`rounded-md border border-(--border-default) py-8 text-center text-[12px] text-(--text-muted)`,children:[V(`loading`),`...`]}):(0,_.jsx)(FG,{value:a,onChange:e=>o(e.target.value),className:`min-h-[220px] resize-y text-[13px] font-mono leading-5`,placeholder:V(`soulPlaceholder`)})]})]}),(0,_.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,_.jsx)(Bp,{variant:`outline`,onClick:n,size:`sm`,children:V(`cancel`)}),(0,_.jsx)(Bp,{onClick:async()=>{l?await tf({name:r,content:a}):await nf(e.name,a),t()},disabled:s||!a.trim()||l&&!r.trim(),size:`sm`,children:V(l?`create`:`save`)})]})]})}function fK({soul:e,open:t,onSave:n,onOpenChange:r}){return(0,_.jsx)(Vp,{open:t,onOpenChange:r,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[720px] max-h-[86vh] flex flex-col overflow-hidden`,children:[(0,_.jsx)(Gp,{className:`shrink-0`,children:(0,_.jsx)(qp,{children:V(e?`editSoul`:`newSoul`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,_.jsx)(dK,{soul:e,onSave:n,onCancel:()=>r(!1)})})]})})}function pK({soul:e,open:t,onOpenChange:n}){let[r,i]=(0,d.useState)(``),[a,o]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{!t||!e||(o(!0),ef(e.name).then(e=>i(e.content||``)).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,_.jsx)(Vp,{open:t,onOpenChange:n,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[680px] max-h-[82vh] flex flex-col overflow-hidden`,children:[(0,_.jsx)(Gp,{className:`shrink-0`,children:(0,_.jsxs)(qp,{children:[e?.name,` `,V(`contentPreview`)]})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:a?(0,_.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[V(`loading`),`...`]}):(0,_.jsx)(`pre`,{className:`rounded-lg bg-(--bg-secondary) p-3 text-[13px] whitespace-pre-wrap break-words font-mono leading-5`,children:r})}),(0,_.jsx)(Kp,{className:`shrink-0`,children:(0,_.jsx)(Bp,{variant:`outline`,onClick:()=>n(!1),size:`sm`,children:V(`close`)})})]})})}function mK(){let[e,t]=(0,d.useState)([]),[n,r]=(0,d.useState)(!0),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(``),[u,f]=(0,d.useState)(`all`),p=(0,d.useCallback)(async()=>{r(!0);try{let e=await $d();t(Array.isArray(e)?e:[])}catch{}r(!1)},[]);(0,d.useEffect)(()=>{p()},[p]);let m=e.find(e=>e.active);e.filter(e=>e.scope!==`builtin`).length;let h=(0,d.useMemo)(()=>{let t=c.trim().toLowerCase();return e.filter(e=>u!==`all`&&e.scope!==u?!1:t?e.name.toLowerCase().includes(t):!0)},[e,c,u]),g=async e=>{await af(e),p()},v=async e=>{await rf(e),p()};return n?(0,_.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[V(`loading`),`...`]}):(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`rounded-lg border border-(--border-default) bg-(--bg-secondary) p-3`,children:(0,_.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(Ap,{size:14,className:`text-(--text-muted)`}),(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary)`,children:m?.name||V(`noActiveSoul`)}),m&&(0,_.jsx)(PG,{className:`h-4 rounded-md border-0 bg-(--text-primary) px-1.5 py-0 text-[10px] text-(--bg-primary)`,children:V(`current`)})]}),(0,_.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:V(`soulPanelHint`)})]}),(0,_.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,_.jsxs)(Bp,{onClick:()=>a(`new`),size:`sm`,children:[(0,_.jsx)(_p,{size:13}),V(`addSoul`)]})})]})}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,_.jsxs)(`div`,{className:`relative flex-1`,children:[(0,_.jsx)(xp,{size:13,className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-(--text-muted)`}),(0,_.jsx)(zG,{value:c,onChange:e=>l(e.target.value),placeholder:V(`searchSouls`),className:`h-8 pl-8 text-[13px]`})]}),(0,_.jsx)(`div`,{className:`flex shrink-0 rounded-md border border-(--border-default) p-0.5`,children:cK.map(e=>(0,_.jsx)(Bp,{type:`button`,variant:u===e?`secondary`:`ghost`,size:`xs`,onClick:()=>f(e),className:`px-2`,children:V(`filter_${e}`)},e))})]}),(0,_.jsx)(Mp,{className:`bg-(--border-default)`}),e.length===0&&!i&&(0,_.jsxs)(`div`,{className:`rounded-lg border border-dashed border-(--border-default) py-8 text-center`,children:[(0,_.jsx)(`div`,{className:`text-[13px] text-(--text-primary)`,children:V(`noSouls`)}),(0,_.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:V(`noSoulsHint`)})]}),e.length>0&&h.length===0&&(0,_.jsx)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:V(`noMatches`)}),(0,_.jsx)(`div`,{className:`grid max-h-[420px] gap-2 overflow-y-auto pr-1`,children:h.map(e=>(0,_.jsx)(`div`,{className:B(`rounded-lg border p-3 transition-colors`,e.active?`border-(--border-strong) bg-(--bg-active)`:`border-(--border-default) bg-(--bg-primary) hover:bg-(--bg-hover)`),children:(0,_.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,_.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,_.jsx)(`span`,{className:`truncate text-[13px] font-medium text-(--text-primary)`,children:e.name}),(0,_.jsx)(PG,{variant:`outline`,className:`h-4 rounded-md px-1.5 py-0 text-[10px]`,children:uK(e.scope)}),e.active&&(0,_.jsx)(PG,{className:`h-4 rounded-md border-0 bg-(--text-primary) px-1.5 py-0 text-[10px] text-(--bg-primary)`,children:V(`current`)})]}),(0,_.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] leading-4 text-(--text-muted)`,children:e.preview||V(`noPreview`)})]}),(0,_.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,_.jsx)(Bp,{variant:`ghost`,size:`icon-xs`,onClick:()=>s(e),title:V(`view`),children:(0,_.jsx)(np,{size:13})}),(0,_.jsx)(lK,{checked:!!e.active,onClick:()=>{e.active||g(e.name)},title:e.active?V(`current`):V(`activate`)}),e.scope!==`builtin`&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Bp,{variant:`ghost`,size:`icon-xs`,onClick:()=>a(e),title:V(`edit`),children:(0,_.jsx)(gp,{size:13})}),(0,_.jsx)(Bp,{variant:`ghost`,size:`icon-xs`,onClick:()=>{confirm(V(`confirmDeleteSoul`).replace(`{{name}}`,e.name))&&v(e.name)},title:V(`delete`),className:`text-(--accent-red) hover:text-(--accent-red)`,children:(0,_.jsx)(Op,{size:13})})]})]})]})},`${e.scope}-${e.name}`))}),(0,_.jsx)(pK,{soul:o,open:!!o,onOpenChange:e=>{e||s(null)}}),(0,_.jsx)(fK,{soul:i===`new`?null:i,open:!!i,onSave:()=>{a(null),p()},onOpenChange:e=>{e||a(null)}})]})}function hK({open:e,onOpenChange:t}){return(0,_.jsx)(Vp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Wp,{className:`sm:max-w-[760px] max-h-[86vh] overflow-hidden flex flex-col`,children:[(0,_.jsx)(Gp,{children:(0,_.jsx)(qp,{children:V(`souls`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,_.jsx)(mK,{})})]})})}function gK({open:e,onOpenChange:t,version:n}){return(0,_.jsx)(Vp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Wp,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Gp,{children:(0,_.jsx)(qp,{children:V(`aboutTitle`)})}),(0,_.jsxs)(`div`,{className:`space-y-4 text-[13px] text-(--text-secondary) leading-relaxed`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h3`,{className:`text-[13px] font-semibold text-(--text-primary) mb-1.5`,children:V(`installation`)}),(0,_.jsx)(`pre`,{className:`bg-(--bg-secondary) rounded-lg px-3 py-2 text-[12px] font-mono overflow-x-auto`,children:`npm install -g codemini-cli`})]}),(0,_.jsx)(Mp,{className:`bg-(--border-default)`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h3`,{className:`text-[13px] font-semibold text-(--text-primary) mb-1.5`,children:V(`startWebUI`)}),(0,_.jsx)(`pre`,{className:`bg-(--bg-secondary) rounded-lg px-3 py-2 text-[12px] font-mono overflow-x-auto`,children:`codemini --web`}),(0,_.jsx)(`p`,{className:`mt-1.5 text-[12px] text-(--text-muted)`,children:V(`startWebUIDesc`)})]}),(0,_.jsx)(Mp,{className:`bg-(--border-default)`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h3`,{className:`text-[13px] font-semibold text-(--text-primary) mb-1.5`,children:V(`basicUsage`)}),(0,_.jsxs)(`ul`,{className:`space-y-1.5 text-[12px]`,children:[(0,_.jsxs)(`li`,{className:`flex gap-2`,children:[(0,_.jsx)(`span`,{className:`text-(--text-muted) shrink-0`,children:V(`newChat`)}),(0,_.jsx)(`span`,{children:V(`chatUsage`)})]}),(0,_.jsxs)(`li`,{className:`flex gap-2`,children:[(0,_.jsx)(`span`,{className:`text-(--text-muted) shrink-0`,children:V(`skills`)}),(0,_.jsx)(`span`,{children:V(`skillUsage`)})]}),(0,_.jsxs)(`li`,{className:`flex gap-2`,children:[(0,_.jsx)(`span`,{className:`text-(--text-muted) shrink-0`,children:V(`souls`)}),(0,_.jsx)(`span`,{children:V(`soulUsage`)})]}),(0,_.jsxs)(`li`,{className:`flex gap-2`,children:[(0,_.jsx)(`span`,{className:`text-(--text-muted) shrink-0`,children:V(`mode`)}),(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`code`,{className:`bg-(--bg-tertiary) px-1 rounded text-[11px]`,children:V(`normalMode`)}),` `,V(`modeUsage`),(0,_.jsx)(`code`,{className:`bg-(--bg-tertiary) px-1 rounded text-[11px]`,children:V(`autoModeAbout`)}),` `,V(`modeUsageAuto`)]})]}),(0,_.jsxs)(`li`,{className:`flex gap-2`,children:[(0,_.jsx)(`span`,{className:`text-(--text-muted) shrink-0`,children:V(`workspace`)}),(0,_.jsx)(`span`,{children:V(`workspaceUsage`)})]})]})]}),(0,_.jsx)(Mp,{className:`bg-(--border-default)`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h3`,{className:`text-[13px] font-semibold text-(--text-primary) mb-1.5`,children:V(`configureModel`)}),(0,_.jsx)(`pre`,{className:`bg-(--bg-secondary) rounded-lg px-3 py-2 text-[12px] font-mono overflow-x-auto`,children:`codemini config set model.name <model-id>`}),(0,_.jsx)(`p`,{className:`mt-1.5 text-[12px] text-(--text-muted)`,children:V(`configureModelDesc`)})]})]}),(0,_.jsxs)(`div`,{className:`text-center text-[11px] text-(--text-muted) pt-2`,children:[`Codemini CLI`,n?`@${n}`:``,` — Coding assistant optimized for small-model workflows`]})]})})}var _K={position:`absolute`,top:0,bottom:0,textAlign:`center`},vK={display:`contents`};function yK(){return null}var bK=`diffs-container`,xK=/(?=^From [a-f0-9]+ .+$)/m,SK=/(?=^diff --git)/gm,CK=/(?=^---\s+\S)/gm,wK=/(?=^@@ )/gm,TK=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,EK=/(?<=\n)/,DK=/^(---|\+\+\+)\s+([^\t\r\n]+)/,OK=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,kK=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,AK=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,jK=`header-prefix`,MK=`header-metadata`,NK=`header-custom`,PK={dark:`pierre-dark`,light:`pierre-light`},FK=`data-theme-css`,IK=`data-unsafe-css`,LK={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},RK=Object.freeze({fromStart:0,fromEnd:0}),zK={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},BK={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function VK(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function HK(e,t){return typeof window>`u`&&t!=null?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,_.jsx)(_.Fragment,{children:e})}var UK=(0,d.createContext)(void 0);function WK(){return(0,d.useContext)(UK)}var GK=new Map,KK=new Map,qK=new Map,JK=new Set;function YK(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=GK.get(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,GK.has(n)||GK.set(n,e);JK.has(n)||(JK.add(n),t.loadThemeSync(e))}}var XK=new Map,ZK=new Map,QK=new Map,$K=new Set;function eq(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if($K.has(n.name))continue;let e=XK.get(n.name);e??(e=n,XK.set(n.name,e)),$K.add(e.name),t.loadLanguageSync(e.data)}}function tq(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var nq=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function rq(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function iq(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function aq(e){return Array.isArray(e)?e:[e]}async function oq(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function sq(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function cq(e){return e===`ansi`||sq(e)}function lq(e){return e===`none`}function uq(e){return lq(e)}function dq(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function fq(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function pq(e){let t=fq(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function mq(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var hq=`light-dark()`,gq=[`color`,`background-color`];function _q(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function vq(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?_q(e,t):e})):e}function yq(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>bq(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&gq.includes(a))if(r===hq&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new nq('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function bq(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&ZI.Italic&&(t[`font-style`]=`italic`),e.fontStyle&ZI.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&ZI.Underline&&n.push(`underline`),e.fontStyle&ZI.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function xq(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var Sq=new WeakMap;function Cq(e,t){Sq.set(e,t)}function wq(e){return Sq.get(e)}var Tq=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(aq(n).map(e=>[e,pR])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Eq(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Eq(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Dq(e,t){if(!(e instanceof Tq))throw new nq(`Invalid grammar state`);return e.getInternalStack(t)}function Oq(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new nq(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new nq(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new nq(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=pq(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));kq(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return vq(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new nq(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Aq(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new nq(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new nq(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&dq(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function kq(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new nq(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new nq(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Aq(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Aq).join(``):``}var jq=[Oq()];function Mq(e){let t=Nq(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...jq]}function Nq(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Pq=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Fq={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Iq(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Lq(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Rq(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Fq[r]&&t.push({type:`setDecoration`,value:Fq[r]});else if(r<=29){let e=Fq[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Pq[r-30]}});else if(r===38){let n=Lq(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Pq[r-40]}});else if(r===48){let n=Lq(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Pq[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Pq[r-100+8]}})}return t}function zq(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Iq(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Rq(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Bq={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 Vq(e=Bq){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Pq.length;e++)r.push(t(Pq[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Hq={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 Uq(e,t,n){let r=rq(e,n),i=fq(t),a=Vq(Object.fromEntries(Pq.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Hq[t]]}))),o=zq();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=iq(i,r),o=iq(o,r),n.decorations.has(`dim`)&&(i=Wq(i));let s=ZI.None;return n.decorations.has(`bold`)&&(s|=ZI.Bold),n.decorations.has(`italic`)&&(s|=ZI.Italic),n.decorations.has(`underline`)&&(s|=ZI.Underline),n.decorations.has(`strikethrough`)&&(s|=ZI.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Wq(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Gq(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(sq(i)||lq(r))return fq(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return Uq(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new nq(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new nq(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return qq(t,s,a,o,n)}function Kq(...e){if(e.length===2)return wq(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(sq(i)||lq(a))throw new nq(`Plain language does not have grammar state`);if(i===`ansi`)throw new nq(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Tq(Jq(n,c,o,s,r).stateStack,c.name,o.name)}function qq(e,t,n,r,i){let a=Jq(e,t,n,r,i),o=new Tq(a.stateStack,t.name,n.name);return Cq(a.tokens,o),a.tokens}function Jq(e,t,n,r,i){let a=rq(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=fq(e),l=i.grammarState?Dq(i.grammarState,n.name)??pR:i.grammarContextCode==null?pR:Jq(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=iq(r[rL.getForeground(s)],a),l=rL.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Yq(t.scopes):Xq(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Yq(e){return e.map(e=>({scopeName:e}))}function Xq(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:$q(e,i,t.slice(0,r))}}return n}function Zq(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Qq(e,t,n){if(!Zq(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Zq(e[r],n[i])&&--r,--i;return r===-1}function $q(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Qq(e,t,n)){r.push(a);break}return r}function eJ(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Gq(e,t,{...n,theme:r.theme});return{tokens:i,state:wq(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=tJ(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new Tq(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&Cq(o,s),o}function tJ(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function nJ(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new nq("`themes` option must not be empty");let p=eJ(e,t,n);if(c=wq(p),l&&hq!==l&&!f.find(e=>e.color===l))throw new nq(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>yq(e,h,u,l,d))),c&&Cq(a,c);let g=f.map(e=>rq(e.theme,n));i=rJ(f,m,g,u,l,`fg`,d),r=rJ(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=rq(n.theme,n);a=Gq(e,t,n);let l=e.getTheme(n.theme);r=iq(l.bg,s),i=iq(l.fg,s),o=l.name,c=wq(a)}else throw new nq("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function rJ(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=iq(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===hq&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new nq('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${iq(t[r][a],n[r])||`inherit`}, ${iq(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function iJ(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>iJ(e,t,n),codeToTokens:(t,n)=>nJ(e,t,n)}){let i=t;for(let e of Mq(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=nJ(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=oJ(a):d===`never`&&(a=sJ(a)),f&&(a=cJ(a));let p={...r,get source(){return i}};for(let e of Mq(n))a=e.tokens?.call(p,a)||a;return aJ(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function aJ(e,t,n,r=wq(e)){let i=Mq(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:dq,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
347
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=xq(a.htmlStyle||bq(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Cq(m,r),m}function oJ(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&ZI.Underline||i.fontStyle&ZI.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function sJ(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function cJ(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=xq(e.htmlStyle||bq(e)),i=xq(n.htmlStyle||bq(n)),a=e.fontStyle&&(e.fontStyle&ZI.Underline||e.fontStyle&ZI.Strikethrough),o=n.fontStyle&&(n.fontStyle&ZI.Underline||n.fontStyle&ZI.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var lJ=pB;function uJ(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>iJ(e,t,n),codeToTokens:(t,n)=>nJ(e,t,n)},i=lJ(iJ(e,t,n,r));for(let e of Mq(n))i=e.postprocess?.call(r,i,n)||i;return i}var dJ={light:`#333333`,dark:`#bbbbbb`},fJ={light:`#fffffe`,dark:`#1e1e1e`},pJ=`__shiki_resolved`;function mJ(e){if(e?.[pJ])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?dJ.light:dJ.dark,n||=t.type===`light`?fJ.light:fJ.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,pJ,{enumerable:!1,writable:!1,value:!0}),t}async function hJ(e){return Array.from(new Set((await Promise.all(e.filter(e=>!cq(e)).map(async e=>await oq(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function gJ(e){return(await Promise.all(e.map(async e=>uq(e)?null:mJ(await oq(e))))).filter(e=>!!e)}var _J=3,vJ=!1;function yJ(e,t=3){if(_J&&!(typeof _J==`number`&&t>_J)){if(vJ)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var bJ=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function xJ(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new bJ(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var SJ=class extends fR{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=mJ(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=WI.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=xJ(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new bJ(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return 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);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},CJ=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},wJ=0;function TJ(e){wJ+=1,e.warnings!==!1&&wJ>=10&&wJ%10==0&&console.warn(`[Shiki] ${wJ} 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 t=!1;if(!e.engine)throw new bJ("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(mJ),i=new SJ(new CJ(e.engine,n),r,n,e.langAlias),a;function o(t){return xJ(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new bJ(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new bJ(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await hJ(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await gJ(e))}function g(){if(t)throw new bJ(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--wJ)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function EJ(e){e.engine||yJ("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([gJ(e.themes||[]),hJ(e.langs||[]),e.engine]);return TJ({...e,themes:t,langs:n,engine:r})}async function DJ(e){let t=await EJ(e);return{getLastGrammarState:(...e)=>Kq(t,...e),codeToTokensBase:(e,n)=>Gq(t,e,n),codeToTokensWithThemes:(e,n)=>eJ(t,e,n),codeToTokens:(e,n)=>nJ(t,e,n),codeToHast:(e,n)=>iJ(t,e,n),codeToHtml:(e,n)=>uJ(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function OJ(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,cq(n))return[];let r=t[n];if(!r)throw new nq(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(uq(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new nq(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await DJ({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function kJ(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function AJ(e,t){let n=kJ(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var jJ=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-BRbAAyvE.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>$(()=>import(`./actionscript-3-Cj-0sM4g.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-DhEA_nP5.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-CHsdtmkx.js`).then(e=>e.n),__vite__mapDeps([103,1,104,105,106])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-JNDGGWj0.js`),__vite__mapDeps([107,103,1,104,105,106,108])))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-D5R2GKIs.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-Qu8W4hal.js`),[]))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-Byuv-g-O.js`),__vite__mapDeps([109,105,1,104,106,110,111,112])))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CBey3ErE.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-CRKnUAN1.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-1KYZEB6-.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-DAaViY0U.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-CTzEugGW.js`),__vite__mapDeps([113,105,1,106,110,114,115,116])))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-ButuPTaW.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-DodmBVwR.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>$(()=>import(`./bat-jA-YqDhG.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-BCkjWTs-.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DjEHm1kC.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-aOfmXHFj.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-BZLx0b6B.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-V7dWeQhQ.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-Dt6km9YT.js`),__vite__mapDeps([117,105,1,118,104,106,110,119,111,112])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-CPV9KqsG.js`),__vite__mapDeps([120,121])))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-Bv0tI3pq.js`).then(e=>e.n),__vite__mapDeps([122,1])))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-BDcFIiRd.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-DaglWUgA.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-CyiRuu7R.js`),__vite__mapDeps([123,124])))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-DS5YLe8G.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-BVGPdaE2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-CCC7tP43.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-DqhY5el-.js`),__vite__mapDeps([125,104,1,105,106,112])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-DXhoR5Ap.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-BGjlu3KC.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-rY-gkJy7.js`),__vite__mapDeps([126,106,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-BE6wRQeA.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>$(()=>import(`./coq-CRT8yML1.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-Bw-qV0P6.js`).then(e=>e.n),__vite__mapDeps([127,1,128,122,129,119])))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-Bw1_1hFA.js`),__vite__mapDeps([130,122,1,105,104,106,131,119])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-Ca2kU4Te.js`),[]))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-z2ijrDWT.js`).then(e=>e.n),__vite__mapDeps([105,1])))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-DUpZC5ZD.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-DlXQ7arx.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-D6dhuZbo.js`),[]))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-BUgyoY6k.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-CVd7TDni.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-sEzq00Tq.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-3VGbzlmJ.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-D4HSRbRn.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-DkLGgDMo.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-BWp1FaLo.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DtLD6KM3.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-r5NIe9Lp.js`),__vite__mapDeps([132,118,104,1,105,106,116])))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-B04apOJS.js`),__vite__mapDeps([133,104,1,105,106])))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-Cezz_HNz.js`),__vite__mapDeps([134,128,1,122])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-BHIDiQRU.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-BNioEFKQ.js`),__vite__mapDeps([135,104,1,105,106,136,122,127,128,129,119,137,138,115,116,139,140,131,111,112,141])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-BC8wryba.js`),__vite__mapDeps([142,143])))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-Cd-BhZ0S.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-CpsjJ6FK.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-D1peBFgx.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-CyrImzNA.js`),__vite__mapDeps([144,145])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CIAQqF5W.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-OCW_PZ4J.js`),__vite__mapDeps([146,143])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-Cl3bohRI.js`),__vite__mapDeps([147,148,149])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-B_XVILZe.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-BOrkFM_X.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-BE7nKhIq.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DzGJhdqS.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-DJZpdBwB.js`),__vite__mapDeps([150,151])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-BJE30GTP.js`),__vite__mapDeps([152,131,1])))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-B9ISJjDl.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-Dn6vjgHP.js`),__vite__mapDeps([153,105,1,104,106,116])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-mq-Q_zEE.js`),__vite__mapDeps([154,105,1,104,106,116])))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-C8VPaAWs.js`).then(e=>e.n),__vite__mapDeps([128,1,122])))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-RQRMslrP.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-CfIGZWjt.js`),[]))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-iV8pwUYW.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-WZCiqIl-.js`).then(e=>e.n),__vite__mapDeps([137,1,106,138,115,116])))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-lvGC2zUz.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-DeD259o6.js`),__vite__mapDeps([155,104,1,105,106,119])))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-B8MRe8CS.js`).then(e=>e.n),__vite__mapDeps([139,1,105,106])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-GoJyzhp1.js`),__vite__mapDeps([156,105,1,104,106,141])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-DdaZtXdd.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-Df79h8x1.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-BibREsa1.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-D-iSecYq.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-CckLjo_3.js`),[]))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-B7kk5NVw.js`).then(e=>e.n),__vite__mapDeps([104,1,105,106])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-Ba28nVB3.js`),__vite__mapDeps([118,104,1,105,106])))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-Deln4Vyb.js`),__vite__mapDeps([157,137,1,106,138,115,116,110,131,111,112])))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-CYSuhGkj.js`),__vite__mapDeps([158,159,137,1,106,138,115,116,111,112])))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-BmF7ngDz.js`),__vite__mapDeps([160,161])))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-6acR1htR.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-I9bJJvhi.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-ovi-wMtM.js`),[]))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-X0I2c5Az.js`).then(e=>e.n),__vite__mapDeps([112,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-WC6XFf_S.js`).then(e=>e.n),__vite__mapDeps([106,1])))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-Dx5IcFSt.js`),__vite__mapDeps([162,104,1,105,106])))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-DuNOGix6.js`),__vite__mapDeps([163,106,1])))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-CmuSmrUv.js`).then(e=>e.n),__vite__mapDeps([110,1])))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-JNG5kh3j.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-Bo6bgSpa.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-eDmbsRcr.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-BrmnmEy9.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-C-QfdDgD.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-Bl4e1-KE.js`).then(e=>e.n),__vite__mapDeps([138,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-Cqc1ADyw.js`),__vite__mapDeps([164,127,1,128,122,129,119,106,124,165])))},{id:`just`,name:`Just`,import:(()=>$(()=>import(`./just-BlUYrdKb.js`),__vite__mapDeps([166,106,1,167,105,104,119,111,112,124,136,122,127,128,129,137,138,115,116,139,140,131,141])))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CPujEk7a.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-GNGS6f4G.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-BcKmLn2p.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-BEPTKliI.js`),__vite__mapDeps([168,169,165,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CQ4oht2M.js`),[]))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DgluPI4Z.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-BUh7yINm.js`),__vite__mapDeps([170,105,1,104,106,110])))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-C_Bk8N51.js`),[]))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-Cqyx7kYB.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-BMyACSNp.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-BroxvhVt.js`).then(e=>e.n),__vite__mapDeps([140,1,122])))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-Dw3qkd4h.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-DRoG6w-e.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-DMIvNSB1.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-Dm8xPXkG.js`),__vite__mapDeps([171,105,1,172,108,116])))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-Buftnej6.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-Dzipcsdb.js`),__vite__mapDeps([173,118,104,1,105,106,143,141])))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-COL7Vpwq.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-tvyj1ZQ2.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-C6fvALrw.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-B3qnM1a8.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-Cjo3d0oi.js`),[]))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-BZSDQnwS.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-DY5cg5OF.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-BRiWOV-p.js`),__vite__mapDeps([174,175])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D6rYlJlL.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-Da_Uewgc.js`),__vite__mapDeps([176,140,1,122])))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-CvgRYLO2.js`),__vite__mapDeps([177,122,1,105,128,104,106,143,111,112])))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-C2G-gZoY.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell-S11HUHTG.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D9GKvYFi.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-SqrtXFXh.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-C_PTi_Pz.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-BWpZDKBG.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BM4fjXzn.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-DYsRufgb.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-BIcNvyL6.js`),__vite__mapDeps([167,105,1,104,106,119,111,112])))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-BP-3TkW_.js`),__vite__mapDeps([178,105,1,104,106,110,119,111,112])))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-Djf8ANrI.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-B1bmZxUF.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BvnTR3_f.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-CAj5SJyd.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-DrpvRGGG.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-I1Ei5hrS.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>$(()=>import(`./powershell-Coc0WruX.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-Ojgxt2lx.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-C1UOAv4v.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-D07RTuB5.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-_XoIcKf3.js`),__vite__mapDeps([179,105,1,104,106])))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-D_zyrMo2.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-CV-DVmZj.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-DcnbpNOV.js`),[]))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-DWxWu28U.js`),__vite__mapDeps([180,106,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-BBNnU9RJ.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-CC0PKRbL.js`),[]))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-B4lG5syH.js`).then(e=>e.n),__vite__mapDeps([165,1])))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-Cbwns2Cq.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-CeV6tH_x.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-DQ6FV4WL.js`),__vite__mapDeps([181,182,104,1,105,106])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-C_WE1pkC.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-da3KYCEG.js`).then(e=>e.n),__vite__mapDeps([129,1])))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-CpHQF4b7.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Co5eiPIZ.js`),[]))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-CgTit1dG.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-C0tpzWlc.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-DDrWKQ9c.js`),__vite__mapDeps([183,184,127,1,128,122,129,119,118,104,105,106,124,136,137,138,115,116,139,140,131,111,112,141])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-BOVYgV5O.js`),__vite__mapDeps([136,122,1,127,128,129,119,105,137,106,138,115,116,139,104,140,131,111,112,141])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-BWAfVMY4.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-DYNukvU9.js`),__vite__mapDeps([185,119,1])))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-MovLey2R.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-C2w7y2mZ.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-Bf85FNnm.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-CaciJ0Gl.js`).then(e=>e.n),__vite__mapDeps([108,1,105])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-DoQ_zDzo.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TbUUdmUb.js`),__vite__mapDeps([186,187])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-KUJZnuCi.js`).then(e=>e.n),__vite__mapDeps([131,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-BeWGuVoR.js`),__vite__mapDeps([188,131,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>$(()=>import(`./smalltalk-Mlf5-xbr.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-DYHGECBw.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-h0dQKbQs.js`),__vite__mapDeps([189,104,1,105,106])))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-DIFvSn1n.js`),__vite__mapDeps([190,191])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-DOdklC0I.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-CZAMrWdL.js`).then(e=>e.n),__vite__mapDeps([119,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-DwwFW7AS.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-C5mLa_ER.js`),__vite__mapDeps([192,119,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-BO6mlOab.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-DyoUfV6n.js`),__vite__mapDeps([193,106,1])))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-CijnRGul.js`),__vite__mapDeps([194,105,1,106,114,116])))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-D9A08YU9.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-DjR3sN6w.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-CJWuVSJU.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CXqq0wX-.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-GVNf7pB7.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-DNlfRSl5.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-CNjJl440.js`),__vite__mapDeps([195,105,1,196,106])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DUK0FOOj.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-ezg8IclB.js`),__vite__mapDeps([169,165,1])))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-X5n3zjEH.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-DV6nguf9.js`),__vite__mapDeps([197,105,1,128,122,104,106,119,116,111,112])))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-Bqs_rchc.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-CfyUE2pW.js`).then(e=>e.n),__vite__mapDeps([115,1])))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-BsUuoeVK.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-BROkIZLg.js`),__vite__mapDeps([198,105,1,106,178,104,110,119,111,112,124,136,122,127,128,129,137,138,115,116,139,140,131,141,108])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-C6LvTgbf.js`).then(e=>e.n),__vite__mapDeps([116,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-CKEcF6Kw.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-CPL77SDw.js`),[]))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-CoJD3IPx.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-C42IfotU.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>$(()=>import(`./vb-CVMKTK26.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-P63PhzSt.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-2WwUdgX8.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-CGPGWJA6.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-BUQP_8VF.js`),__vite__mapDeps([199,105,1,118,104,106,110,116])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-Bx2Sgp8M.js`),__vite__mapDeps([200,106,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-RK3AHrhp.js`),__vite__mapDeps([201,105,1,106,172,114,108,202])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-DP_vqZO9.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-Db7VBw0n.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-ZEcjghA1.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-CdusuPLe.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-CBIB6hmW.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-ZhUbVeze.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-HyMOyERF.js`),[]))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-BkdunjRC.js`).then(e=>e.n),__vite__mapDeps([111,1,112])))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-C66i1pDH.js`),__vite__mapDeps([203,111,1,112])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-D_uvhEF7.js`).then(e=>e.n),__vite__mapDeps([141,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-C6ZuzgrL.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-Do2h8XKj.js`),[]))}],MJ=Object.fromEntries(jJ.map(e=>[e.id,e.import])),NJ=Object.fromEntries(jJ.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),PJ={...MJ,...NJ},FJ=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>$(()=>import(`./andromeeda-CWmR-N6V.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>$(()=>import(`./aurora-x-LPpmXm4i.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>$(()=>import(`./ayu-dark-Dv4ngVMP.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>$(()=>import(`./ayu-light-CxeOePuA.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>$(()=>import(`./ayu-mirage-i2YLXKmY.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-frappe-CSAC76is.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>$(()=>import(`./catppuccin-latte-Jt6sqtds.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-macchiato-HM96_05s.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-mocha-CXgIAGBL.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>$(()=>import(`./dark-plus-DNkJKrcZ.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>$(()=>import(`./dracula-Donvxzd6.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>$(()=>import(`./dracula-soft-BqL-kkUg.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>$(()=>import(`./everforest-dark-pZNhY4MK.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>$(()=>import(`./everforest-light-BijKClkf.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>$(()=>import(`./github-dark-BB9G20EV.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>$(()=>import(`./github-dark-default-CBFNEU03.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>$(()=>import(`./github-dark-dimmed-sQhEp72S.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>$(()=>import(`./github-dark-high-contrast-C8GVvrcM.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>$(()=>import(`./github-light-pT7U8Cnd.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>$(()=>import(`./github-light-default-iyEXWnoa.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>$(()=>import(`./github-light-high-contrast-DLnsZL7l.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-hard-CC38iqQ4.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-medium-DaS0IqFN.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-soft-C4niJipy.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-hard-DTfv4LmB.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-medium-m1VBpvsE.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-soft-CiE1IJdk.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>$(()=>import(`./horizon-BG-OH9yH.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>$(()=>import(`./horizon-bright-B0vmEjwb.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>$(()=>import(`./houston-C8DdNIgg.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-dragon-Dc8jzBf8.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>$(()=>import(`./kanagawa-lotus-DglQpAHb.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-wave-CTxJC692.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>$(()=>import(`./laserwave-BLDq6SCM.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>$(()=>import(`./light-plus-Ce6vIMrA.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>$(()=>import(`./material-theme-D1yzOeFY.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>$(()=>import(`./material-theme-darker-DhWqiNtj.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>$(()=>import(`./material-theme-lighter-PKoq0Soa.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>$(()=>import(`./material-theme-ocean-TtH-ZZAj.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>$(()=>import(`./material-theme-palenight-DPEAidnA.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>$(()=>import(`./min-dark-D66g901Q.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>$(()=>import(`./min-light-CMnDj2iG.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>$(()=>import(`./monokai-DCoxt20T.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>$(()=>import(`./night-owl-DuMFo77c.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>$(()=>import(`./night-owl-light-DihOYNub.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>$(()=>import(`./nord-CqZqLQaJ.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>$(()=>import(`./one-dark-pro-DpWTHpwg.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>$(()=>import(`./one-light-Cu0d64Hp.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>$(()=>import(`./plastic-CmjIC4JL.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>$(()=>import(`./poimandres-BTndTogr.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>$(()=>import(`./red-CVEaJbMR.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-BDTwvYHf.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>$(()=>import(`./rose-pine-dawn-CAIk_wLV.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-moon-C5gdiznP.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>$(()=>import(`./slack-dark-BnOYKTBJ.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>$(()=>import(`./slack-ochin-43udxtUg.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>$(()=>import(`./snazzy-light-kw-pZEiM.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>$(()=>import(`./solarized-dark-BDezFa9V.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>$(()=>import(`./solarized-light-CkoenhS2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>$(()=>import(`./synthwave-84-C69NN2j9.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>$(()=>import(`./tokyo-night-DWTtuXS3.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>$(()=>import(`./vesper-BGr95374.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>$(()=>import(`./vitesse-black-cI0k84-I.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>$(()=>import(`./vitesse-dark-SouM0FMW.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>$(()=>import(`./vitesse-light-WiCy6lDO.js`),[]))}].map(e=>[e.id,e.import])),IJ=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function LJ(){return 2147483648}function RJ(){return typeof performance<`u`?performance.now():Date.now()}var zJ=(e,t)=>e+(t-e%t)%t;async function BJ(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=LJ();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,zJ(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:RJ,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var VJ=Object.defineProperty,HJ=(e,t,n)=>t in e?VJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UJ=(e,t,n)=>HJ(e,typeof t==`symbol`?t:t+``,n),WJ=null;function GJ(e){throw new IJ(e.UTF8ToString(e.getLastOnigError()))}var KJ=class e{constructor(t){UJ(this,`utf16Length`),UJ(this,`utf8Length`),UJ(this,`utf16Value`),UJ(this,`utf8Value`),UJ(this,`utf16OffsetToUtf8`),UJ(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},qJ=class e{constructor(t){if(UJ(this,`id`,++e.LAST_ID),UJ(this,`_onigBinding`),UJ(this,`content`),UJ(this,`utf16Length`),UJ(this,`utf8Length`),UJ(this,`utf16OffsetToUtf8`),UJ(this,`utf8OffsetToUtf16`),UJ(this,`ptr`),!WJ)throw new IJ(`Must invoke loadWasm first.`);this._onigBinding=WJ,this.content=t;let n=new KJ(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=WJ.omalloc(1e4),e._sharedPtrInUse=!0,WJ.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(WJ)}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===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};UJ(qJ,`LAST_ID`,0),UJ(qJ,`_sharedPtr`,0),UJ(qJ,`_sharedPtrInUse`,!1);var JJ=qJ,YJ=class{constructor(e){if(UJ(this,`_onigBinding`),UJ(this,`_ptr`),!WJ)throw new IJ(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new KJ(e[r]);t[r]=i.createString(WJ),n[r]=i.utf8Length}let r=WJ.omalloc(4*e.length);WJ.HEAPU32.set(t,r/4);let i=WJ.omalloc(4*e.length);WJ.HEAPU32.set(n,i/4);let a=WJ.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)WJ.ofree(t[n]);WJ.ofree(i),WJ.ofree(r),a===0&&GJ(WJ),this._onigBinding=WJ,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new JJ(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function XJ(e){return typeof e.instantiator==`function`}function ZJ(e){return typeof e.default==`function`}function QJ(e){return e.data!==void 0}function $J(e){return typeof Response<`u`&&e instanceof Response}function eY(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var tY;function nY(e){if(tY)return tY;async function t(){WJ=await BJ(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),XJ(n)?n=await n.instantiator(t):ZJ(n)?n=await n.default(t):(QJ(n)&&(n=n.data),$J(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await iY(n)(t):await aY(n)(t):eY(n)||n instanceof WebAssembly.Module?n=await rY(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await rY(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return tY=t(),tY}function rY(e){return t=>WebAssembly.instantiate(e,t)}function iY(e){return t=>WebAssembly.instantiateStreaming(e,t)}function aY(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function oY(e){return e&&await nY(e),{createScanner(e){return new YJ(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new JJ(e)}}}var sY=OJ({langs:PJ,themes:FJ,engine:()=>oY($(()=>import(`./wasm-DiIFv9DE.js`),[]))}),{codeToHtml:cY,codeToHast:lY,codeToTokens:uY,codeToTokensBase:dY,codeToTokensWithThemes:fY,getSingletonHighlighter:pY,getLastGrammarState:mY}=AJ(sY,{guessEmbeddedLanguages:mq}),hY=4294967295,gY=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:hY,end:hY,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function _Y(e,t){return MW(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function vY(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>_Y(e,{target:t.target}),{createScanner(e){return new gY(e,t)},createString(e){return{content:e}}}}async function yY(e){if(tq())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=ZK.get(e);if(t!=null)return t;try{let t=QK.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(PJ,e)&&(t=PJ[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return XK.has(e)||XK.set(e,n),n});return ZK.set(e,n),await n}finally{ZK.delete(e)}}function bY(e){return XK.get(e)??yY(e)}async function xY(e){if(tq())throw Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=KK.get(e);if(t!=null)return t;try{let t=qK.get(e)??FJ[e];if(t==null)throw Error(`resolveTheme: No valid loader for ${e}`);let n=t().then(t=>SY(e,`default`in t?t.default:t));KK.set(e,n);let r=await n;if(r.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${r.name}`);return GK.set(r.name,r),r}finally{KK.delete(e)}}function SY(e,t){return GK.get(e)??(t=mJ(t),GK.set(e,t),t)}function CY(e){return GK.get(e)??xY(e)}function wY(e,t){if(qK.has(e)){console.error(`SharedHighlight.registerCustomTheme: theme name already registered`,e);return}qK.set(e,t)}var TY;async function EY({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){TY??=sY({themes:[],langs:[`text`],engine:n===`shiki-wasm`?oY($(()=>import(`./wasm-DiIFv9DE.js`),[])):vY()});let r=OY(TY)?await TY:TY;TY=r;let i=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=bY(e);`then`in t?i.push(t):eq(t,r)}let a=[];for(let t of e){let e=CY(t);`then`in e?a.push(e):YK(e,TY)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{eq(e,r)}),Promise.all(a).then(e=>{YK(e,r)})]),r}function DY(){if(TY!=null&&!(`then`in TY))return TY}function OY(e=TY){return e!=null&&`then`in e}wY(`pierre-dark`,async()=>{let{default:e}=await $(async()=>{let{default:e}=await import(`./pierre-dark-CBqOR10c.js`);return{default:e}},[]);return{...e,name:`pierre-dark`}}),wY(`pierre-light`,async()=>{let{default:e}=await $(async()=>{let{default:e}=await import(`./pierre-light-sgwdVCEP.js`);return{default:e}},[]);return{...e,name:`pierre-light`}});function kY(e=PK){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function AY(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}var jY=new Map,MY={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function NY(e){if(jY.has(e))return jY.get(e)??`text`;if(MY[e]!=null)return MY[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(jY.has(t[1]))return jY.get(t[1])??`text`;if(MY[t[1]]!=null)return MY[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return jY.has(n)?jY.get(n)??`text`:MY[n]??`text`}function PY(e){return e.replace(/\n$|\r\n$/,``)}function FY(e){return{type:`text`,value:e}}function IY({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function LY({name:e,width:t=16,height:n=16,properties:r}){return IY({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[IY({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function RY(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function zY(e){return IY({tagName:`div`,properties:{"data-gutter":``},children:e})}function BY(e,t,n,r={}){return IY({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[IY({tagName:`span`,properties:{"data-line-number-content":``},children:[FY(`${t}`)]})]})}function VY(e,t,n){return IY({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function HY(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(FY(`
|
|
348
|
+
`)),e}var UY=Symbol(`no-token`),WY=Symbol(`multiple-tokens`);function GY(e){let t=KY(e);if(t!=null)return t;let n=UY,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){JY(e,a);for(let t of e.children)qY(t)}else qY(e);r.push(e),i=[],a=void 0;return}for(let e of i)qY(e);r.push(IY({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==UY){if(e===WY){n=WY;return}if(n===UY){n=e;return}n!==e&&(n=WY)}};for(let t of e.children){let e=t.type===`element`?GY(t):UY;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function KY(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function qY(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)qY(t)}}function JY(e,t){e.properties[`data-char`]=t}function YY(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=t+XY(typeof e==`string`?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,typeof e==`string`?e:{...e}),o}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function XY(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function ZY(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=RY(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&GY(a),i.push(HY(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push($Y,QY),{state:n,transformers:r,toClass:QY}}var QY=YY({classPrefix:`hl-`}),$Y={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function eX(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}function tX({theme:e=PK,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e);r+=`color:${i.fg};`,r+=`background-color:${i.bg};`,r+=`${eX(`global`)}fg:${i.fg};`,r+=`${eX(`global`)}bg:${i.bg};`,r+=nX(i,n)}else{let n=t.getTheme(e.dark);r+=`${eX(`global`)}dark:${n.fg};`,r+=`${eX(`global`)}dark-bg:${n.bg};`,r+=nX(n,`dark`),n=t.getTheme(e.light),r+=`${eX(`global`)}light:${n.fg};`,r+=`${eX(`global`)}light-bg:${n.bg};`,r+=nX(n,`light`)}return r}function nX(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${eX(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${eX(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${eX(`global`)}${t}modified-color:${a};`),n}function rX(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function iX(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function aX(e,t){return AY(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function oX(e){let t=e.lang??NY(e.name),n=e.lang??(e.prevName==null?`text`:NY(e.prevName));return t===`text`&&n===`text`}function sX({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s={finalHunk:e.hunks.at(-1),viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!s.isWindowedHighlight)return!1;let e=s.unifiedCount>=n+r,i=s.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!s.isWindowedHighlight)return!1;let i=s.unifiedCount+e<n,a=s.splitCount+r<n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(s.unifiedCount+=e),(t===`split`||t===`both`)&&(s.splitCount+=n)},isInWindow(e,n){if(!s.isWindowedHighlight)return!0;let r=s.isInUnifiedWindow(e),i=s.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!s.isWindowedHighlight||s.unifiedCount>=n-e&&s.unifiedCount<n+r},isInSplitWindow(e){return!s.isWindowedHighlight||s.splitCount>=n-e&&s.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?s.incrementCounts(1,0):t===`split`?s.incrementCounts(0,1):s.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let[n,r]of e.hunks.entries()){if(s.shouldBreak())break;let o=cX(e.isPartial,r.collapsedBefore,i,n,a),c=(()=>{if(r!==s.finalHunk||!lX(e))return;let t=e.additionLines.length-(r.additionLineIndex+r.additionCount),n=e.deletionLines.length-(r.deletionLineIndex+r.deletionCount);if(t!==n)throw Error(`iterateOverDiff: trailing context mismatch (additions=${t}, deletions=${n}) for ${e.name}`);let o=Math.min(t,n);return cX(e.isPartial,o,i,e.hunks.length,a)})(),l=o.fromStart+o.fromEnd;function u(e,n){return c==null||c.collapsedLines<=0||c.fromStart+c.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?c.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?c.collapsedLines:0}function d(){if(o.collapsedLines===0)return 0;let e=o.collapsedLines;return o.collapsedLines=0,e}if(s.shouldSkip(l,l))s.incrementCounts(l,l),d();else{let e=r.unifiedLineStart-o.rangeSize,t=r.splitLineStart-o.rangeSize,i=r.deletionLineIndex-o.rangeSize,a=r.additionLineIndex-o.rangeSize,c=r.deletionStart-o.rangeSize,l=r.additionStart-o.rangeSize,u=0;for(;u<o.fromStart;){if(s.isInWindow(0,0)){if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:c+u,lineIndex:i+u,noEOFCR:!1,unifiedLineIndex:e+u,splitLineIndex:t+u},additionLine:{unifiedLineIndex:e+u,splitLineIndex:t+u,lineIndex:a+u,lineNumber:l+u,noEOFCR:!1}}))break hunkIterator}else s.incrementCounts(1,1);u++}for(e=r.unifiedLineStart-o.fromEnd,t=r.splitLineStart-o.fromEnd,i=r.deletionLineIndex-o.fromEnd,a=r.additionLineIndex-o.fromEnd,c=r.deletionStart-o.fromEnd,l=r.additionStart-o.fromEnd,u=0;u<o.fromEnd;){if(s.isInWindow(0,0)){if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:d(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:c+u,lineIndex:i+u,noEOFCR:!1,unifiedLineIndex:e+u,splitLineIndex:t+u},additionLine:{unifiedLineIndex:e+u,splitLineIndex:t+u,lineIndex:a+u,lineNumber:l+u,noEOFCR:!1}}))break hunkIterator}else s.incrementCounts(1,1);u++}}let f=r.unifiedLineStart,p=r.splitLineStart,m=r.deletionLineIndex,h=r.additionLineIndex,g=r.deletionStart,_=r.additionStart,v=r.hunkContent.at(-1);for(let e of r.hunkContent){if(s.shouldBreak())break hunkIterator;let i=e===v;if(e.type===`context`){if(s.shouldSkip(e.lines,e.lines))s.incrementCounts(e.lines,e.lines),d();else{let t=0;for(;t<e.lines;){if(s.isInWindow(0,0)){let a=i&&t===e.lines-1,o=f+t,c=p+t;if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:d(),collapsedAfter:u(o,c),type:`context`,deletionLine:{lineNumber:g+t,lineIndex:m+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:c},additionLine:{unifiedLineIndex:o,splitLineIndex:c,lineIndex:h+t,lineNumber:_+t,noEOFCR:a&&r.noEOFCRAdditions}}))break hunkIterator}else s.incrementCounts(1,1);t++}}f+=e.lines,p+=e.lines,m+=e.lines,h+=e.lines,g+=e.lines,_+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!s.shouldSkip(o,a)){let c=uX(s,e,t);for(let[l,v]of c)for(let c=l;c<v;c++){let l=u(f+c,t===`unified`?p+(c<e.deletions?c:c-e.deletions):p+c);if(s.emit(dX({hunkIndex:n,hunk:r,collapsedBefore:d(),collapsedAfter:l,diffStyle:t,index:c,unifiedLineIndex:f,splitLineIndex:p,additionLineIndex:h,deletionLineIndex:m,additionLineNumber:_,deletionLineNumber:g,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}d(),s.incrementCounts(o,a),f+=o,p+=a,m+=e.deletions,h+=e.additions,g+=e.deletions,_+=e.additions}}if(c!=null){let{collapsedLines:t,fromStart:n,fromEnd:r}=c,i=n+r,a=0;for(;a<i;){if(s.shouldBreak())break hunkIterator;if(s.isInWindow(0,0)){let n=a===i-1;if(s.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:n?t:0,type:`context-expanded`,deletionLine:{lineNumber:g+a,lineIndex:m+a,noEOFCR:!1,unifiedLineIndex:f+a,splitLineIndex:p+a},additionLine:{unifiedLineIndex:f+a,splitLineIndex:p+a,lineIndex:h+a,lineNumber:_+a,noEOFCR:!1}}))break hunkIterator}else s.incrementCounts(1,1);a++}}}}function cX(e,t,n,r,i){if(t=Math.max(t,0),t===0||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(n===!0||t<=i)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};let a=n?.get(r),o=Math.min(Math.max(a?.fromStart??0,0),t),s=Math.min(Math.max(a?.fromEnd??0,0),t),c=o+s,l=c>=t;return{fromStart:l?t:o,fromEnd:l?0:s,rangeSize:t,collapsedLines:Math.max(t-c,0)}}function lX(e){let t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function uX(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function dX({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}var fX=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},pX=new class extends fX{};function mX(e,t,n){return pX.diff(e,t,n)}function hX(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function gX(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function _X(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function vX(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function yX(e,t){return _X(e,t,``)}function bX(e,t){return vX(e,t,``)}function xX(e,t){return t.slice(0,SX(e,t))}function SX(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function CX(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function wX(e){let t=e.match(/^\s*/);return t?t[0]:``}var TX=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,EX=RegExp(`[${TX}]+|\\s+|[^${TX}]`,`ug`);new class extends fX{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(EX)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&DX(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&DX(n,i,r,null),e}};function DX(e,t,n,r){if(t&&n){let i=wX(t.value),a=CX(t.value),o=wX(n.value),s=CX(n.value);if(e){let r=hX(i,o);e.value=vX(e.value,o,r),t.value=yX(t.value,r),n.value=yX(n.value,r)}if(r){let e=gX(a,s);r.value=_X(r.value,s,e),t.value=bX(t.value,e),n.value=bX(n.value,e)}}else if(n){if(e){let e=wX(n.value);n.value=n.value.substring(e.length)}if(r){let e=wX(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=wX(r.value),i=wX(t.value),a=CX(t.value),o=hX(n,i);t.value=yX(t.value,o);let s=gX(yX(n,o),a);t.value=bX(t.value,s),r.value=_X(r.value,n,s),e.value=vX(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=wX(r.value),n=xX(CX(t.value),e);t.value=bX(t.value,n)}else if(e){let n=xX(CX(e.value),wX(t.value));t.value=yX(t.value,n)}}var OX=new class extends fX{tokenize(e){let t=RegExp(`(\\r?\\n)|[${TX}]+|[^\\S\\n\\r]+|[^${TX}]`,`ug`);return e.match(t)||[]}};function kX(e,t,n){return OX.diff(e,t,n)}var AX=new class extends fX{constructor(){super(...arguments),this.tokenize=MX}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
349
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
350
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
351
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
352
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function jX(e,t,n){return AX.diff(e,t,n)}function MX(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
353
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function NX(e){return e==`.`||e==`!`||e==`?`}new class extends fX{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(NX(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends fX{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends fX{constructor(){super(...arguments),this.tokenize=MX}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(PX(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function PX(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=PX(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=PX(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends fX{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var FX={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function IX(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;jX(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(jX(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||zX(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
354
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function LX(e,t){if(t||=FX,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>LX(e,t)).join(`
|
|
355
|
+
`)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
356
|
+
`)+`
|
|
357
|
+
`}function RX(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;IX(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?LX(e,o.headerOptions):void 0)}}))}else{let s=IX(e,t,n,r,i,a,o);return s?LX(s,o?.headerOptions):void 0}}function zX(e){let t=e.endsWith(`
|
|
358
|
+
`),n=e.split(`
|
|
359
|
+
`).map(e=>e+`
|
|
360
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function BX({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function VX({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}var HX={forcePlainText:!1};function UX(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=HX){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=tX({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??GX();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}sX({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:c?h:!0,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&WX({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=KX({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function WX({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=PY(e),t=PY(t),e.length>s||t.length>s))return;let c=o===`char`?mX(e,t):kX(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(VX({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),VX({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?VX({item:e,arr:l,enableJoin:d,isLastItem:t}):VX({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(BX({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(BX({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function GX(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function KX({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=PK,...l}}){let u=s??NY(e.name),d=s??NY(t.name),{state:f,transformers:p}=ZY(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:eX(`token`)}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:eX(`token`)};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,rX(i.codeToHast(PY(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,rX(i.codeToHast(PY(t.contents),m)))}}var qX=(0,d.createContext)(void 0);function JX(e){let t=(0,d.useRef)(e);return(0,d.useInsertionEffect)(()=>void(t.current=e)),(0,d.useCallback)((...e)=>t.current(...e),[])}function YX(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function XX(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function ZX(){return IY({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[LY({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}var QX=class{hoveredLine;hoveredToken;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){let t=!(e===this.selectedRange||XX(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode===`diff`&&this.hoveredLine.type===`diff-line`)return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode===`file`&&this.hoveredLine.type===`line`)return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&uZ(e.composedPath())||(dZ(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(dZ(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(dZ(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){dZ(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.gutterUtilityContainer?.remove(),this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine())};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();dZ(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);dZ(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=rZ(i)&&this.hoveredLine?.lineElement===i.lineElement;nZ(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),nZ(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),rZ(i)&&(this.setHoveredLine(this.toEventBaseProps(i)),this.gutterUtilityContainer!=null&&i.numberElement.appendChild(this.gutterUtilityContainer),s?.({...this.hoveredLine,event:t})));break}case`click`:{if(i==null)break;if(aZ(i)&&p!=null){p(i);break}if(iZ(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!rZ(i))break;nZ(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,dZ(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),dZ(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),dZ(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();uZ(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){let{enableLineSelection:n=!1}=this.options;if(!n)return;let r=this.getSelectionPointerInfo(t,!0);if(r==null)return;let{pre:i}=this;if(i==null)return;e.preventDefault();let{lineNumber:a,eventSide:o,lineIndex:s}=r;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,i.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?s>=t.start:s<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,o,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){let t={lineNumber:a,side:o};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:a,side:o},this.updateSelection(a,o,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,t){let{enableLineSelection:n=!1,onGutterUtilityClick:r}=this.options;if(r==null)return;let i=this.getSelectionPointFromPath(t);i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:i},n&&(this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.selectedRange)),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;let n=this.getSelectionPointFromPath(e.composedPath());if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;let t=this.getSelectionPointerInfo(e.composedPath(),!1);if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;let t=this.getSelectionPointerInfo(e.composedPath(),!1);if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(YX(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.selectedRange),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;let r=this.getSelectionPointFromPath(e.composedPath());r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=pB(ZX());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}getSelectionPointerInfo(e,t){let n=this.resolvePointerTarget(e);if(tZ(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}getSelectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(tZ(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}updateSelection(e,t,n=!0){let{selectedRange:r}=this,i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}XX(r??void 0,i??void 0)||(this.selectedRange=i,n&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let n=this.pre.getAttribute(`data-diff-type`)===`split`,r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`InteractionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(let e of t){let[t,r]=e.children,s=r.children.length;if(s!==t.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);for(let e=0;e<s;e++){let s=r.children[e],c=t.children[e];if(!(s instanceof HTMLElement)||!(c instanceof HTMLElement))continue;let l=this.parseLineIndex(s,n);if((l??0)>o)break;if(l==null||l<a)continue;let u=i?`single`:l===a?`first`:l===o?`last`:``;s.setAttribute(`data-selected-line`,u),c.setAttribute(`data-selected-line`,u),c.nextSibling instanceof HTMLElement&&s.nextSibling instanceof HTMLElement&&(s.nextSibling.hasAttribute(`data-line-annotation`)||s.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(i?(u=`last`,s.setAttribute(`data-selected-line`,`first`)):l===a?u=``:l===o&&s.setAttribute(`data-selected-line`,``),s.nextSibling.setAttribute(`data-selected-line`,u),c.nextSibling.setAttribute(`data-selected-line`,u))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);oZ(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=lZ(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=lZ(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:sZ(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:sZ(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:cZ(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:cZ(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function $X({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,enableHoverUtility:n,lineHoverHighlight:r,onGutterUtilityClick:i,onLineClick:a,onLineEnter:o,onLineLeave:s,onLineNumberClick:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,renderGutterUtility:f,renderHoverUtility:p,__debugPointerEvents:m,enableLineSelection:h,onLineSelected:g,onLineSelectionStart:_,onLineSelectionChange:v,onLineSelectionEnd:y},b,x,S){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:eZ({enableGutterUtility:t,enableHoverUtility:n,renderGutterUtility:f,renderHoverUtility:p,onGutterUtilityClick:i}),usesCustomGutterUtility:f!=null||p!=null,lineHoverHighlight:r,onGutterUtilityClick:i,onHunkExpand:b,onMergeConflictActionClick:S,onLineClick:a,onLineEnter:o,onLineLeave:s,onLineNumberClick:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,__debugPointerEvents:m,enableLineSelection:h,onLineSelected:g,onLineSelectionStart:_,onLineSelectionChange:v,onLineSelectionEnd:y,getLineIndex:x}}function eZ({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:n,renderHoverUtility:r,onGutterUtilityClick:i}){if(e!==void 0&&t!==void 0)throw Error(`Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.`);if(n!=null&&r!=null)throw Error(`Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.`);if(i!=null&&(n!=null||r!=null))throw Error(`Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.`);return e??t??!1}function tZ(e){return e!=null&&`kind`in e&&e.kind===`line`}function nZ(e){return e!=null&&`kind`in e&&e.kind===`token`}function rZ(e){return tZ(e)||nZ(e)}function iZ(e){return`type`in e&&e.type===`line-info`}function aZ(e){return`kind`in e&&e.kind===`merge-conflict-action`}function oZ(e){return e===`current`||e===`incoming`||e===`both`}function sZ(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function cZ(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function lZ(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function uZ(e){for(let t of e)if(t instanceof HTMLElement&&t.hasAttribute(`data-utility-button`))return!0;return!1}function dZ(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return;break}console.log(...n)}var fZ=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,t){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);let n=e.querySelectorAll(`code`),r=new Map(this.observedNodes);this.observedNodes.clear();for(let e of n){let t=r.get(e);if(t!=null&&t.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let n=e.firstElementChild;n instanceof HTMLElement||(n=null),t==null?(t={type:`code`,codeElement:e,numberElement:n,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,t),this.resizeObserver.observe(e),n!=null&&(this.observedNodes.set(n,t),this.resizeObserver.observe(n))):(this.observedNodes.set(e,t),r.delete(e),t.numberElement===n?t.numberElement!=null&&(r.delete(t.numberElement),this.observedNodes.set(t.numberElement,t)):(t.numberElement!=null&&this.resizeObserver.unobserve(t.numberElement),n!=null&&(this.resizeObserver.observe(n),r.delete(n),this.observedNodes.set(n,t)),t.numberElement=n))}if(n.length>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let{lineAnnotation:t=``}=e.dataset;if(!/^\d+,\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,o=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement))continue;let s=r.get(a);if(s!=null){this.observedNodes.set(a,s),this.observedNodes.set(o,s),r.delete(a),r.delete(o);continue}s={type:`annotations`,column1:{container:n,child:a,childHeight:a.getBoundingClientRect().height},column2:{container:i,child:o,childHeight:o.getBoundingClientRect().height},currentHeight:`auto`};let c=Math.max(s.column1.childHeight,s.column2.childHeight);this.applyNewHeight(s,c),this.observedNodes.set(a,s),this.observedNodes.set(o,s),this.resizeObserver.observe(a),this.resizeObserver.observe(o)}}for(let e of r.keys())e.isConnected&&(e.style.removeProperty(`--diffs-column-content-width`),e.style.removeProperty(`--diffs-column-number-width`),e.style.removeProperty(`--diffs-column-width`),e.parentElement instanceof HTMLElement&&e.parentElement.style.removeProperty(`--diffs-annotation-min-height`)),this.resizeObserver.unobserve(e);r.clear()}handleResizeObserver=e=>{for(let t of e){let{target:e,borderBoxSize:n,contentBoxSize:r}=t;if(!(e instanceof HTMLElement)){console.error(`FileDiff.handleResizeObserver: Invalid element for ResizeObserver`,t);continue}let i=this.observedNodes.get(e);if(i==null){console.error(`FileDiff.handleResizeObserver: Not a valid observed node`,t);continue}if(i.type===`annotations`){let t=(()=>{if(e===i.column1.child)return i.column1;if(e===i.column2.child)return i.column2})();if(t==null){console.error(`FileDiff.handleResizeObserver: Couldn't find a column for`,{item:i,target:e});continue}t.childHeight=n[0].blockSize;let r=Math.max(i.column1.childHeight,i.column2.childHeight);this.applyNewHeight(i,r)}else if(i.type===`code`){let t=[e,r[0].inlineSize],n=this.queuedUpdates.get(i)??[];n.push(t),this.queuedUpdates.set(i,n)}}this.handleColumnChange()};handleColumnChange=()=>{for(let[e,t]of this.queuedUpdates)for(let[n,r]of t)if(n===e.codeElement){let n=Math.max(Math.floor(r),0);if(n!==e.codeWidth){let t=Math.max(n-e.numberWidth,0);e.codeWidth=n===0?`auto`:n,e.codeElement.style.setProperty(`--diffs-column-content-width`,`${t>0?`${t}px`:`auto`}`),e.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e.codeWidth==`number`?`${e.codeWidth}px`:`auto`}`)}e.numberElement!=null&&typeof e.codeWidth==`number`&&e.numberWidth===0&&t.push([e.numberElement,e.numberElement.getBoundingClientRect().width])}else if(n===e.numberElement){let t=Math.max(Math.ceil(r),0);if(t!==e.numberWidth&&(e.numberWidth=t,e.codeElement.style.setProperty(`--diffs-column-number-width`,`${e.numberWidth===0?`auto`:`${e.numberWidth}px`}`),e.codeWidth!==`auto`)){let t=Math.max(e.codeWidth-e.numberWidth,0);e.codeElement.style.setProperty(`--diffs-column-content-width`,`${t===0?`auto`:`${t}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function pZ(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function mZ(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!$K.has(t))return!1;return!0}function hZ(e){for(let t of kY(e))if(!JK.has(t))return!1;return!0}function gZ(e){return IY({tagName:`div`,children:[IY({tagName:`div`,children:e.annotations?.map(e=>IY({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function _Z(e,t){return IY({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function vZ(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function yZ({fileOrDiff:e,mode:t}){let n=`type`in e?e:void 0,r={"data-diffs-header":t,"data-change-type":n?.type};return IY({tagName:`div`,children:[t===`custom`?IY({tagName:`slot`,properties:{name:NK}}):bZ({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:n?.type??`file`}),...t===`custom`?[]:[xZ(n)]],properties:r})}function bZ({name:e,prevName:t,iconType:n}){let r=[IY({tagName:`slot`,properties:{name:jK}}),LY({name:vZ(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(IY({tagName:`div`,children:[IY({tagName:`bdi`,children:[FY(t)]})],properties:{"data-prev-name":``}})),r.push(LY({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(IY({tagName:`div`,children:[IY({tagName:`bdi`,children:[FY(e)]})],properties:{"data-title":``}})),IY({tagName:`div`,children:r,properties:{"data-header-content":``}})}function xZ(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(IY({tagName:`span`,children:[FY(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(IY({tagName:`span`,children:[FY(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(IY({tagName:`slot`,properties:{name:MK}})),IY({tagName:`div`,children:t,properties:{"data-metadata":``}})}function SZ(e){return IY({tagName:`pre`,properties:CZ(e)})}function CZ({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function wZ(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:kY(t),preferredHighlighter:n}}function TZ(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}var EZ=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
361
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
362
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
363
|
+
</symbol>
|
|
364
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
365
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
366
|
+
</symbol>
|
|
367
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
368
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
369
|
+
</symbol>
|
|
370
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
371
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
372
|
+
</symbol>
|
|
373
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
374
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
375
|
+
</symbol>
|
|
376
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
377
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
378
|
+
</symbol>
|
|
379
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
380
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
381
|
+
</symbol>
|
|
382
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
383
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
384
|
+
</symbol>
|
|
385
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
386
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
387
|
+
</symbol>
|
|
388
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
389
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
390
|
+
</symbol>
|
|
391
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
392
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
393
|
+
</symbol>
|
|
394
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
395
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
396
|
+
</symbol>
|
|
397
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
398
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
399
|
+
</symbol>
|
|
400
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
401
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
402
|
+
</symbol>
|
|
403
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
404
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
405
|
+
</symbol>
|
|
406
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
407
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
408
|
+
</symbol>
|
|
409
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
410
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
411
|
+
</symbol>
|
|
412
|
+
</svg>`;function DZ(e,t){return e==null||t==null?e===t:kZ(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var OZ={};function kZ(e=OZ,t=OZ){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function AZ(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function jZ(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e}function MZ(){let e=document.createElement(`style`);return e.setAttribute(IK,``),e}var NZ=`@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-computed-diff-line-bg:var(--diffs-annotation-bg);--diffs-computed-selected-line-bg:var(--diffs-annotation-bg);--diffs-line-bg:var(--diffs-annotation-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - 6px));align-self:flex-start;display:grid;overflow:scroll clip}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:6px}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info] [data-separator-wrapper]{min-width:16px}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}:is([data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]):before{min-width:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:6px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-interactive-line-numbers] [data-column-number]{cursor:pointer}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;`,PZ=`@layer base, theme, rendered, unsafe;`;function FZ(e){return`${PZ}
|
|
413
|
+
@layer unsafe {
|
|
414
|
+
${e}
|
|
415
|
+
}`}function IZ(e,t=`system`){return`${PZ}
|
|
416
|
+
@layer rendered {
|
|
417
|
+
:host {${t===`system`?``:`
|
|
418
|
+
color-scheme: ${t};`}
|
|
419
|
+
${e}
|
|
420
|
+
}
|
|
421
|
+
}`}function LZ({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function RZ({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=zZ(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function zZ(){let e=document.createElement(`style`);return e.setAttribute(FK,``),e}function BZ(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function VZ(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`);break}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.tabIndex=0,e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(NZ)),t.adoptedStyleSheets=[e]}}customElements.define(bK,t)}function HZ(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function UZ(e,t){let n=e?.theme??PK,r=t?.theme??PK,i=WZ(e),a=WZ(t);return AY(n,r)&&HZ(e,t,[`theme`,`parseDiffOptions`])&&HZ(i,a)}function WZ(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function GZ({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function KZ(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:qZ(n,e.startContentIndex)}}function qZ(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function JZ({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o,renderHoverUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d}){let f=o??s,p=n?.(e),m=r?.(e),h=i?.(e);return(0,_.jsxs)(_.Fragment,{children:[p==null?(0,_.jsxs)(_.Fragment,{children:[m!=null&&(0,_.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,_.jsx)(`div`,{slot:`header-metadata`,children:h})]}):(0,_.jsx)(`div`,{slot:NK,children:p}),a!=null&&l?.map((e,t)=>(0,_.jsx)(`div`,{slot:VK(e),children:a(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=YZ(t,e);return(0,_.jsx)(`div`,{slot:n,style:vK,children:c(t,d)},n)}),f!=null&&(0,_.jsx)(`div`,{slot:`gutter-utility-slot`,style:_K,children:f(u)})]})}function YZ(e,t){let n=KZ(e,t);return n==null?void 0:GZ({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var XZ=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function ZZ(e){return IY({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function QZ(e){return IY({tagName:`div`,children:[IY({tagName:`span`,children:[FY(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function $Z(e){return IY({tagName:`div`,children:[LY({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function eQ({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(IY({tagName:`div`,children:[FY(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push($Z(`up`)),s++),o||(e.push($Z(`down`)),s++)):(e.push($Z(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(IY({tagName:`div`,children:[IY({tagName:`span`,children:[FY(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(IY({tagName:`div`,children:[FY(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(IY({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(IY({tagName:`slot`,properties:{name:i}})),IY({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function tQ(e,t){return`hunk-separator-${e}-${t}`}function nQ(e){let t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function rQ(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}var iQ=-1,aQ=class{__id=`diff-hunks-renderer:${++iQ}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;constructor(e={theme:PK},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=hZ(e.theme??PK)?DY():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??RK}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t===`change`?{gutterLineType:e===`deletions`?`change-deletion`:`change-addition`}:{gutterLineType:t}}createAnnotationElement(e){return gZ(e)}getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,theme:m=PK,headerRenderMode:h=`default`,tokenizeMaxLineLength:g=1e3,useTokenTransformer:_=!1,useCSSClasses:v=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,theme:this.workerManager?.getDiffRenderOptions().theme??m,headerRenderMode:h,tokenizeMaxLineLength:g,useTokenTransformer:_,useCSSClasses:v}}async initializeHighlighter(){return this.highlighter=await EY(wZ(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=this.workerManager?.getDiffResultCache(e);n!=null&&!aX(t,n.options)&&(n=void 0),this.renderCache??={diff:e,highlighted:!oX(e),options:t,result:n?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result??this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLang=e.lang??NY(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:TZ(this.options),tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||e!==n.diff||!aX(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=zK){if(e==null)return;let{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),i=this.workerManager?.getDiffResultCache(e);i!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...i});let{options:a,forceRender:o}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:a,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&(e!==this.renderCache.diff||!pZ(this.renderCache.renderRange,t)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,rQ(t)||n?!0:this.expandedHunks,r),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||o)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??NY(e.name);let t=this.highlighter!=null&&hZ(a.theme),n=this.highlighter!=null&&mZ(this.computedLang);if(this.highlighter!=null&&t&&(o||!this.renderCache.highlighted&&n||this.renderCache.result==null)){let{result:t,options:r}=this.renderDiffWithHighlighter(e,this.highlighter,!n);this.renderCache={diff:e,options:r,highlighted:n,result:t,renderRange:void 0}}(!t||!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=zK){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return SZ({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){this.computedLang=e.lang??NY(e.name);let t=this.highlighter!=null&&hZ(this.options.theme??PK),n=this.highlighter!=null&&mZ(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:UX(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;let r=!this.renderCache.highlighted||!aX(this.renderCache.options,n)||this.renderCache.diff!==e;this.renderCache={diff:e,options:n,highlighted:!0,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;let d=a===`unified`,f=[],p=[],m=[],h=[],{additionLines:g,deletionLines:_}=n,v={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:p,unifiedContentAST:m,unifiedGutterAST:zY(),deletionsGutterAST:zY(),additionsGutterAST:zY(),expansionLineCount:c,hunkData:h,incrementRowCount(e=1){v.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:v.unifiedGutterAST.children.push(t);break;case`deletions`:v.deletionsGutterAST.children.push(t);break;case`additions`:v.additionsGutterAST.children.push(t);break}}},y=fQ(e),b={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(v.pushToGutter(`additions`,VY(void 0,`buffer`,this.size)),f?.push(ZZ(this.size))):(v.pushToGutter(`deletions`,VY(void 0,`buffer`,this.size)),p?.push(ZZ(this.size))),this.size=0,this.side=void 0}}},x=(e,t,n,r,i)=>{v.pushToGutter(e,BY(t,n,r,i))};function S(e){b.flush(),a===`unified`?uQ(`unified`,e,v):(uQ(`deletions`,e,v),uQ(`additions`,e,v))}sX({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,d=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&b.flush(),r>0&&S({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:!e.isPartial});let f=a===`unified`?d:l,p={type:c,hunkIndex:t,lineIndex:f,unifiedLineIndex:d,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(p);n?.before!=null&&sQ(n.before,v);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});x(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${d},${l}`,u.gutterProperties),i==null?r!=null&&(r=dQ(r,u.contentProperties)):i=dQ(i,u.contentProperties),lQ({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,f),createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&sQ(n.after,v)}else{let n=this.getSplitInjectedRowsForLine?.(p);n?.before!=null&&cQ(n.before,v,b);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let d=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();if(d!=null){if(b.side!=null&&b.side!==d)throw Error(`DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits`);b.side=d,b.increment()}let m=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,f);if(m!=null&&b.size>0&&b.flush(),s!=null){let e=dQ(r,a.contentProperties);x(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=dQ(i,u.contentProperties);x(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}lQ({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...m,createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&cQ(n.after,v,b)}let m=s?.noEOFCR??!1,h=o?.noEOFCR??!1;if(h||m){if(m){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(v.unifiedContentAST.push(QZ(e)),v.pushToGutter(`unified`,VY(e,`metadata`,1))):(v.deletionsContentAST.push(QZ(e)),v.pushToGutter(`deletions`,VY(e,`metadata`,1)),h||(v.pushToGutter(`additions`,VY(void 0,`buffer`,1)),v.additionsContentAST.push(ZZ(1))))}if(h){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(v.unifiedContentAST.push(QZ(e)),v.pushToGutter(`unified`,VY(e,`metadata`,1))):(v.additionsContentAST.push(QZ(e)),v.pushToGutter(`additions`,VY(e,`metadata`,1)),m||(v.pushToGutter(`deletions`,VY(void 0,`buffer`,1)),v.deletionsContentAST.push(ZZ(1))))}v.incrementRowCount(1)}i>0&&u!==`simple`&&S({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:i,rangeSize:y,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),a===`split`&&b.flush();let C=Math.max(nQ(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),w=t.bufferBefore>0||t.bufferAfter>0,T=!d&&e.type!==`deleted`,E=!d&&e.type!==`new`,D=v.rowCount>0||w;f=T&&D?f:void 0,p=E&&D?p:void 0,m=d&&D?m:void 0;let O=this.createPreElement(p!=null&&f!=null,C);return{unifiedGutterAST:d&&D?v.unifiedGutterAST.children:void 0,unifiedContentAST:m,deletionsGutterAST:E&&D?v.deletionsGutterAST.children:void 0,deletionsContentAST:p,additionsGutterAST:T&&D?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:h,preNode:O,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:C,rowCount:v.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=zY(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,_Z(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(IY({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(IY({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(IY({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return pB(this.renderFullAST(e,t))}renderPartialHTML(e,t){return pB(t==null?e:IY({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(VK(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(VK(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(!(o.annotations.length===0&&a.annotations.length===0))return{deletionSpan:a,additionSpan:o}}renderHeader(e){let{headerRenderMode:t}=this.getOptionsWithDefaults();return yZ({fileOrDiff:e,mode:t})}};function oQ(e){return`${e} unmodified line${e>1?`s`:``}`}function sQ(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function cQ(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function lQ({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,VY(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,VY(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,VY(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function uQ(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,eQ({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(eQ({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,eQ({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(eQ({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=tQ(e,t),d=r>c.expansionLineCount,f=s?t:void 0;c.pushToGutter(e,eQ({type:c.hunkSeparators,content:oQ(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(eQ({type:c.hunkSeparators,content:oQ(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function dQ(e,t){return e==null||e.type!==`element`||t==null?e:{...e,properties:{...e.properties,...t}}}function fQ(e){let t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let n=e.additionLines.length-(t.additionLineIndex+t.additionCount),r=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(n!==r)throw Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${n}, deletions=${r}) for ${e.name}`);return Math.min(n,r)}function pQ(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function mQ(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function hQ(e){let t=e[0];if(t!==`+`&&t!==`-`&&t!==` `&&t!==`\\`){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}let n=e.substring(1);return{line:n===``?`
|
|
422
|
+
`:n,type:t===` `?`context`:t===`\\`?`metadata`:t===`+`?`addition`:`deletion`}}function gQ(e,t,n=!1){let r=SK.test(e),i=e.split(r?SK:CK),a,o=[];for(let e of i){if(r&&!SK.test(e)){if(a==null)a=e;else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!CK.test(e)){if(a==null)a=e;else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=_Q(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function _Q(e,{cacheKey:t,isGitDiff:n=SK.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=e.split(wK),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=e.split(EK),f=s.shift();if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=f.match(TK),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?i.contents.split(EK):[],deletionLines:!l&&r!=null&&i!=null?r.contents.split(EK):[],cacheKey:t},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0),s.unshift(f);for(let e of s){let t=e.match(n?OK:DK);if(e.startsWith(`diff --git`)){let[,,t,,n]=e.trim().match(kK)??[];c.name=n.trim(),t!==n&&(c.prevName=t.trim())}else if(t!=null){let[,e,n]=t;e===`---`&&n!==`/dev/null`?(c.prevName=n.trim(),c.name=n.trim()):e===`+++`&&n!==`/dev/null`&&(c.name=n.trim())}else if(n){if(e.startsWith(`new mode `)&&(c.mode=e.replace(`new mode`,``).trim()),e.startsWith(`old mode `)&&(c.prevMode=e.replace(`old mode`,``).trim()),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=e.replace(`new file mode`,``).trim()),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=e.replace(`deleted file mode`,``).trim()),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(AK)??[];t!=null&&(c.prevObjectId=t),n!=null&&(c.newObjectId=n),r!=null&&(c.mode=r)}e.startsWith(`rename from `)&&(c.prevName=e.replace(`rename from `,``).trim()),e.startsWith(`rename to `)&&(c.name=e.replace(`rename to `,``).trim())}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
423
|
+
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
424
|
+
`||s[s.length-1]===``);)s.pop();let v=parseInt(p[3]),y=parseInt(p[1]);u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(p[4]??`1`),additionStart:v,additionLines:m,deletionCount:parseInt(p[2]??`1`),deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:p[5],hunkSpecs:f,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(b.additionCount)||isNaN(b.deletionCount)||isNaN(b.additionStart)||isNaN(b.deletionStart)){if(a)throw Error(`parsePatchContent: invalid hunk metadata`);console.error(`parsePatchContent: invalid hunk metadata`,b);continue}let x=0,S=0;for(let e of s){if(vQ({additionCount:b.additionCount,parsedAdditionLines:x,deletionCount:b.deletionCount,parsedDeletionLines:S})&&!e.startsWith(`\\`))break;let t=hQ(e);if(t==null){console.error(`processFile: invalid rawLine:`,e);continue}let{type:n,line:r}=t;if(n===`addition`)(g==null||g.type!==`change`)&&(g=bQ(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(r),g.additions++,m++,_=`addition`;else if(n===`deletion`)(g==null||g.type!==`change`)&&(g=bQ(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(r),g.deletions++,h++,_=`deletion`;else if(n===`context`)(g==null||g.type!==`context`)&&(g=bQ(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(r),c.additionLines.push(r)),g.lines++,_=`context`;else if(n===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=PY(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=PY(c.deletionLines[e]))}}}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),c}}function vQ({additionCount:e,parsedAdditionLines:t,deletionCount:n,parsedDeletionLines:r}){return t>=e&&r>=n}function yQ(e,t,n=!1){let r=[];for(let i of e.split(xK))try{r.push(gQ(i,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function bQ(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}function xQ(e,t,n,r=!1){let i=_Q(RX(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);return t.lang!=null&&(i.lang=t.lang),i}var SQ=-1,CQ=class{static LoadedCustomComponent=!0;__id=`file-diff:${++SQ}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(e={theme:PK},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new fZ,this.scrollSyncManager=new XZ,this.interactionManager=new QX(`diff`,$X(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return{...e,headerRenderMode:e.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e.hunkSeparators==`function`?`custom`:e.hunkSeparators}}createHunksRenderer(e){return new aQ(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{if(this.fileDiff==null)return;let n=this.fileDiff.hunks.at(-1),r,i;hunkIterator:for(let a of this.fileDiff.hunks){let o=t===`deletions`?a.deletionStart:a.additionStart,s=t===`deletions`?a.deletionCount:a.additionCount,c=a.splitLineStart,l=a.unifiedLineStart;if(e<o){let t=o-e;r=Math.max(l-t,0),i=Math.max(c-t,0);break hunkIterator}if(e>=o+s){if(a===n){let t=e-(o+s);r=l+a.unifiedLineCount+t,i=c+a.splitLineCount+t;break hunkIterator}continue}for(let n of a.hunkContent)if(n.type===`context`)if(e<o+n.lines){let t=e-o;i=c+t,r=l+t;break hunkIterator}else o+=n.lines,c+=n.lines,l+=n.lines;else{let a=t===`deletions`?n.deletions:n.additions;if(e<o+a){let a=e-o;r=l+(t===`additions`?n.deletions:0)+a,i=c+a;break hunkIterator}else o+=a,c+=Math.max(n.deletions,n.additions),l+=n.deletions+n.additions}break hunkIterator}if(!(r==null||i==null))return[r,i]};setOptions(e){e!=null&&(this.options=e,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.interactionManager.setOptions($X(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),!(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e){this.interactionManager.setSelection(e)}cleanUp(e=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=``),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML=``,this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:a,newFile:o,fileDiff:s}=e;this.hydrateElements(t,n),EQ(this.pre,wQ({fileDiff:s,oldFile:a,newFile:o}),this.options.collapsed)||DQ(this.headerElement,TQ({fileDiff:s,oldFile:a,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:s,oldFile:a,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){BZ(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){let{diffStyle:i=`split`,overflow:a=`scroll`}=this.options;this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?xQ(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,a===`wrap`),a===`scroll`&&i===`split`&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,forceRender:r=!1,preventEmit:i=!1,lineAnnotations:a,fileContainer:o,containerWrapper:s,renderRange:c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let{collapsed:l=!1}=this.options,u=l?void 0:c,d=e!=null&&t!=null&&(!iX(e,this.deletionFile)||!iX(t,this.additionFile)),f=n!=null&&n!==this.fileDiff,p=a!=null&&(a.length>0||this.lineAnnotations.length>0)?a!==this.lineAnnotations:!1;if(!l&&pZ(u,this.renderRange)&&!r&&!p&&(n!=null&&n===this.fileDiff||n==null&&!d))return!1;let{renderRange:m}=this;if(this.renderRange=u,this.deletionFile=e,this.additionFile=t,n==null?e!=null&&t!=null&&d&&(f=!0,this.fileDiff=xQ(e,t,this.options.parseDiffOptions)):this.fileDiff=n,a!=null&&this.setLineAnnotations(a),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{diffStyle:h=`split`,disableErrorHandling:g=!1,disableFileHeader:_=!1,overflow:v=`scroll`,themeType:y=`system`}=this.options;if(_&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),o=this.getOrCreateFileContainer(o,s),l){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,BK);e!=null&&this.applyThemeState(o,e.themeStyles,y,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,o),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(g)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,o)}return i||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(o);if(!(this.canPartiallyRender(r,p,d||f)&&this.applyPartialRender({previousRenderRange:m,renderRange:u}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,u);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(o,t.themeStyles,y,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,o),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,u),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(e),this.resizeManager.setup(e,v===`wrap`),v===`scroll`&&h===`split`?this.scrollSyncManager.setup(e,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(e){if(g)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,o)}return i||this.emitPostRender(),!0}emitPostRender(){this.fileContainer!=null&&this.options.onPostRender?.(this.fileContainer,this)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!mQ(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${VK(r)}`,a=this.annotationCache.get(i);if(a==null||!pQ(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:AZ(VK(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let e=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=jZ();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let n=this.fileContainer;if(this.fileContainer=e??this.fileContainer??document.createElement(`diffs-container`),n!=null&&n!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=EZ;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=pB(e);if(r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,NK,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}let s=a?.(n)??void 0,c=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,jK,s),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,MK,c),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=MZ(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=FZ(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n;this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a||(this.themeCSSStyle=RZ({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:IZ(t,a)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{themeStyles:t,themeType:a,baseThemeType:r})}applyHunksToDOM(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=LZ({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=LZ({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=LZ({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=OQ(t[0]),i=OQ(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}else throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}if(e===`unified`)return i(t);{let e=i(n),t=i(r);return e!=null||t!=null?[e,t]:void 0}}applyBuffers(e,t){let{disableVirtualizationBuffers:n=!1}=this.options;if(n||t==null){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l===`unified`?!1:t!=null&&n!=null,totalLines:r,customProperties:i};DZ(u,this.appliedPreAttributes)||(VZ(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper();let n=this.getOrCreatePreNode(t);n.innerHTML=``,n.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let r=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.innerHTML=``,r.appendChild(this.errorWrapper);let i=document.createElement(`div`);i.dataset.errorMessage=``,i.innerText=e.message,this.errorWrapper.appendChild(i);let a=document.createElement(`pre`);a.dataset.errorStack=``,a.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(a)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function wQ({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function TQ({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function EQ(e,t,n=!1){return!n&&e==null&&t}function DQ(e,t,n=!1){return e==null&&t&&!n}function OQ(e){if(!(e==null||e.type!==`element`))return e.children??[]}function kQ(e,t){let n={...LK,...t};return n.hunkSeparatorHeight=AQ(e,t?.hunkSeparatorHeight),n}function AQ(e,t){if(t!=null)return t;switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}var jQ=-1,MQ=class extends CQ{__id=`little-virtualized-file-diff:${++jQ}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;isSetup=!1;virtualizer;constructor(e,t,n,r,i=!1){super(e,r,i);let{hunkSeparators:a=`line-info`}=this.options;this.virtualizer=t,this.metrics=kQ(typeof a==`function`?`custom`:a,n)}getLineHeight(e,t=!1){let n=this.heightCache.get(e);if(n!=null)return n;let r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(e==null)return;let t=this.options.diffStyle,n=this.options.overflow,r=this.options.collapsed;super.setOptions(e),(t!==this.options.diffStyle||n!==this.options.overflow||r!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){let{overflow:e=`scroll`}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(e===`scroll`&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;let t=this.getDiffStyle(),n=!1,r=t===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(let e of r){if(e==null)continue;let r=e.children[1];if(r instanceof HTMLElement)for(let e of r.children){if(!(e instanceof HTMLElement))continue;let r=e.dataset.lineIndex;if(r==null)continue;let i=PQ(r,t),a=e.getBoundingClientRect().height,o=!1;e.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in e.nextElementSibling.dataset||`noNewline`in e.nextElementSibling.dataset)&&(`noNewline`in e.nextElementSibling.dataset&&(o=!0),a+=e.nextElementSibling.getBoundingClientRect().height);let s=this.getLineHeight(i,o);a!==s&&(n=!0,a===this.metrics.lineHeight*(o?2:1)?this.heightCache.delete(i):this.heightCache.set(i,a))}}(n||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),this.isSetup=!1,super.cleanUp()}expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){let e=this.height===0;if(this.height=0,this.fileDiff==null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=1,hunkSeparators:a=`line-info`}=this.options,{diffHeaderHeight:o,fileGap:s,hunkSeparatorHeight:c}=this.metrics,l=this.getDiffStyle(),u=a!==`simple`&&a!==`metadata`&&a!==`line-info-basic`?s:0;if(t?a!==`simple`&&a!==`metadata`&&(this.height+=s):this.height+=o,!r&&(sX({diff:this.fileDiff,diffStyle:l,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:e,collapsedBefore:t,collapsedAfter:n,deletionLine:r,additionLine:i})=>{let o=i==null?r.splitLineIndex:i.splitLineIndex,s=i==null?r.unifiedLineIndex:i.unifiedLineIndex,d=(i?.noEOFCR??!1)||(r?.noEOFCR??!1);t>0&&(e>0&&(this.height+=u),this.height+=c+u),this.height+=this.getLineHeight(l===`split`?o:s,d),n>0&&a!==`simple`&&(this.height+=u+c)}}),this.fileDiff.hunks.length>0&&(this.height+=s),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){let e=this.fileContainer.getBoundingClientRect();e.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height})}}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,...i}={}){let{isSetup:a}=this;if(this.fileDiff??=r??(t!=null&&n!=null?xQ(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;if(a?this.top??=this.virtualizer.getOffsetInScrollContainer(e):(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height),this.isSetup=!0),!this.isVisible)return this.renderPlaceholder(this.height);let o=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.fileDiff,this.top,o);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:s,oldFile:t,newFile:n,...i})}getDiffStyle(){return this.options.diffStyle??`split`}getExpandedRegion(e,t,n){if(n<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(n,0),renderAll:!1};let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;if(r||n<=i)return{fromStart:n,fromEnd:0,collapsedLines:0,renderAll:!0};let a=this.hunksRenderer.getExpandedHunk(t),o=Math.min(Math.max(a.fromStart,0),n),s=Math.min(Math.max(a.fromEnd,0),n),c=o+s,l=c>=n;return{fromStart:o,fromEnd:s,collapsedLines:Math.max(n-c,0),renderAll:l}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}for(let[r,i]of e.hunks.entries()){let a=t===`split`?i.splitLineCount:i.unifiedLineCount;n+=a;let o=Math.max(i.collapsedBefore,0),{fromStart:s,fromEnd:c,renderAll:l}=this.getExpandedRegion(e.isPartial,r,o);o>0&&(n+=l?o:s+c)}let r=e.hunks.at(-1);if(r!=null&&NQ(e)){let t=e.additionLines.length-(r.additionLineIndex+r.additionCount),i=e.deletionLines.length-(r.deletionLineIndex+r.deletionCount);if(r!=null&&t!==i)throw Error(`VirtualizedFileDiff: trailing context mismatch (additions=${t}, deletions=${i}) for ${e.name}`);let a=Math.min(t,i);if(r!=null&&a>0){let{fromStart:t,renderAll:r}=this.getExpandedRegion(e.isPartial,e.hunks.length,a);n+=r?a:t}}return n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1,hunkSeparators:s=`line-info`}=this.options,{diffHeaderHeight:c,fileGap:l,hunkLineCount:u,hunkSeparatorHeight:d,lineHeight:f}=this.metrics,p=this.getDiffStyle(),m=this.height,h=this.getExpandedLineCount(e,p),g=i?l:c;if(t<n-m||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:m-g-l};if(h<=u||e.hunks.length===0)return{startingLine:0,totalLines:u,bufferBefore:0,bufferAfter:0};let _=Math.ceil(Math.max(r-n,0)/f),v=Math.ceil(_/u)*u+u,y=v/u,b=y,x=[],S=(n+r)/2,C=s===`simple`||s===`metadata`||s===`line-info-basic`?0:l,w=t+g,T=0,E,D,O;if(sX({diff:e,diffStyle:p,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:e,collapsedBefore:i,collapsedAfter:a,deletionLine:o,additionLine:c})=>{let l=c==null?o.splitLineIndex:c.splitLineIndex,f=c==null?o.unifiedLineIndex:c.unifiedLineIndex,m=(c?.noEOFCR??!1)||(o?.noEOFCR??!1),h=i>0?d+C+(e>0?C:0):0;e===0&&s===`simple`&&(h=0),w+=h;let _=T%u===0;if(_&&(x.push(w-(t+g+h)),O!=null)){if(O<=0)return!0;O--}let v=this.getLineHeight(p===`split`?l:f,m),y=Math.floor(T/u);return w>n-v&&w<r&&(E??=y),D==null&&w+v>S&&(D=y),O==null&&w>=r&&_&&(O=b),T++,w+=v,a>0&&s!==`simple`&&(w+=d+C),!1}}),E==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:m-g-l};let ee=x.length;D??=E;let k=Math.round(D-y/2),A=Math.max(0,ee-y),j=Math.max(0,Math.min(k,A)),M=j*u,N=k<0?v+k*u:v,te=x[j]??0,P=j+N/u;return{startingLine:M,totalLines:N,bufferBefore:te,bufferAfter:P<x.length?m-g-x[P]-l:m-(w-t)-l}}};function NQ(e){let t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function PQ(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}var FQ=typeof window>`u`?d.useEffect:d.useLayoutEffect;function IQ({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:i,metrics:a,hasGutterRenderUtility:o,hasCustomHeader:s,disableWorkerPool:c}){let l=WK(),u=(0,d.useContext)(qX),f=(0,d.useRef)(null),p=JX(r=>{if(r!=null){if(f.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);l==null?f.current=new CQ(LQ({hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),c?void 0:u,!0):f.current=new MQ(LQ({hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),l,a,c?void 0:u,!0),f.current.hydrate({fileDiff:e,fileContainer:r,lineAnnotations:n,prerenderedHTML:i})}else{if(f.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);f.current.cleanUp(),f.current=null}});return FQ(()=>{let{current:i}=f;if(i==null)return;let a=LQ({hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),c=!UZ(i.options,a);i.setOptions(a),i.render({forceRender:c,fileDiff:e,lineAnnotations:n}),r!==void 0&&i.setSelectedLines(r)}),{ref:p,getHoveredLine:(0,d.useCallback)(()=>f.current?.getHoveredLine(),[])}}function LQ({options:e,hasCustomHeader:t,hasGutterRenderUtility:n}){return n||t?{...e,renderCustomHeader:t?yK:void 0,renderGutterUtility:n?yK:void 0}:e}function RQ(e){let t=yQ(e);if(t.length!==1)throw console.error(t),Error(`PatchDiff: Provided patch must include only 1 patch, with 1 diff`);let{files:n}=t[0];if(n.length!==1)throw console.error(n),Error(`FileDiff: Provided patch must contain exactly 1 file diff`);return n[0]}function zQ({patch:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,className:a,style:o,prerenderedHTML:s,renderAnnotation:c,renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderMetadata:d,renderGutterUtility:f,renderHoverUtility:p,disableWorkerPool:m=!1}){let h=BQ(e),{ref:g,getHoveredLine:v}=IQ({fileDiff:h,options:t,metrics:n,lineAnnotations:r,selectedLines:i,prerenderedHTML:s,hasGutterRenderUtility:f!=null||p!=null,hasCustomHeader:l!=null,disableWorkerPool:m});return(0,_.jsx)(bK,{ref:g,className:a,style:o,children:HK(JZ({fileDiff:h,renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderMetadata:d,renderAnnotation:c,lineAnnotations:r,renderGutterUtility:f,renderHoverUtility:p,getHoveredLine:v}),s)})}function BQ(e){return(0,d.useMemo)(()=>RQ(e),[e])}var VQ={M:`text-amber-600 dark:text-amber-400`,A:`text-green-600 dark:text-green-400`,D:`text-red-600 dark:text-red-400`,"?":`text-(--text-muted)`};function HQ({open:e,onOpenChange:t}){let[n,r]=(0,d.useState)(null),[i,a]=(0,d.useState)(!1),[o,s]=(0,d.useState)(null),c=(0,d.useCallback)(()=>document.documentElement.classList.contains(`dark`)||document.documentElement.dataset.theme===`dark`,[]),[l,u]=(0,d.useState)(c);(0,d.useEffect)(()=>{if(typeof window>`u`)return;let e=new MutationObserver(()=>u(c()));return e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-theme`]}),()=>e.disconnect()},[c]);let f=(0,d.useCallback)(e=>{if(!n?.patch||!e)return``;let t=n.patch.split(`
|
|
425
|
+
`),r=[],i=!1;for(let n of t)if(n.startsWith(`diff --git `)){let t=n.match(/^diff --git a\/(.+) b\/(.+)$/);t&&(t[1]===e||t[2]===e)?(i=!0,r.push(n)):i=!1}else i&&r.push(n);return r.join(`
|
|
426
|
+
`)},[n?.patch]),p=(0,d.useMemo)(()=>Array.isArray(n?.files)?n.files.filter(e=>f(e.path).trim()):[],[n?.files,f]);(0,d.useEffect)(()=>{if(!e){r(null),s(null);return}a(!0),Ud().then(e=>{r(e)}).finally(()=>a(!1))},[e]),(0,d.useEffect)(()=>{if(e){if(!p.length){s(null);return}(!o||!p.some(e=>e.path===o))&&s(p[0].path)}},[p,e,o]);let m=(0,d.useMemo)(()=>f(o),[f,o]);return(0,_.jsx)(Vp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Wp,{className:`sm:max-w-5xl h-[80vh] flex flex-col p-0 gap-0`,children:[(0,_.jsx)(Gp,{className:`px-5 pt-5 pb-3 shrink-0`,children:(0,_.jsx)(qp,{children:V(`gitDiffTitle`)})}),i?(0,_.jsx)(`div`,{className:`flex-1 flex items-center justify-center py-12 text-(--text-muted) text-[13px]`,children:V(`gitDiffLoading`)}):p.length?(0,_.jsxs)(`div`,{className:`flex-1 flex min-h-0 border-t border-(--border-default)`,children:[(0,_.jsx)(`div`,{className:`w-[220px] shrink-0 border-r border-(--border-default) overflow-y-auto py-1`,children:p.map(e=>(0,_.jsxs)(`button`,{onClick:()=>s(e.path),className:B(`w-full text-left px-3 my-1 py-1.5 text-[12px] cursor-pointer flex items-center gap-2 border-0 bg-transparent`,o===e.path?`bg-(--bg-hover) text-(--text-primary)`:`text-(--text-secondary) hover:bg-(--bg-hover)`),children:[(0,_.jsx)(`span`,{className:B(`shrink-0 text-[11px] font-mono w-[14px] text-center`,VQ[e.status]||``),children:e.status===`?`?`U`:e.status}),(0,_.jsx)(`span`,{className:`truncate`,children:e.path})]},e.path))}),(0,_.jsx)(`div`,{className:`flex-1 overflow-auto`,children:m?(0,_.jsx)(zQ,{patch:m,options:{theme:{dark:`pierre-dark`,light:`pierre-light`},themeType:l?`dark`:`light`,diffStyle:`unified`}}):(0,_.jsx)(`div`,{className:`flex items-center justify-center h-full text-(--text-muted) text-[12px]`,children:V(`gitDiffNoDiffAvailable`)})})]}):(0,_.jsx)(`div`,{className:`flex-1 flex items-center justify-center py-12 text-(--text-muted) text-[13px]`,children:V(`gitDiffNoChanges`)})]})})}function UQ({sessions:e,currentId:t,onSwitch:n,onNew:r,onDelete:i}){let a=Array.isArray(e)?e:[],[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(!1);return(0,_.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,_.jsx)(`h2`,{className:`text-[15px] font-semibold text-(--text-primary)`,children:V(`sessions`)}),(0,_.jsxs)(Bp,{size:`sm`,onClick:r,className:`text-[13px]`,children:[`+ `,V(`newChat`)]})]}),(0,_.jsx)(YG,{className:`h-[calc(100vh-160px)]`,children:(0,_.jsxs)(`div`,{className:`space-y-2`,children:[a.length===0&&(0,_.jsx)(`div`,{className:`text-center text-(--text-muted) text-[13px] py-8`,children:V(`noSessions`)}),a.map(e=>(0,_.jsxs)(`div`,{onClick:()=>e.id!==t&&n(e.id),className:B(`w-full text-left rounded-lg border border-(--border-default) p-3 transition-colors bg-(--bg-primary) cursor-pointer`,e.id===t?`border-(--accent-blue)/30 bg-(--accent-blue-bg)`:`hover:bg-(--bg-hover)`),children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,_.jsx)(`span`,{className:`font-mono text-[11px] text-(--text-muted)`,children:e.id?.slice(-12)}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.id===t&&(0,_.jsx)(PG,{variant:`secondary`,className:`text-[11px]`,children:V(`current`)}),(0,_.jsxs)(Np,{children:[(0,_.jsx)(Pp,{asChild:!0,children:(0,_.jsx)(`button`,{type:`button`,className:`inline-flex size-7 items-center justify-center rounded-md text-(--text-muted) hover:bg-(--bg-hover) hover:text-(--text-primary)`,onClick:e=>e.stopPropagation(),"aria-label":V(`sessionActions`),children:(0,_.jsx)(tp,{size:15})})}),(0,_.jsx)(Fp,{align:`end`,className:`w-36 border-(--border-default) bg-(--bg-primary) p-1 text-(--text-primary)`,onClick:e=>e.stopPropagation(),children:(0,_.jsx)(`button`,{type:`button`,className:`w-full rounded-md px-2.5 py-2 text-left text-[13px] text-(--accent-red) hover:bg-(--accent-red-bg)`,onClick:()=>s(e),children:V(`deleteSession`)})})]})]})]}),(0,_.jsx)(`div`,{className:`text-[13px] font-medium truncate mt-1 text-(--text-primary)`,children:e.title||e.preview||(e.messageCount>0?`${e.messageCount} ${V(`messages`)}`:V(`emptyChat`))}),e.updatedAt&&(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) mt-1`,children:nm(e.updatedAt)})]},e.id))]})}),(0,_.jsx)(Yp,{open:!!o,title:V(`deleteSessionConfirm`),description:o?V(`deleteSessionDescription`).replace(`{{session}}`,o.title||o.preview||o.id||``):``,loading:c,onOpenChange:e=>!e&&s(null),onConfirm:async()=>{if(!o)return;l(!0);let e=await i?.(o.id);l(!1),e?.error||s(null)}})]})}function WQ({size:e=14,className:t,...n}){return(0,_.jsx)(`svg`,{viewBox:`0 0 24 24`,width:e,height:e,fill:`currentColor`,"aria-hidden":`true`,className:t,...n,children:(0,_.jsx)(`path`,{d:`M12 .5C5.65.5.5 5.65.5 12c0 5.09 3.29 9.4 7.86 10.93.58.1.79-.25.79-.56v-2.18c-3.2.69-3.87-1.36-3.87-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.76 2.7 1.25 3.36.96.1-.75.4-1.25.73-1.54-2.55-.29-5.23-1.27-5.23-5.67 0-1.25.45-2.27 1.18-3.07-.12-.29-.51-1.46.11-3.03 0 0 .97-.31 3.16 1.17A10.98 10.98 0 0 1 12 6.07c.98 0 1.96.13 2.88.39 2.19-1.48 3.15-1.17 3.15-1.17.63 1.57.24 2.74.12 3.03.74.8 1.18 1.82 1.18 3.07 0 4.41-2.69 5.38-5.25 5.66.42.36.78 1.06.78 2.14v3.18c0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z`})})}var GQ=class extends d.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,_.jsxs)(`div`,{style:{padding:32,color:`#d84f4f`,fontFamily:`monospace`,fontSize:13},children:[(0,_.jsx)(`p`,{style:{fontWeight:600,marginBottom:8},children:V(`renderError`)}),(0,_.jsx)(`pre`,{style:{whiteSpace:`pre-wrap`,opacity:.8},children:this.state.error?.message||String(this.state.error)}),(0,_.jsx)(`button`,{onClick:()=>this.setState({error:null}),style:{marginTop:12,padding:`6px 16px`,borderRadius:6,border:`1px solid #d84f4f`,background:`transparent`,color:`#d84f4f`,cursor:`pointer`},children:V(`retry`)})]}):this.props.children}};function KQ(){let{state:e,actions:t}=jf(),n=(e.runtimeState||{}).sessionId;return(0,_.jsxs)(`div`,{className:`flex h-screen bg-(--bg-primary) text-(--text-primary)`,children:[(0,_.jsx)(em,{sessions:e.sessions,currentSessionId:n,onNewSession:t.newSession,onSwitchSession:t.switchSession,onToggleTheme:t.toggleTheme,onOpenSettings:()=>t.setConfigOpen(!0),onOpenSkills:()=>t.setSkillsOpen(!0),onOpenSouls:()=>t.setSoulsOpen(!0),onOpenAbout:()=>t.setAboutOpen(!0),gitBatch:e.gitBatch,versionInfo:e.versionInfo,onUpdate:t.runUpdate,updateStatus:e.updateStatus,currentView:e.currentView,onSwitchView:t.switchView,onOpenProject:t.openProject,onDeleteSession:t.deleteSession}),(0,_.jsx)(`div`,{className:`flex-1 flex flex-col min-w-0 bg-(--bg-secondary)`,children:e.currentView===`sessions`?(0,_.jsx)(UQ,{sessions:e.sessions,currentId:n,onSwitch:t.switchSession,onNew:t.newSession,onDelete:t.deleteSession}):e.currentView===`codewiki`?(0,_.jsx)(DG,{projectCwd:e.codewikiProjectPath?.split(/[/\\]/).pop()||e.projectCwd,projectKey:e.codewikiProjectPath||e.runtimeState?.cwd||e.projectCwd||``,busy:e.busy,planSteps:e.planSteps,stageLabel:e.stageLabel}):(0,_.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 bg-(--bg-primary) rounded-[18px] border border-(--border-default) border-b-0 relative overflow-hidden my-1 mx-1`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between h-[52px] px-5 shrink-0 border-b border-(--border-default)`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2.5 min-w-0`,children:[(0,_.jsx)(`span`,{className:`font-medium text-[14px] text-(--text-primary) truncate`,children:e.projectCwd||`qurio-coder`}),e.gitInfo?.isGit&&(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[12px] text-(--text-muted) shrink-0`,children:[(0,_.jsx)(WQ,{size:13}),(0,_.jsx)(`span`,{children:e.gitInfo.branch})]}),e.gitInfo?.isGit&&e.gitInfo?.dirty&&(0,_.jsx)(`button`,{onClick:()=>t.setGitDiffOpen(!0),className:`inline-flex items-center gap-1 text-[12px] text-(--text-muted) shrink-0 border-0 bg-transparent cursor-pointer hover:text-(--text-primary) p-0`,children:(0,_.jsx)(sp,{size:13})})]}),(0,_.jsx)(`button`,{className:`border-0 bg-transparent text-(--text-muted) rounded-md p-1.5 cursor-pointer hover:bg-(--bg-hover) hover:text-(--text-primary) shrink-0`,children:(0,_.jsx)(tp,{size:16})})]}),e.planSteps?.length>0&&!e.pendingPlanApproval&&(0,_.jsx)(`div`,{className:`px-4`,children:(0,_.jsx)(LG,{steps:e.planSteps})}),(0,_.jsx)(rG,{messages:e.messages,projectCwd:e.projectCwd,skills:e.skills,gitInfo:e.gitInfo}),(0,_.jsxs)(`div`,{className:`w-[min(980px,calc(100%-64px))] mx-auto mb-4 shrink-0 z-30 bg-transparent relative`,children:[e.pendingPlanApproval&&(0,_.jsx)(`div`,{className:`mb-3`,children:(0,_.jsx)(RG,{plan:e.pendingPlanApproval,onAction:t.approvePlan,disabled:e.busy})}),(0,_.jsx)(dG,{onSubmit:t.submit,onAbort:t.abort,busy:e.busy,disabled:!!e.pendingPlanApproval,disabledReason:V(`planReviewFirst`),runtimeState:e.runtimeState,history:e.history,onCompletionRequest:async e=>{try{await(await fetch(`/api/completions?q=${encodeURIComponent(e)}`)).json()}catch{}},onOpenProject:()=>t.setProjectOpen(!0),projectCwd:e.projectCwd}),(0,_.jsxs)(`div`,{className:`flex items-center gap-3 pt-2 px-3 min-h-[28px] overflow-hidden`,children:[e.versionInfo?.current&&(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[11px] text-(--text-muted) shrink-0`,children:[(0,_.jsx)(Dp,{size:11}),`Codemini CLI@`,e.versionInfo.current]}),(0,_.jsx)(pG,{runtimeState:e.runtimeState,live:e.live,stageLabel:e.stageLabel})]})]})]})}),(0,_.jsx)(MG,{request:e.approvalRequest,open:!!e.approvalRequest,onDecision:t.approve}),(0,_.jsx)(JG,{open:e.configOpen,onOpenChange:t.setConfigOpen}),(0,_.jsx)(sK,{open:e.skillsOpen,onOpenChange:t.setSkillsOpen}),(0,_.jsx)(hK,{open:e.soulsOpen,onOpenChange:t.setSoulsOpen}),(0,_.jsx)(gK,{open:e.aboutOpen,onOpenChange:t.setAboutOpen,version:e.versionInfo?.current}),(0,_.jsx)(HQ,{open:e.gitDiffOpen,onOpenChange:t.setGitDiffOpen}),(0,_.jsx)(ZG,{open:e.projectOpen,onOpenChange:t.setProjectOpen,onOpenProject:t.openProject})]})}function qQ(){return(0,_.jsx)(GQ,{children:(0,_.jsx)(pd,{children:(0,_.jsx)(Af,{children:(0,_.jsx)(KQ,{})})})})}(0,Bl.createRoot)(document.getElementById(`root`)).render((0,_.jsx)(qQ,{}));export{g as a,VF as i,UN as n,i as o,LF as r,hN as t};
|