codemini-cli 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/OPERATIONS.md +0 -0
- package/README.md +0 -0
- package/bin/coder.js +0 -0
- package/codemini-web/dist/assets/Geist-Italic_wght_-vKc54d3Z.woff2 +0 -0
- package/codemini-web/dist/assets/Geist-Variable-CrgPqtmy.woff2 +0 -0
- package/codemini-web/dist/assets/GeistMono-Variable-BNLlm6Cd.woff2 +0 -0
- package/codemini-web/dist/assets/abap-BRbAAyvE.js +0 -0
- package/codemini-web/dist/assets/actionscript-3-Cj-0sM4g.js +0 -0
- package/codemini-web/dist/assets/ada-DhEA_nP5.js +0 -0
- package/codemini-web/dist/assets/andromeeda-CWmR-N6V.js +0 -0
- package/codemini-web/dist/assets/angular-html-Cde9qVP5.js +0 -0
- package/codemini-web/dist/assets/angular-ts-DefScAWP.js +0 -0
- package/codemini-web/dist/assets/apache-D5R2GKIs.js +0 -0
- package/codemini-web/dist/assets/apex-Qu8W4hal.js +0 -0
- package/codemini-web/dist/assets/apl-w753UHCW.js +0 -0
- package/codemini-web/dist/assets/applescript-CBey3ErE.js +0 -0
- package/codemini-web/dist/assets/ara-CRKnUAN1.js +0 -0
- package/codemini-web/dist/assets/asciidoc-1KYZEB6-.js +0 -0
- package/codemini-web/dist/assets/asm-DAaViY0U.js +0 -0
- package/codemini-web/dist/assets/astro-DBA9Da7s.js +0 -0
- package/codemini-web/dist/assets/aurora-x-LPpmXm4i.js +0 -0
- package/codemini-web/dist/assets/awk-ButuPTaW.js +0 -0
- package/codemini-web/dist/assets/ayu-dark-Dv4ngVMP.js +0 -0
- package/codemini-web/dist/assets/ayu-light-CxeOePuA.js +0 -0
- package/codemini-web/dist/assets/ayu-mirage-i2YLXKmY.js +0 -0
- package/codemini-web/dist/assets/ballerina-DodmBVwR.js +0 -0
- package/codemini-web/dist/assets/bat-jA-YqDhG.js +0 -0
- package/codemini-web/dist/assets/beancount-BCkjWTs-.js +0 -0
- package/codemini-web/dist/assets/berry-DjEHm1kC.js +0 -0
- package/codemini-web/dist/assets/bibtex-aOfmXHFj.js +0 -0
- package/codemini-web/dist/assets/bicep-BZLx0b6B.js +0 -0
- package/codemini-web/dist/assets/bird2-Bs7YDhA3.js +0 -0
- package/codemini-web/dist/assets/blade-B-u5p0Rp.js +0 -0
- package/codemini-web/dist/assets/bsl-CPV9KqsG.js +0 -0
- package/codemini-web/dist/assets/c-Bv0tI3pq.js +0 -0
- package/codemini-web/dist/assets/c3-BDcFIiRd.js +0 -0
- package/codemini-web/dist/assets/cadence-DaglWUgA.js +0 -0
- package/codemini-web/dist/assets/cairo-CyiRuu7R.js +0 -0
- package/codemini-web/dist/assets/catppuccin-frappe-CSAC76is.js +0 -0
- package/codemini-web/dist/assets/catppuccin-latte-Jt6sqtds.js +0 -0
- package/codemini-web/dist/assets/catppuccin-macchiato-HM96_05s.js +0 -0
- package/codemini-web/dist/assets/catppuccin-mocha-CXgIAGBL.js +0 -0
- package/codemini-web/dist/assets/clarity-DS5YLe8G.js +0 -0
- package/codemini-web/dist/assets/clojure-BVGPdaE2.js +0 -0
- package/codemini-web/dist/assets/cmake-CCC7tP43.js +0 -0
- package/codemini-web/dist/assets/cobol-CkQrskif.js +0 -0
- package/codemini-web/dist/assets/codeowners-DXhoR5Ap.js +0 -0
- package/codemini-web/dist/assets/codeql-BGjlu3KC.js +0 -0
- package/codemini-web/dist/assets/coffee-rY-gkJy7.js +0 -0
- package/codemini-web/dist/assets/common-lisp-BE6wRQeA.js +0 -0
- package/codemini-web/dist/assets/coq-CRT8yML1.js +0 -0
- package/codemini-web/dist/assets/cpp-Bw-qV0P6.js +0 -0
- package/codemini-web/dist/assets/crystal-Dh09vXLx.js +0 -0
- package/codemini-web/dist/assets/csharp-Ca2kU4Te.js +0 -0
- package/codemini-web/dist/assets/css-BTi88BmP.js +0 -0
- package/codemini-web/dist/assets/csv-DUpZC5ZD.js +0 -0
- package/codemini-web/dist/assets/cue-DlXQ7arx.js +0 -0
- package/codemini-web/dist/assets/cypher-D6dhuZbo.js +0 -0
- package/codemini-web/dist/assets/d-BUgyoY6k.js +0 -0
- package/codemini-web/dist/assets/dark-plus-DNkJKrcZ.js +0 -0
- package/codemini-web/dist/assets/dart-Czrjv-nr.js +0 -0
- package/codemini-web/dist/assets/dax-sEzq00Tq.js +0 -0
- package/codemini-web/dist/assets/desktop-3VGbzlmJ.js +0 -0
- package/codemini-web/dist/assets/diff-D4HSRbRn.js +0 -0
- package/codemini-web/dist/assets/docker-DkLGgDMo.js +0 -0
- package/codemini-web/dist/assets/dotenv-BWp1FaLo.js +0 -0
- package/codemini-web/dist/assets/dracula-Donvxzd6.js +0 -0
- package/codemini-web/dist/assets/dracula-soft-BqL-kkUg.js +0 -0
- package/codemini-web/dist/assets/dream-maker-DtLD6KM3.js +0 -0
- package/codemini-web/dist/assets/edge-CCRtknu5.js +0 -0
- package/codemini-web/dist/assets/elixir-5EYbFEoC.js +0 -0
- package/codemini-web/dist/assets/elm-Cezz_HNz.js +0 -0
- package/codemini-web/dist/assets/emacs-lisp-D4W-_rAk.js +0 -0
- package/codemini-web/dist/assets/erb-C6pPz4fX.js +0 -0
- package/codemini-web/dist/assets/erlang-BC8wryba.js +0 -0
- package/codemini-web/dist/assets/everforest-dark-pZNhY4MK.js +0 -0
- package/codemini-web/dist/assets/everforest-light-BijKClkf.js +0 -0
- package/codemini-web/dist/assets/fennel-Cd-BhZ0S.js +0 -0
- package/codemini-web/dist/assets/fish-CpsjJ6FK.js +0 -0
- package/codemini-web/dist/assets/fluent-D1peBFgx.js +0 -0
- package/codemini-web/dist/assets/fortran-fixed-form-CyrImzNA.js +0 -0
- package/codemini-web/dist/assets/fortran-free-form-CIAQqF5W.js +0 -0
- package/codemini-web/dist/assets/fsharp-OCW_PZ4J.js +0 -0
- package/codemini-web/dist/assets/gdresource-Cl3bohRI.js +0 -0
- package/codemini-web/dist/assets/gdscript-B_XVILZe.js +0 -0
- package/codemini-web/dist/assets/gdshader-BOrkFM_X.js +0 -0
- package/codemini-web/dist/assets/genie-BE7nKhIq.js +0 -0
- package/codemini-web/dist/assets/gherkin-DzGJhdqS.js +0 -0
- package/codemini-web/dist/assets/git-commit-DJZpdBwB.js +0 -0
- package/codemini-web/dist/assets/git-rebase-BJE30GTP.js +0 -0
- package/codemini-web/dist/assets/github-dark-BB9G20EV.js +0 -0
- package/codemini-web/dist/assets/github-dark-default-CBFNEU03.js +0 -0
- package/codemini-web/dist/assets/github-dark-dimmed-sQhEp72S.js +0 -0
- package/codemini-web/dist/assets/github-dark-high-contrast-C8GVvrcM.js +0 -0
- package/codemini-web/dist/assets/github-light-default-iyEXWnoa.js +0 -0
- package/codemini-web/dist/assets/github-light-high-contrast-DLnsZL7l.js +0 -0
- package/codemini-web/dist/assets/github-light-pT7U8Cnd.js +0 -0
- package/codemini-web/dist/assets/gleam-B9ISJjDl.js +0 -0
- package/codemini-web/dist/assets/glimmer-js-C4PTXfaW.js +0 -0
- package/codemini-web/dist/assets/glimmer-ts-Df1V6YK_.js +0 -0
- package/codemini-web/dist/assets/glsl-C8VPaAWs.js +0 -0
- package/codemini-web/dist/assets/gn-RQRMslrP.js +0 -0
- package/codemini-web/dist/assets/gnuplot-CfIGZWjt.js +0 -0
- package/codemini-web/dist/assets/go-BTh90-YS.js +0 -0
- package/codemini-web/dist/assets/graphql-WZCiqIl-.js +0 -0
- package/codemini-web/dist/assets/groovy-lvGC2zUz.js +0 -0
- package/codemini-web/dist/assets/gruvbox-dark-hard-CC38iqQ4.js +0 -0
- package/codemini-web/dist/assets/gruvbox-dark-medium-DaS0IqFN.js +0 -0
- package/codemini-web/dist/assets/gruvbox-dark-soft-C4niJipy.js +0 -0
- package/codemini-web/dist/assets/gruvbox-light-hard-DTfv4LmB.js +0 -0
- package/codemini-web/dist/assets/gruvbox-light-medium-m1VBpvsE.js +0 -0
- package/codemini-web/dist/assets/gruvbox-light-soft-CiE1IJdk.js +0 -0
- package/codemini-web/dist/assets/hack-zJL_tEH0.js +0 -0
- package/codemini-web/dist/assets/haml-qjVLLTZk.js +0 -0
- package/codemini-web/dist/assets/handlebars-B3RyMMk0.js +0 -0
- package/codemini-web/dist/assets/haskell-DdaZtXdd.js +0 -0
- package/codemini-web/dist/assets/haxe-Df79h8x1.js +0 -0
- package/codemini-web/dist/assets/hcl-BibREsa1.js +0 -0
- package/codemini-web/dist/assets/{highlighted-body-OFNGDK62-CJHWad2r.js → highlighted-body-OFNGDK62-0FuBVb0_.js} +1 -1
- package/codemini-web/dist/assets/hjson-D-iSecYq.js +0 -0
- package/codemini-web/dist/assets/hlsl-CckLjo_3.js +0 -0
- package/codemini-web/dist/assets/horizon-BG-OH9yH.js +0 -0
- package/codemini-web/dist/assets/horizon-bright-CpoqdULz.js +0 -0
- package/codemini-web/dist/assets/houston-C8DdNIgg.js +0 -0
- package/codemini-web/dist/assets/html-DP-V-rfg.js +0 -0
- package/codemini-web/dist/assets/html-derivative-DB9UhNDN.js +0 -0
- package/codemini-web/dist/assets/http-Deln4Vyb.js +0 -0
- package/codemini-web/dist/assets/hurl-CYSuhGkj.js +0 -0
- package/codemini-web/dist/assets/hxml-BmF7ngDz.js +0 -0
- package/codemini-web/dist/assets/hy-6acR1htR.js +0 -0
- package/codemini-web/dist/assets/imba-I9bJJvhi.js +0 -0
- package/codemini-web/dist/assets/index-CSYMjBeT.css +2 -0
- package/codemini-web/dist/assets/{index-BZ01DHrh.js → index-DtiSt5vh.js} +64 -64
- package/codemini-web/dist/assets/ini-ovi-wMtM.js +0 -0
- package/codemini-web/dist/assets/java-X0I2c5Az.js +0 -0
- package/codemini-web/dist/assets/javascript-WC6XFf_S.js +0 -0
- package/codemini-web/dist/assets/jinja-BcRTlqOI.js +0 -0
- package/codemini-web/dist/assets/jison-DuNOGix6.js +0 -0
- package/codemini-web/dist/assets/json-CmuSmrUv.js +0 -0
- package/codemini-web/dist/assets/json5-JNG5kh3j.js +0 -0
- package/codemini-web/dist/assets/jsonc-Bo6bgSpa.js +0 -0
- package/codemini-web/dist/assets/jsonl-eDmbsRcr.js +0 -0
- package/codemini-web/dist/assets/jsonnet-BrmnmEy9.js +0 -0
- package/codemini-web/dist/assets/jssm-C-QfdDgD.js +0 -0
- package/codemini-web/dist/assets/jsx-Bl4e1-KE.js +0 -0
- package/codemini-web/dist/assets/julia-Cqc1ADyw.js +0 -0
- package/codemini-web/dist/assets/just-O9z-zIlY.js +0 -0
- package/codemini-web/dist/assets/kanagawa-dragon-Dc8jzBf8.js +0 -0
- package/codemini-web/dist/assets/kanagawa-lotus-DglQpAHb.js +0 -0
- package/codemini-web/dist/assets/kanagawa-wave-CTxJC692.js +0 -0
- package/codemini-web/dist/assets/kdl-CPujEk7a.js +0 -0
- package/codemini-web/dist/assets/kotlin-GNGS6f4G.js +0 -0
- package/codemini-web/dist/assets/kusto-ByPWIc1b.js +0 -0
- package/codemini-web/dist/assets/laserwave-BLDq6SCM.js +0 -0
- package/codemini-web/dist/assets/latex-BEPTKliI.js +0 -0
- package/codemini-web/dist/assets/lean-CQ4oht2M.js +0 -0
- package/codemini-web/dist/assets/less-DgluPI4Z.js +0 -0
- package/codemini-web/dist/assets/light-plus-Ce6vIMrA.js +0 -0
- package/codemini-web/dist/assets/liquid-BK2PyMjt.js +0 -0
- package/codemini-web/dist/assets/llvm-C_Bk8N51.js +0 -0
- package/codemini-web/dist/assets/log-Cqyx7kYB.js +0 -0
- package/codemini-web/dist/assets/logo-BMyACSNp.js +0 -0
- package/codemini-web/dist/assets/lua-BroxvhVt.js +0 -0
- package/codemini-web/dist/assets/luau-Dw3qkd4h.js +0 -0
- package/codemini-web/dist/assets/make-DRoG6w-e.js +0 -0
- package/codemini-web/dist/assets/markdown-DMIvNSB1.js +0 -0
- package/codemini-web/dist/assets/marko-CTEKS39A.js +0 -0
- package/codemini-web/dist/assets/material-theme-D1yzOeFY.js +0 -0
- package/codemini-web/dist/assets/material-theme-darker-DhWqiNtj.js +0 -0
- package/codemini-web/dist/assets/material-theme-lighter-PKoq0Soa.js +0 -0
- package/codemini-web/dist/assets/material-theme-ocean-TtH-ZZAj.js +0 -0
- package/codemini-web/dist/assets/material-theme-palenight-DPEAidnA.js +0 -0
- package/codemini-web/dist/assets/matlab-Buftnej6.js +0 -0
- package/codemini-web/dist/assets/mdc-BOaCYzzL.js +0 -0
- package/codemini-web/dist/assets/mdx-COL7Vpwq.js +0 -0
- package/codemini-web/dist/assets/mermaid-GHXKKRXX-BQrwnoIu.js +1 -0
- package/codemini-web/dist/assets/mermaid-tvyj1ZQ2.js +0 -0
- package/codemini-web/dist/assets/min-dark-D66g901Q.js +0 -0
- package/codemini-web/dist/assets/min-light-CMnDj2iG.js +0 -0
- package/codemini-web/dist/assets/mipsasm-C6fvALrw.js +0 -0
- package/codemini-web/dist/assets/mojo-B3qnM1a8.js +0 -0
- package/codemini-web/dist/assets/monokai-DCoxt20T.js +0 -0
- package/codemini-web/dist/assets/moonbit-Cjo3d0oi.js +0 -0
- package/codemini-web/dist/assets/move-BZSDQnwS.js +0 -0
- package/codemini-web/dist/assets/narrat-DY5cg5OF.js +0 -0
- package/codemini-web/dist/assets/nextflow-Cto1mpL3.js +0 -0
- package/codemini-web/dist/assets/nextflow-groovy-D1X5Yd05.js +0 -0
- package/codemini-web/dist/assets/nginx-Da_Uewgc.js +0 -0
- package/codemini-web/dist/assets/night-owl-DuMFo77c.js +0 -0
- package/codemini-web/dist/assets/night-owl-light-DihOYNub.js +0 -0
- package/codemini-web/dist/assets/nim-BZyx58NM.js +0 -0
- package/codemini-web/dist/assets/nix-C2G-gZoY.js +0 -0
- package/codemini-web/dist/assets/nord-CqZqLQaJ.js +0 -0
- package/codemini-web/dist/assets/nushell-S11HUHTG.js +0 -0
- package/codemini-web/dist/assets/objective-c-D9GKvYFi.js +0 -0
- package/codemini-web/dist/assets/objective-cpp-SqrtXFXh.js +0 -0
- package/codemini-web/dist/assets/ocaml-C_PTi_Pz.js +0 -0
- package/codemini-web/dist/assets/odin-BWpZDKBG.js +0 -0
- package/codemini-web/dist/assets/one-dark-pro-DpWTHpwg.js +0 -0
- package/codemini-web/dist/assets/one-light-Cu0d64Hp.js +0 -0
- package/codemini-web/dist/assets/openscad-BM4fjXzn.js +0 -0
- package/codemini-web/dist/assets/pascal-DYsRufgb.js +0 -0
- package/codemini-web/dist/assets/perl-BW8t13Xq.js +0 -0
- package/codemini-web/dist/assets/php-Cq5FOhfR.js +0 -0
- package/codemini-web/dist/assets/pkl-Djf8ANrI.js +0 -0
- package/codemini-web/dist/assets/plastic-CmjIC4JL.js +0 -0
- package/codemini-web/dist/assets/plsql-B1bmZxUF.js +0 -0
- package/codemini-web/dist/assets/po-BvnTR3_f.js +0 -0
- package/codemini-web/dist/assets/poimandres-BTndTogr.js +0 -0
- package/codemini-web/dist/assets/polar-CAj5SJyd.js +0 -0
- package/codemini-web/dist/assets/postcss-DrpvRGGG.js +0 -0
- package/codemini-web/dist/assets/powerquery-I1Ei5hrS.js +0 -0
- package/codemini-web/dist/assets/powershell-Coc0WruX.js +0 -0
- package/codemini-web/dist/assets/prisma-Ojgxt2lx.js +0 -0
- package/codemini-web/dist/assets/prolog-C1UOAv4v.js +0 -0
- package/codemini-web/dist/assets/proto-D07RTuB5.js +0 -0
- package/codemini-web/dist/assets/pug-B4WHazil.js +0 -0
- package/codemini-web/dist/assets/puppet-D_zyrMo2.js +0 -0
- package/codemini-web/dist/assets/purescript-CV-DVmZj.js +0 -0
- package/codemini-web/dist/assets/python-DcnbpNOV.js +0 -0
- package/codemini-web/dist/assets/qml-DWxWu28U.js +0 -0
- package/codemini-web/dist/assets/qmldir-BBNnU9RJ.js +0 -0
- package/codemini-web/dist/assets/qss-CC0PKRbL.js +0 -0
- package/codemini-web/dist/assets/r-B4lG5syH.js +0 -0
- package/codemini-web/dist/assets/racket-Cbwns2Cq.js +0 -0
- package/codemini-web/dist/assets/raku-CeV6tH_x.js +0 -0
- package/codemini-web/dist/assets/razor-CQPYUgex.js +0 -0
- package/codemini-web/dist/assets/red-CVEaJbMR.js +0 -0
- package/codemini-web/dist/assets/reg-C_WE1pkC.js +0 -0
- package/codemini-web/dist/assets/regexp-da3KYCEG.js +0 -0
- package/codemini-web/dist/assets/rel-CpHQF4b7.js +0 -0
- package/codemini-web/dist/assets/riscv-Co5eiPIZ.js +0 -0
- package/codemini-web/dist/assets/rolldown-runtime-S-ySWqyJ.js +0 -0
- package/codemini-web/dist/assets/ron-CgTit1dG.js +0 -0
- package/codemini-web/dist/assets/rose-pine-BDTwvYHf.js +0 -0
- package/codemini-web/dist/assets/rose-pine-dawn-CAIk_wLV.js +0 -0
- package/codemini-web/dist/assets/rose-pine-moon-C5gdiznP.js +0 -0
- package/codemini-web/dist/assets/rosmsg-C0tpzWlc.js +0 -0
- package/codemini-web/dist/assets/rst-B-OS2pa5.js +0 -0
- package/codemini-web/dist/assets/ruby-BM15fmxz.js +0 -0
- package/codemini-web/dist/assets/rust-BWAfVMY4.js +0 -0
- package/codemini-web/dist/assets/sas-DYNukvU9.js +0 -0
- package/codemini-web/dist/assets/sass-MovLey2R.js +0 -0
- package/codemini-web/dist/assets/scala-C2w7y2mZ.js +0 -0
- package/codemini-web/dist/assets/scheme-Bf85FNnm.js +0 -0
- package/codemini-web/dist/assets/scss-C0BQ8YVM.js +0 -0
- package/codemini-web/dist/assets/sdbl-DoQ_zDzo.js +0 -0
- package/codemini-web/dist/assets/shaderlab-TbUUdmUb.js +0 -0
- package/codemini-web/dist/assets/shellscript-KUJZnuCi.js +0 -0
- package/codemini-web/dist/assets/shellsession-BeWGuVoR.js +0 -0
- package/codemini-web/dist/assets/slack-dark-BnOYKTBJ.js +0 -0
- package/codemini-web/dist/assets/slack-ochin-43udxtUg.js +0 -0
- package/codemini-web/dist/assets/smalltalk-Mlf5-xbr.js +0 -0
- package/codemini-web/dist/assets/snazzy-light-kw-pZEiM.js +0 -0
- package/codemini-web/dist/assets/solarized-dark-BDezFa9V.js +0 -0
- package/codemini-web/dist/assets/solarized-light-CkoenhS2.js +0 -0
- package/codemini-web/dist/assets/solidity-DYHGECBw.js +0 -0
- package/codemini-web/dist/assets/soy-C6D0Ibo9.js +0 -0
- package/codemini-web/dist/assets/sparql-DIFvSn1n.js +0 -0
- package/codemini-web/dist/assets/splunk-DOdklC0I.js +0 -0
- package/codemini-web/dist/assets/sql-CZAMrWdL.js +0 -0
- package/codemini-web/dist/assets/ssh-config-DwwFW7AS.js +0 -0
- package/codemini-web/dist/assets/stata-C5mLa_ER.js +0 -0
- package/codemini-web/dist/assets/stylus-BO6mlOab.js +0 -0
- package/codemini-web/dist/assets/surrealql-DyoUfV6n.js +0 -0
- package/codemini-web/dist/assets/svelte-DJ-0FpL2.js +0 -0
- package/codemini-web/dist/assets/swift-D9A08YU9.js +0 -0
- package/codemini-web/dist/assets/synthwave-84-C69NN2j9.js +0 -0
- package/codemini-web/dist/assets/system-verilog-DjR3sN6w.js +0 -0
- package/codemini-web/dist/assets/systemd-CJWuVSJU.js +0 -0
- package/codemini-web/dist/assets/talonscript-CXqq0wX-.js +0 -0
- package/codemini-web/dist/assets/tasl-GVNf7pB7.js +0 -0
- package/codemini-web/dist/assets/tcl-DNlfRSl5.js +0 -0
- package/codemini-web/dist/assets/templ-7Bvm-rei.js +0 -0
- package/codemini-web/dist/assets/terraform-DUK0FOOj.js +0 -0
- package/codemini-web/dist/assets/tex-ezg8IclB.js +0 -0
- package/codemini-web/dist/assets/tokyo-night-DWTtuXS3.js +0 -0
- package/codemini-web/dist/assets/toml-X5n3zjEH.js +0 -0
- package/codemini-web/dist/assets/ts-tags-BfuR6EQ0.js +0 -0
- package/codemini-web/dist/assets/tsv-Bqs_rchc.js +0 -0
- package/codemini-web/dist/assets/tsx-CfyUE2pW.js +0 -0
- package/codemini-web/dist/assets/turtle-BsUuoeVK.js +0 -0
- package/codemini-web/dist/assets/twig-_uxJ-QmX.js +0 -0
- package/codemini-web/dist/assets/typescript-C6LvTgbf.js +0 -0
- package/codemini-web/dist/assets/typespec-8nkhqWz6.js +0 -0
- package/codemini-web/dist/assets/typst-CPL77SDw.js +0 -0
- package/codemini-web/dist/assets/v-CoJD3IPx.js +0 -0
- package/codemini-web/dist/assets/vala-C42IfotU.js +0 -0
- package/codemini-web/dist/assets/vb-CVMKTK26.js +0 -0
- package/codemini-web/dist/assets/verilog-P63PhzSt.js +0 -0
- package/codemini-web/dist/assets/vesper-BGr95374.js +0 -0
- package/codemini-web/dist/assets/vhdl-2WwUdgX8.js +0 -0
- package/codemini-web/dist/assets/viml-CGPGWJA6.js +0 -0
- package/codemini-web/dist/assets/vitesse-black-cI0k84-I.js +0 -0
- package/codemini-web/dist/assets/vitesse-dark-SouM0FMW.js +0 -0
- package/codemini-web/dist/assets/vitesse-light-WiCy6lDO.js +0 -0
- package/codemini-web/dist/assets/vue-DkOBu49o.js +0 -0
- package/codemini-web/dist/assets/vue-html-Bx2Sgp8M.js +0 -0
- package/codemini-web/dist/assets/vue-vine-veyFk6GJ.js +0 -0
- package/codemini-web/dist/assets/vyper-DP_vqZO9.js +0 -0
- package/codemini-web/dist/assets/wasm-Db7VBw0n.js +0 -0
- package/codemini-web/dist/assets/wasm-DiIFv9DE.js +0 -0
- package/codemini-web/dist/assets/wenyan-ZEcjghA1.js +0 -0
- package/codemini-web/dist/assets/wgsl-CdusuPLe.js +0 -0
- package/codemini-web/dist/assets/wikitext-CBIB6hmW.js +0 -0
- package/codemini-web/dist/assets/wit-ZhUbVeze.js +0 -0
- package/codemini-web/dist/assets/wolfram-HyMOyERF.js +0 -0
- package/codemini-web/dist/assets/xml-BkdunjRC.js +0 -0
- package/codemini-web/dist/assets/xsl-C66i1pDH.js +0 -0
- package/codemini-web/dist/assets/yaml-D_uvhEF7.js +0 -0
- package/codemini-web/dist/assets/zenscript-C6ZuzgrL.js +0 -0
- package/codemini-web/dist/assets/zig-Do2h8XKj.js +0 -0
- package/codemini-web/dist/index.html +2 -2
- package/codemini-web/lib/approval-manager.js +0 -0
- package/codemini-web/lib/runtime-bridge.js +0 -0
- package/codemini-web/server.js +49 -15
- package/deployment.md +5 -5
- package/package.json +1 -1
- package/skills/brainstorm/SKILL.md +3 -1
- package/skills/grill-me/SKILL.md +0 -0
- package/skills/project-requirements/SKILL.md +293 -291
- package/skills/superpowers-lite/SKILL.md +18 -32
- package/skills/writing-plans/SKILL.md +67 -67
- package/souls/anime.md +0 -0
- package/souls/caveman.md +0 -0
- package/souls/ceo.md +0 -0
- package/souls/default.md +0 -0
- package/souls/pirate.md +0 -0
- package/souls/playful.md +0 -0
- package/souls/professional.md +0 -0
- package/src/cli.js +0 -0
- package/src/commands/chat.js +0 -0
- package/src/commands/config.js +0 -0
- package/src/commands/doctor.js +0 -0
- package/src/commands/run.js +0 -0
- package/src/commands/skill.js +0 -0
- package/src/commands/web.js +0 -0
- package/src/core/agent-loop.js +0 -0
- package/src/core/ast.js +0 -0
- package/src/core/bounded-cache.js +0 -0
- package/src/core/chat-runtime.js +114 -6
- package/src/core/checkpoint-store.js +0 -0
- package/src/core/command-evaluator.js +0 -0
- package/src/core/command-loader.js +0 -0
- package/src/core/command-policy.js +0 -0
- package/src/core/command-risk.js +0 -0
- package/src/core/config-store.js +0 -0
- package/src/core/constants.js +0 -0
- package/src/core/context-compact.js +0 -0
- package/src/core/crypto-utils.js +0 -0
- package/src/core/default-system-prompt.js +0 -0
- package/src/core/dream-audit.js +0 -0
- package/src/core/dream-consolidate.js +0 -0
- package/src/core/dream-evaluator.js +0 -0
- package/src/core/fff-adapter.js +1 -1
- package/src/core/fs-utils.js +0 -0
- package/src/core/input-history-store.js +0 -0
- package/src/core/input-parser.js +0 -0
- package/src/core/memory-policy.js +0 -0
- package/src/core/memory-prompt.js +0 -0
- package/src/core/memory-store.js +0 -0
- package/src/core/paths.js +0 -0
- package/src/core/plan-state.js +0 -0
- package/src/core/project-index.js +0 -0
- package/src/core/provider/anthropic.js +0 -0
- package/src/core/provider/index.js +0 -0
- package/src/core/provider/openai-compatible.js +0 -0
- package/src/core/reflect-skill.js +0 -0
- package/src/core/reply-language.js +10 -1
- package/src/core/session-store.js +0 -0
- package/src/core/shell-profile.js +0 -0
- package/src/core/shell.js +0 -0
- package/src/core/skill-registry.js +0 -0
- package/src/core/soul.js +0 -0
- package/src/core/string-utils.js +0 -0
- package/src/core/todo-state.js +0 -0
- package/src/core/tool-args.js +0 -0
- package/src/core/tool-output.js +0 -0
- package/src/core/tool-result-store.js +0 -0
- package/src/core/tools.js +0 -0
- package/src/tui/chat-app.js +0 -0
- package/src/tui/input-escape.js +0 -0
- package/src/tui/skill-activity/index.js +0 -0
- package/src/tui/tool-activity/common.js +0 -0
- package/src/tui/tool-activity/index.js +0 -0
- package/src/tui/tool-activity/presenters/command.js +0 -0
- package/src/tui/tool-activity/presenters/files.js +0 -0
- package/src/tui/tool-activity/presenters/misc.js +0 -0
- package/src/tui/tool-activity/presenters/system.js +0 -0
- package/src/tui/tool-narration/common.js +0 -0
- package/src/tui/tool-narration/presenters/change.js +0 -0
- package/src/tui/tool-narration/presenters/edit.js +0 -0
- package/src/tui/tool-narration/presenters/generic.js +0 -0
- package/src/tui/tool-narration/presenters/glob.js +0 -0
- package/src/tui/tool-narration/presenters/grep.js +0 -0
- package/src/tui/tool-narration/presenters/list.js +0 -0
- package/src/tui/tool-narration/presenters/read.js +0 -0
- package/src/tui/tool-narration/presenters/run.js +0 -0
- package/src/tui/tool-narration/presenters/write.js +0 -0
- package/src/tui/tool-narration.js +0 -0
- package/templates/project-requirements/report-shell.html +46 -46
- package/codemini-web/dist/assets/index-Dq1mwNaQ.css +0 -2
- package/codemini-web/dist/assets/mermaid-GHXKKRXX-BuB6-G4r.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-0FuBVb0_.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/angular-html-Cde9qVP5.js","assets/html-DP-V-rfg.js","assets/css-BTi88BmP.js","assets/javascript-WC6XFf_S.js","assets/angular-ts-DefScAWP.js","assets/scss-C0BQ8YVM.js","assets/apl-w753UHCW.js","assets/json-CmuSmrUv.js","assets/xml-BkdunjRC.js","assets/java-X0I2c5Az.js","assets/astro-DBA9Da7s.js","assets/postcss-DrpvRGGG.js","assets/tsx-CfyUE2pW.js","assets/typescript-C6LvTgbf.js","assets/blade-B-u5p0Rp.js","assets/html-derivative-DB9UhNDN.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-CkQrskif.js","assets/coffee-rY-gkJy7.js","assets/cpp-Bw-qV0P6.js","assets/glsl-C8VPaAWs.js","assets/regexp-da3KYCEG.js","assets/crystal-Dh09vXLx.js","assets/shellscript-KUJZnuCi.js","assets/edge-CCRtknu5.js","assets/elixir-5EYbFEoC.js","assets/elm-Cezz_HNz.js","assets/erb-C6pPz4fX.js","assets/ruby-BM15fmxz.js","assets/graphql-WZCiqIl-.js","assets/jsx-Bl4e1-KE.js","assets/haml-qjVLLTZk.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-C4PTXfaW.js","assets/glimmer-ts-Df1V6YK_.js","assets/hack-zJL_tEH0.js","assets/handlebars-B3RyMMk0.js","assets/http-Deln4Vyb.js","assets/hurl-CYSuhGkj.js","assets/csv-DUpZC5ZD.js","assets/hxml-BmF7ngDz.js","assets/haxe-Df79h8x1.js","assets/jinja-BcRTlqOI.js","assets/jison-DuNOGix6.js","assets/julia-Cqc1ADyw.js","assets/r-B4lG5syH.js","assets/just-O9z-zIlY.js","assets/perl-BW8t13Xq.js","assets/latex-BEPTKliI.js","assets/tex-ezg8IclB.js","assets/liquid-BK2PyMjt.js","assets/marko-CTEKS39A.js","assets/less-DgluPI4Z.js","assets/mdc-BOaCYzzL.js","assets/nextflow-Cto1mpL3.js","assets/nextflow-groovy-D1X5Yd05.js","assets/nginx-Da_Uewgc.js","assets/nim-BZyx58NM.js","assets/php-Cq5FOhfR.js","assets/pug-B4WHazil.js","assets/qml-DWxWu28U.js","assets/razor-CQPYUgex.js","assets/csharp-Ca2kU4Te.js","assets/rst-B-OS2pa5.js","assets/cmake-CCC7tP43.js","assets/sas-DYNukvU9.js","assets/shaderlab-TbUUdmUb.js","assets/hlsl-CckLjo_3.js","assets/shellsession-BeWGuVoR.js","assets/soy-C6D0Ibo9.js","assets/sparql-DIFvSn1n.js","assets/turtle-BsUuoeVK.js","assets/stata-C5mLa_ER.js","assets/surrealql-DyoUfV6n.js","assets/svelte-DJ-0FpL2.js","assets/templ-7Bvm-rei.js","assets/go-BTh90-YS.js","assets/ts-tags-BfuR6EQ0.js","assets/twig-_uxJ-QmX.js","assets/vue-DkOBu49o.js","assets/vue-html-Bx2Sgp8M.js","assets/vue-vine-veyFk6GJ.js","assets/stylus-BO6mlOab.js","assets/xsl-C66i1pDH.js"])))=>i.map(i=>d[i]);
|
|
2
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 te=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function A(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 j(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,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),j(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(te,`$&/`)+`/`)+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+k(a,u),c+=j(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+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(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 ne(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(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 M=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)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(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=N,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:re}},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,M)}catch(e){M(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&&k(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&&k(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,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(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,k(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`),te=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?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?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},ie=[],ae=-1;function oe(e){return{current:e}}function F(e){0>ae||(e.current=ie[ae],ie[ae]=null,ae--)}function I(e,t){ae++,ie[ae]=e.current,e.current=t}var se=oe(null),ce=oe(null),le=oe(null),ue=oe(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,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}}F(se),I(se,e)}function fe(){F(se),F(ce),F(le)}function pe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=ef(t,e.type);t!==n&&(I(ce,e),I(se,n))}function me(e){ce.current===e&&(F(se),F(ce)),ue.current===e&&(F(ue),up._currentValue=P)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!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(`
|
|
@@ -56,64 +56,64 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
56
56
|
- less than the value passed to \`max\` (or ${xo} if no \`max\` prop is set)
|
|
57
57
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
58
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]=ne(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)),te=he(i);return(0,_.jsx)(Ho,{scope:n,type:r,dir:te,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:te,...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)(se,{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)(se,{present:n||s!==`hidden`,children:(0,_.jsx)(Qo,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:N(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:N(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)(se,{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=ge(u),T=ge(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:ge(a),onThumbPointerUp:ge(o),onThumbPositionChange:T,onThumbPointerDown:ge(s),children:(0,_.jsx)(D.div,{...p,ref:y,style:{position:`absolute`,...p.style},onPointerDown:N(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:N(e.onPointerMove,O),onPointerUp:N(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)(se,{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:N(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:N(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=Ua(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=ge(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=ge(t);P(()=>{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]=M(Ts),[ks,As]=ne(Ts,[Os,Ca]),js=Ca(),[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=he(l),[T,E]=ae({prop:r,defaultProp:i??!1,onChange:a,caller:Ts}),[D,O]=ae({prop:o,defaultProp:s,onChange:c,caller:Ts}),ee=d.useRef(null),te=v?h||!!v.closest(`form`):!0,[k,A]=d.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return(0,_.jsx)(za,{...g,children:(0,_.jsxs)(Ms,{required:m,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:pe(),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=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:d.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),te?(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(k)]},j):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)(Ba,{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:N(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:N(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:N(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 P(()=>{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)(Je,{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(P(()=>{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,te]=d.useState(null),k=Ds(n),[A,j]=d.useState(!1),ne=d.useRef(!1);d.useEffect(()=>{if(S)return gn(S)},[S]),Xe();let re=d.useCallback(e=>{let[t,...n]=k().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},[k,w]),M=d.useCallback(()=>re([D,S]),[re,D,S]);d.useEffect(()=>{A&&M()},[A,M]);let{onOpenChange:P,triggerPointerDownPosRef:ie}=x;d.useEffect(()=>{if(S){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ie.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ie.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():S.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),ie.current=null};return ie.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,P,ie]),d.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[ae,oe]=Nc(e=>{let t=k().filter(e=>!e.disabled),n=Pc(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),F=d.useCallback((e,t,n)=>{let r=!ne.current&&!n;(x.value!==void 0&&x.value===t||r)&&(O(e),r&&(ne.current=!0))},[x.value]),I=d.useCallback(()=>S?.focus(),[S]),se=d.useCallback((e,t,n)=>{let r=!ne.current&&!n;(x.value!==void 0&&x.value===t||r)&&te(e)},[x.value]),ce=r===`popper`?nc:ec,le=ce===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:F,selectedItem:D,onItemLeave:I,itemTextRefCallback:se,focusSelectedItem:M,selectedItemText:ee,position:r,isPositioned:A,searchRef:ae,children:(0,_.jsx)(sn,{as:Zs,allowPinchZoom:!0,children:(0,_.jsx)(Fe,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:N(i,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,_.jsx)(we,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,_.jsx)(ce,{role:`listbox`,id:x.contentId,"data-state":x.open?`open`:`closed`,dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...le,onPlaced:()=>j(!0),ref:E,style:{display:`flex`,flexDirection:`column`,outline:`none`,...b.style},onKeyDown:N(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&oe(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().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(()=>re(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=Ua(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=Ua(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,te=f+m+ee,k=x-te;if(te<=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=te+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)+k;s.style.height=t+`px`,v.scrollTop=te-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]);P(()=>S(),[S]);let[C,w]=d.useState();return P(()=>{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)(Va,{...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:N(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=pe();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=pe(),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:N(o.onFocus,()=>h(!0)),onBlur:N(o.onBlur,()=>h(!1)),onClick:N(o.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:N(o.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:N(o.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:N(o.onPointerMove,e=>{y.current=e.pointerType,i?c.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:N(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 P(()=>(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 P(()=>{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 P(()=>{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]),P(()=>{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:N(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:N(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:N(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)(Ha,{...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=ir(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=ge(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]=ne(`Tooltip`,[Ca]),nl=Ca(),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=pe(),m=d.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,v=d.useRef(!1),[y,b]=ae({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)(za,{...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)(Ba,{asChild:!0,...o,children:(0,_.jsx)(D.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:N(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:N(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:N(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:N(e.onBlur,i.onClose),onClick:N(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)(se,{present:n||a.open,children:(0,_.jsx)(Je,{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)(se,{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)(we,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,_.jsxs)(Va,{"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)(A,{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)(Ha,{...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],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[Au,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[Au,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[Au,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,z,R],N=()=>[...b(),Zu,Ku,{position:[z,R]}],P=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,Qu,Vu,{size:[z,R]}],ae=()=>[Nu,Yu,Hu],oe=()=>[``,`none`,`full`,l,z,R],F=()=>[``,ju,Yu,Hu],I=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[ju,Nu,Zu,Ku],le=()=>[``,`none`,m,z,R],ue=()=>[`none`,ju,z,R],de=()=>[`none`,ju,z,R],fe=()=>[ju,z,R],pe=()=>[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:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],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:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"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:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...I(),`wavy`]}],"text-decoration-thickness":[{decoration:[ju,`from-font`,`auto`,z,Hu]}],"text-decoration-color":[{decoration:M()}],"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:N()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:ie()}],"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:M()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...I(),`hidden`,`none`]}],"divide-style":[{divide:[...I(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...I(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ju,z,R]}],"outline-w":[{outline:[``,ju,Yu,Hu]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,ed,Ju]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,ed,Ju]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ju,Hu]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,ed,Ju]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ju,z,R]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"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":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,z,R]}],filter:[{filter:[``,`none`,z,R]}],blur:[{blur:le()}],brightness:[{brightness:[ju,z,R]}],contrast:[{contrast:[ju,z,R]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ed,Ju]}],"drop-shadow-color":[{"drop-shadow":M()}],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":le()}],"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:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[z,R,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"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`,...M()]}],"stroke-w":[{stroke:[ju,Yu,Hu,Uu]}],stroke:[{stroke:[`none`,...M()]}],"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:`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`,shell:`Shell`,defaultShell:`Default Shell`,ui:`UI`,uiLanguage:`UI Language`,replyLanguage:`Reply Language`,backToTop:`回到顶部`,pendingItems:`排队中`,copyCode:`复制`,copied:`已复制`,connected:`已连接`,disconnected:`连接断开,正在重连...`,unknownProject:`未知项目`,emptyChat:`空对话`,messages:`条消息`,renderError:`渲染错误`,retry:`重试`,planReviewFirst:`请先在上方审阅计划,批准、修改或否决后再继续输入`,loading:`加载中`,sending:`发送`,updating:`更新中...`,updatedRestart:`已更新,请重启`,updateAvailable:`新版本可用,点击更新`,openSettings:`打开设置`,current:`当前`,sessions:`会话`,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:`灵魂内容`,create:`创建`,save:`保存`,contentPreview:`- 内容预览`,close:`关闭`,addSoul:`添加灵魂`,noSouls:`暂无灵魂`,activate:`激活`,edit:`编辑`,view:`查看`,delete:`删除`,deleting:`删除中`,globalScope:`全局`,projectScope:`项目`,enable:`启用`,addSkill:`+ 添加技能`,noSkills:`暂无技能`,skillContent:`SKILL.md 内容`,description:`描述`,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:`切换语言`},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`,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`,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`,create:`Create`,save:`Save`,contentPreview:`- Content Preview`,close:`Close`,addSoul:`Add Soul`,noSouls:`No souls yet`,activate:`Activate`,edit:`Edit`,view:`View`,delete:`Delete`,deleting:`Deleting...`,globalScope:`Global`,projectScope:`Project`,enable:`Enable`,addSkill:`+ Add Skill`,noSkills:`No skills yet`,skillContent:`SKILL.md Content`,description:`Description`,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`}},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(e){return(await Cd(`/api/git-batch`,{method:`POST`,headers:Sd,body:JSON.stringify({dirs:e})})).json()}async function Wd(e){return(await Cd(`/api/project/open`,{method:`POST`,headers:Sd,body:JSON.stringify({path:e})})).json()}async function Gd(e){return(await Cd(`/api/project/browse`,{method:`POST`,headers:Sd,body:JSON.stringify({dir:e})})).json()}async function Kd(){return(await Cd(`/api/skills`)).json()}async function qd(e){return(await Cd(`/api/skills/${encodeURIComponent(e)}/content`)).json()}async function Jd({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 Yd(e,t){return(await Cd(`/api/skills/${encodeURIComponent(e)}/content`,{method:`PUT`,headers:Sd,body:JSON.stringify({content:t})})).json()}async function Xd(e){return(await Cd(`/api/skills/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function Zd(e,t){return(await Cd(`/api/skills/${encodeURIComponent(e)}/toggle`,{method:`POST`,headers:Sd,body:JSON.stringify({enabled:t})})).json()}async function Qd(){return(await Cd(`/api/souls`)).json()}async function $d(e){return(await Cd(`/api/souls/${encodeURIComponent(e)}/content`)).json()}async function ef({name:e,content:t}){return(await Cd(`/api/souls/create`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e,content:t})})).json()}async function tf(e,t){return(await Cd(`/api/souls/${encodeURIComponent(e)}/content`,{method:`PUT`,headers:Sd,body:JSON.stringify({content:t})})).json()}async function nf(e){return(await Cd(`/api/souls/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function rf(e){return(await Cd(`/api/souls/activate`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e})})).json()}async function af(){return(await Cd(`/api/codewiki/reports`)).json()}async function of(e=`standard`){return(await Cd(`/api/codewiki/generate`,{method:`POST`,headers:Sd,body:JSON.stringify({depth:e})})).json()}async function sf({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(`
|
|
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]=ne(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)),te=he(i);return(0,_.jsx)(Ho,{scope:n,type:r,dir:te,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:te,...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)(se,{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)(se,{present:n||s!==`hidden`,children:(0,_.jsx)(Qo,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:N(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:N(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)(se,{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=ge(u),T=ge(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:ge(a),onThumbPointerUp:ge(o),onThumbPositionChange:T,onThumbPointerDown:ge(s),children:(0,_.jsx)(D.div,{...p,ref:y,style:{position:`absolute`,...p.style},onPointerDown:N(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:N(e.onPointerMove,O),onPointerUp:N(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)(se,{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:N(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:N(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=Ua(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=ge(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=ge(t);P(()=>{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]=M(Ts),[ks,As]=ne(Ts,[Os,Ca]),js=Ca(),[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=he(l),[T,E]=ae({prop:r,defaultProp:i??!1,onChange:a,caller:Ts}),[D,O]=ae({prop:o,defaultProp:s,onChange:c,caller:Ts}),ee=d.useRef(null),te=v?h||!!v.closest(`form`):!0,[k,A]=d.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return(0,_.jsx)(za,{...g,children:(0,_.jsxs)(Ms,{required:m,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:pe(),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=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:d.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),te?(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(k)]},j):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)(Ba,{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:N(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:N(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:N(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 P(()=>{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)(Je,{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(P(()=>{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,te]=d.useState(null),k=Ds(n),[A,j]=d.useState(!1),ne=d.useRef(!1);d.useEffect(()=>{if(S)return gn(S)},[S]),Xe();let re=d.useCallback(e=>{let[t,...n]=k().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},[k,w]),M=d.useCallback(()=>re([D,S]),[re,D,S]);d.useEffect(()=>{A&&M()},[A,M]);let{onOpenChange:P,triggerPointerDownPosRef:ie}=x;d.useEffect(()=>{if(S){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ie.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ie.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():S.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),ie.current=null};return ie.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,P,ie]),d.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[ae,oe]=Nc(e=>{let t=k().filter(e=>!e.disabled),n=Pc(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),F=d.useCallback((e,t,n)=>{let r=!ne.current&&!n;(x.value!==void 0&&x.value===t||r)&&(O(e),r&&(ne.current=!0))},[x.value]),I=d.useCallback(()=>S?.focus(),[S]),se=d.useCallback((e,t,n)=>{let r=!ne.current&&!n;(x.value!==void 0&&x.value===t||r)&&te(e)},[x.value]),ce=r===`popper`?nc:ec,le=ce===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:F,selectedItem:D,onItemLeave:I,itemTextRefCallback:se,focusSelectedItem:M,selectedItemText:ee,position:r,isPositioned:A,searchRef:ae,children:(0,_.jsx)(sn,{as:Zs,allowPinchZoom:!0,children:(0,_.jsx)(Fe,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:N(i,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,_.jsx)(we,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,_.jsx)(ce,{role:`listbox`,id:x.contentId,"data-state":x.open?`open`:`closed`,dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...le,onPlaced:()=>j(!0),ref:E,style:{display:`flex`,flexDirection:`column`,outline:`none`,...b.style},onKeyDown:N(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&oe(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().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(()=>re(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=Ua(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=Ua(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,te=f+m+ee,k=x-te;if(te<=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=te+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)+k;s.style.height=t+`px`,v.scrollTop=te-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]);P(()=>S(),[S]);let[C,w]=d.useState();return P(()=>{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)(Va,{...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:N(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=pe();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=pe(),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:N(o.onFocus,()=>h(!0)),onBlur:N(o.onBlur,()=>h(!1)),onClick:N(o.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:N(o.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:N(o.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:N(o.onPointerMove,e=>{y.current=e.pointerType,i?c.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:N(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 P(()=>(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 P(()=>{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 P(()=>{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]),P(()=>{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:N(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:N(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:N(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)(Ha,{...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=ir(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=ge(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]=ne(`Tooltip`,[Ca]),nl=Ca(),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=pe(),m=d.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,v=d.useRef(!1),[y,b]=ae({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)(za,{...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)(Ba,{asChild:!0,...o,children:(0,_.jsx)(D.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:N(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:N(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:N(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:N(e.onBlur,i.onClose),onClick:N(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)(se,{present:n||a.open,children:(0,_.jsx)(Je,{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)(se,{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)(we,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,_.jsxs)(Va,{"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)(A,{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)(Ha,{...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],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[Au,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[Au,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[Au,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,z,R],N=()=>[...b(),Zu,Ku,{position:[z,R]}],P=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,Qu,Vu,{size:[z,R]}],ae=()=>[Nu,Yu,Hu],oe=()=>[``,`none`,`full`,l,z,R],F=()=>[``,ju,Yu,Hu],I=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[ju,Nu,Zu,Ku],le=()=>[``,`none`,m,z,R],ue=()=>[`none`,ju,z,R],de=()=>[`none`,ju,z,R],fe=()=>[ju,z,R],pe=()=>[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:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],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:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"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:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...I(),`wavy`]}],"text-decoration-thickness":[{decoration:[ju,`from-font`,`auto`,z,Hu]}],"text-decoration-color":[{decoration:M()}],"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:N()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:ie()}],"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:M()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...I(),`hidden`,`none`]}],"divide-style":[{divide:[...I(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...I(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ju,z,R]}],"outline-w":[{outline:[``,ju,Yu,Hu]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,ed,Ju]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,ed,Ju]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ju,Hu]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,ed,Ju]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ju,z,R]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"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":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,z,R]}],filter:[{filter:[``,`none`,z,R]}],blur:[{blur:le()}],brightness:[{brightness:[ju,z,R]}],contrast:[{contrast:[ju,z,R]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ed,Ju]}],"drop-shadow-color":[{"drop-shadow":M()}],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":le()}],"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:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[z,R,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"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`,...M()]}],"stroke-w":[{stroke:[ju,Yu,Hu,Uu]}],stroke:[{stroke:[`none`,...M()]}],"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:`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`,shell:`Shell`,defaultShell:`Default Shell`,ui:`UI`,uiLanguage:`UI Language`,replyLanguage:`Reply Language`,backToTop:`回到顶部`,pendingItems:`排队中`,copyCode:`复制`,copied:`已复制`,connected:`已连接`,disconnected:`连接断开,正在重连...`,unknownProject:`未知项目`,emptyChat:`空对话`,messages:`条消息`,renderError:`渲染错误`,retry:`重试`,planReviewFirst:`请先在上方审阅计划,批准、修改或否决后再继续输入`,loading:`加载中`,sending:`发送`,updating:`更新中...`,updatedRestart:`已更新,请重启`,updateAvailable:`新版本可用,点击更新`,openSettings:`打开设置`,current:`当前`,sessions:`会话`,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:`灵魂内容`,create:`创建`,save:`保存`,contentPreview:`- 内容预览`,close:`关闭`,addSoul:`添加灵魂`,noSouls:`暂无灵魂`,activate:`激活`,edit:`编辑`,view:`查看`,delete:`删除`,deleting:`删除中`,globalScope:`全局`,projectScope:`项目`,enable:`启用`,addSkill:`+ 添加技能`,noSkills:`暂无技能`,skillContent:`SKILL.md 内容`,description:`描述`,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:`切换语言`,buildInProject:`要在 {{project}} 中构建什么?`,gitStaged:`已暂存`,gitModified:`已修改`,gitUntracked:`未跟踪`,gitClean:`无变更`},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`,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`,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`,create:`Create`,save:`Save`,contentPreview:`- Content Preview`,close:`Close`,addSoul:`Add Soul`,noSouls:`No souls yet`,activate:`Activate`,edit:`Edit`,view:`View`,delete:`Delete`,deleting:`Deleting...`,globalScope:`Global`,projectScope:`Project`,enable:`Enable`,addSkill:`+ Add Skill`,noSkills:`No skills yet`,skillContent:`SKILL.md Content`,description:`Description`,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`,buildInProject:`What do you want to build in {{project}}?`,gitStaged:`Staged`,gitModified:`Modified`,gitUntracked:`Untracked`,gitClean:`Clean`}},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(e){return(await Cd(`/api/git-batch`,{method:`POST`,headers:Sd,body:JSON.stringify({dirs:e})})).json()}async function Wd(e){return(await Cd(`/api/project/open`,{method:`POST`,headers:Sd,body:JSON.stringify({path:e})})).json()}async function Gd(e){return(await Cd(`/api/project/browse`,{method:`POST`,headers:Sd,body:JSON.stringify({dir:e})})).json()}async function Kd(){return(await Cd(`/api/skills`)).json()}async function qd(e){return(await Cd(`/api/skills/${encodeURIComponent(e)}/content`)).json()}async function Jd({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 Yd(e,t){return(await Cd(`/api/skills/${encodeURIComponent(e)}/content`,{method:`PUT`,headers:Sd,body:JSON.stringify({content:t})})).json()}async function Xd(e){return(await Cd(`/api/skills/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function Zd(e,t){return(await Cd(`/api/skills/${encodeURIComponent(e)}/toggle`,{method:`POST`,headers:Sd,body:JSON.stringify({enabled:t})})).json()}async function Qd(){return(await Cd(`/api/souls`)).json()}async function $d(e){return(await Cd(`/api/souls/${encodeURIComponent(e)}/content`)).json()}async function ef({name:e,content:t}){return(await Cd(`/api/souls/create`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e,content:t})})).json()}async function tf(e,t){return(await Cd(`/api/souls/${encodeURIComponent(e)}/content`,{method:`PUT`,headers:Sd,body:JSON.stringify({content:t})})).json()}async function nf(e){return(await Cd(`/api/souls/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}async function rf(e){return(await Cd(`/api/souls/activate`,{method:`POST`,headers:Sd,body:JSON.stringify({name:e})})).json()}async function af(){return(await Cd(`/api/codewiki/reports`)).json()}async function of(e=`standard`){return(await Cd(`/api/codewiki/generate`,{method:`POST`,headers:Sd,body:JSON.stringify({depth:e})})).json()}async function sf({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
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 cf(e){return(await Cd(`/api/codewiki/report/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}var lf=(0,d.createContext)(null);function uf(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 df(){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 ff(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 pf(e,t,{replace:n=!1,projectPath:r=``}={}){let i=ff(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 mf={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,sessions:[],projectCwd:null,history:[],skills:[],gitInfo:null,gitBatch:{},codewikiProjectPath:``,versionInfo:null,updateStatus:null};function hf(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 gf(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 _f(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 vf(e){return e.length===0?[{type:`text`,text:``,isStreaming:!1}]:e[e.length-1].type===`text`?e:[...e,{type:`text`,text:``,isStreaming:!1}]}function yf(e,t){let n=vf(e),r=n[n.length-1];return[...n.slice(0,-1),{...r,text:(r.text||``)+t,isStreaming:!0}]}function bf(e){return String(e||``).replace(/(?:^|\n)\[plan\]\s+Step\s+\d+\/\d+\s+->[^\n]*\n?/g,``)}function xf(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 Sf(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 Cf(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 wf(e){let t=String(e||``).trim().toLowerCase();return[`/yes`,`/plan approve`,`/no`,`/reject`].includes(t)||t.startsWith(`/edit `)}function Tf(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 Ef(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 Df(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 Of(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 kf({children:e}){let[t,n]=(0,d.useState)(mf),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:xf(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 Ud(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 Wd(e);return n?.error?null:n}catch{return null}},[]),x=(0,d.useCallback)(async()=>{try{let e=await Kd();u({skills:Array.isArray(e)?e:[]})}catch{}},[u]),S=(0,d.useCallback)(async()=>{try{let e=await Ad();if(!Array.isArray(e)||!e.length){let e=await jd();Array.isArray(e)&&e.length&&u({messages:e});return}let t=[],n=null;for(let r of e)if(r.role===`user`){if(wf(r.content))continue;n=null;let e=hf(r.content||``);t.push({id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}-u${t.length}`,role:`you`,segments:[{type:`text`,text:e,isStreaming:!1}],skillBadges:[],fileChanges:[]})}else if(r.role===`assistant`){if(Array.isArray(r.planTranscript)&&r.planTranscript.length){n=null;for(let e of r.planTranscript)t.push(Of(e,t.length));continue}let e=Ef(r.content);if(e?.length){n=null;let r=[...e].reverse().find(e=>e.role===`summarizer`)||e[e.length-1];t.push(Df({...r,step:1,total:1,role:r.role||`summarizer`},t.length));continue}n||(n={id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}-a${t.length}`,role:`general`,segments:[],skillBadges:[],fileChanges:[]},t.push(n)),r.content&&n.segments.push({type:`text`,text:r.content,isStreaming:!1}),r.toolCalls&&r.toolCalls.length&&n.segments.push({type:`tools`,cards:r.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(r.role===`tool`&&n){let e=r.toolCallId||r.tool_call_id;if(!e)continue;for(let t of n.segments){if(t.type!==`tools`)continue;let n=t.cards.find(t=>t.id===e);if(n){r.toolSummary&&(n.summary=r.toolSummary),r.toolDurationMs!=null&&(n.durationMs=r.toolDurationMs),r.toolStatus===`error`&&(n.status=`error`),r.toolStatus===`blocked`&&(n.status=`blocked`),r.content&&(n.result=r.content);break}}}u({messages:t})}catch{}},[u]),C=(0,d.useCallback)(e=>{if(!e?.type||uf(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:xf(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=bf(e.text);c&&t&&n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,segments:yf(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=bf(e.text),r=vf(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:_f(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:gf(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:gf(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:gf(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:gf(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=Tf(e);i=r.id,s.current.set(t,i),n(e=>({...e,messages:[...xf(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:[...xf(t.messages,[`plan-waiting-review`,`waiting-response`]).filter(e=>!Sf(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:xf(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:`system`,text:`Context auto-compacted (${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&&!Sf(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:xf(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`&&pf(`chat`,i.sessionId,{replace:!0});break}case`mode:changed`:{let t=e;u({runtimeState:{...r.current.runtimeState,mode:t.mode,...t}});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`&&pf(`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=df();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||uf(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)pf(`chat`,t.sessionId,{replace:!0});else if(e.view===`codewiki`){let n=e.projectPath||t?.cwd||``;u({currentView:`codewiki`,codewikiProjectPath:n}),n&&pf(`codewiki`,null,{replace:!0,projectPath:n})}await S(),v(),y(),x(),h();try{u({versionInfo:await wd()})}catch{}w()})();let e=async()=>{let e=df();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&&Cf(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`}),pf(`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&&pf(`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&&pf(`chat`,e.sessionId),await m(),n(e=>({...e,messages:[]})),y())}catch{}},openProject:async(e,t={})=>{try{let i=await Wd(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`?pf(`codewiki`,null,{projectPath:o}):i.sessionId&&pf(`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`&&pf(e),e===`codewiki`&&pf(e,null,{projectPath:n}),e===`chat`){let e=r.current.runtimeState;pf(`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}),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)(lf.Provider,{value:T,children:e})}function Af(){let e=(0,d.useContext)(lf);if(!e)throw Error(`useApp must be used within AppProvider`);return e}var jf=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Mf=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Nf=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Pf=e=>{let t=Nf(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ff={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`},If=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Lf=(0,d.createContext)({}),Rf=()=>(0,d.useContext)(Lf),zf=(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=``}=Rf()??{},h=r??f?Number(n??u)*24/Number(t??l):n??u;return(0,d.createElement)(`svg`,{ref:c,...Ff,width:t??l??Ff.width,height:t??l??Ff.height,stroke:e??p,strokeWidth:h,className:jf(`lucide`,m,i),...!a&&!If(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Bf=(e,t)=>{let n=(0,d.forwardRef)(({className:n,...r},i)=>(0,d.createElement)(zf,{ref:i,iconNode:t,className:jf(`lucide-${Mf(Pf(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Pf(e),n},Vf=Bf(`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=Bf(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Uf=Bf(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Wf=Bf(`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=Bf(`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=Bf(`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=Bf(`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=Bf(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Yf=Bf(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Xf=Bf(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Zf=Bf(`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=Bf(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),$f=Bf(`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=Bf(`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=Bf(`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=Bf(`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`}]]),rp=Bf(`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`}]]),ip=Bf(`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`}]]),ap=Bf(`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`}]]),op=Bf(`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`}]]),sp=Bf(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),cp=Bf(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),lp=Bf(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),up=Bf(`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`}]]),dp=Bf(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),fp=Bf(`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`}]]),pp=Bf(`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`}]]),mp=Bf(`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`}]]),hp=Bf(`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`}]]),gp=Bf(`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`}]]),_p=Bf(`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`}]]),vp=Bf(`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`}]]),yp=Bf(`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`}]]),bp=Bf(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),xp=Bf(`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`}]]),Sp=Bf(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Cp({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 wp({...e}){return(0,_.jsx)(L,{"data-slot":`popover`,...e})}function Tp({...e}){return(0,_.jsx)(_o,{"data-slot":`popover-trigger`,...e})}function Ep({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 Dp=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Op=Hl,kp=(e,t)=>n=>{if(t?.variants==null)return Op(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=Dp(t)||Dp(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 Op(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)},Ap=kp(`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 jp({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(Ap({variant:t,size:n,className:e})),...i})}function Mp({...e}){return(0,_.jsx)(Zn,{"data-slot":`dialog`,...e})}function Np({...e}){return(0,_.jsx)(Qn,{"data-slot":`dialog-portal`,...e})}function Pp({className:e,...t}){return(0,_.jsx)($n,{"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 Fp({className:e,children:t,...n}){return(0,_.jsxs)(Np,{"data-slot":`dialog-portal`,children:[(0,_.jsx)(Pp,{}),(0,_.jsx)(er,{"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 Ip({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)(rr,{"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)(Sp,{}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})}function Lp({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)(rr,{asChild:!0,children:(0,_.jsx)(jp,{variant:`outline`,children:`Close`})})]})}function Rp({className:e,...t}){return(0,_.jsx)(tr,{"data-slot":`dialog-title`,className:B(`text-base font-semibold text-(--text-primary)`,e),...t})}function zp({className:e,...t}){return(0,_.jsx)(nr,{"data-slot":`dialog-description`,className:B(`text-sm text-(--text-secondary)`,e),...t})}function Bp({open:e,title:t,description:n,confirmLabel:r,cancelLabel:i,loading:a=!1,onOpenChange:o,onConfirm:s}){return(0,_.jsx)(Mp,{open:e,onOpenChange:e=>!a&&o?.(e),children:(0,_.jsxs)(Fp,{className:`sm:max-w-[380px]`,children:[(0,_.jsxs)(Ip,{showCloseButton:!a,children:[(0,_.jsx)(Rp,{children:t}),(0,_.jsx)(zp,{className:`leading-6`,children:n})]}),(0,_.jsxs)(Lp,{children:[(0,_.jsx)(jp,{type:`button`,variant:`outline`,disabled:a,onClick:()=>o?.(!1),children:i||V(`cancel`)}),(0,_.jsx)(jp,{type:`button`,variant:`destructive`,disabled:a,onClick:s,children:a?V(`deleting`):r||V(`delete`)})]})]})})}function Vp(e){return e?.projectDir||`unknown`}function Hp(e){return!e||e===`unknown`?V(`unknownProject`):String(e).split(/[/\\]/).filter(Boolean).pop()||e}function Up({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`})})}function Wp({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=Array.isArray(e)?e:[],E=T.find(e=>e.id===t),D=E?Vp(E):null,O=new Map;for(let e of T){let t=Vp(e);O.has(t)||O.set(t,[]),O.get(t).push(e)}let ee=e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},te=typeof document<`u`&&document.documentElement.dataset.theme===`dark`,k=async(e,t)=>{if(e.stopPropagation(),t&&t!==`unknown`&&t!==D&&g){await g(t,{view:`codewiki`});return}h?.(`codewiki`,{projectPath:t})},A=async(e,t)=>{if(e.stopPropagation(),!(!t||t===`unknown`)){if(t===D){await n?.();return}await g?.(t,{view:`chat`})}};return(0,_.jsxs)(`aside`,{className:`w-[260px] shrink-0 border-r border-(--border-default) 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)(dp,{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)(ap,{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)(xp,{size:15,strokeWidth:2,className:`text-(--text-secondary) shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:V(`souls`)})]}),(0,_.jsx)(Cp,{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(O.entries()).map(([e,n])=>{let i=y.has(e)||O.size===1,a=l?.[e],o=e===D,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:()=>ee(e),children:[(0,_.jsx)(rp,{size:13,className:`shrink-0`}),(0,_.jsx)(`span`,{className:`truncate flex-1`,children:Hp(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`)} ${Hp(e)}`,onClick:t=>A(t,e),children:(0,_.jsx)(dp,{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`)} ${Hp(e)}`,onClick:t=>k(t,e),children:(0,_.jsx)(Wf,{size:13,strokeWidth:1.9})}),a?.isGit&&(0,_.jsx)(Up,{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:()=>ee(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`,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)(wp,{children:[(0,_.jsx)(Tp,{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)(Ep,{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)}),T.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-1.5 border-t border-(--border-default)`,children:[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)(sp,{size:15,strokeWidth:1.8})}),(0,_.jsxs)(wp,{children:[(0,_.jsx)(Tp,{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)(ip,{size:15,strokeWidth:1.8})})}),(0,_.jsx)(Ep,{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(te?`lightMode`:`darkMode`),"aria-label":V(te?`switchToLightMode`:`switchToDarkMode`),children:te?(0,_.jsx)(up,{size:15,strokeWidth:1.8}):(0,_.jsx)(yp,{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)(gp,{size:15,strokeWidth:1.8})})]})]}),(0,_.jsx)(Bp,{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 Gp(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 Kp(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 qp={read:`📖`,edit:`✏️`,write:`📝`,delete:`🗑️`,run:`⚙️`,grep:`🔍`,glob:`📂`,list:`📁`,web_fetch:`🌐`,web_search:`🔎`,default:`🔧`};function Jp(e){let t=String(e).match(/^(\w+)/);return t?t[1]:e}function Yp(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 Xp(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 Zp={running:`bg-[var(--accent-blue)] animate-pulse`,done:`bg-[var(--accent-green)]`,error:`bg-[var(--accent-red)]`,blocked:`bg-[var(--accent-orange)]`};function Qp({card:e}){let[t,n]=(0,d.useState)(!1),r=Jp(e.name),i=qp[r]||qp.default,a=Yp(e.arguments,r),o=a&&!String(e.name).includes(`(`)?`${e.name}(${a})`:e.name,s=[];return e.arguments!=null&&e.arguments!==``&&s.push([`Arguments`,Xp(e.arguments)]),e.summary&&s.push([`Summary`,String(e.summary)]),e.result&&s.push([`Result`,Xp(e.result)]),(0,_.jsxs)(`div`,{className:B(`border border-[var(--border-default)] rounded-lg 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:Gp(e.durationMs)}),(0,_.jsx)(`span`,{className:B(`w-1.5 h-1.5 rounded-full shrink-0`,Zp[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 $p=(function(e){if(e==null)return im;if(typeof e==`function`)return rm(e);if(typeof e==`object`)return Array.isArray(e)?em(e):tm(e);if(typeof e==`string`)return nm(e);throw Error(`Expected function, string, or object as test`)});function em(e){let t=[],n=-1;for(;++n<e.length;)t[n]=$p(e[n]);return rm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function tm(e){let t=e;return rm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function nm(e){return rm(t);function t(t){return t&&t.type===e}}function rm(e){return t;function t(t,n,r){return!!(am(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function im(){return!0}function am(e){return typeof e==`object`&&!!e&&`type`in e}function om(e){return e}var sm=[],cm=`skip`;function lm(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=$p(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 (`+om(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=sm,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=um(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 um(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?sm:[e]}function dm(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),lm(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 fm={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function pm({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=fm.indicator,imageBlockPolicy:c=fm.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=Cm(e,t,n,r,i,a,o,s,c);ym(l),dm(l,u)}}function mm(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 hm(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var gm=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),_m=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function vm(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=mm(e,n);if(!o||_m.has(o.protocol)||!(gm.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=hm(e);return o&&t.some(e=>{let t=mm(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 ym(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)ym(t)}}var bm=Symbol(`node-seen`);function xm(e,t,n){return t===fm.remove?{type:`remove`}:t===fm.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 Sm(e,t,n){if(t===fm.remove)return{type:`remove`};if(t===fm.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 Cm=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[bm])return!0;if(u.tagName===`a`){let n=vm(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[bm]=!0,dm(u,l),f&&typeof d==`number`){let e=xm(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[cm,d];f.children[d]=e.element}return cm}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=vm(u.properties.src,n,e,r,!0,i);if(t===null){if(u[bm]=!0,dm(u,l),f&&typeof d==`number`){let e=Sm(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[cm,d];f.children[d]=e.element}return cm}else return u.properties.src=t,!0}return!0};return l},wm=typeof self==`object`?self:globalThis,Tm=(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 wm[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 wm[a](o),i)};return r},Em=e=>Tm(new Map,e)(0),Dm=``,{toString:Om}={},{keys:km}=Object,Am=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Om.call(e).slice(8,-1);switch(n){case`Array`:return[1,Dm];case`Object`:return[2,Dm];case`Date`:return[3,Dm];case`RegExp`:return[4,Dm];case`Map`:return[5,Dm];case`Set`:return[6,Dm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},jm=([e,t])=>e===0&&(t===`function`||t===`symbol`),Mm=(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]=Am(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 km(r))(e||!jm(Am(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||!(jm(Am(n))||jm(Am(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!jm(Am(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Nm=(e,{json:t,lossy:n}={})=>{let r=[];return Mm(!(t||n),!!t,new Map,r)(e),r},Pm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Em(Nm(e,t)):structuredClone(e):(e,t)=>Em(Nm(e,t)),Fm=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Fm.prototype.normal={},Fm.prototype.property={},Fm.prototype.space=void 0;function Im(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Fm(n,r,t)}function Lm(e){return e.toLowerCase()}var Rm=class{constructor(e,t){this.attribute=t,this.property=e}};Rm.prototype.attribute=``,Rm.prototype.booleanish=!1,Rm.prototype.boolean=!1,Rm.prototype.commaOrSpaceSeparated=!1,Rm.prototype.commaSeparated=!1,Rm.prototype.defined=!1,Rm.prototype.mustUseProperty=!1,Rm.prototype.number=!1,Rm.prototype.overloadedBoolean=!1,Rm.prototype.property=``,Rm.prototype.spaceSeparated=!1,Rm.prototype.space=void 0;var zm=e({boolean:()=>H,booleanish:()=>Vm,commaOrSpaceSeparated:()=>Gm,commaSeparated:()=>Wm,number:()=>U,overloadedBoolean:()=>Hm,spaceSeparated:()=>Um}),Bm=0,H=Km(),Vm=Km(),Hm=Km(),U=Km(),Um=Km(),Wm=Km(),Gm=Km();function Km(){return 2**++Bm}var qm=Object.keys(zm),Jm=class extends Rm{constructor(e,t,n,r){let i=-1;if(super(e,t),Ym(this,`space`,r),typeof n==`number`)for(;++i<qm.length;){let e=qm[i];Ym(this,qm[i],(n&zm[e])===zm[e])}}};Jm.prototype.defined=!0;function Ym(e,t,n){n&&(e[t]=n)}function Xm(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Jm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Lm(r)]=r,n[Lm(a.attribute)]=r}return new Fm(t,n,e.space)}var Zm=Xm({properties:{ariaActiveDescendant:null,ariaAtomic:Vm,ariaAutoComplete:null,ariaBusy:Vm,ariaChecked:Vm,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:Um,ariaCurrent:null,ariaDescribedBy:Um,ariaDetails:null,ariaDisabled:Vm,ariaDropEffect:Um,ariaErrorMessage:null,ariaExpanded:Vm,ariaFlowTo:Um,ariaGrabbed:Vm,ariaHasPopup:null,ariaHidden:Vm,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Um,ariaLevel:U,ariaLive:null,ariaModal:Vm,ariaMultiLine:Vm,ariaMultiSelectable:Vm,ariaOrientation:null,ariaOwns:Um,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Vm,ariaReadOnly:Vm,ariaRelevant:null,ariaRequired:Vm,ariaRoleDescription:Um,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Vm,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 Qm(e,t){return t in e?e[t]:t}function $m(e,t){return Qm(e,t.toLowerCase())}var eh=Xm({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Wm,acceptCharset:Um,accessKey:Um,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:Um,autoFocus:H,autoPlay:H,blocking:Um,capture:null,charSet:null,checked:H,cite:null,className:Um,cols:U,colSpan:null,content:null,contentEditable:Vm,controls:H,controlsList:Um,coords:U|Wm,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:Hm,draggable:Vm,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:Um,height:U,hidden:Hm,high:U,href:null,hrefLang:null,htmlFor:Um,httpEquiv:Um,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:Um,itemRef:Um,itemScope:H,itemType:Um,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,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:H,optimum:U,pattern:null,ping:Um,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:Um,required:H,reversed:H,rows:U,rowSpan:U,sandbox:Um,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Vm,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:H,useMap:null,value:Vm,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Um,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:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Vm,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:H,disableRemotePlayback:H,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:$m}),th=Xm({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:Gm,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:Um,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:H,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:Wm,g2:Wm,glyphName:Wm,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:Gm,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:Um,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gm,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gm,rev:Gm,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gm,requiredFeatures:Gm,requiredFonts:Gm,requiredFormats:Gm,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:Gm,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:Gm,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:Gm,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:Qm}),nh=Xm({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()}}),rh=Xm({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$m}),ih=Xm({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ah={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`},oh=/[A-Z]/g,sh=/-[a-z]/g,ch=/^data[-\w.:]+$/i;function lh(e,t){let n=Lm(t),r=t,i=Rm;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ch.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(sh,dh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!sh.test(e)){let n=e.replace(oh,uh);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Jm}return new i(r,t)}function uh(e){return`-`+e.toLowerCase()}function dh(e){return e.charAt(1).toUpperCase()}var fh=Im([Zm,eh,nh,rh,ih],`html`),ph=Im([Zm,th,nh,rh,ih],`svg`);function mh(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 hh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var gh=/[#.]/g;function _h(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){gh.lastIndex=i;let e=gh.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 vh(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function yh(e){return e.join(` `).trim()}function bh(e,t,n){let r=n?Eh(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=_h(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,xh(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Sh(e,o.properties,t,n)}for(let e of a)Ch(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function xh(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 Sh(e,t,n,r){let i=lh(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?vh(r):i.commaSeparated?mh(r):i.commaOrSpaceSeparated?vh(mh(r).join(` `)):wh(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Th(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(wh(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ch(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)Ch(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Ch(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function wh(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Lm(n)===Lm(t)))return!0}return n}function Th(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Eh(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Dh=`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(`.`),Oh=bh(fh,`div`),kh=bh(ph,`g`,Dh);function Ah(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=jh(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=jh(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 jh(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 Mh={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/`},Nh={}.hasOwnProperty,Ph=Object.prototype;function Fh(e,t){let n=t||{};return Ih({file:n.file||void 0,location:!1,schema:n.space===`svg`?ph:fh,verbose:n.verbose||!1},e)}function Ih(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},zh(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:Lh(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Ah(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`},zh(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},zh(e,r,n),n}default:return n=Rh(e,t),n}}function Lh(e,t){let n=-1,r=[];for(;++n<t.length;){let i=Ih(e,t[n]);r.push(i)}return r}function Rh(e,t){let n=e.schema;e.schema=t.namespaceURI===Mh.svg?ph:fh;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Nh.call(Ph,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?kh:Oh)(t.tagName,i,Lh(e,t.childNodes));if(zh(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Vh(r.startTag),o=r&&r.endTag&&Vh(r.endTag),s=Ih(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function zh(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Bh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Bh(e,t,n){let r=Vh(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)Nh.call(n.attrs,i)&&(r[lh(e.schema,i).property]=Vh(n.attrs[i]));n.startTag;let a=Vh(n.startTag),o=n.endTag?Vh(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Vh(e){let t=Hh({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Hh({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Hh(e){return e.line&&e.column?e:void 0}var Uh={}.hasOwnProperty;function Wh(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Uh.call(t,e)){let n=String(t[e]);i=Uh.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 Gh={},Kh={}.hasOwnProperty,qh=Wh(`type`,{handlers:{root:Yh,element:eg,text:Qh,comment:$h,doctype:Zh}});function Jh(e,t){let n=(t||Gh).space;return qh(e,n===`svg`?ph:fh)}function Yh(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=ng(e.children,n,t),rg(e,n),n}function Xh(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=ng(e.children,n,t),rg(e,n),n}function Zh(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return rg(e,t),t}function Qh(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return rg(e,t),t}function $h(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return rg(e,t),t}function eg(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=ph);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Kh.call(e.properties,a)){let t=tg(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Mh[o],childNodes:[],parentNode:null};return s.childNodes=ng(e.children,s,r),rg(e,s),e.tagName===`template`&&e.content&&(s.content=Xh(e.content,r)),s}function tg(e,t,n){let r=lh(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?hh(n):yh(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=Mh[r.space]}return i}function ng(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=qh(e[r],n);a.parentNode=t,i.push(a)}return i}function rg(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 ig=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],ag=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 og={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function sg(e){return e>=55296&&e<=57343}function cg(e){return e>=56320&&e<=57343}function lg(e,t){return(e-55296)*1024+9216+t}function ug(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dg(e){return e>=64976&&e<=65007||ag.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 fg=65536,pg=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=fg,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(cg(t))return this.pos++,this._addGap(),lg(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,sg(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){ug(e)?this._err(G.controlCharacterInInputStream):dg(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}},mg;(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`})(mg||={});function hg(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 gg=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))),_g=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 vg(e){return e>=55296&&e<=57343||e>1114111?65533:_g.get(e)??e}var yg;(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`})(yg||={});var bg=32,xg;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(xg||={});function Sg(e){return e>=yg.ZERO&&e<=yg.NINE}function Cg(e){return e>=yg.UPPER_A&&e<=yg.UPPER_F||e>=yg.LOWER_A&&e<=yg.LOWER_F}function wg(e){return e>=yg.UPPER_A&&e<=yg.UPPER_Z||e>=yg.LOWER_A&&e<=yg.LOWER_Z||Sg(e)}function Tg(e){return e===yg.EQUALS||wg(e)}var Eg;(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`})(Eg||={});var Dg;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Dg||={});var Og=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Eg.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Dg.Strict}startEntity(e){this.decodeMode=e,this.state=Eg.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Eg.EntityStart:return e.charCodeAt(t)===yg.NUM?(this.state=Eg.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Eg.NamedEntity,this.stateNamedEntity(e,t));case Eg.NumericStart:return this.stateNumericStart(e,t);case Eg.NumericDecimal:return this.stateNumericDecimal(e,t);case Eg.NumericHex:return this.stateNumericHex(e,t);case Eg.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|bg)===yg.LOWER_X?(this.state=Eg.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Eg.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(Sg(r)||Cg(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(Sg(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===yg.SEMI)this.consumed+=1;else if(this.decodeMode===Dg.Strict)return 0;return this.emitCodePoint(vg(this.result),this.consumed),this.errors&&(e!==yg.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&xg.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=kg(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Dg.Attribute&&(i===0||Tg(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&xg.VALUE_LENGTH)>>14,i!==0){if(a===yg.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Dg.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]&xg.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]&~xg.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Eg.NamedEntity:return this.result!==0&&(this.decodeMode!==Dg.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Eg.NumericDecimal:return this.emitNumericEntity(0,2);case Eg.NumericHex:return this.emitNumericEntity(0,3);case Eg.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Eg.EntityStart:return 0}}};function kg(e,t,n,r){let i=(t&xg.BRANCH_LENGTH)>>7,a=t&xg.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 Ag;(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`})(Ag||={});var jg;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(jg||={});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 Mg=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 Ng(e){return Mg.get(e)??J.UNKNOWN}var Y=J,Pg={[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},Fg=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 Ig={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function Lg(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function Rg(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function zg(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function Bg(e){return zg(e)||Rg(e)}function Vg(e){return Bg(e)||Lg(e)}function Hg(e){return e+32}function Ug(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function Wg(e){return Ug(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function Gg(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:sg(e)?G.surrogateCharacterReference:dg(e)?G.noncharacterCharacterReference:ug(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var Kg=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 pg(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Og(gg,(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=Gg(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:mg.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:mg.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:mg.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:mg.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(hg(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=Ng(e.tagName),e.type===mg.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 mg.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case mg.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case mg.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:mg.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=Ug(e)?mg.WHITESPACE_CHARACTER:e===W.NULL?mg.NULL_CHARACTER:mg.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(mg.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Dg.Attribute:Dg.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(Bg(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(Bg(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(Rg(e)?Hg(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){Bg(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){Bg(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){Bg(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:Bg(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){Bg(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(og.SCRIPT,!1)&&Wg(this.preprocessor.peek(og.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<og.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(og.SCRIPT,!1)&&Wg(this.preprocessor.peek(og.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<og.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(Rg(e)?Hg(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(og.DASH_DASH,!0)?(this._createCommentToken(og.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(og.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(og.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(og.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(og.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(Rg(e))this._createDoctypeToken(String.fromCharCode(Hg(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(Rg(e)?Hg(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(og.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(og.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()&&Vg(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Vg(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},qg=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),Jg=new Set([...qg,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),Yg=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),Xg=new Set([...Yg,J.OL,J.UL]),Zg=new Set([...Yg,J.BUTTON]),Qg=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),$g=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),e_=new Set([J.TR,J.TEMPLATE,J.HTML]),t_=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),n_=new Set([J.TABLE,J.TEMPLATE,J.HTML]),r_=new Set([J.TD,J.TH]),i_=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(Fg,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(r_,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(n_,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(t_,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(e_,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($g.has(r))return!1;break;case K.MATHML:if(Qg.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Yg)}hasInListItemScope(e){return this.hasInDynamicScope(e,Xg)}hasInButtonScope(e){return this.hasInDynamicScope(e,Zg)}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(Fg.has(t))return!0;if(Yg.has(t))return!1;break;case K.SVG:if($g.has(t))return!1;break;case K.MATHML:if(Qg.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&&qg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Jg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Jg.has(this.currentTagId);)this.pop()}},a_=3,o_;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(o_||={});var s_={type:o_.Marker},c_=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===o_.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<a_)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<a_)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>=a_&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(s_)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:o_.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:o_.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(s_);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===o_.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===o_.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===o_.Element&&t.element===e)}},l_={createDocument(){return{nodeName:`#document`,mode:jg.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};l_.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(l_.isTextNode(n)){n.value+=t;return}}l_.appendChild(e,l_.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&l_.isTextNode(r)?r.value+=t:l_.insertBefore(e,l_.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}}},u_=`html`,d_=`about:legacy-compat`,f_=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,p_=`+//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(`,`),m_=[...p_,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],h_=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),g_=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],__=[...g_,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function v_(e,t){return t.some(t=>e.startsWith(t))}function y_(e){return e.name===u_&&e.publicId===null&&(e.systemId===null||e.systemId===d_)}function b_(e){if(e.name!==u_)return jg.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===f_)return jg.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),h_.has(n))return jg.QUIRKS;let e=t===null?m_:p_;if(v_(n,e))return jg.QUIRKS;if(e=t===null?g_:__,v_(n,e))return jg.LIMITED_QUIRKS}return jg.NO_QUIRKS}var x_={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},S_=`definitionurl`,C_=`definitionURL`,w_=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])),T_=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}]]),E_=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])),D_=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 O_(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===Ag.COLOR||e===Ag.SIZE||e===Ag.FACE)||D_.has(t)}function k_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===S_){e.attrs[t].name=C_;break}}function A_(e){for(let t=0;t<e.attrs.length;t++){let n=w_.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function j_(e){for(let t=0;t<e.attrs.length;t++){let n=T_.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 M_(e){let t=E_.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ng(e.tagName))}function N_(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function P_(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Ag.ENCODING){let t=n[e].value.toLowerCase();return t===x_.TEXT_HTML||t===x_.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function F_(e,t,n,r){return(!r||r===K.HTML)&&P_(e,t,n)||(!r||r===K.MATHML)&&N_(e,t)}var I_=`hidden`,L_=8,R_=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 z_={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},B_=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),V_={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:l_,onParseError:null},H_=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={...V_,...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 Kg(this.options,this),this.activeFormattingElements=new c_(this.treeAdapter),this.fragmentContextID=n?Ng(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new i_(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={...V_,...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??z_,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=Ig.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=Ig.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=Ig.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=Ig.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=Ig.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===mg.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 mg.CHARACTER:this.onCharacter(e);break;case mg.NULL_CHARACTER:this.onNullCharacter(e);break;case mg.COMMENT:this.onComment(e);break;case mg.DOCTYPE:this.onDoctype(e);break;case mg.START_TAG:this._processStartTag(e);break;case mg.END_TAG:this.onEndTag(e);break;case mg.EOF:this.onEof(e);break;case mg.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return F_(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===o_.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 B_.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 Pg[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ob(this,e);return}switch(this.insertionMode){case Z.INITIAL:tv(this,e);break;case Z.BEFORE_HTML:iv(this,e);break;case Z.BEFORE_HEAD:sv(this,e);break;case Z.IN_HEAD:dv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:mv(this,e);break;case Z.AFTER_HEAD:_v(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:bv(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:hy(this,e);break;case Z.IN_TABLE_TEXT:Oy(this,e);break;case Z.IN_COLUMN_GROUP:Fy(this,e);break;case Z.AFTER_BODY:Zy(this,e);break;case Z.AFTER_AFTER_BODY:rb(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ab(this,e);return}switch(this.insertionMode){case Z.INITIAL:tv(this,e);break;case Z.BEFORE_HTML:iv(this,e);break;case Z.BEFORE_HEAD:sv(this,e);break;case Z.IN_HEAD:dv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:mv(this,e);break;case Z.AFTER_HEAD:_v(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:hy(this,e);break;case Z.IN_COLUMN_GROUP:Fy(this,e);break;case Z.AFTER_BODY:Zy(this,e);break;case Z.AFTER_AFTER_BODY:rb(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){X_(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:X_(this,e);break;case Z.IN_TABLE_TEXT:ky(this,e);break;case Z.AFTER_BODY:Z_(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:Q_(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:ev(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:ky(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)?cb(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:tv(this,e);break;case Z.BEFORE_HTML:nv(this,e);break;case Z.BEFORE_HEAD:av(this,e);break;case Z.IN_HEAD:cv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:fv(this,e);break;case Z.AFTER_HEAD:hv(this,e);break;case Z.IN_BODY:$v(this,e);break;case Z.IN_TABLE:wy(this,e);break;case Z.IN_TABLE_TEXT:ky(this,e);break;case Z.IN_CAPTION:jy(this,e);break;case Z.IN_COLUMN_GROUP:Ny(this,e);break;case Z.IN_TABLE_BODY:Iy(this,e);break;case Z.IN_ROW:Ry(this,e);break;case Z.IN_CELL:By(this,e);break;case Z.IN_SELECT:Hy(this,e);break;case Z.IN_SELECT_IN_TABLE:Wy(this,e);break;case Z.IN_TEMPLATE:Ky(this,e);break;case Z.AFTER_BODY:Yy(this,e);break;case Z.IN_FRAMESET:Qy(this,e);break;case Z.AFTER_FRAMESET:eb(this,e);break;case Z.AFTER_AFTER_BODY:nb(this,e);break;case Z.AFTER_AFTER_FRAMESET:ib(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?lb(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:tv(this,e);break;case Z.BEFORE_HTML:rv(this,e);break;case Z.BEFORE_HEAD:ov(this,e);break;case Z.IN_HEAD:lv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:pv(this,e);break;case Z.AFTER_HEAD:gv(this,e);break;case Z.IN_BODY:dy(this,e);break;case Z.TEXT:py(this,e);break;case Z.IN_TABLE:Ty(this,e);break;case Z.IN_TABLE_TEXT:ky(this,e);break;case Z.IN_CAPTION:My(this,e);break;case Z.IN_COLUMN_GROUP:Py(this,e);break;case Z.IN_TABLE_BODY:Ly(this,e);break;case Z.IN_ROW:zy(this,e);break;case Z.IN_CELL:Vy(this,e);break;case Z.IN_SELECT:Uy(this,e);break;case Z.IN_SELECT_IN_TABLE:Gy(this,e);break;case Z.IN_TEMPLATE:qy(this,e);break;case Z.AFTER_BODY:Xy(this,e);break;case Z.IN_FRAMESET:$y(this,e);break;case Z.AFTER_FRAMESET:tb(this,e);break;case Z.AFTER_AFTER_BODY:rb(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Z.INITIAL:tv(this,e);break;case Z.BEFORE_HTML:iv(this,e);break;case Z.BEFORE_HEAD:sv(this,e);break;case Z.IN_HEAD:dv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:mv(this,e);break;case Z.AFTER_HEAD:_v(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:fy(this,e);break;case Z.TEXT:my(this,e);break;case Z.IN_TABLE_TEXT:ky(this,e);break;case Z.IN_TEMPLATE:Jy(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:$_(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:yv(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:hy(this,e);break;case Z.IN_TABLE_TEXT:Dy(this,e);break;default:}}};function U_(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):uy(e,t),n}function W_(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 G_(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>=R_;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=K_(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function K_(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 q_(e,t,n){let r=Ng(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 J_(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 Y_(e,t){for(let n=0;n<L_;n++){let n=U_(e,t);if(!n)break;let r=W_(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=G_(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&q_(e,a,i),J_(e,r,n)}}function X_(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Z_(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Q_(e,t){e._appendCommentNode(t,e.document)}function $_(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 ev(e,t){e._setDocumentType(t);let n=t.forceQuirks?jg.QUIRKS:b_(t);y_(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function tv(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,jg.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function nv(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):iv(e,t)}function rv(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&iv(e,t)}function iv(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function av(e,t){switch(t.tagID){case J.HTML:$v(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:sv(e,t)}}function ov(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?sv(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function sv(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function cv(e,t){switch(t.tagID){case J.HTML:$v(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,Ig.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ig.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,Ig.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,Ig.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:dv(e,t)}}function lv(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:dv(e,t);break;case J.TEMPLATE:uv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function uv(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 dv(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function fv(e,t){switch(t.tagID){case J.HTML:$v(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:cv(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:mv(e,t)}}function pv(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:mv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function mv(e,t){let n=t.type===mg.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function hv(e,t){switch(t.tagID){case J.HTML:$v(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),cv(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:_v(e,t)}}function gv(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:_v(e,t);break;case J.TEMPLATE:uv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function _v(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,vv(e,t)}function vv(e,t){switch(t.type){case mg.CHARACTER:bv(e,t);break;case mg.WHITESPACE_CHARACTER:yv(e,t);break;case mg.COMMENT:X_(e,t);break;case mg.START_TAG:$v(e,t);break;case mg.END_TAG:dy(e,t);break;case mg.EOF:fy(e,t);break;default:}}function yv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function bv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function xv(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Sv(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Cv(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 wv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Tv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Fg.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function Ev(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Dv(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 Ov(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 kv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Ig.PLAINTEXT}function Av(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 jv(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(Y_(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 Mv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Nv(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(Y_(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Pv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Fv(e,t){e.treeAdapter.getDocumentMode(e.document)!==jg.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function Iv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lv(e){let t=hg(e,Ag.TYPE);return t!=null&&t.toLowerCase()===I_}function Rv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Lv(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function zv(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function Bv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Vv(e,t){t.tagName=q.IMG,t.tagID=J.IMG,Iv(e,t)}function Hv(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ig.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function Uv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ig.RAWTEXT)}function Wv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ig.RAWTEXT)}function Gv(e,t){e._switchToTextParsing(t,Ig.RAWTEXT)}function Kv(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 qv(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Jv(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function Yv(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function Xv(e,t){e._reconstructActiveFormattingElements(),k_(t),j_(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function Zv(e,t){e._reconstructActiveFormattingElements(),A_(t),j_(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function Qv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function $v(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:Mv(e,t);break;case J.A:jv(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:Tv(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:wv(e,t);break;case J.LI:case J.DD:case J.DT:Ov(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:Iv(e,t);break;case J.HR:Bv(e,t);break;case J.RB:case J.RTC:Jv(e,t);break;case J.RT:case J.RP:Yv(e,t);break;case J.PRE:case J.LISTING:Ev(e,t);break;case J.XMP:Uv(e,t);break;case J.SVG:Zv(e,t);break;case J.HTML:xv(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:cv(e,t);break;case J.BODY:Sv(e,t);break;case J.FORM:Dv(e,t);break;case J.NOBR:Nv(e,t);break;case J.MATH:Xv(e,t);break;case J.TABLE:Fv(e,t);break;case J.INPUT:Rv(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:zv(e,t);break;case J.IMAGE:Vv(e,t);break;case J.BUTTON:Av(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:Pv(e,t);break;case J.IFRAME:Wv(e,t);break;case J.SELECT:Kv(e,t);break;case J.OPTION:case J.OPTGROUP:qv(e,t);break;case J.NOEMBED:case J.NOFRAMES:Gv(e,t);break;case J.FRAMESET:Cv(e,t);break;case J.TEXTAREA:Hv(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?Gv(e,t):Qv(e,t);break;case J.PLAINTEXT:kv(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:Qv(e,t)}}function ey(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 ty(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,Xy(e,t))}function ny(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ry(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 iy(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function ay(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function oy(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function sy(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cy(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ly(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function uy(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 dy(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:Y_(e,t);break;case J.P:iy(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:ny(e,t);break;case J.LI:ay(e);break;case J.DD:case J.DT:oy(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:sy(e);break;case J.BR:ly(e);break;case J.BODY:ey(e,t);break;case J.HTML:ty(e,t);break;case J.FORM:ry(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:cy(e,t);break;case J.TEMPLATE:uv(e,t);break;default:uy(e,t)}}function fy(e,t){e.tmplInsertionModeStack.length>0?Jy(e,t):$_(e,t)}function py(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 my(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function hy(e,t){if(e.openElements.currentTagId!==void 0&&B_.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 mg.CHARACTER:Oy(e,t);break;case mg.WHITESPACE_CHARACTER:Dy(e,t);break}else Ey(e,t)}function gy(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function _y(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function vy(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,Ny(e,t)}function yy(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function by(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,Iy(e,t)}function xy(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Sy(e,t){Lv(t)?e._appendElement(t,K.HTML):Ey(e,t),t.ackSelfClosing=!0}function Cy(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function wy(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:by(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:cv(e,t);break;case J.COL:vy(e,t);break;case J.FORM:Cy(e,t);break;case J.TABLE:xy(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:yy(e,t);break;case J.INPUT:Sy(e,t);break;case J.CAPTION:gy(e,t);break;case J.COLGROUP:_y(e,t);break;default:Ey(e,t)}}function Ty(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:uv(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:Ey(e,t)}}function Ey(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,vv(e,t),e.fosterParentingEnabled=n}function Dy(e,t){e.pendingCharacterTokens.push(t)}function Oy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ky(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ey(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Ay=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function jy(e,t){let n=t.tagID;Ay.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,wy(e,t)):$v(e,t)}function My(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&&Ty(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:dy(e,t)}}function Ny(e,t){switch(t.tagID){case J.HTML:$v(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:cv(e,t);break;default:Fy(e,t)}}function Py(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:uv(e,t);break;case J.COL:break;default:Fy(e,t)}}function Fy(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function Iy(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,Ry(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,wy(e,t));break;default:wy(e,t)}}function Ly(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,Ty(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:Ty(e,t)}}function Ry(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,Iy(e,t));break;default:wy(e,t)}}function zy(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,Ly(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,Ly(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:Ty(e,t)}}function By(e,t){let n=t.tagID;Ay.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),Ry(e,t)):$v(e,t)}function Vy(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(),zy(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:dy(e,t)}}function Hy(e,t){switch(t.tagID){case J.HTML:$v(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:cv(e,t);break;default:}}function Uy(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:uv(e,t);break;default:}}function Wy(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)):Hy(e,t)}function Gy(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)):Uy(e,t)}function Ky(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:cv(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,wy(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,Ny(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,Iy(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Ry(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,$v(e,t)}}function qy(e,t){t.tagID===J.TEMPLATE&&uv(e,t)}function Jy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):$_(e,t)}function Yy(e,t){t.tagID===J.HTML?$v(e,t):Zy(e,t)}function Xy(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 Zy(e,t)}function Zy(e,t){e.insertionMode=Z.IN_BODY,vv(e,t)}function Qy(e,t){switch(t.tagID){case J.HTML:$v(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:cv(e,t);break;default:}}function $y(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 eb(e,t){switch(t.tagID){case J.HTML:$v(e,t);break;case J.NOFRAMES:cv(e,t);break;default:}}function tb(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function nb(e,t){t.tagID===J.HTML?$v(e,t):rb(e,t)}function rb(e,t){e.insertionMode=Z.IN_BODY,vv(e,t)}function ib(e,t){switch(t.tagID){case J.HTML:$v(e,t);break;case J.NOFRAMES:cv(e,t);break;default:}}function ab(e,t){t.chars=`�`,e._insertCharacters(t)}function ob(e,t){e._insertCharacters(t),e.framesetOk=!1}function sb(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 cb(e,t){if(O_(t))sb(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?k_(t):r===K.SVG&&(M_(t),A_(t)),j_(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function lb(e,t){if(t.tagID===J.P||t.tagID===J.BR){sb(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 ub=fb(`end`),db=fb(`start`);function fb(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 pb(e){let t=db(e),n=ub(e);if(t&&n)return{start:t,end:n}}var mb=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,hb=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),gb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _b(e,t){let n=jb(e),r=Wh(`type`,{handlers:{root:yb,element:bb,text:xb,comment:wb,doctype:Sb,raw:Tb},unknown:Eb}),i={parser:n?new H_(gb):H_.getFragmentParser(void 0,gb),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Db(i,db());let a=Fh(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&dm(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 vb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function yb(e,t){vb(e.children,t)}function bb(e,t){kb(e,t),vb(e.children,t),Ab(e,t)}function xb(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:mg.CHARACTER,chars:e.value,location:Mb(e)};Db(t,db(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Sb(e,t){let n={type:mg.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Mb(e)};Db(t,db(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Cb(e,t){t.stitches=!0;let n=Nb(e);`children`in e&&`children`in n&&(n.children=_b({type:`root`,children:e.children},t.options).children),wb({type:`comment`,value:{stitch:n}},t)}function wb(e,t){let n=e.value,r={type:mg.COMMENT,data:n,location:Mb(e)};Db(t,db(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Tb(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,Ob(t,db(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(mb,`<$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 Eb(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Cb(n,t);else{let e=``;throw hb.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 Db(e,t){Ob(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=Ig.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 Ob(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 kb(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ig.PLAINTEXT)return;Db(t,db(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Mh.html;i===Mh.html&&n===`svg`&&(i=Mh.svg);let a=Jh({...e,children:[]},{space:i===Mh.svg?`svg`:`html`}),o={type:mg.START_TAG,tagName:n,tagID:Ng(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Mb(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ab(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ig.includes(n)||t.parser.tokenizer.state===Ig.PLAINTEXT)return;Db(t,ub(e));let r={type:mg.END_TAG,tagName:n,tagID:Ng(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Mb(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ig.RCDATA||t.parser.tokenizer.state===Ig.RAWTEXT||t.parser.tokenizer.state===Ig.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ig.DATA)}function jb(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Mb(e){let t=db(e)||{line:void 0,column:void 0,offset:void 0},n=ub(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 Nb(e){return`children`in e?Pm({...e,children:[]}):Pm(e)}function Pb(e){return function(t,n){return _b(t,{...e,file:n})}}var Fb=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Ib={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Fb,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Fb],h2:[[`className`,`sr-only`]],img:[...Fb,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Fb,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Fb],table:[...Fb],ul:[...Fb,[`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(`.`)},Lb={}.hasOwnProperty;function Rb(e,t){let n={type:`root`,children:[]},r=zb({schema:t?{...Ib,...t}:Ib,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function zb(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Bb(e,n);case`doctype`:return Vb(e,n);case`element`:return Hb(e,n);case`root`:return Ub(e,n);case`text`:return Wb(e,n);default:}}}function Bb(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 Zb(r,t),r}}function Vb(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Zb(e,t),e}}function Hb(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Gb(e,t.children),i=Kb(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&&Lb.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 Zb(o,t),o}function Ub(e,t){let n={type:`root`,children:Gb(e,t.children)};return Zb(n,t),n}function Wb(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Zb(n,t),n}function Gb(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=zb(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Kb(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Lb.call(r,n)?r[n]:void 0,o=r&&Lb.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(Lb.call(s,l)){let t=s[l],n=qb(e,Qb(a,l),l,t);n??=qb(e,Qb(o,l),l,t),n!=null&&(c[l]=n)}if(i&&Lb.call(i,n)){let e=i[n];for(l in e)Lb.call(e,l)&&!Lb.call(c,l)&&(c[l]=e[l])}return c}function qb(e,t,n,r){return t?Array.isArray(r)?Jb(e,t,n,r):Yb(e,t,n,r):void 0}function Jb(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Yb(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Yb(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Xb(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 Xb(e,t,n){let r=e.schema.protocols&&Lb.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 Zb(e,t){let n=pb(t);t.data&&(e.data=Pm(t.data)),n&&(e.position=n)}function Qb(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 $b(e){return function(t){return Rb(t,e)}}function ex(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 tx=fx(/[A-Za-z]/),nx=fx(/[\dA-Za-z]/),rx=fx(/[#-'*+\--9=?A-Z^-~]/);function ix(e){return e!==null&&(e<32||e===127)}var ax=fx(/\d/),ox=fx(/[\dA-Fa-f]/),sx=fx(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function cx(e){return e!==null&&(e<0||e===32)}function lx(e){return e===-2||e===-1||e===32}var ux=fx(/\p{P}|\p{S}/u),dx=fx(/\s/);function fx(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function px(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function mx(e,t,n){let r=$p((n||{}).ignore||[]),i=hx(t),a=-1;for(;++a<i.length;)lm(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 hx(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([gx(e[0]),_x(e[1])])}return t}function gx(e){return typeof e==`string`?new RegExp(px(e),`g`):e}function _x(e){return typeof e==`function`?e:function(){return e}}var vx=`phrasing`,yx=[`autolink`,`link`,`image`,`label`];function bx(){return{transforms:[Ox],enter:{literalAutolink:Sx,literalAutolinkEmail:Cx,literalAutolinkHttp:Cx,literalAutolinkWww:Cx},exit:{literalAutolink:Dx,literalAutolinkEmail:Ex,literalAutolinkHttp:wx,literalAutolinkWww:Tx}}}function xx(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:vx,notInConstruct:yx},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:vx,notInConstruct:yx},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:vx,notInConstruct:yx}]}}function Sx(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Cx(e){this.config.enter.autolinkProtocol.call(this,e)}function wx(e){this.config.exit.autolinkProtocol.call(this,e)}function Tx(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 Ex(e){this.config.exit.autolinkEmail.call(this,e)}function Dx(e){this.exit(e)}function Ox(e){mx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kx],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ax]],{ignore:[`link`,`linkReference`]})}function kx(e,t,n,r,i){let a=``;if(!Nx(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!jx(n)))return!1;let o=Mx(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 Ax(e,t,n,r){return!Nx(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function jx(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 Mx(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=ex(e,`(`),a=ex(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 Nx(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||dx(n)||ux(n))&&(!t||n!==47)}function Px(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}Wx.peek=Ux;function Fx(){this.buffer()}function Ix(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Lx(){this.buffer()}function Rx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function zx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Px(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bx(e){this.exit(e)}function Vx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Px(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hx(e){this.exit(e)}function Ux(){return`[`}function Wx(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 Gx(){return{enter:{gfmFootnoteCallString:Fx,gfmFootnoteCall:Ix,gfmFootnoteDefinitionLabelString:Lx,gfmFootnoteDefinition:Rx},exit:{gfmFootnoteCallString:zx,gfmFootnoteCall:Bx,gfmFootnoteDefinitionLabelString:Vx,gfmFootnoteDefinition:Hx}}}function Kx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wx},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?Jx
|
|
64
|
-
`)}function
|
|
65
|
-
`&&
|
|
66
|
-
`}function
|
|
61
|
+
`)}}o+=a.decode();let s=o.trim();s&&n?.(JSON.parse(s))}async function cf(e){return(await Cd(`/api/codewiki/report/${encodeURIComponent(e)}`,{method:`DELETE`})).json()}var lf=(0,d.createContext)(null);function uf(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 df(){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 ff(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 pf(e,t,{replace:n=!1,projectPath:r=``}={}){let i=ff(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 mf={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,sessions:[],projectCwd:null,history:[],skills:[],gitInfo:null,gitBatch:{},codewikiProjectPath:``,versionInfo:null,updateStatus:null};function hf(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 gf(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 _f(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 vf(e){return e.length===0?[{type:`text`,text:``,isStreaming:!1}]:e[e.length-1].type===`text`?e:[...e,{type:`text`,text:``,isStreaming:!1}]}function yf(e,t){let n=vf(e),r=n[n.length-1];return[...n.slice(0,-1),{...r,text:(r.text||``)+t,isStreaming:!0}]}function bf(e){return String(e||``).replace(/(?:^|\n)\[plan\]\s+Step\s+\d+\/\d+\s+->[^\n]*\n?/g,``)}function xf(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 Sf(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 Cf(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 wf(e){let t=String(e||``).trim().toLowerCase();return[`/yes`,`/plan approve`,`/no`,`/reject`].includes(t)||t.startsWith(`/edit `)}function Tf(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 Ef(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 Df(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 Of(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 kf({children:e}){let[t,n]=(0,d.useState)(mf),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:xf(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 Ud(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 Wd(e);return n?.error?null:n}catch{return null}},[]),x=(0,d.useCallback)(async()=>{try{let e=await Kd();u({skills:Array.isArray(e)?e:[]})}catch{}},[u]),S=(0,d.useCallback)(async()=>{try{let e=await Ad();if(!Array.isArray(e)||!e.length){let e=await jd();Array.isArray(e)&&e.length&&u({messages:e});return}let t=[],n=null;for(let r of e)if(r.role===`user`){if(wf(r.content))continue;n=null;let e=hf(r.content||``);t.push({id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}-u${t.length}`,role:`you`,segments:[{type:`text`,text:e,isStreaming:!1}],skillBadges:[],fileChanges:[]})}else if(r.role===`assistant`){if(Array.isArray(r.planTranscript)&&r.planTranscript.length){n=null;for(let e of r.planTranscript)t.push(Of(e,t.length));continue}let e=Ef(r.content);if(e?.length){n=null;let r=[...e].reverse().find(e=>e.role===`summarizer`)||e[e.length-1];t.push(Df({...r,step:1,total:1,role:r.role||`summarizer`},t.length));continue}n||(n={id:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}-a${t.length}`,role:`general`,segments:[],skillBadges:[],fileChanges:[]},t.push(n)),r.content&&n.segments.push({type:`text`,text:r.content,isStreaming:!1}),r.toolCalls&&r.toolCalls.length&&n.segments.push({type:`tools`,cards:r.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(r.role===`tool`&&n){let e=r.toolCallId||r.tool_call_id;if(!e)continue;for(let t of n.segments){if(t.type!==`tools`)continue;let n=t.cards.find(t=>t.id===e);if(n){r.toolSummary&&(n.summary=r.toolSummary),r.toolDurationMs!=null&&(n.durationMs=r.toolDurationMs),r.toolStatus===`error`&&(n.status=`error`),r.toolStatus===`blocked`&&(n.status=`blocked`),r.content&&(n.result=r.content);break}}}u({messages:t})}catch{}},[u]),C=(0,d.useCallback)(e=>{if(!e?.type||uf(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:xf(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=bf(e.text);c&&t&&n(e=>({...e,messages:e.messages.map(e=>e.id===c?{...e,segments:yf(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=bf(e.text),r=vf(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:_f(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:gf(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:gf(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:gf(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:gf(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=Tf(e);i=r.id,s.current.set(t,i),n(e=>({...e,messages:[...xf(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:[...xf(t.messages,[`plan-waiting-review`,`waiting-response`]).filter(e=>!Sf(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:xf(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:`system`,text:`Context auto-compacted (${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&&!Sf(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:xf(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`&&pf(`chat`,i.sessionId,{replace:!0});break}case`mode:changed`:{let t=e;u({runtimeState:{...r.current.runtimeState,mode:t.mode,...t}});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`&&pf(`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=df();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||uf(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)pf(`chat`,t.sessionId,{replace:!0});else if(e.view===`codewiki`){let n=e.projectPath||t?.cwd||``;u({currentView:`codewiki`,codewikiProjectPath:n}),n&&pf(`codewiki`,null,{replace:!0,projectPath:n})}await S(),v(),y(),x(),h();try{u({versionInfo:await wd()})}catch{}w()})();let e=async()=>{let e=df();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&&Cf(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`}),pf(`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&&pf(`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&&pf(`chat`,e.sessionId),await m(),n(e=>({...e,messages:[]})),y())}catch{}},openProject:async(e,t={})=>{try{let i=await Wd(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`?pf(`codewiki`,null,{projectPath:o}):i.sessionId&&pf(`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`&&pf(e),e===`codewiki`&&pf(e,null,{projectPath:n}),e===`chat`){let e=r.current.runtimeState;pf(`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}),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)(lf.Provider,{value:T,children:e})}function Af(){let e=(0,d.useContext)(lf);if(!e)throw Error(`useApp must be used within AppProvider`);return e}var jf=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Mf=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Nf=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Pf=e=>{let t=Nf(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ff={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`},If=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Lf=(0,d.createContext)({}),Rf=()=>(0,d.useContext)(Lf),zf=(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=``}=Rf()??{},h=r??f?Number(n??u)*24/Number(t??l):n??u;return(0,d.createElement)(`svg`,{ref:c,...Ff,width:t??l??Ff.width,height:t??l??Ff.height,stroke:e??p,strokeWidth:h,className:jf(`lucide`,m,i),...!a&&!If(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Bf=(e,t)=>{let n=(0,d.forwardRef)(({className:n,...r},i)=>(0,d.createElement)(zf,{ref:i,iconNode:t,className:jf(`lucide-${Mf(Pf(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Pf(e),n},Vf=Bf(`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=Bf(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Uf=Bf(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Wf=Bf(`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=Bf(`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=Bf(`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=Bf(`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=Bf(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Yf=Bf(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Xf=Bf(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Zf=Bf(`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=Bf(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),$f=Bf(`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=Bf(`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=Bf(`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=Bf(`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`}]]),rp=Bf(`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`}]]),ip=Bf(`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`}]]),ap=Bf(`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`}]]),op=Bf(`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`}]]),sp=Bf(`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`}]]),cp=Bf(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),lp=Bf(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),up=Bf(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),dp=Bf(`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`}]]),fp=Bf(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),pp=Bf(`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`}]]),mp=Bf(`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`}]]),hp=Bf(`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`}]]),gp=Bf(`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`}]]),_p=Bf(`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`}]]),vp=Bf(`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`}]]),yp=Bf(`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`}]]),bp=Bf(`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`}]]),xp=Bf(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Sp=Bf(`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`}]]),Cp=Bf(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function wp({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 Tp({...e}){return(0,_.jsx)(L,{"data-slot":`popover`,...e})}function Ep({...e}){return(0,_.jsx)(_o,{"data-slot":`popover-trigger`,...e})}function Dp({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 Op=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,kp=Hl,Ap=(e,t)=>n=>{if(t?.variants==null)return kp(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=Op(t)||Op(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 kp(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)},jp=Ap(`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 Mp({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(jp({variant:t,size:n,className:e})),...i})}function Np({...e}){return(0,_.jsx)(Zn,{"data-slot":`dialog`,...e})}function Pp({...e}){return(0,_.jsx)(Qn,{"data-slot":`dialog-portal`,...e})}function Fp({className:e,...t}){return(0,_.jsx)($n,{"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 Ip({className:e,children:t,...n}){return(0,_.jsxs)(Pp,{"data-slot":`dialog-portal`,children:[(0,_.jsx)(Fp,{}),(0,_.jsx)(er,{"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 Lp({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)(rr,{"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)(Cp,{}),(0,_.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})}function Rp({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)(rr,{asChild:!0,children:(0,_.jsx)(Mp,{variant:`outline`,children:`Close`})})]})}function zp({className:e,...t}){return(0,_.jsx)(tr,{"data-slot":`dialog-title`,className:B(`text-base font-semibold text-(--text-primary)`,e),...t})}function Bp({className:e,...t}){return(0,_.jsx)(nr,{"data-slot":`dialog-description`,className:B(`text-sm text-(--text-secondary)`,e),...t})}function Vp({open:e,title:t,description:n,confirmLabel:r,cancelLabel:i,loading:a=!1,onOpenChange:o,onConfirm:s}){return(0,_.jsx)(Np,{open:e,onOpenChange:e=>!a&&o?.(e),children:(0,_.jsxs)(Ip,{className:`sm:max-w-[380px]`,children:[(0,_.jsxs)(Lp,{showCloseButton:!a,children:[(0,_.jsx)(zp,{children:t}),(0,_.jsx)(Bp,{className:`leading-6`,children:n})]}),(0,_.jsxs)(Rp,{children:[(0,_.jsx)(Mp,{type:`button`,variant:`outline`,disabled:a,onClick:()=>o?.(!1),children:i||V(`cancel`)}),(0,_.jsx)(Mp,{type:`button`,variant:`destructive`,disabled:a,onClick:s,children:a?V(`deleting`):r||V(`delete`)})]})]})})}function Hp(e){return e?.projectDir||`unknown`}function Up(e){return!e||e===`unknown`?V(`unknownProject`):String(e).split(/[/\\]/).filter(Boolean).pop()||e}function Wp({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`})})}function Gp({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=Array.isArray(e)?e:[],E=T.find(e=>e.id===t),D=E?Hp(E):null,O=new Map;for(let e of T){let t=Hp(e);O.has(t)||O.set(t,[]),O.get(t).push(e)}let ee=e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},te=typeof document<`u`&&document.documentElement.dataset.theme===`dark`,k=async(e,t)=>{if(e.stopPropagation(),t&&t!==`unknown`&&t!==D&&g){await g(t,{view:`codewiki`});return}h?.(`codewiki`,{projectPath:t})},A=async(e,t)=>{if(e.stopPropagation(),!(!t||t===`unknown`)){if(t===D){await n?.();return}await g?.(t,{view:`chat`})}};return(0,_.jsxs)(`aside`,{className:`w-[260px] shrink-0 border-r border-(--border-default) 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)(fp,{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)(op,{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)(Sp,{size:15,strokeWidth:2,className:`text-(--text-secondary) shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:V(`souls`)})]}),(0,_.jsx)(wp,{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(O.entries()).map(([e,n])=>{let i=y.has(e)||O.size===1,a=l?.[e],o=e===D,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:()=>ee(e),children:[(0,_.jsx)(rp,{size:13,className:`shrink-0`}),(0,_.jsx)(`span`,{className:`truncate flex-1`,children:Up(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`)} ${Up(e)}`,onClick:t=>A(t,e),children:(0,_.jsx)(fp,{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`)} ${Up(e)}`,onClick:t=>k(t,e),children:(0,_.jsx)(Wf,{size:13,strokeWidth:1.9})}),a?.isGit&&(0,_.jsx)(Wp,{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:()=>ee(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`,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)(Tp,{children:[(0,_.jsx)(Ep,{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)(Dp,{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)}),T.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-1.5 border-t border-(--border-default)`,children:[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)(cp,{size:15,strokeWidth:1.8})}),(0,_.jsxs)(Tp,{children:[(0,_.jsx)(Ep,{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)(ap,{size:15,strokeWidth:1.8})})}),(0,_.jsx)(Dp,{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(te?`lightMode`:`darkMode`),"aria-label":V(te?`switchToLightMode`:`switchToDarkMode`),children:te?(0,_.jsx)(dp,{size:15,strokeWidth:1.8}):(0,_.jsx)(bp,{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)(_p,{size:15,strokeWidth:1.8})})]})]}),(0,_.jsx)(Vp,{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 Kp(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 qp(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 Jp={read:`📖`,edit:`✏️`,write:`📝`,delete:`🗑️`,run:`⚙️`,grep:`🔍`,glob:`📂`,list:`📁`,web_fetch:`🌐`,web_search:`🔎`,default:`🔧`};function Yp(e){let t=String(e).match(/^(\w+)/);return t?t[1]:e}function Xp(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 Zp(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 Qp={running:`bg-[var(--accent-blue)] animate-pulse`,done:`bg-[var(--accent-green)]`,error:`bg-[var(--accent-red)]`,blocked:`bg-[var(--accent-orange)]`};function $p({card:e}){let[t,n]=(0,d.useState)(!1),r=Yp(e.name),i=Jp[r]||Jp.default,a=Xp(e.arguments,r),o=a&&!String(e.name).includes(`(`)?`${e.name}(${a})`:e.name,s=[];return e.arguments!=null&&e.arguments!==``&&s.push([`Arguments`,Zp(e.arguments)]),e.summary&&s.push([`Summary`,String(e.summary)]),e.result&&s.push([`Result`,Zp(e.result)]),(0,_.jsxs)(`div`,{className:B(`border border-[var(--border-default)] rounded-lg 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:Kp(e.durationMs)}),(0,_.jsx)(`span`,{className:B(`w-1.5 h-1.5 rounded-full shrink-0`,Qp[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 em=(function(e){if(e==null)return am;if(typeof e==`function`)return im(e);if(typeof e==`object`)return Array.isArray(e)?tm(e):nm(e);if(typeof e==`string`)return rm(e);throw Error(`Expected function, string, or object as test`)});function tm(e){let t=[],n=-1;for(;++n<e.length;)t[n]=em(e[n]);return im(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function nm(e){let t=e;return im(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function rm(e){return im(t);function t(t){return t&&t.type===e}}function im(e){return t;function t(t,n,r){return!!(om(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function am(){return!0}function om(e){return typeof e==`object`&&!!e&&`type`in e}function sm(e){return e}var cm=[],lm=`skip`;function um(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=em(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 (`+sm(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=cm,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=dm(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 dm(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?cm:[e]}function fm(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),um(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 pm={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function mm({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=pm.indicator,imageBlockPolicy:c=pm.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=wm(e,t,n,r,i,a,o,s,c);bm(l),fm(l,u)}}function hm(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 gm(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var _m=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),vm=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function ym(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=hm(e,n);if(!o||vm.has(o.protocol)||!(_m.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=gm(e);return o&&t.some(e=>{let t=hm(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 bm(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)bm(t)}}var xm=Symbol(`node-seen`);function Sm(e,t,n){return t===pm.remove?{type:`remove`}:t===pm.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 Cm(e,t,n){if(t===pm.remove)return{type:`remove`};if(t===pm.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 wm=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[xm])return!0;if(u.tagName===`a`){let n=ym(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[xm]=!0,fm(u,l),f&&typeof d==`number`){let e=Sm(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[lm,d];f.children[d]=e.element}return lm}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=ym(u.properties.src,n,e,r,!0,i);if(t===null){if(u[xm]=!0,fm(u,l),f&&typeof d==`number`){let e=Cm(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[lm,d];f.children[d]=e.element}return lm}else return u.properties.src=t,!0}return!0};return l},Tm=typeof self==`object`?self:globalThis,Em=(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 Tm[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 Tm[a](o),i)};return r},Dm=e=>Em(new Map,e)(0),Om=``,{toString:km}={},{keys:Am}=Object,jm=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=km.call(e).slice(8,-1);switch(n){case`Array`:return[1,Om];case`Object`:return[2,Om];case`Date`:return[3,Om];case`RegExp`:return[4,Om];case`Map`:return[5,Om];case`Set`:return[6,Om];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Mm=([e,t])=>e===0&&(t===`function`||t===`symbol`),Nm=(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]=jm(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 Am(r))(e||!Mm(jm(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||!(Mm(jm(n))||Mm(jm(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Mm(jm(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Pm=(e,{json:t,lossy:n}={})=>{let r=[];return Nm(!(t||n),!!t,new Map,r)(e),r},Fm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Dm(Pm(e,t)):structuredClone(e):(e,t)=>Dm(Pm(e,t)),Im=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Im.prototype.normal={},Im.prototype.property={},Im.prototype.space=void 0;function Lm(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Im(n,r,t)}function Rm(e){return e.toLowerCase()}var zm=class{constructor(e,t){this.attribute=t,this.property=e}};zm.prototype.attribute=``,zm.prototype.booleanish=!1,zm.prototype.boolean=!1,zm.prototype.commaOrSpaceSeparated=!1,zm.prototype.commaSeparated=!1,zm.prototype.defined=!1,zm.prototype.mustUseProperty=!1,zm.prototype.number=!1,zm.prototype.overloadedBoolean=!1,zm.prototype.property=``,zm.prototype.spaceSeparated=!1,zm.prototype.space=void 0;var Bm=e({boolean:()=>H,booleanish:()=>Hm,commaOrSpaceSeparated:()=>Km,commaSeparated:()=>Gm,number:()=>U,overloadedBoolean:()=>Um,spaceSeparated:()=>Wm}),Vm=0,H=qm(),Hm=qm(),Um=qm(),U=qm(),Wm=qm(),Gm=qm(),Km=qm();function qm(){return 2**++Vm}var Jm=Object.keys(Bm),Ym=class extends zm{constructor(e,t,n,r){let i=-1;if(super(e,t),Xm(this,`space`,r),typeof n==`number`)for(;++i<Jm.length;){let e=Jm[i];Xm(this,Jm[i],(n&Bm[e])===Bm[e])}}};Ym.prototype.defined=!0;function Xm(e,t,n){n&&(e[t]=n)}function Zm(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ym(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Rm(r)]=r,n[Rm(a.attribute)]=r}return new Im(t,n,e.space)}var Qm=Zm({properties:{ariaActiveDescendant:null,ariaAtomic:Hm,ariaAutoComplete:null,ariaBusy:Hm,ariaChecked:Hm,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:Wm,ariaCurrent:null,ariaDescribedBy:Wm,ariaDetails:null,ariaDisabled:Hm,ariaDropEffect:Wm,ariaErrorMessage:null,ariaExpanded:Hm,ariaFlowTo:Wm,ariaGrabbed:Hm,ariaHasPopup:null,ariaHidden:Hm,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wm,ariaLevel:U,ariaLive:null,ariaModal:Hm,ariaMultiLine:Hm,ariaMultiSelectable:Hm,ariaOrientation:null,ariaOwns:Wm,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Hm,ariaReadOnly:Hm,ariaRelevant:null,ariaRequired:Hm,ariaRoleDescription:Wm,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Hm,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 $m(e,t){return t in e?e[t]:t}function eh(e,t){return $m(e,t.toLowerCase())}var th=Zm({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Gm,acceptCharset:Wm,accessKey:Wm,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:Wm,autoFocus:H,autoPlay:H,blocking:Wm,capture:null,charSet:null,checked:H,cite:null,className:Wm,cols:U,colSpan:null,content:null,contentEditable:Hm,controls:H,controlsList:Wm,coords:U|Gm,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:Um,draggable:Hm,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:Wm,height:U,hidden:Um,high:U,href:null,hrefLang:null,htmlFor:Wm,httpEquiv:Wm,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:Wm,itemRef:Wm,itemScope:H,itemType:Wm,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,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:H,optimum:U,pattern:null,ping:Wm,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:Wm,required:H,reversed:H,rows:U,rowSpan:U,sandbox:Wm,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Hm,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:H,useMap:null,value:Hm,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Wm,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:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Hm,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:H,disableRemotePlayback:H,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:eh}),nh=Zm({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:Km,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:Wm,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:H,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:Gm,g2:Gm,glyphName:Gm,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:Km,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:Wm,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Km,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Km,rev:Km,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Km,requiredFeatures:Km,requiredFonts:Km,requiredFormats:Km,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:Km,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:Km,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:Km,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:$m}),rh=Zm({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()}}),ih=Zm({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:eh}),ah=Zm({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),oh={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`},sh=/[A-Z]/g,ch=/-[a-z]/g,lh=/^data[-\w.:]+$/i;function uh(e,t){let n=Rm(t),r=t,i=zm;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&lh.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ch,fh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ch.test(e)){let n=e.replace(sh,dh);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ym}return new i(r,t)}function dh(e){return`-`+e.toLowerCase()}function fh(e){return e.charAt(1).toUpperCase()}var ph=Lm([Qm,th,rh,ih,ah],`html`),mh=Lm([Qm,nh,rh,ih,ah],`svg`);function hh(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 gh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var _h=/[#.]/g;function vh(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){_h.lastIndex=i;let e=_h.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 yh(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function bh(e){return e.join(` `).trim()}function xh(e,t,n){let r=n?Dh(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=vh(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Sh(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Ch(e,o.properties,t,n)}for(let e of a)wh(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Sh(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 Ch(e,t,n,r){let i=uh(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?yh(r):i.commaSeparated?hh(r):i.commaOrSpaceSeparated?yh(hh(r).join(` `)):Th(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Eh(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Th(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function wh(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)wh(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?wh(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Th(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Rm(n)===Rm(t)))return!0}return n}function Eh(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Dh(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Oh=`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(`.`),kh=xh(ph,`div`),Ah=xh(mh,`g`,Oh);function jh(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=Mh(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=Mh(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 Mh(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 Nh={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/`},Ph={}.hasOwnProperty,Fh=Object.prototype;function Ih(e,t){let n=t||{};return Lh({file:n.file||void 0,location:!1,schema:n.space===`svg`?mh:ph,verbose:n.verbose||!1},e)}function Lh(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Bh(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:Rh(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=jh(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`},Bh(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Bh(e,r,n),n}default:return n=zh(e,t),n}}function Rh(e,t){let n=-1,r=[];for(;++n<t.length;){let i=Lh(e,t[n]);r.push(i)}return r}function zh(e,t){let n=e.schema;e.schema=t.namespaceURI===Nh.svg?mh:ph;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Ph.call(Fh,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Ah:kh)(t.tagName,i,Rh(e,t.childNodes));if(Bh(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Hh(r.startTag),o=r&&r.endTag&&Hh(r.endTag),s=Lh(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function Bh(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Vh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Vh(e,t,n){let r=Hh(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)Ph.call(n.attrs,i)&&(r[uh(e.schema,i).property]=Hh(n.attrs[i]));n.startTag;let a=Hh(n.startTag),o=n.endTag?Hh(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Hh(e){let t=Uh({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Uh({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Uh(e){return e.line&&e.column?e:void 0}var Wh={}.hasOwnProperty;function Gh(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Wh.call(t,e)){let n=String(t[e]);i=Wh.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 Kh={},qh={}.hasOwnProperty,Jh=Gh(`type`,{handlers:{root:Xh,element:tg,text:$h,comment:eg,doctype:Qh}});function Yh(e,t){let n=(t||Kh).space;return Jh(e,n===`svg`?mh:ph)}function Xh(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=rg(e.children,n,t),ig(e,n),n}function Zh(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=rg(e.children,n,t),ig(e,n),n}function Qh(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return ig(e,t),t}function $h(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return ig(e,t),t}function eg(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return ig(e,t),t}function tg(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=mh);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&qh.call(e.properties,a)){let t=ng(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Nh[o],childNodes:[],parentNode:null};return s.childNodes=rg(e.children,s,r),ig(e,s),e.tagName===`template`&&e.content&&(s.content=Zh(e.content,r)),s}function ng(e,t,n){let r=uh(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?gh(n):bh(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=Nh[r.space]}return i}function rg(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=Jh(e[r],n);a.parentNode=t,i.push(a)}return i}function ig(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 ag=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],og=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 sg={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function cg(e){return e>=55296&&e<=57343}function lg(e){return e>=56320&&e<=57343}function ug(e,t){return(e-55296)*1024+9216+t}function dg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function fg(e){return e>=64976&&e<=65007||og.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 pg=65536,mg=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=pg,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(lg(t))return this.pos++,this._addGap(),ug(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,cg(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){dg(e)?this._err(G.controlCharacterInInputStream):fg(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}},hg;(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`})(hg||={});function gg(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 _g=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))),vg=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 yg(e){return e>=55296&&e<=57343||e>1114111?65533:vg.get(e)??e}var bg;(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`})(bg||={});var xg=32,Sg;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Sg||={});function Cg(e){return e>=bg.ZERO&&e<=bg.NINE}function wg(e){return e>=bg.UPPER_A&&e<=bg.UPPER_F||e>=bg.LOWER_A&&e<=bg.LOWER_F}function Tg(e){return e>=bg.UPPER_A&&e<=bg.UPPER_Z||e>=bg.LOWER_A&&e<=bg.LOWER_Z||Cg(e)}function Eg(e){return e===bg.EQUALS||Tg(e)}var Dg;(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`})(Dg||={});var Og;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Og||={});var kg=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Dg.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Og.Strict}startEntity(e){this.decodeMode=e,this.state=Dg.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Dg.EntityStart:return e.charCodeAt(t)===bg.NUM?(this.state=Dg.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Dg.NamedEntity,this.stateNamedEntity(e,t));case Dg.NumericStart:return this.stateNumericStart(e,t);case Dg.NumericDecimal:return this.stateNumericDecimal(e,t);case Dg.NumericHex:return this.stateNumericHex(e,t);case Dg.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|xg)===bg.LOWER_X?(this.state=Dg.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Dg.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(Cg(r)||wg(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(Cg(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===bg.SEMI)this.consumed+=1;else if(this.decodeMode===Og.Strict)return 0;return this.emitCodePoint(yg(this.result),this.consumed),this.errors&&(e!==bg.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Sg.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=Ag(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Og.Attribute&&(i===0||Eg(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Sg.VALUE_LENGTH)>>14,i!==0){if(a===bg.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Og.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]&Sg.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]&~Sg.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Dg.NamedEntity:return this.result!==0&&(this.decodeMode!==Og.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Dg.NumericDecimal:return this.emitNumericEntity(0,2);case Dg.NumericHex:return this.emitNumericEntity(0,3);case Dg.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Dg.EntityStart:return 0}}};function Ag(e,t,n,r){let i=(t&Sg.BRANCH_LENGTH)>>7,a=t&Sg.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 jg;(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`})(jg||={});var Mg;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Mg||={});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 Ng=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 Pg(e){return Ng.get(e)??J.UNKNOWN}var Y=J,Fg={[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},Ig=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 Lg={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function Rg(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function zg(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Bg(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function Vg(e){return Bg(e)||zg(e)}function Hg(e){return Vg(e)||Rg(e)}function Ug(e){return e+32}function Wg(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function Gg(e){return Wg(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function Kg(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:cg(e)?G.surrogateCharacterReference:fg(e)?G.noncharacterCharacterReference:dg(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var qg=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 mg(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new kg(_g,(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=Kg(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:hg.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:hg.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:hg.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:hg.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(gg(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=Pg(e.tagName),e.type===hg.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 hg.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case hg.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case hg.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:hg.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=Wg(e)?hg.WHITESPACE_CHARACTER:e===W.NULL?hg.NULL_CHARACTER:hg.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(hg.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Og.Attribute:Og.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(Vg(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(Vg(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(zg(e)?Ug(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){Vg(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){Vg(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){Vg(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:Vg(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){Vg(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(sg.SCRIPT,!1)&&Gg(this.preprocessor.peek(sg.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<sg.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(sg.SCRIPT,!1)&&Gg(this.preprocessor.peek(sg.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<sg.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(zg(e)?Ug(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(sg.DASH_DASH,!0)?(this._createCommentToken(sg.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(sg.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(sg.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(sg.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(sg.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(zg(e))this._createDoctypeToken(String.fromCharCode(Ug(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(zg(e)?Ug(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(sg.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(sg.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()&&Hg(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Hg(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},Jg=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),Yg=new Set([...Jg,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),Xg=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),Zg=new Set([...Xg,J.OL,J.UL]),Qg=new Set([...Xg,J.BUTTON]),$g=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),e_=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),t_=new Set([J.TR,J.TEMPLATE,J.HTML]),n_=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),r_=new Set([J.TABLE,J.TEMPLATE,J.HTML]),i_=new Set([J.TD,J.TH]),a_=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(Ig,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(i_,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(r_,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(n_,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(t_,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(e_.has(r))return!1;break;case K.MATHML:if($g.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Xg)}hasInListItemScope(e){return this.hasInDynamicScope(e,Zg)}hasInButtonScope(e){return this.hasInDynamicScope(e,Qg)}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(Ig.has(t))return!0;if(Xg.has(t))return!1;break;case K.SVG:if(e_.has(t))return!1;break;case K.MATHML:if($g.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&&Jg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Yg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Yg.has(this.currentTagId);)this.pop()}},o_=3,s_;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(s_||={});var c_={type:s_.Marker},l_=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===s_.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<o_)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<o_)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>=o_&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(c_)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:s_.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:s_.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(c_);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===s_.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===s_.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===s_.Element&&t.element===e)}},u_={createDocument(){return{nodeName:`#document`,mode:Mg.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};u_.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(u_.isTextNode(n)){n.value+=t;return}}u_.appendChild(e,u_.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&u_.isTextNode(r)?r.value+=t:u_.insertBefore(e,u_.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}}},d_=`html`,f_=`about:legacy-compat`,p_=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,m_=`+//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(`,`),h_=[...m_,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],g_=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),__=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],v_=[...__,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function y_(e,t){return t.some(t=>e.startsWith(t))}function b_(e){return e.name===d_&&e.publicId===null&&(e.systemId===null||e.systemId===f_)}function x_(e){if(e.name!==d_)return Mg.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===p_)return Mg.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),g_.has(n))return Mg.QUIRKS;let e=t===null?h_:m_;if(y_(n,e))return Mg.QUIRKS;if(e=t===null?__:v_,y_(n,e))return Mg.LIMITED_QUIRKS}return Mg.NO_QUIRKS}var S_={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},C_=`definitionurl`,w_=`definitionURL`,T_=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])),E_=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}]]),D_=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])),O_=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 k_(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===jg.COLOR||e===jg.SIZE||e===jg.FACE)||O_.has(t)}function A_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===C_){e.attrs[t].name=w_;break}}function j_(e){for(let t=0;t<e.attrs.length;t++){let n=T_.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function M_(e){for(let t=0;t<e.attrs.length;t++){let n=E_.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 N_(e){let t=D_.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Pg(e.tagName))}function P_(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function F_(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===jg.ENCODING){let t=n[e].value.toLowerCase();return t===S_.TEXT_HTML||t===S_.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function I_(e,t,n,r){return(!r||r===K.HTML)&&F_(e,t,n)||(!r||r===K.MATHML)&&P_(e,t)}var L_=`hidden`,R_=8,z_=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 B_={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},V_=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),H_={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:u_,onParseError:null},U_=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={...H_,...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 qg(this.options,this),this.activeFormattingElements=new l_(this.treeAdapter),this.fragmentContextID=n?Pg(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new a_(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={...H_,...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??B_,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=Lg.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=Lg.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=Lg.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=Lg.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=Lg.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===hg.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 hg.CHARACTER:this.onCharacter(e);break;case hg.NULL_CHARACTER:this.onNullCharacter(e);break;case hg.COMMENT:this.onComment(e);break;case hg.DOCTYPE:this.onDoctype(e);break;case hg.START_TAG:this._processStartTag(e);break;case hg.END_TAG:this.onEndTag(e);break;case hg.EOF:this.onEof(e);break;case hg.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return I_(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===s_.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 V_.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 Fg[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){sb(this,e);return}switch(this.insertionMode){case Z.INITIAL:nv(this,e);break;case Z.BEFORE_HTML:av(this,e);break;case Z.BEFORE_HEAD:cv(this,e);break;case Z.IN_HEAD:fv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:hv(this,e);break;case Z.AFTER_HEAD:vv(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:xv(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:gy(this,e);break;case Z.IN_TABLE_TEXT:ky(this,e);break;case Z.IN_COLUMN_GROUP:Iy(this,e);break;case Z.AFTER_BODY:Qy(this,e);break;case Z.AFTER_AFTER_BODY:ib(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ob(this,e);return}switch(this.insertionMode){case Z.INITIAL:nv(this,e);break;case Z.BEFORE_HTML:av(this,e);break;case Z.BEFORE_HEAD:cv(this,e);break;case Z.IN_HEAD:fv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:hv(this,e);break;case Z.AFTER_HEAD:vv(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:gy(this,e);break;case Z.IN_COLUMN_GROUP:Iy(this,e);break;case Z.AFTER_BODY:Qy(this,e);break;case Z.AFTER_AFTER_BODY:ib(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Z_(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:Z_(this,e);break;case Z.IN_TABLE_TEXT:Ay(this,e);break;case Z.AFTER_BODY:Q_(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:$_(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:tv(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:Ay(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)?lb(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:nv(this,e);break;case Z.BEFORE_HTML:rv(this,e);break;case Z.BEFORE_HEAD:ov(this,e);break;case Z.IN_HEAD:lv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:pv(this,e);break;case Z.AFTER_HEAD:gv(this,e);break;case Z.IN_BODY:ey(this,e);break;case Z.IN_TABLE:Ty(this,e);break;case Z.IN_TABLE_TEXT:Ay(this,e);break;case Z.IN_CAPTION:My(this,e);break;case Z.IN_COLUMN_GROUP:Py(this,e);break;case Z.IN_TABLE_BODY:Ly(this,e);break;case Z.IN_ROW:zy(this,e);break;case Z.IN_CELL:Vy(this,e);break;case Z.IN_SELECT:Uy(this,e);break;case Z.IN_SELECT_IN_TABLE:Gy(this,e);break;case Z.IN_TEMPLATE:qy(this,e);break;case Z.AFTER_BODY:Xy(this,e);break;case Z.IN_FRAMESET:$y(this,e);break;case Z.AFTER_FRAMESET:tb(this,e);break;case Z.AFTER_AFTER_BODY:rb(this,e);break;case Z.AFTER_AFTER_FRAMESET:ab(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?ub(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:nv(this,e);break;case Z.BEFORE_HTML:iv(this,e);break;case Z.BEFORE_HEAD:sv(this,e);break;case Z.IN_HEAD:uv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:mv(this,e);break;case Z.AFTER_HEAD:_v(this,e);break;case Z.IN_BODY:fy(this,e);break;case Z.TEXT:my(this,e);break;case Z.IN_TABLE:Ey(this,e);break;case Z.IN_TABLE_TEXT:Ay(this,e);break;case Z.IN_CAPTION:Ny(this,e);break;case Z.IN_COLUMN_GROUP:Fy(this,e);break;case Z.IN_TABLE_BODY:Ry(this,e);break;case Z.IN_ROW:By(this,e);break;case Z.IN_CELL:Hy(this,e);break;case Z.IN_SELECT:Wy(this,e);break;case Z.IN_SELECT_IN_TABLE:Ky(this,e);break;case Z.IN_TEMPLATE:Jy(this,e);break;case Z.AFTER_BODY:Zy(this,e);break;case Z.IN_FRAMESET:eb(this,e);break;case Z.AFTER_FRAMESET:nb(this,e);break;case Z.AFTER_AFTER_BODY:ib(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Z.INITIAL:nv(this,e);break;case Z.BEFORE_HTML:av(this,e);break;case Z.BEFORE_HEAD:cv(this,e);break;case Z.IN_HEAD:fv(this,e);break;case Z.IN_HEAD_NO_SCRIPT:hv(this,e);break;case Z.AFTER_HEAD:vv(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:py(this,e);break;case Z.TEXT:hy(this,e);break;case Z.IN_TABLE_TEXT:Ay(this,e);break;case Z.IN_TEMPLATE:Yy(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:ev(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:bv(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:gy(this,e);break;case Z.IN_TABLE_TEXT:Oy(this,e);break;default:}}};function W_(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):dy(e,t),n}function G_(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 K_(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>=z_;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=q_(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function q_(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 J_(e,t,n){let r=Pg(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 Y_(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 X_(e,t){for(let n=0;n<R_;n++){let n=W_(e,t);if(!n)break;let r=G_(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=K_(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&J_(e,a,i),Y_(e,r,n)}}function Z_(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Q_(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $_(e,t){e._appendCommentNode(t,e.document)}function ev(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 tv(e,t){e._setDocumentType(t);let n=t.forceQuirks?Mg.QUIRKS:x_(t);b_(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function nv(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Mg.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function rv(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):av(e,t)}function iv(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&av(e,t)}function av(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function ov(e,t){switch(t.tagID){case J.HTML:ey(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:cv(e,t)}}function sv(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?cv(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function cv(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function lv(e,t){switch(t.tagID){case J.HTML:ey(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,Lg.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Lg.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,Lg.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,Lg.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:fv(e,t)}}function uv(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:fv(e,t);break;case J.TEMPLATE:dv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function dv(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 fv(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function pv(e,t){switch(t.tagID){case J.HTML:ey(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:lv(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:hv(e,t)}}function mv(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:hv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function hv(e,t){let n=t.type===hg.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function gv(e,t){switch(t.tagID){case J.HTML:ey(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),lv(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:vv(e,t)}}function _v(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:vv(e,t);break;case J.TEMPLATE:dv(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function vv(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,yv(e,t)}function yv(e,t){switch(t.type){case hg.CHARACTER:xv(e,t);break;case hg.WHITESPACE_CHARACTER:bv(e,t);break;case hg.COMMENT:Z_(e,t);break;case hg.START_TAG:ey(e,t);break;case hg.END_TAG:fy(e,t);break;case hg.EOF:py(e,t);break;default:}}function bv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function xv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Sv(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Cv(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function wv(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 Tv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Ev(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ig.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function Dv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ov(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 kv(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 Av(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Lg.PLAINTEXT}function jv(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 Mv(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(X_(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 Nv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Pv(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(X_(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Fv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Iv(e,t){e.treeAdapter.getDocumentMode(e.document)!==Mg.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function Lv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Rv(e){let t=gg(e,jg.TYPE);return t!=null&&t.toLowerCase()===L_}function zv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Rv(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Bv(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function Vv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Hv(e,t){t.tagName=q.IMG,t.tagID=J.IMG,Lv(e,t)}function Uv(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lg.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function Wv(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lg.RAWTEXT)}function Gv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lg.RAWTEXT)}function Kv(e,t){e._switchToTextParsing(t,Lg.RAWTEXT)}function qv(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 Jv(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Yv(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function Xv(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function Zv(e,t){e._reconstructActiveFormattingElements(),A_(t),M_(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function Qv(e,t){e._reconstructActiveFormattingElements(),j_(t),M_(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function $v(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function ey(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:Nv(e,t);break;case J.A:Mv(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:Ev(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:Tv(e,t);break;case J.LI:case J.DD:case J.DT:kv(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:Lv(e,t);break;case J.HR:Vv(e,t);break;case J.RB:case J.RTC:Yv(e,t);break;case J.RT:case J.RP:Xv(e,t);break;case J.PRE:case J.LISTING:Dv(e,t);break;case J.XMP:Wv(e,t);break;case J.SVG:Qv(e,t);break;case J.HTML:Sv(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:lv(e,t);break;case J.BODY:Cv(e,t);break;case J.FORM:Ov(e,t);break;case J.NOBR:Pv(e,t);break;case J.MATH:Zv(e,t);break;case J.TABLE:Iv(e,t);break;case J.INPUT:zv(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:Bv(e,t);break;case J.IMAGE:Hv(e,t);break;case J.BUTTON:jv(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:Fv(e,t);break;case J.IFRAME:Gv(e,t);break;case J.SELECT:qv(e,t);break;case J.OPTION:case J.OPTGROUP:Jv(e,t);break;case J.NOEMBED:case J.NOFRAMES:Kv(e,t);break;case J.FRAMESET:wv(e,t);break;case J.TEXTAREA:Uv(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?Kv(e,t):$v(e,t);break;case J.PLAINTEXT:Av(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:$v(e,t)}}function ty(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 ny(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,Zy(e,t))}function ry(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function iy(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 ay(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function oy(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function sy(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function cy(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ly(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function uy(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function dy(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 fy(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:X_(e,t);break;case J.P:ay(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:ry(e,t);break;case J.LI:oy(e);break;case J.DD:case J.DT:sy(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:cy(e);break;case J.BR:uy(e);break;case J.BODY:ty(e,t);break;case J.HTML:ny(e,t);break;case J.FORM:iy(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:ly(e,t);break;case J.TEMPLATE:dv(e,t);break;default:dy(e,t)}}function py(e,t){e.tmplInsertionModeStack.length>0?Yy(e,t):ev(e,t)}function my(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 hy(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function gy(e,t){if(e.openElements.currentTagId!==void 0&&V_.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 hg.CHARACTER:ky(e,t);break;case hg.WHITESPACE_CHARACTER:Oy(e,t);break}else Dy(e,t)}function _y(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function vy(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function yy(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,Py(e,t)}function by(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function xy(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,Ly(e,t)}function Sy(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Cy(e,t){Rv(t)?e._appendElement(t,K.HTML):Dy(e,t),t.ackSelfClosing=!0}function wy(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ty(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:xy(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:lv(e,t);break;case J.COL:yy(e,t);break;case J.FORM:wy(e,t);break;case J.TABLE:Sy(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:by(e,t);break;case J.INPUT:Cy(e,t);break;case J.CAPTION:_y(e,t);break;case J.COLGROUP:vy(e,t);break;default:Dy(e,t)}}function Ey(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:dv(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:Dy(e,t)}}function Dy(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yv(e,t),e.fosterParentingEnabled=n}function Oy(e,t){e.pendingCharacterTokens.push(t)}function ky(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ay(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Dy(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var jy=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function My(e,t){let n=t.tagID;jy.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,Ty(e,t)):ey(e,t)}function Ny(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&&Ey(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:fy(e,t)}}function Py(e,t){switch(t.tagID){case J.HTML:ey(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:lv(e,t);break;default:Iy(e,t)}}function Fy(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:dv(e,t);break;case J.COL:break;default:Iy(e,t)}}function Iy(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function Ly(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,zy(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,Ty(e,t));break;default:Ty(e,t)}}function Ry(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,Ey(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:Ey(e,t)}}function zy(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,Ly(e,t));break;default:Ty(e,t)}}function By(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,Ry(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,Ry(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:Ey(e,t)}}function Vy(e,t){let n=t.tagID;jy.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),zy(e,t)):ey(e,t)}function Hy(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(),By(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:fy(e,t)}}function Uy(e,t){switch(t.tagID){case J.HTML:ey(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:lv(e,t);break;default:}}function Wy(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:dv(e,t);break;default:}}function Gy(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)):Uy(e,t)}function Ky(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)):Wy(e,t)}function qy(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:lv(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,Ty(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,Py(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,Ly(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,zy(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,ey(e,t)}}function Jy(e,t){t.tagID===J.TEMPLATE&&dv(e,t)}function Yy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ev(e,t)}function Xy(e,t){t.tagID===J.HTML?ey(e,t):Qy(e,t)}function Zy(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 Qy(e,t)}function Qy(e,t){e.insertionMode=Z.IN_BODY,yv(e,t)}function $y(e,t){switch(t.tagID){case J.HTML:ey(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:lv(e,t);break;default:}}function eb(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 tb(e,t){switch(t.tagID){case J.HTML:ey(e,t);break;case J.NOFRAMES:lv(e,t);break;default:}}function nb(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function rb(e,t){t.tagID===J.HTML?ey(e,t):ib(e,t)}function ib(e,t){e.insertionMode=Z.IN_BODY,yv(e,t)}function ab(e,t){switch(t.tagID){case J.HTML:ey(e,t);break;case J.NOFRAMES:lv(e,t);break;default:}}function ob(e,t){t.chars=`�`,e._insertCharacters(t)}function sb(e,t){e._insertCharacters(t),e.framesetOk=!1}function cb(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 lb(e,t){if(k_(t))cb(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?A_(t):r===K.SVG&&(N_(t),j_(t)),M_(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ub(e,t){if(t.tagID===J.P||t.tagID===J.BR){cb(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 db=pb(`end`),fb=pb(`start`);function pb(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 mb(e){let t=fb(e),n=db(e);if(t&&n)return{start:t,end:n}}var hb=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,gb=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),_b={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function vb(e,t){let n=Mb(e),r=Gh(`type`,{handlers:{root:bb,element:xb,text:Sb,comment:Tb,doctype:Cb,raw:Eb},unknown:Db}),i={parser:n?new U_(_b):U_.getFragmentParser(void 0,_b),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Ob(i,fb());let a=Ih(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&fm(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 yb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function bb(e,t){yb(e.children,t)}function xb(e,t){Ab(e,t),yb(e.children,t),jb(e,t)}function Sb(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:hg.CHARACTER,chars:e.value,location:Nb(e)};Ob(t,fb(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Cb(e,t){let n={type:hg.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Nb(e)};Ob(t,fb(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wb(e,t){t.stitches=!0;let n=Pb(e);`children`in e&&`children`in n&&(n.children=vb({type:`root`,children:e.children},t.options).children),Tb({type:`comment`,value:{stitch:n}},t)}function Tb(e,t){let n=e.value,r={type:hg.COMMENT,data:n,location:Nb(e)};Ob(t,fb(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Eb(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,kb(t,fb(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(hb,`<$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 Db(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))wb(n,t);else{let e=``;throw gb.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 Ob(e,t){kb(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=Lg.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 kb(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 Ab(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lg.PLAINTEXT)return;Ob(t,fb(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Nh.html;i===Nh.html&&n===`svg`&&(i=Nh.svg);let a=Yh({...e,children:[]},{space:i===Nh.svg?`svg`:`html`}),o={type:hg.START_TAG,tagName:n,tagID:Pg(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Nb(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function jb(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ag.includes(n)||t.parser.tokenizer.state===Lg.PLAINTEXT)return;Ob(t,db(e));let r={type:hg.END_TAG,tagName:n,tagID:Pg(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Nb(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lg.RCDATA||t.parser.tokenizer.state===Lg.RAWTEXT||t.parser.tokenizer.state===Lg.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lg.DATA)}function Mb(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Nb(e){let t=fb(e)||{line:void 0,column:void 0,offset:void 0},n=db(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 Pb(e){return`children`in e?Fm({...e,children:[]}):Fm(e)}function Fb(e){return function(t,n){return vb(t,{...e,file:n})}}var Ib=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Lb={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Ib,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Ib],h2:[[`className`,`sr-only`]],img:[...Ib,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Ib,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Ib],table:[...Ib],ul:[...Ib,[`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(`.`)},Rb={}.hasOwnProperty;function zb(e,t){let n={type:`root`,children:[]},r=Bb({schema:t?{...Lb,...t}:Lb,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Bb(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Vb(e,n);case`doctype`:return Hb(e,n);case`element`:return Ub(e,n);case`root`:return Wb(e,n);case`text`:return Gb(e,n);default:}}}function Vb(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 Qb(r,t),r}}function Hb(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Qb(e,t),e}}function Ub(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Kb(e,t.children),i=qb(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&&Rb.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 Qb(o,t),o}function Wb(e,t){let n={type:`root`,children:Kb(e,t.children)};return Qb(n,t),n}function Gb(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Qb(n,t),n}function Kb(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Bb(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function qb(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Rb.call(r,n)?r[n]:void 0,o=r&&Rb.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(Rb.call(s,l)){let t=s[l],n=Jb(e,$b(a,l),l,t);n??=Jb(e,$b(o,l),l,t),n!=null&&(c[l]=n)}if(i&&Rb.call(i,n)){let e=i[n];for(l in e)Rb.call(e,l)&&!Rb.call(c,l)&&(c[l]=e[l])}return c}function Jb(e,t,n,r){return t?Array.isArray(r)?Yb(e,t,n,r):Xb(e,t,n,r):void 0}function Yb(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Xb(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Xb(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Zb(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 Zb(e,t,n){let r=e.schema.protocols&&Rb.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 Qb(e,t){let n=mb(t);t.data&&(e.data=Fm(t.data)),n&&(e.position=n)}function $b(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 ex(e){return function(t){return zb(t,e)}}function tx(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 nx=px(/[A-Za-z]/),rx=px(/[\dA-Za-z]/),ix=px(/[#-'*+\--9=?A-Z^-~]/);function ax(e){return e!==null&&(e<32||e===127)}var ox=px(/\d/),sx=px(/[\dA-Fa-f]/),cx=px(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function lx(e){return e!==null&&(e<0||e===32)}function ux(e){return e===-2||e===-1||e===32}var dx=px(/\p{P}|\p{S}/u),fx=px(/\s/);function px(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function mx(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function hx(e,t,n){let r=em((n||{}).ignore||[]),i=gx(t),a=-1;for(;++a<i.length;)um(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 gx(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([_x(e[0]),vx(e[1])])}return t}function _x(e){return typeof e==`string`?new RegExp(mx(e),`g`):e}function vx(e){return typeof e==`function`?e:function(){return e}}var yx=`phrasing`,bx=[`autolink`,`link`,`image`,`label`];function xx(){return{transforms:[kx],enter:{literalAutolink:Cx,literalAutolinkEmail:wx,literalAutolinkHttp:wx,literalAutolinkWww:wx},exit:{literalAutolink:Ox,literalAutolinkEmail:Dx,literalAutolinkHttp:Tx,literalAutolinkWww:Ex}}}function Sx(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:yx,notInConstruct:bx},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:yx,notInConstruct:bx},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:yx,notInConstruct:bx}]}}function Cx(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function wx(e){this.config.enter.autolinkProtocol.call(this,e)}function Tx(e){this.config.exit.autolinkProtocol.call(this,e)}function Ex(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 Dx(e){this.config.exit.autolinkEmail.call(this,e)}function Ox(e){this.exit(e)}function kx(e){hx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ax],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,jx]],{ignore:[`link`,`linkReference`]})}function Ax(e,t,n,r,i){let a=``;if(!Px(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Mx(n)))return!1;let o=Nx(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 jx(e,t,n,r){return!Px(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Mx(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 Nx(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=tx(e,`(`),a=tx(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 Px(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||fx(n)||dx(n))&&(!t||n!==47)}function Fx(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}Gx.peek=Wx;function Ix(){this.buffer()}function Lx(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Rx(){this.buffer()}function zx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Bx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fx(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vx(e){this.exit(e)}function Hx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fx(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ux(e){this.exit(e)}function Wx(){return`[`}function Gx(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 Kx(){return{enter:{gfmFootnoteCallString:Ix,gfmFootnoteCall:Lx,gfmFootnoteDefinitionLabelString:Rx,gfmFootnoteDefinition:zx},exit:{gfmFootnoteCallString:Bx,gfmFootnoteCall:Vx,gfmFootnoteDefinitionLabelString:Hx,gfmFootnoteDefinition:Ux}}}function qx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Gx},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?Yx:Jx))),s(),o}}function Jx(e,t,n){return t===0?e:Yx(e,t,n)}function Yx(e,t,n){return(n?``:` `)+e}var Xx=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];tS.peek=nS;function Zx(){return{canContainEols:[`delete`],enter:{strikethrough:$x},exit:{strikethrough:eS}}}function Qx(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Xx}],handlers:{delete:tS}}}function $x(e){this.enter({type:`delete`,children:[]},e)}function eS(e){this.exit(e)}function tS(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 nS(){return`~`}function rS(e){return e.length}function iS(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||rS,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=aS(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]=oS(r[d]);else{let e=oS(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 aS(e){return e==null?``:String(e)}function oS(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 sS(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()),cS);return i(),o}function cS(e,t,n){return`>`+(n?``:` `)+e}function lS(e,t){return uS(e,t.inConstruct,!0)&&!uS(e,t.notInConstruct,!1)}function uS(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 dS(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
65
|
+
`&&lS(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
66
|
+
`}function fS(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 pS(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 mS(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function hS(e,t,n,r){let i=mS(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(pS(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,gS);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(fS(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
67
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
68
68
|
`),a&&(u+=s.move(a+`
|
|
69
|
-
`)),u+=s.move(c),l(),u}function
|
|
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
|
|
69
|
+
`)),u+=s.move(c),l(),u}function gS(e,t,n){return(n?``:` `)+e}function _S(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vS(e,t,n,r){let i=_S(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 yS(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function xS(e){if(e===null||lx(e)||fx(e))return 1;if(dx(e))return 2}function SS(e,t,n){let r=xS(e),i=xS(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}}CS.peek=wS;function CS(e,t,n,r){let i=yS(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=SS(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=bS(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=SS(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+bS(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function wS(e,t,n){return n.options.emphasis||`*`}var TS={};function ES(e,t){let n=t||TS;return DS(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function DS(e,t,n){if(kS(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 OS(e.children,t,n)}return Array.isArray(e)?OS(e,t,n):``}function OS(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=DS(e[i],t,n);return r.join(``)}function kS(e){return!!(e&&typeof e==`object`)}function AS(e,t){let n=!1;return fm(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)&&ES(e)&&(t.options.setext||n))}function jS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(AS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
71
71
|
`,after:`
|
|
72
72
|
`});return r(),t(),o+`
|
|
73
73
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
74
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=
|
|
75
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=bS(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}MS.peek=NS;function MS(e){return e.value||``}function NS(){return`<`}PS.peek=FS;function PS(e,t,n,r){let i=_S(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 FS(){return`!`}IS.peek=LS;function IS(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 LS(){return`!`}RS.peek=zS;function RS(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 zS(){return"`"}function BS(e,t){let n=ES(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))}VS.peek=HS;function VS(e,t,n,r){let i=_S(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(BS(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 HS(e,t,n){return BS(e,n)?`<`:`[`}US.peek=WS;function US(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 WS(){return`[`}function GS(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 KS(e){let t=GS(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 qS(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function JS(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 YS(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?qS(n):GS(n),s=e.ordered?o===`.`?`)`:`.`:KS(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),JS(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 XS(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 ZS(e,t,n,r){let i=XS(n),a=n.bulletCurrent||GS(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 QS(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var $S=em([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function eC(e,t,n,r){return(e.children.some(function(e){return $S(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function tC(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}nC.peek=rC;function nC(e,t,n,r){let i=tC(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=SS(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=bS(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=SS(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+bS(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function rC(e,t,n){return n.options.strong||`*`}function iC(e,t,n,r){return n.safe(e.value,r)}function aC(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 oC(e,t,n){let r=(JS(n)+(n.options.ruleSpaces?` `:``)).repeat(aC(n));return n.options.ruleSpaces?r.slice(0,-1):r}var sC={blockquote:sS,break:dS,code:hS,definition:vS,emphasis:CS,hardBreak:dS,heading:jS,html:MS,image:PS,imageReference:IS,inlineCode:RS,link:VS,linkReference:US,list:YS,listItem:ZS,paragraph:QS,root:eC,strong:nC,text:iC,thematicBreak:oC},cC=document.createElement(`i`);function lC(e){let t=`&`+e+`;`;cC.innerHTML=t;let n=cC.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function uC(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 dC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fC(e){return e.replace(dC,pC)}function pC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return uC(n.slice(t?2:1),t?16:10)}return lC(n)||e}function mC(){return{enter:{table:hC,tableData:yC,tableHeader:yC,tableRow:_C},exit:{codeText:bC,table:gC,tableData:vC,tableHeader:vC,tableRow:vC}}}function hC(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 gC(e){this.exit(e),this.data.inTable=void 0}function _C(e){this.enter({type:`tableRow`,children:[]},e)}function vC(e){this.exit(e)}function yC(e){this.enter({type:`tableCell`,children:[]},e)}function bC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function xC(e,t){return t===`|`?t:e}function SC(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
76
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 rS(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=oC.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function SC(){return{exit:{taskListCheckValueChecked:wC,taskListCheckValueUnchecked:wC,paragraph:TC}}}function CC(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:EC}}}function wC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function TC(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 EC(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=oC.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 DC(){return[bx(),Gx(),Xx(),pC(),SC()]}function OC(e){return{extensions:[xx(),Kx(e),Zx(),xC(e),CC()]}}function kC(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 AC(e,t){return e.length>0?(kC(e,e.length,0,t),e):t}var jC={}.hasOwnProperty;function MC(e){let t={},n=-1;for(;++n<e.length;)NC(t,e[n]);return t}function NC(e,t){let n;for(n in t){let r=(jC.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){jC.call(r,a)||(r[a]=[]);let e=i[a];PC(r[a],Array.isArray(e)?e:e?[e]:[])}}}function PC(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);kC(e,0,0,r)}var FC={tokenize:YC,partial:!0},IC={tokenize:XC,partial:!0},LC={tokenize:ZC,partial:!0},RC={tokenize:QC,partial:!0},zC={tokenize:$C,partial:!0},BC={name:`wwwAutolink`,tokenize:qC,previous:ew},VC={name:`protocolAutolink`,tokenize:JC,previous:tw},HC={name:`emailAutolink`,tokenize:KC,previous:nw},UC={};function WC(){return{text:UC}}for(var GC=48;GC<123;)UC[GC]=HC,GC++,GC===58?GC=65:GC===91&&(GC=97);UC[43]=HC,UC[45]=HC,UC[46]=HC,UC[95]=HC,UC[72]=[HC,VC],UC[104]=[HC,VC],UC[87]=[HC,BC],UC[119]=[HC,BC];function KC(e,t,n){let r=this,i,a;return o;function o(t){return!rw(t)||!nw.call(r,r.previous)||iw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return rw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(zC,u,l)(t):t===45||t===95||nx(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&&tx(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function qC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ew.call(r,r.previous)||iw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(FC,e.attempt(IC,e.attempt(LC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function JC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&tw.call(r,r.previous)&&!iw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(tx(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||ix(t)||cx(t)||dx(t)||ux(t)?n(t):e.attempt(IC,e.attempt(LC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function YC(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 XC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(RC,c,s)(t):t===null||cx(t)||dx(t)||t!==45&&ux(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 ZC(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(RC,t,a)(o):o===null||cx(o)||dx(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function QC(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||cx(o)||dx(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||cx(e)||dx(e)?t(e):r(e)}function a(e){return tx(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):tx(t)?(e.consume(t),o):n(t)}}function $C(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return nx(e)?n(e):t(e)}}function ew(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||cx(e)}function tw(e){return!tx(e)}function nw(e){return!(e===47||rw(e))}function rw(e){return e===43||e===45||e===46||e===95||nx(e)}function iw(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 aw(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&nx(e.charCodeAt(n+1))&&nx(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 ow(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 sw={name:`attention`,resolveAll:cw,tokenize:lw};function cw(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};uw(d,-c),uw(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=AC(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=AC(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=AC(l,ow(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=AC(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=AC(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,kC(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 lw(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=bS(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=bS(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 uw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var dw={name:`autolink`,tokenize:fw};function fw(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 tx(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||nx(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||nx(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||ix(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):rx(t)?(e.consume(t),l):n(t)}function u(e){return nx(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||nx(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function pw(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return lx(r)?(e.enter(n),s(r)):t(r)}function s(r){return lx(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var mw={partial:!0,tokenize:hw};function hw(e,t,n){return r;function r(t){return lx(t)?pw(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var gw={continuation:{tokenize:vw},exit:yw,name:`blockQuote`,tokenize:_w};function _w(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 lx(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function vw(e,t,n){let r=this;return i;function i(t){return lx(t)?pw(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(gw,t,n)(r)}}function yw(e){e.exit(`blockQuote`)}var bw={name:`characterEscape`,tokenize:xw};function xw(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 sx(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Sw={name:`characterReference`,tokenize:Cw};function Cw(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=nx,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=ox,u):(e.enter(`characterReferenceValue`),a=7,o=ax,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===nx&&!cC(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 ww={partial:!0,tokenize:Dw},Tw={concrete:!0,name:`codeFenced`,tokenize:Ew};function Ew(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`),lx(t)?pw(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ww,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)):lx(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),pw(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&&lx(t)?pw(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(ww,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`),lx(t)?pw(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`),lx(t)?pw(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Dw(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 Ow={name:`codeIndented`,tokenize:Aw},kw={partial:!0,tokenize:jw};function Aw(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),pw(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(kw,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 jw(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):pw(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 Mw={name:`codeText`,previous:Pw,resolve:Nw,tokenize:Fw};function Nw(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 Pw(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Fw(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 Iw=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&&Lw(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),Lw(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Lw(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);Lw(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Lw(this.left,t.reverse())}}};function Lw(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 Rw(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Iw(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,zw(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 kC(e,0,1/0,u.slice(0)),!l}function zw(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 Bw={resolve:Hw,tokenize:Uw},Vw={partial:!0,tokenize:Ww};function Hw(e){return Rw(e),e}function Uw(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(Vw,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 Ww(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),pw(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 Gw(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||ix(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||cx(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||ix(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 Kw(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||=!lx(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function qw(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`),pw(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 Jw(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):lx(i)?pw(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Yw={name:`definition`,tokenize:Zw},Xw={partial:!0,tokenize:Qw};function Zw(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Kw.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Px(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 cx(t)?Jw(e,l)(t):l(t)}function l(t){return Gw(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Xw,d,d)(t)}function d(t){return lx(t)?pw(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 Qw(e,t,n){return r;function r(t){return cx(t)?Jw(e,i)(t):n(t)}function i(t){return qw(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return lx(t)?pw(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var $w={name:`hardBreakEscape`,tokenize:eT};function eT(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 tT={name:`headingAtx`,resolve:nT,tokenize:rT};function nT(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`},kC(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function rT(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||cx(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)):lx(n)?pw(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||cx(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var iT=`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(`.`),aT=[`pre`,`script`,`style`,`textarea`],oT={concrete:!0,name:`htmlFlow`,resolveTo:lT,tokenize:uT},sT={partial:!0,tokenize:fT},cT={partial:!0,tokenize:dT};function lT(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 uT(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:M):tx(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):tx(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):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 tx(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||cx(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&aT.includes(l)?(i=1,r.interrupt?t(s):O(s)):iT.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||nx(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 lx(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||tx(t)?(e.consume(t),b):lx(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||nx(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):lx(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):lx(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||cx(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||lx(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):lx(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),N):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(sT,P,ee)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(cT,te,P)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||Q(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),M):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return aT.includes(n)?(e.consume(t),N):O(t)}return tx(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),N):t===45&&i===2?(e.consume(t),M):O(t)}function N(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),P(t)):(e.consume(t),N)}function P(n){return e.exit(`htmlFlow`),t(n)}}function dT(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 fT(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(mw,t,n)}}var pT={name:`htmlText`,tokenize:mT};function mT(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):tx(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):tx(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,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(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,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):Q(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return tx(t)?(e.consume(t),S):n(t)}function S(t){return t===45||nx(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,j(t)):lx(t)?(e.consume(t),C):A(t)}function w(t){return t===45||nx(t)?(e.consume(t),w):t===47||t===62||cx(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||tx(t)?(e.consume(t),E):Q(t)?(o=T,j(t)):lx(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||nx(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,j(t)):lx(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,j(t)):lx(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):Q(t)?(o=ee,j(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||cx(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||cx(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return lx(t)?pw(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var hT={name:`labelEnd`,resolveAll:yT,resolveTo:bT,tokenize:xT},gT={tokenize:ST},_T={tokenize:CT},vT={tokenize:wT};function yT(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&&kC(e,0,e.length,n),e}function bT(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=AC(s,e.slice(a+1,a+r+3)),s=AC(s,[[`enter`,u,t]]),s=AC(s,ow(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=AC(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=AC(s,e.slice(o+1)),s=AC(s,[[`exit`,c,t]]),kC(e,a,e.length,s),e}function xT(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(Px(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(gT,u,o?u:d)(t):t===91?e.attempt(_T,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(vT,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function ST(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 cx(t)?Jw(e,a)(t):a(t)}function a(t){return t===41?u(t):Gw(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return cx(t)?Jw(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?qw(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return cx(t)?Jw(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 CT(e,t,n){let r=this;return i;function i(t){return Kw.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Px(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function wT(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 TT={name:`labelStartImage`,resolveAll:hT.resolveAll,tokenize:ET};function ET(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 DT={name:`labelStartLink`,resolveAll:hT.resolveAll,tokenize:OT};function OT(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 kT={name:`lineEnding`,tokenize:AT};function AT(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),pw(e,t,`linePrefix`)}}var jT={name:`thematicBreak`,tokenize:MT};function MT(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`),lx(t)?pw(e,s,`whitespace`)(t):s(t))}}var NT={continuation:{tokenize:LT},exit:zT,name:`list`,tokenize:IT},PT={partial:!0,tokenize:BT},FT={partial:!0,tokenize:RT};function IT(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:ax(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(jT,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 ax(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(mw,r.interrupt?n:u,e.attempt(PT,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return lx(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 LT(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(mw,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pw(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!lx(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(FT,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,pw(e,e.attempt(NT,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function RT(e,t,n){let r=this;return pw(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 zT(e){e.exit(this.containerState.type)}function BT(e,t,n){let r=this;return pw(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!lx(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var VT={name:`setextUnderline`,resolveTo:HT,tokenize:UT};function HT(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 UT(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`),lx(t)?pw(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var WT={tokenize:QT,partial:!0};function GT(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:YT,continuation:{tokenize:XT},exit:ZT}},text:{91:{name:`gfmFootnoteCall`,tokenize:JT},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:KT,resolveTo:qT}}}}function KT(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=Px(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 qT(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 JT(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||cx(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Px(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return cx(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 YT(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||cx(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Px(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return cx(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),pw(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function XT(e,t,n){return e.check(mw,t,e.attempt(WT,t,n))}function ZT(e){e.exit(`gfmFootnoteDefinition`)}function QT(e,t,n){let r=this;return pw(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 $T(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&&kC(o,o.length,0,ow(s,e.slice(r+1,n),t)),kC(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),kC(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=bS(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=bS(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var eE=class{constructor(){this.map=[]}add(e,t,n){tE(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 tE(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 nE(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 rE(){return{flow:{null:{name:`table`,tokenize:iE,resolveAll:aE}}}}function iE(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):lx(t)?pw(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||cx(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,lx(t)?pw(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 lx(t)?pw(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 lx(t)?pw(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)):lx(n)?pw(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||cx(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 aE(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 eE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(sE(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=oE(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=oE(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=oE(f,t,o,i,n,d)):(o[0]=o[1],d=oE(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&sE(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=nE(t.events,n))}return e}function oE(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},cE(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=cE(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=cE(t.events,n[2]),a=cE(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({},cE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function sE(e,t,n,r,i){let a=[],o=cE(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 cE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var lE={name:`tasklistCheck`,tokenize:dE};function uE(){return{text:{91:lE}}}function dE(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 cx(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):lx(r)?e.check({tokenize:fE},t,n)(r):n(r)}}function fE(e,t,n){return pw(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function pE(e){return MC([WC(),GT(),$T(e),rE(),uE()])}var mE={};function hE(e){let t=this,n=e||mE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(pE(n)),a.push(DC()),o.push(OC(n))}var gE=Object.defineProperty,_E=Object.defineProperties,vE=Object.getOwnPropertyDescriptors,yE=Object.getOwnPropertySymbols,bE=Object.prototype.hasOwnProperty,xE=Object.prototype.propertyIsEnumerable,SE=(e,t,n)=>t in e?gE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CE=(e,t)=>{for(var n in t||={})bE.call(t,n)&&SE(e,n,t[n]);if(yE)for(var n of yE(t))xE.call(t,n)&&SE(e,n,t[n]);return e},wE=(e,t)=>_E(e,vE(t)),TE=(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},EE=(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},DE=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]==="`"&&!EE(e,n)&&(t+=1)}return t},OE=(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},kE=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,AE=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(kE,(t,n,r,i)=>TE(e,i)?t:`${n}\\>${r}`),jE=/(\*\*)([^*]*\*?)$/,ME=/(__)([^_]*?)$/,NE=/(\*\*\*)([^*]*?)$/,PE=/(\*)([^*]*?)$/,FE=/(_)([^_]*?)$/,IE=/(`)([^`]*?)$/,LE=/(~~)([^~]*?)$/,RE=/^[\s_~*`]*$/,zE=/^[\s]*[-*+][\s]+$/,BE=/[\p{L}\p{N}_]/u,VE=/^```[^`\n]*```?$/,HE=/^\*{4,}$/,UE=/(__)([^_]+)_$/,WE=/(~~)([^~]+)~$/,GE=/~~/g,KE=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:BE.test(e)},qE=(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},JE=(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},YE=(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},XE=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
78
|
-
`)return!1}return!1},
|
|
79
|
-
`)return!1}return!1}
|
|
80
|
-
`)return!1}return!1}
|
|
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 iS(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=sC.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function CC(){return{exit:{taskListCheckValueChecked:TC,taskListCheckValueUnchecked:TC,paragraph:EC}}}function wC(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:DC}}}function TC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function EC(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 DC(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=sC.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 OC(){return[xx(),Kx(),Zx(),mC(),CC()]}function kC(e){return{extensions:[Sx(),qx(e),Qx(),SC(e),wC()]}}function AC(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 jC(e,t){return e.length>0?(AC(e,e.length,0,t),e):t}var MC={}.hasOwnProperty;function NC(e){let t={},n=-1;for(;++n<e.length;)PC(t,e[n]);return t}function PC(e,t){let n;for(n in t){let r=(MC.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){MC.call(r,a)||(r[a]=[]);let e=i[a];FC(r[a],Array.isArray(e)?e:e?[e]:[])}}}function FC(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);AC(e,0,0,r)}var IC={tokenize:XC,partial:!0},LC={tokenize:ZC,partial:!0},RC={tokenize:QC,partial:!0},zC={tokenize:$C,partial:!0},BC={tokenize:ew,partial:!0},VC={name:`wwwAutolink`,tokenize:JC,previous:tw},HC={name:`protocolAutolink`,tokenize:YC,previous:nw},UC={name:`emailAutolink`,tokenize:qC,previous:rw},WC={};function GC(){return{text:WC}}for(var KC=48;KC<123;)WC[KC]=UC,KC++,KC===58?KC=65:KC===91&&(KC=97);WC[43]=UC,WC[45]=UC,WC[46]=UC,WC[95]=UC,WC[72]=[UC,HC],WC[104]=[UC,HC],WC[87]=[UC,VC],WC[119]=[UC,VC];function qC(e,t,n){let r=this,i,a;return o;function o(t){return!iw(t)||!rw.call(r,r.previous)||aw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return iw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(BC,u,l)(t):t===45||t===95||rx(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&&nx(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function JC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!tw.call(r,r.previous)||aw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(IC,e.attempt(LC,e.attempt(RC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function YC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&nw.call(r,r.previous)&&!aw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(nx(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||ax(t)||lx(t)||fx(t)||dx(t)?n(t):e.attempt(LC,e.attempt(RC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function XC(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 ZC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(zC,c,s)(t):t===null||lx(t)||fx(t)||t!==45&&dx(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 QC(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(zC,t,a)(o):o===null||lx(o)||fx(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function $C(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||lx(o)||fx(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||lx(e)||fx(e)?t(e):r(e)}function a(e){return nx(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):nx(t)?(e.consume(t),o):n(t)}}function ew(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return rx(e)?n(e):t(e)}}function tw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||lx(e)}function nw(e){return!nx(e)}function rw(e){return!(e===47||iw(e))}function iw(e){return e===43||e===45||e===46||e===95||rx(e)}function aw(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 ow(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&rx(e.charCodeAt(n+1))&&rx(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 sw(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 cw={name:`attention`,resolveAll:lw,tokenize:uw};function lw(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};dw(d,-c),dw(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=jC(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=jC(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=jC(l,sw(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=jC(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=jC(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,AC(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 uw(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=xS(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=xS(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 dw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var fw={name:`autolink`,tokenize:pw};function pw(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 nx(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||rx(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||rx(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||ax(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ix(t)?(e.consume(t),l):n(t)}function u(e){return rx(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||rx(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function mw(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return ux(r)?(e.enter(n),s(r)):t(r)}function s(r){return ux(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var hw={partial:!0,tokenize:gw};function gw(e,t,n){return r;function r(t){return ux(t)?mw(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var _w={continuation:{tokenize:yw},exit:bw,name:`blockQuote`,tokenize:vw};function vw(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 ux(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function yw(e,t,n){let r=this;return i;function i(t){return ux(t)?mw(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(_w,t,n)(r)}}function bw(e){e.exit(`blockQuote`)}var xw={name:`characterEscape`,tokenize:Sw};function Sw(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 cx(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Cw={name:`characterReference`,tokenize:ww};function ww(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=rx,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=sx,u):(e.enter(`characterReferenceValue`),a=7,o=ox,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===rx&&!lC(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 Tw={partial:!0,tokenize:Ow},Ew={concrete:!0,name:`codeFenced`,tokenize:Dw};function Dw(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`),ux(t)?mw(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Tw,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)):ux(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),mw(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&&ux(t)?mw(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(Tw,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`),ux(t)?mw(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`),ux(t)?mw(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ow(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 kw={name:`codeIndented`,tokenize:jw},Aw={partial:!0,tokenize:Mw};function jw(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),mw(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(Aw,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 Mw(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):mw(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 Nw={name:`codeText`,previous:Fw,resolve:Pw,tokenize:Iw};function Pw(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 Fw(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Iw(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 Lw=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&&Rw(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),Rw(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Rw(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);Rw(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Rw(this.left,t.reverse())}}};function Rw(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 zw(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Lw(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,Bw(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 AC(e,0,1/0,u.slice(0)),!l}function Bw(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 Vw={resolve:Uw,tokenize:Ww},Hw={partial:!0,tokenize:Gw};function Uw(e){return zw(e),e}function Ww(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(Hw,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 Gw(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),mw(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 Kw(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||ax(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||lx(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||ax(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 qw(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||=!ux(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Jw(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`),mw(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 Yw(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):ux(i)?mw(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Xw={name:`definition`,tokenize:Qw},Zw={partial:!0,tokenize:$w};function Qw(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return qw.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Fx(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 lx(t)?Yw(e,l)(t):l(t)}function l(t){return Kw(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Zw,d,d)(t)}function d(t){return ux(t)?mw(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 $w(e,t,n){return r;function r(t){return lx(t)?Yw(e,i)(t):n(t)}function i(t){return Jw(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return ux(t)?mw(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var eT={name:`hardBreakEscape`,tokenize:tT};function tT(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 nT={name:`headingAtx`,resolve:rT,tokenize:iT};function rT(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`},AC(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function iT(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||lx(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)):ux(n)?mw(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||lx(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var aT=`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(`.`),oT=[`pre`,`script`,`style`,`textarea`],sT={concrete:!0,name:`htmlFlow`,resolveTo:uT,tokenize:dT},cT={partial:!0,tokenize:pT},lT={partial:!0,tokenize:fT};function uT(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 dT(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:M):nx(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):nx(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):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 nx(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||lx(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&oT.includes(l)?(i=1,r.interrupt?t(s):O(s)):aT.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||rx(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 ux(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||nx(t)?(e.consume(t),b):ux(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||rx(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):ux(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):ux(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||lx(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||ux(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):ux(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),N):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(cT,P,ee)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(lT,te,P)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||Q(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),M):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return oT.includes(n)?(e.consume(t),N):O(t)}return nx(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),N):t===45&&i===2?(e.consume(t),M):O(t)}function N(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),P(t)):(e.consume(t),N)}function P(n){return e.exit(`htmlFlow`),t(n)}}function fT(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 pT(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(hw,t,n)}}var mT={name:`htmlText`,tokenize:hT};function hT(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):nx(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):nx(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,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(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,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):Q(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return nx(t)?(e.consume(t),S):n(t)}function S(t){return t===45||rx(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,j(t)):ux(t)?(e.consume(t),C):A(t)}function w(t){return t===45||rx(t)?(e.consume(t),w):t===47||t===62||lx(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||nx(t)?(e.consume(t),E):Q(t)?(o=T,j(t)):ux(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||rx(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,j(t)):ux(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,j(t)):ux(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):Q(t)?(o=ee,j(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||lx(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||lx(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return ux(t)?mw(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var gT={name:`labelEnd`,resolveAll:bT,resolveTo:xT,tokenize:ST},_T={tokenize:CT},vT={tokenize:wT},yT={tokenize:TT};function bT(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&&AC(e,0,e.length,n),e}function xT(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=jC(s,e.slice(a+1,a+r+3)),s=jC(s,[[`enter`,u,t]]),s=jC(s,sw(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=jC(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=jC(s,e.slice(o+1)),s=jC(s,[[`exit`,c,t]]),AC(e,a,e.length,s),e}function ST(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(Fx(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(_T,u,o?u:d)(t):t===91?e.attempt(vT,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(yT,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function CT(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 lx(t)?Yw(e,a)(t):a(t)}function a(t){return t===41?u(t):Kw(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return lx(t)?Yw(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Jw(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return lx(t)?Yw(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 wT(e,t,n){let r=this;return i;function i(t){return qw.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Fx(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function TT(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 ET={name:`labelStartImage`,resolveAll:gT.resolveAll,tokenize:DT};function DT(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 OT={name:`labelStartLink`,resolveAll:gT.resolveAll,tokenize:kT};function kT(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 AT={name:`lineEnding`,tokenize:jT};function jT(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),mw(e,t,`linePrefix`)}}var MT={name:`thematicBreak`,tokenize:NT};function NT(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`),ux(t)?mw(e,s,`whitespace`)(t):s(t))}}var PT={continuation:{tokenize:RT},exit:BT,name:`list`,tokenize:LT},FT={partial:!0,tokenize:VT},IT={partial:!0,tokenize:zT};function LT(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:ox(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(MT,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 ox(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(hw,r.interrupt?n:u,e.attempt(FT,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return ux(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 RT(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(hw,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mw(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!ux(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(IT,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,mw(e,e.attempt(PT,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function zT(e,t,n){let r=this;return mw(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 BT(e){e.exit(this.containerState.type)}function VT(e,t,n){let r=this;return mw(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!ux(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var HT={name:`setextUnderline`,resolveTo:UT,tokenize:WT};function UT(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 WT(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`),ux(t)?mw(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var GT={tokenize:$T,partial:!0};function KT(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:XT,continuation:{tokenize:ZT},exit:QT}},text:{91:{name:`gfmFootnoteCall`,tokenize:YT},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:qT,resolveTo:JT}}}}function qT(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=Fx(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 JT(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 YT(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||lx(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Fx(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return lx(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 XT(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||lx(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Fx(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return lx(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),mw(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function ZT(e,t,n){return e.check(hw,t,e.attempt(GT,t,n))}function QT(e){e.exit(`gfmFootnoteDefinition`)}function $T(e,t,n){let r=this;return mw(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 eE(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&&AC(o,o.length,0,sw(s,e.slice(r+1,n),t)),AC(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),AC(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=xS(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=xS(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var tE=class{constructor(){this.map=[]}add(e,t,n){nE(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 nE(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 rE(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 iE(){return{flow:{null:{name:`table`,tokenize:aE,resolveAll:oE}}}}function aE(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):ux(t)?mw(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||lx(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,ux(t)?mw(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 ux(t)?mw(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 ux(t)?mw(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)):ux(n)?mw(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||lx(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 oE(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 tE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(cE(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=sE(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=sE(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=sE(f,t,o,i,n,d)):(o[0]=o[1],d=sE(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&cE(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=rE(t.events,n))}return e}function sE(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},lE(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=lE(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=lE(t.events,n[2]),a=lE(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({},lE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function cE(e,t,n,r,i){let a=[],o=lE(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 lE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var uE={name:`tasklistCheck`,tokenize:fE};function dE(){return{text:{91:uE}}}function fE(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 lx(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):ux(r)?e.check({tokenize:pE},t,n)(r):n(r)}}function pE(e,t,n){return mw(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function mE(e){return NC([GC(),KT(),eE(e),iE(),dE()])}var hE={};function gE(e){let t=this,n=e||hE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(mE(n)),a.push(OC()),o.push(kC(n))}var _E=Object.defineProperty,vE=Object.defineProperties,yE=Object.getOwnPropertyDescriptors,bE=Object.getOwnPropertySymbols,xE=Object.prototype.hasOwnProperty,SE=Object.prototype.propertyIsEnumerable,CE=(e,t,n)=>t in e?_E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wE=(e,t)=>{for(var n in t||={})xE.call(t,n)&&CE(e,n,t[n]);if(bE)for(var n of bE(t))SE.call(t,n)&&CE(e,n,t[n]);return e},TE=(e,t)=>vE(e,yE(t)),EE=(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},DE=(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},OE=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]==="`"&&!DE(e,n)&&(t+=1)}return t},kE=(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},AE=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,jE=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(AE,(t,n,r,i)=>EE(e,i)?t:`${n}\\>${r}`),ME=/(\*\*)([^*]*\*?)$/,NE=/(__)([^_]*?)$/,PE=/(\*\*\*)([^*]*?)$/,FE=/(\*)([^*]*?)$/,IE=/(_)([^_]*?)$/,LE=/(`)([^`]*?)$/,RE=/(~~)([^~]*?)$/,zE=/^[\s_~*`]*$/,BE=/^[\s]*[-*+][\s]+$/,VE=/[\p{L}\p{N}_]/u,HE=/^```[^`\n]*```?$/,UE=/^\*{4,}$/,WE=/(__)([^_]+)_$/,GE=/(~~)([^~]+)~$/,KE=/~~/g,qE=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:VE.test(e)},JE=(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},YE=(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},XE=(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},ZE=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
78
|
+
`)return!1}return!1},QE=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?ZE(e,t):!1;if(e[n]===`
|
|
79
|
+
`)return!1}return!1},$E=(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},eD=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
|
|
81
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},
|
|
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},tD=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&XE(e,t)?!0:n!==`*`&&r===`*`?(t<e.length-2?e[t+2]:``)!==`*`:!!(n===`*`||n&&r&&qE(n)&&qE(r)||(!n||n===` `||n===` `||n===`
|
|
83
83
|
`)&&(!r||r===` `||r===` `||r===`
|
|
84
|
-
`)),
|
|
85
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return
|
|
86
|
-
`)?!0
|
|
87
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return
|
|
88
|
-
`)?!0
|
|
84
|
+
`)),nD=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]:``;tD(e,i,a,o)||(t+=1)}return t},rD=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&XE(e,t)||QE(e,t)||$E(e,t)||n===`_`||r===`_`||n&&r&&qE(n)&&qE(r)),iD=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]:``;rD(e,i,a,o)||(t+=1)}return t},aD=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},oD=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},sD=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},cD=(e,t,n)=>{if(!t||zE.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
85
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return BE.test(a)&&t.includes(`
|
|
86
|
+
`)?!0:eD(e,n,`*`)},lD=e=>{let t=e.match(ME);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return EE(e,r)||kE(e,r)||cD(e,n,r)?e:oD(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},uD=(e,t,n)=>{if(!t||zE.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
87
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return BE.test(a)&&t.includes(`
|
|
88
|
+
`)?!0:eD(e,n,`_`)},dD=e=>{let t=e.match(NE);if(!t){let t=e.match(WE);if(t){let n=e.lastIndexOf(t[1]);if(!(EE(e,n)||kE(e,n))&&sD(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return EE(e,r)||kE(e,r)||uD(e,n,r)?e:sD(e)%2==1?`${e}__`:e},fD=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]!==`\\`&&!XE(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if((!t||t===` `||t===` `||t===`
|
|
89
89
|
`)&&(!r||r===` `||r===` `||r===`
|
|
90
|
-
`)||t&&r&&
|
|
91
|
-
`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},
|
|
92
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,
|
|
90
|
+
`)||t&&r&&qE(t)&&qE(r))continue;return n}}return-1},pD=e=>{if(!e.match(FE))return e;let t=fD(e);if(t===-1||EE(e,t)||kE(e,t))return e;let n=e.substring(t+1);return!n||zE.test(n)?e:nD(e)%2==1?`${e}*`:e},mD=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]!==`\\`&&!XE(e,n)&&!QE(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&qE(t)&&qE(r))continue;return n}}return-1},hD=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}_`},gD=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(oD(t)%2!=1)return null;let n=t.indexOf(`**`),r=mD(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},_D=e=>{if(!e.match(IE))return e;let t=mD(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||zE.test(n)||EE(e,t)||kE(e,t))return e;if(iD(e)%2==1){let t=gD(e);return t===null?hD(e):t}return e},vD=e=>{let t=oD(e),n=nD(e);return t%2==0&&n%2==0},yD=(e,t,n)=>!t||zE.test(t)||EE(e,n)||kE(e,n)?!0:eD(e,n,`*`),bD=e=>{if(UE.test(e))return e;let t=e.match(PE);if(!t)return e;let n=t[2];return yD(e,n,e.lastIndexOf(t[1]))?e:aD(e)%2==1?vD(e)?e:`${e}***`:e},xD=/<[a-zA-Z/][^>]*$/,SD=e=>{let t=e.match(xD);return!t||t.index===void 0||EE(e,t.index)?e:e.substring(0,t.index).trimEnd()},CD=e=>!e.match(HE)||e.includes(`
|
|
92
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,wD=e=>(e.match(/```/g)||[]).length%2==1,TD=e=>{let t=CD(e);if(t!==null)return t;let n=e.match(LE);if(n&&!wD(e)){let t=n[2];if(!t||zE.test(t))return e;if(OE(e)%2==1)return`${e}\``}return e},ED=(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)==="```",DD=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!ED(e,r)&&(n=!n),!n&&e[r]===`$`&&e[r+1]===`$`&&(t+=1,r+=1);return t},OD=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]===`\\`){r+=1;continue}if(e[r]==="`"&&!ED(e,r)){n=!n;continue}!n&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:t+=1)}return t},kD=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
|
|
93
93
|
`,t)!==-1&&!e.endsWith(`
|
|
94
94
|
`)?`${e}
|
|
95
|
-
$$`:`${e}$$`},
|
|
96
|
-
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(
|
|
97
|
-
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(
|
|
98
|
-
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},
|
|
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})),rO=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(nO());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}})),iO=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))}})),aO=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(rO()),r=iO();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 oO(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?cO(e.position):`start`in e||`end`in e?cO(e):`line`in e||`column`in e?sO(e):``}function sO(e){return lO(e&&e.line)+`:`+lO(e&&e.column)}function cO(e){return sO(e&&e.start)+`-`+sO(e&&e.end)}function lO(e){return e&&typeof e==`number`?e:1}var uO=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=oO(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}};uO.prototype.file=``,uO.prototype.name=``,uO.prototype.reason=``,uO.prototype.message=``,uO.prototype.stack=``,uO.prototype.column=void 0,uO.prototype.line=void 0,uO.prototype.ancestors=void 0,uO.prototype.cause=void 0,uO.prototype.fatal=void 0,uO.prototype.place=void 0,uO.prototype.ruleId=void 0,uO.prototype.source=void 0;var dO=t(aO(),1),fO={}.hasOwnProperty,pO=new Map,mO=/[A-Z]/g,hO=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),gO=new Set([`td`,`th`]),_O=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function vO(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=kO(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=OO(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`?ph:fh,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=yO(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function yO(e,t,n){if(t.type===`element`)return bO(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return xO(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return CO(e,t,n);if(t.type===`mdxjsEsm`)return SO(e,t);if(t.type===`root`)return wO(e,t,n);if(t.type===`text`)return TO(e,t)}function bO(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ph,e.schema=i),e.ancestors.push(t);let a=FO(e,t.tagName,!1),o=AO(e,t),s=MO(e,t);return hO.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!eO(e):!0})),EO(e,o,a,t),DO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function xO(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)}IO(e,t.position)}function SO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);IO(e,t.position)}function CO(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ph,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:FO(e,t.name,!0),o=jO(e,t),s=MO(e,t);return EO(e,o,a,t),DO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function wO(e,t,n){let r={};return DO(r,MO(e,t)),e.create(t,e.Fragment,r,n)}function TO(e,t){return t.value}function EO(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function DO(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function OO(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 kO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=db(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 AO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&fO.call(t.properties,i)){let a=NO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&gO.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 jO(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 IO(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 IO(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function MO(e,t){let n=[],r=-1,i=e.passKeys?new Map:pO;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=yO(e,a,o);s!==void 0&&n.push(s)}return n}function NO(e,t,n){let r=lh(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hh(n):yh(n)),r.property===`style`){let t=typeof n==`object`?n:PO(e,String(n));return e.stylePropertyNameCase===`css`&&(t=LO(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ah[r.property]||r.property:r.attribute,n]}}function PO(e,t){try{return(0,dO.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new uO("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=_O+`#cannot-parse-style-attribute`,r}}function FO(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=QD(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=QD(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return fO.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);IO(e)}function IO(e,t){let n=new uO("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=_O+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function LO(e){let t={},n;for(n in e)fO.call(e,n)&&(t[RO(n)]=e[n]);return t}function RO(e){let t=e.replace(mO,zO);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function zO(e){return`-`+e.toLowerCase()}var BO={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`]},VO={tokenize:HO};function HO(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`),pw(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 UO={tokenize:GO},WO={tokenize:KO};function GO(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 kC(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(WO,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(WO,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++;kC(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 KO(e,t,n){return pw(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var qO={tokenize:JO};function JO(e){let t=this,n=e.attempt(mw,r,e.attempt(this.parser.constructs.flowInitial,i,pw(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Bw,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 YO={resolveAll:$O()},XO=QO(`string`),ZO=QO(`text`);function QO(e){return{resolveAll:$O(e===`text`?ek: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 $O(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 ek(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 tk=e({attentionMarkers:()=>lk,contentInitial:()=>rk,disable:()=>uk,document:()=>nk,flow:()=>ak,flowInitial:()=>ik,insideSpan:()=>ck,string:()=>ok,text:()=>sk}),nk={42:NT,43:NT,45:NT,48:NT,49:NT,50:NT,51:NT,52:NT,53:NT,54:NT,55:NT,56:NT,57:NT,62:gw},rk={91:Yw},ik={[-2]:Ow,[-1]:Ow,32:Ow},ak={35:tT,42:jT,45:[VT,jT],60:oT,61:VT,95:jT,96:Tw,126:Tw},ok={38:Sw,92:bw},sk={[-5]:kT,[-4]:kT,[-3]:kT,33:TT,38:Sw,42:sw,60:[dw,pT],91:DT,92:[$w,bw],93:hT,95:sw,96:Mw},ck={null:[sw,YO]},lk={null:[42,95]},uk={null:[]};function dk(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=AC(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ow(a,l.events,l),l.events):[]}function f(e,t){return pk(p(e),t)}function p(e){return fk(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&&kC(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 fk(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 pk(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=`
|
|
95
|
+
$$`:`${e}$$`},AD=e=>DD(e)%2==0?e:kD(e),jD=e=>OD(e)%2==1?`${e}$`:e,MD=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=JE(e,t);if(r===-1||EE(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)`},ND=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!EE(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=YE(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},PD=(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=ND(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(YE(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=ND(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},FD=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!EE(e,n)){let r=MD(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!EE(e,n)){let r=PD(e,n,t);if(r!==null)return r}return e},ID=/^-{1,2}$/,LD=/^[\s]*-{1,2}[\s]+$/,RD=/^={1,2}$/,zD=/^[\s]*={1,2}[\s]+$/,BD=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(ID.test(i)&&!n.match(LD)){let t=r.split(`
|
|
97
|
+
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(RD.test(i)&&!n.match(zD)){let t=r.split(`
|
|
98
|
+
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},VD=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),HD=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(VD,(t,n)=>EE(e,n)?t:`\\~`),UD=e=>{let t=e.match(RE);if(t){let n=t[2];if(!n||zE.test(n))return e;let r=e.lastIndexOf(t[1]);if(EE(e,r)||kE(e,r))return e;if(e.match(KE)?.length%2==1)return`${e}~~`}else{let t=e.match(GE);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(EE(e,n)||kE(e,n))return e;if(e.match(KE)?.length%2==1)return`${e}~`}}return e},WD=e=>e!==!1,GD=e=>e===!0,KD={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},qD=[{handler:{name:`singleTilde`,handle:HD,priority:KD.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:jE,priority:KD.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:SD,priority:KD.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:BD,priority:KD.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:FD,priority:KD.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:bD,priority:KD.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:lD,priority:KD.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:dD,priority:KD.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:pD,priority:KD.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:_D,priority:KD.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:TD,priority:KD.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:UD,priority:KD.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:AD,priority:KD.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:jD,priority:KD.INLINE_KATEX},optionKey:`inlineKatex`}],JD=e=>{let t=e?.linkMode??`protocol`;return qD.filter(({handler:t,optionKey:n})=>t.name===`links`?WD(e?.links)||WD(e?.images):t.name===`inlineKatex`?GD(e?.inlineKatex):WD(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:TE(wE({},e),{handle:e=>FD(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},YD=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=JD(t),i=(t?.handlers??[]).map(e=>({handler:TE(wE({},e),{priority:e.priority??KD.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},XD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QD={};function $D(e,t){return((t||QD).jsx?ZD:XD).test(e)}var eO=/[ \t\n\f\r]/g;function tO(e){return typeof e==`object`?e.type===`text`?nO(e.value):!1:nO(e)}function nO(e){return e.replace(eO,``)===``}var rO=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})),iO=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(rO());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}})),aO=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))}})),oO=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(iO()),r=aO();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 sO(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?lO(e.position):`start`in e||`end`in e?lO(e):`line`in e||`column`in e?cO(e):``}function cO(e){return uO(e&&e.line)+`:`+uO(e&&e.column)}function lO(e){return cO(e&&e.start)+`-`+cO(e&&e.end)}function uO(e){return e&&typeof e==`number`?e:1}var dO=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=sO(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}};dO.prototype.file=``,dO.prototype.name=``,dO.prototype.reason=``,dO.prototype.message=``,dO.prototype.stack=``,dO.prototype.column=void 0,dO.prototype.line=void 0,dO.prototype.ancestors=void 0,dO.prototype.cause=void 0,dO.prototype.fatal=void 0,dO.prototype.place=void 0,dO.prototype.ruleId=void 0,dO.prototype.source=void 0;var fO=t(oO(),1),pO={}.hasOwnProperty,mO=new Map,hO=/[A-Z]/g,gO=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),_O=new Set([`td`,`th`]),vO=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function yO(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=AO(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=kO(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`?mh:ph,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=bO(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function bO(e,t,n){if(t.type===`element`)return xO(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return SO(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return wO(e,t,n);if(t.type===`mdxjsEsm`)return CO(e,t);if(t.type===`root`)return TO(e,t,n);if(t.type===`text`)return EO(e,t)}function xO(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=mh,e.schema=i),e.ancestors.push(t);let a=IO(e,t.tagName,!1),o=jO(e,t),s=NO(e,t);return gO.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!tO(e):!0})),DO(e,o,a,t),OO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function SO(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)}LO(e,t.position)}function CO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);LO(e,t.position)}function wO(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=mh,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:IO(e,t.name,!0),o=MO(e,t),s=NO(e,t);return DO(e,o,a,t),OO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function TO(e,t,n){let r={};return OO(r,NO(e,t)),e.create(t,e.Fragment,r,n)}function EO(e,t){return t.value}function DO(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function OO(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function kO(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 AO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=fb(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 jO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&pO.call(t.properties,i)){let a=PO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&_O.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 MO(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 LO(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 LO(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function NO(e,t){let n=[],r=-1,i=e.passKeys?new Map:mO;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=bO(e,a,o);s!==void 0&&n.push(s)}return n}function PO(e,t,n){let r=uh(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?gh(n):bh(n)),r.property===`style`){let t=typeof n==`object`?n:FO(e,String(n));return e.stylePropertyNameCase===`css`&&(t=RO(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?oh[r.property]||r.property:r.attribute,n]}}function FO(e,t){try{return(0,fO.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new dO("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=vO+`#cannot-parse-style-attribute`,r}}function IO(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=$D(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=$D(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return pO.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);LO(e)}function LO(e,t){let n=new dO("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=vO+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function RO(e){let t={},n;for(n in e)pO.call(e,n)&&(t[zO(n)]=e[n]);return t}function zO(e){let t=e.replace(hO,BO);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function BO(e){return`-`+e.toLowerCase()}var VO={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`]},HO={tokenize:UO};function UO(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`),mw(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 WO={tokenize:KO},GO={tokenize:qO};function KO(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 AC(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(GO,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(GO,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++;AC(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 qO(e,t,n){return mw(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var JO={tokenize:YO};function YO(e){let t=this,n=e.attempt(hw,r,e.attempt(this.parser.constructs.flowInitial,i,mw(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Vw,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 XO={resolveAll:ek()},ZO=$O(`string`),QO=$O(`text`);function $O(e){return{resolveAll:ek(e===`text`?tk: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 ek(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 tk(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 nk=e({attentionMarkers:()=>uk,contentInitial:()=>ik,disable:()=>dk,document:()=>rk,flow:()=>ok,flowInitial:()=>ak,insideSpan:()=>lk,string:()=>sk,text:()=>ck}),rk={42:PT,43:PT,45:PT,48:PT,49:PT,50:PT,51:PT,52:PT,53:PT,54:PT,55:PT,56:PT,57:PT,62:_w},ik={91:Xw},ak={[-2]:kw,[-1]:kw,32:kw},ok={35:nT,42:MT,45:[HT,MT],60:sT,61:HT,95:MT,96:Ew,126:Ew},sk={38:Cw,92:xw},ck={[-5]:AT,[-4]:AT,[-3]:AT,33:ET,38:Cw,42:cw,60:[fw,mT],91:OT,92:[eT,xw],93:gT,95:cw,96:Nw},lk={null:[cw,XO]},uk={null:[42,95]},dk={null:[]};function fk(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=jC(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=sw(a,l.events,l),l.events):[]}function f(e,t){return mk(p(e),t)}function p(e){return pk(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&&AC(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 pk(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 mk(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
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 mk(e){let t={constructs:MC([tk,...(e||{}).extensions||[]]),content:n(VO),defined:[],document:n(UO),flow:n(qO),lazy:{},string:n(XO),text:n(ZO)};return t;function n(e){return n;function n(n){return dk(t,e,n)}}}function hk(e){for(;!Rw(e););return e}var gk=/[\0\t\n\r]/g;function _k(){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(gk.lastIndex=u,c=gk.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 vk={}.hasOwnProperty;function yk(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),bk(n)(hk(mk(n).document().write(_k()(e,t,!0))))}function bk(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:ie,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:F,characterReference:I,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),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(te),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:M,resourceTitleString:N,resource:P,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Sk(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]];vk.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]||wk).call(a,void 0,e[0])}for(r.position={start:xk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:xk(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:xk(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]||wk).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+oO({start:e.start,end:e.end})+`): it’s not open`);n.position.end=xk(e.end)}function u(){return TS(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=Px(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=Ce(),n.position={start:xk(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=xk(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=xk(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 te(){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.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 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 ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=dC(t),n.identifier=Px(t).toLowerCase()}function re(){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 M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function P(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Px(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function F(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=lC(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=cC(t);let i=this.stack[this.stack.length-1];i.value+=r}function I(e){let t=this.stack.pop();t.position.end=xk(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function xk(e){return{line:e.line,column:e.column,offset:e.offset}}function Sk(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Sk(e,r):Ck(e,r)}}function Ck(e,t){let n;for(n in t)if(vk.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 wk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+oO({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+oO({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+oO({start:t.start,end:t.end})+`) is still open`)}function Tk(e){let t=this;t.parser=n;function n(n){return yk(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Ek(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 Dk(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
102
|
-
`}]}function
|
|
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
|
|
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 hk(e){let t={constructs:NC([nk,...(e||{}).extensions||[]]),content:n(HO),defined:[],document:n(WO),flow:n(JO),lazy:{},string:n(ZO),text:n(QO)};return t;function n(e){return n;function n(n){return fk(t,e,n)}}}function gk(e){for(;!zw(e););return e}var _k=/[\0\t\n\r]/g;function vk(){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(_k.lastIndex=u,c=_k.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 yk={}.hasOwnProperty;function bk(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),xk(n)(gk(hk(n).document().write(vk()(e,t,!0))))}function xk(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:ie,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:F,characterReference:I,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),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(te),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:M,resourceTitleString:N,resource:P,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Ck(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]];yk.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]||Tk).call(a,void 0,e[0])}for(r.position={start:Sk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Sk(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:Sk(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]||Tk).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+sO({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Sk(e.end)}function u(){return ES(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=Fx(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=Ce(),n.position={start:Sk(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=Sk(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=Sk(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 te(){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.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 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 ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=fC(t),n.identifier=Fx(t).toLowerCase()}function re(){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 M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function P(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Fx(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function F(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=uC(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=lC(t);let i=this.stack[this.stack.length-1];i.value+=r}function I(e){let t=this.stack.pop();t.position.end=Sk(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function Sk(e){return{line:e.line,column:e.column,offset:e.offset}}function Ck(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ck(e,r):wk(e,r)}}function wk(e,t){let n;for(n in t)if(yk.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 Tk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+sO({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sO({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+sO({start:t.start,end:t.end})+`) is still open`)}function Ek(e){let t=this;t.parser=n;function n(n){return bk(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Dk(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 Ok(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
102
|
+
`}]}function kk(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 Ak(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jk(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mk(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=ow(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 Nk(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 Pk(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Fk(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 Ik(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fk(e,t);let i={src:ow(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 Lk(e,t){let n={src:ow(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 Rk(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 zk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fk(e,t);let i={href:ow(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 Bk(e,t){let n={href:ow(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 Vk(e,t,n){let r=e.all(t),i=n?Hk(n):Uk(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
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
|
|
105
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Hk(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Uk(n[r])}return t}function Uk(e){return e.spread??e.children.length>1}function Wk(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 Gk(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qk(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jk(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=fb(t.children[1]),o=db(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 Yk(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 Xk(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Zk=9,Qk=32;function $k(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(eA(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(eA(t.slice(i),i>0,!1)),a.join(``)}function eA(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Zk||t===Qk;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Zk||t===Qk;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function tA(e,t){let n={type:`text`,value:$k(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nA(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var rA={blockquote:Dk,break:Ok,code:kk,delete:Ak,emphasis:jk,footnoteReference:Mk,heading:Nk,html:Pk,imageReference:Ik,image:Lk,inlineCode:Rk,linkReference:zk,link:Bk,listItem:Vk,list:Wk,paragraph:Gk,root:Kk,strong:qk,table:Jk,tableCell:Xk,tableRow:Yk,text:tA,thematicBreak:nA,toml:iA,yaml:iA,definition:iA,footnoteDefinition:iA};function iA(){}function aA(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 oA(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function sA(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||aA,r=e.options.footnoteBackLabel||oA,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=ow(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:{...Fm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
106
106
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
107
|
-
`}]}}var
|
|
107
|
+
`}]}}var cA={}.hasOwnProperty,lA={};function uA(e,t){let n=t||lA,r=new Map,i=new Map,a={all:s,applyData:fA,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...rA,...n.handlers},one:o,options:n,patch:dA,wrap:mA};return fm(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(cA.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=Fm(n);return r.children=a.all(e),r}return Fm(e)}return(a.options.unknownHandler||pA)(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=hA(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=hA(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function dA(e,t){e.position&&(t.position=mb(e))}function fA(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,Fm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function pA(e,t){let n=t.data||{},r=`value`in t&&!(cA.call(n,`hProperties`)||cA.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 mA(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
108
108
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
109
109
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
110
|
-
`}),n}function
|
|
111
|
-
`},i)),a}function gA(e,t){return e&&`run`in e?async function(n,r){let i=hA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hA(n,{file:r,...e||t})}}function _A(e){if(e)throw e}var vA=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 yA(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 bA(){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?xA(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 xA(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 SA={basename:CA,dirname:wA,extname:TA,join:EA,sep:`/`};function CA(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);kA(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 wA(e){if(kA(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 TA(e){kA(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 EA(...e){let t=-1,n;for(;++t<e.length;)kA(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:DA(n)}function DA(e){kA(e);let t=e.codePointAt(0)===47,n=OA(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function OA(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 kA(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var AA={cwd:jA};function jA(){return`/`}function MA(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function NA(e){if(typeof e==`string`)e=new URL(e);else if(!MA(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 PA(e)}function PA(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 FA=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],IA=class{constructor(e){let t;t=e?MA(e)?{path:e}:typeof e==`string`||BA(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:AA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<FA.length;){let e=FA[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)FA.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?SA.basename(this.path):void 0}set basename(e){RA(e,`basename`),LA(e,`basename`),this.path=SA.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?SA.dirname(this.path):void 0}set dirname(e){zA(this.basename,`dirname`),this.path=SA.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?SA.extname(this.path):void 0}set extname(e){if(LA(e,`extname`),zA(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=SA.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){MA(e)&&(e=NA(e)),RA(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?SA.basename(this.path,this.extname):void 0}set stem(e){RA(e,`stem`),LA(e,`stem`),this.path=SA.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 uO(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 LA(e,t){if(e&&e.includes(SA.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+SA.sep+"`")}function RA(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function zA(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function BA(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var VA=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),HA=t(vA(),1),UA={}.hasOwnProperty,WA=new class e extends VA{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=bA()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,HA.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(qA(`data`,this.frozen),this.namespace[e]=t,this):UA.call(this.namespace,e)&&this.namespace[e]||void 0:e?(qA(`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=XA(e),n=this.parser||this.Parser;return GA(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),GA(`process`,this.parser||this.Parser),KA(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=XA(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);QA(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(),GA(`processSync`,this.parser||this.Parser),KA(`processSync`,this.compiler||this.Compiler),this.process(e,r),YA(`processSync`,`process`,t),n;function r(e,r){t=!0,_A(e),n=r}}run(e,t,n){JA(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=XA(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),YA(`runSync`,`run`,n),r;function i(e,t){_A(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=XA(t),r=this.compiler||this.Compiler;return KA(`stringify`,r),JA(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(qA(`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,HA.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];yA(o)&&yA(r)&&(r=(0,HA.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function GA(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function KA(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function qA(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 JA(e){if(!yA(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function YA(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function XA(e){return ZA(e)?e:new IA(e)}function ZA(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function QA(e){return typeof e==`string`||$A(e)}function $A(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function ej(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tj=ej();function nj(e){tj=e}var rj={exec:()=>null};function ij(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(oj.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var aj=(()=>{try{return!0}catch{return!1}})(),oj={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)}}>`)},sj=/^(?:[ \t]*(?:\n|$))+/,cj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lj=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,uj=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fj=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pj=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mj=ij(pj).replace(/bull/g,fj).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(),hj=ij(pj).replace(/bull/g,fj).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(),gj=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_j=/^[^\n]+/,vj=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yj=ij(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,vj).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),bj=ij(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fj).getRegex(),xj=`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`,Sj=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Cj=ij(`^ {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`,Sj).replace(`tag`,xj).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wj=ij(gj).replace(`hr`,uj).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`,xj).getRegex(),Tj={blockquote:ij(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,wj).getRegex(),code:cj,def:yj,fences:lj,heading:dj,hr:uj,html:Cj,lheading:mj,list:bj,newline:sj,paragraph:wj,table:rj,text:_j},Ej=ij(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,uj).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`,xj).getRegex(),Dj={...Tj,lheading:hj,table:Ej,paragraph:ij(gj).replace(`hr`,uj).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ej).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`,xj).getRegex()},Oj={...Tj,html:ij(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Sj).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:rj,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ij(gj).replace(`hr`,uj).replace(`heading`,` *#{1,6} *[^
|
|
112
|
-
]`).replace(`lheading`,
|
|
110
|
+
`}),n}function hA(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function gA(e,t){let n=uA(e,t),r=n.one(e,void 0),i=sA(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 _A(e,t){return e&&`run`in e?async function(n,r){let i=gA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return gA(n,{file:r,...e||t})}}function vA(e){if(e)throw e}var yA=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 bA(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 xA(){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?SA(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 SA(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 CA={basename:wA,dirname:TA,extname:EA,join:DA,sep:`/`};function wA(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);AA(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 TA(e){if(AA(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 EA(e){AA(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 DA(...e){let t=-1,n;for(;++t<e.length;)AA(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:OA(n)}function OA(e){AA(e);let t=e.codePointAt(0)===47,n=kA(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function kA(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 AA(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var jA={cwd:MA};function MA(){return`/`}function NA(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function PA(e){if(typeof e==`string`)e=new URL(e);else if(!NA(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 FA(e)}function FA(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 IA=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],LA=class{constructor(e){let t;t=e?NA(e)?{path:e}:typeof e==`string`||VA(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:jA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<IA.length;){let e=IA[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)IA.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?CA.basename(this.path):void 0}set basename(e){zA(e,`basename`),RA(e,`basename`),this.path=CA.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?CA.dirname(this.path):void 0}set dirname(e){BA(this.basename,`dirname`),this.path=CA.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?CA.extname(this.path):void 0}set extname(e){if(RA(e,`extname`),BA(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=CA.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){NA(e)&&(e=PA(e)),zA(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?CA.basename(this.path,this.extname):void 0}set stem(e){zA(e,`stem`),RA(e,`stem`),this.path=CA.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 dO(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 RA(e,t){if(e&&e.includes(CA.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+CA.sep+"`")}function zA(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function BA(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function VA(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var HA=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),UA=t(yA(),1),WA={}.hasOwnProperty,GA=new class e extends HA{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=xA()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,UA.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(JA(`data`,this.frozen),this.namespace[e]=t,this):WA.call(this.namespace,e)&&this.namespace[e]||void 0:e?(JA(`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=ZA(e),n=this.parser||this.Parser;return KA(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),KA(`process`,this.parser||this.Parser),qA(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=ZA(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);$A(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(),KA(`processSync`,this.parser||this.Parser),qA(`processSync`,this.compiler||this.Compiler),this.process(e,r),XA(`processSync`,`process`,t),n;function r(e,r){t=!0,vA(e),n=r}}run(e,t,n){YA(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=ZA(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),XA(`runSync`,`run`,n),r;function i(e,t){vA(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=ZA(t),r=this.compiler||this.Compiler;return qA(`stringify`,r),YA(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(JA(`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,UA.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];bA(o)&&bA(r)&&(r=(0,UA.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function KA(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function qA(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function JA(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 YA(e){if(!bA(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function XA(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function ZA(e){return QA(e)?e:new LA(e)}function QA(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function $A(e){return typeof e==`string`||ej(e)}function ej(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function tj(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nj=tj();function rj(e){nj=e}var ij={exec:()=>null};function aj(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(sj.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var oj=(()=>{try{return!0}catch{return!1}})(),sj={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)}}>`)},cj=/^(?:[ \t]*(?:\n|$))+/,lj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,uj=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dj=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pj=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,mj=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hj=aj(mj).replace(/bull/g,pj).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(),gj=aj(mj).replace(/bull/g,pj).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(),_j=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vj=/^[^\n]+/,yj=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,bj=aj(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,yj).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xj=aj(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pj).getRegex(),Sj=`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`,Cj=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wj=aj(`^ {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`,Cj).replace(`tag`,Sj).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Tj=aj(_j).replace(`hr`,dj).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`,Sj).getRegex(),Ej={blockquote:aj(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Tj).getRegex(),code:lj,def:bj,fences:uj,heading:fj,hr:dj,html:wj,lheading:hj,list:xj,newline:cj,paragraph:Tj,table:ij,text:vj},Dj=aj(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,dj).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`,Sj).getRegex(),Oj={...Ej,lheading:gj,table:Dj,paragraph:aj(_j).replace(`hr`,dj).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Dj).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`,Sj).getRegex()},kj={...Ej,html:aj(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Cj).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:ij,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:aj(_j).replace(`hr`,dj).replace(`heading`,` *#{1,6} *[^
|
|
112
|
+
]`).replace(`lheading`,hj).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Aj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Mj=/^( {2,}|\\)\n(?!\s*$)/,Nj=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pj=/[\p{P}\p{S}]/u,Fj=/[\s\p{P}\p{S}]/u,Ij=/[^\s\p{P}\p{S}]/u,Lj=aj(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Fj).getRegex(),Rj=/(?!~)[\p{P}\p{S}]/u,zj=/(?!~)[\s\p{P}\p{S}]/u,Bj=/(?:[^\s\p{P}\p{S}]|~)/u,Vj=aj(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,oj?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Hj=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Uj=aj(Hj,`u`).replace(/punct/g,Pj).getRegex(),Wj=aj(Hj,`u`).replace(/punct/g,Rj).getRegex(),Gj=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Kj=aj(Gj,`gu`).replace(/notPunctSpace/g,Ij).replace(/punctSpace/g,Fj).replace(/punct/g,Pj).getRegex(),qj=aj(Gj,`gu`).replace(/notPunctSpace/g,Bj).replace(/punctSpace/g,zj).replace(/punct/g,Rj).getRegex(),Jj=aj(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Ij).replace(/punctSpace/g,Fj).replace(/punct/g,Pj).getRegex(),Yj=aj(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Pj).getRegex(),Xj=aj(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Ij).replace(/punctSpace/g,Fj).replace(/punct/g,Pj).getRegex(),Zj=aj(/\\(punct)/,`gu`).replace(/punct/g,Pj).getRegex(),Qj=aj(/^<(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(),$j=aj(Cj).replace(`(?:-->|$)`,`-->`).getRegex(),eM=aj(`^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`,$j).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tM=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nM=aj(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,tM).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rM=aj(/^!?\[(label)\]\[(ref)\]/).replace(`label`,tM).replace(`ref`,yj).getRegex(),iM=aj(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,yj).getRegex(),aM=aj(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,rM).replace(`nolink`,iM).getRegex(),oM=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sM={_backpedal:ij,anyPunctuation:Zj,autolink:Qj,blockSkip:Vj,br:Mj,code:jj,del:ij,delLDelim:ij,delRDelim:ij,emStrongLDelim:Uj,emStrongRDelimAst:Kj,emStrongRDelimUnd:Jj,escape:Aj,link:nM,nolink:iM,punctuation:Lj,reflink:rM,reflinkSearch:aM,tag:eM,text:Nj,url:ij},cM={...sM,link:aj(/^!?\[(label)\]\((.*?)\)/).replace(`label`,tM).getRegex(),reflink:aj(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,tM).getRegex()},lM={...sM,emStrongRDelimAst:qj,emStrongLDelim:Wj,delLDelim:Yj,delRDelim:Xj,url:aj(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,oM).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:aj(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,oM).getRegex()},uM={...lM,br:aj(Mj).replace(`{2,}`,`*`).getRegex(),text:aj(lM.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},dM={normal:Ej,gfm:Oj,pedantic:kj},fM={normal:sM,gfm:lM,breaks:uM,pedantic:cM},pM={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},mM=e=>pM[e];function hM(e,t){if(t){if(sj.escapeTest.test(e))return e.replace(sj.escapeReplace,mM)}else if(sj.escapeTestNoEncode.test(e))return e.replace(sj.escapeReplaceNoEncode,mM);return e}function gM(e){try{e=encodeURI(e).replace(sj.percentDecode,`%`)}catch{return null}return e}function _M(e,t){let n=e.replace(sj.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(sj.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(sj.slashPipe,`|`);return n}function vM(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 yM(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 bM(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 xM(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 SM(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
113
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
|
|
115
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=
|
|
116
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=
|
|
114
|
+
`)}var CM=class{options;rules;lexer;constructor(e){this.options=e||nj}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:vM(e,`
|
|
115
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=SM(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=vM(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:vM(t[0],`
|
|
116
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=vM(t[0],`
|
|
117
117
|
`).split(`
|
|
118
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
119
|
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
@@ -124,17 +124,17 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
124
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
125
|
`+e.join(`
|
|
126
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=
|
|
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=bM(t[2].split(`
|
|
128
128
|
`,1)[0],t[1].length),l=e.split(`
|
|
129
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
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
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
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
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=
|
|
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(
|
|
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=
|
|
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(
|
|
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=_M(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(_M(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=vM(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=yM(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)),xM(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 xM(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}}}},wM=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||nj,this.options.tokenizer=this.options.tokenizer||new CM,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:sj,block:dM.normal,inline:fM.normal};this.options.pedantic?(t.block=dM.pedantic,t.inline=fM.pedantic):this.options.gfm&&(t.block=dM.gfm,this.options.breaks?t.inline=fM.breaks:t.inline=fM.gfm),this.tokenizer.rules=t}static get rules(){return{block:dM,inline:fM}}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(sj.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(sj.tabCharGlobal,` `).replace(sj.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
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
139
|
`)?``:`
|
|
140
140
|
`)+r.raw,n.text+=`
|
|
@@ -147,9 +147,9 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
147
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
148
|
`)?``:`
|
|
149
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}},
|
|
151
|
-
`;return r?`<pre><code class="language-`+
|
|
152
|
-
`:`<pre><code>`+(n?i:
|
|
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}},TM=class{options;parser;constructor(e){this.options=e||nj}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(sj.notSpaceStart)?.[0],i=e.replace(sj.endingNewline,``)+`
|
|
151
|
+
`;return r?`<pre><code class="language-`+hM(r)+`">`+(n?i:hM(i,!0))+`</code></pre>
|
|
152
|
+
`:`<pre><code>`+(n?i:hM(i,!0))+`</code></pre>
|
|
153
153
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
154
154
|
${this.parser.parse(e)}</blockquote>
|
|
155
155
|
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
@@ -165,19 +165,19 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
165
165
|
`}tablerow({text:e}){return`<tr>
|
|
166
166
|
${e}</tr>
|
|
167
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>${
|
|
169
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+
|
|
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),
|
|
171
|
-
`;)t--;return e.slice(0,t)},
|
|
172
|
-
`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,_.jsx)(oN.Provider,{value:{code:e},children:(0,_.jsxs)(aN,{isIncomplete:i,language:t,children:[(0,_.jsx)(cN,{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)(iN,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,_.jsx)(uN,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},fN={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`})})},pN=(0,d.createContext)(fN),mN=(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},hN=({icons:e,children:t})=>{let n=(0,d.useRef)(e),r=(0,d.useRef)(e?{...fN,...e}:fN);mN(n.current,e)||(n.current=e,r.current=e?{...fN,...e}:fN);let i=r.current;return(0,_.jsx)(pN.Provider,{value:i,children:t})},gN=()=>(0,d.useContext)(pN),_N={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`},vN=(0,d.createContext)(_N),yN=()=>(0,d.useContext)(vN),bN=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=tN(),[c,l]=(0,d.useState)(!1),u=(0,d.useRef)(0),{code:f}=sN(),{isAnimating:p}=(0,d.useContext)(EF),m=yN(),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=gN(),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})})},xN={"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`},SN=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=tN(),{code:c}=sN(),{isAnimating:l}=(0,d.useContext)(EF),u=yN(),f=gN(),p=a??c,m=`file.${n&&n in xN?xN[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{$M(m,p,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,_.jsx)(f.DownloadIcon,{size:14})})},CN=()=>{let{Loader2Icon:e}=gN(),t=tN();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`)})})]})},wN=/\.[^/.]+$/,TN=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=gN(),c=tN(),l=(0,d.useRef)(null),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(!1),h=yN(),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(wN,``)}.${i}`}$M(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},EN=0,DN=()=>{EN+=1,EN===1&&(document.body.style.overflow=`hidden`)},ON=()=>{EN=Math.max(0,EN-1),EN===0&&(document.body.style.overflow=``)},kN=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=gN(),c=tN(),[l,u]=(0,d.useState)(!1),f=yN(),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){DN();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),ON()}}},[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},AN=(0,d.createContext)(null),jN=()=>(0,d.useContext)(AN),MN=()=>jN()?.code??null,NN=()=>jN()?.mermaid??null,PN=e=>{var t;let n=jN();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},FN=(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}),IN=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=tN(),[s,c]=(0,d.useState)(!1),l=(0,d.useRef)(null),{isAnimating:u}=(0,d.useContext)(EF),f=gN(),p=NN(),m=yN(),h=async t=>{try{if(t===`mmd`){$M(`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`){$M(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){$M(`diagram.png`,await FN(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]})},LN=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=gN(),c=tN(),[l,u]=(0,d.useState)(!1),{isAnimating:f,controls:p}=(0,d.useContext)(EF),m=yN(),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){DN();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),ON()}}},[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)(AF,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:h})})]}),document.body):null]})},RN=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}},zN=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===`
|
|
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>${hM(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=gM(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+hM(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=gM(e);if(i===null)return hM(n);e=i;let a=`<img src="${e}" alt="${hM(n)}"`;return t&&(a+=` title="${hM(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:hM(e.text)}},EM=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}},DM=class e{options;renderer;textRenderer;constructor(e){this.options=e||nj,this.options.renderer=this.options.renderer||new TM,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new EM}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}},OM=class{options;block;constructor(e){this.options=e||nj}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?wM.lex:wM.lexInline}provideParser(e=this.block){return e?DM.parse:DM.parseInline}},kM=new class{defaults=tj();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=DM;Renderer=TM;TextRenderer=EM;Lexer=wM;Tokenizer=CM;Hooks=OM;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 TM(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 CM(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 OM;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];OM.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&OM.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 wM.lex(e,t??this.defaults)}parser(e,t){return DM.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?wM.lex:wM.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?DM.parse:DM.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?wM.lex:wM.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?DM.parse:DM.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>`+hM(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function AM(e,t){return kM.parse(e,t)}AM.options=AM.setOptions=function(e){return kM.setOptions(e),AM.defaults=kM.defaults,rj(AM.defaults),AM},AM.getDefaults=tj,AM.defaults=nj,AM.use=function(...e){return kM.use(...e),AM.defaults=kM.defaults,rj(AM.defaults),AM},AM.walkTokens=function(e,t){return kM.walkTokens(e,t)},AM.parseInline=kM.parseInline,AM.Parser=DM,AM.parser=DM.parse,AM.Renderer=TM,AM.TextRenderer=EM,AM.Lexer=wM,AM.lexer=wM.lex,AM.Tokenizer=CM,AM.Hooks=OM,AM.parse=AM,AM.options,AM.setOptions,AM.use,AM.walkTokens,AM.parseInline,DM.parse,wM.lex;var jM=`modulepreload`,MM=function(e){return`/`+e},NM={},$=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=MM(t,n),t in NM)return;NM[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`:jM,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)})},PM=300,FM=`300px`,IM=500;function LM(e={}){let{immediate:t=!1,debounceDelay:n=PM,rootMargin:r=FM,idleTimeout:i=IM}=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 RM=/\s/,zM=/^\s+$/,BM=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),VM=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,HM=e=>e.some(e=>VM(e)&&BM.has(e.tagName)),UM=e=>{let t=[],n=``,r=!1;for(let i of e){let e=RM.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},WM=e=>{let t=[],n=``;for(let r of e)RM.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},GM=(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}]}},KM=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(HM(t))return lm;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`?WM(c):UM(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,zM.test(e))return{type:`text`,value:e};let r=u>0&&t<u,a=r?0:i.newIndex++*n.stagger;return GM(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...d),s+d.length},qM=0;function JM(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=qM++,i=()=>e=>{let r={count:0,newIndex:0};um(e,`text`,(e,i)=>KM(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}}}JM();var YM=(0,d.createContext)(!1),XM=()=>(0,d.useContext)(YM),ZM=(...e)=>fd(Hl(e)),QM=(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(` `)},$M=e=>e?(...t)=>QM(e,fd(Hl(t))):ZM,eN=(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)},tN=(0,d.createContext)(ZM),nN=()=>(0,d.useContext)(tN),rN=ZM(`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`),iN=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},aN=(0,d.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=nN(),c=(0,d.useMemo)(()=>s(rN),[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,iN(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),oN=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,_.jsx)(`div`,{className:nN()(`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}),sN=(0,d.createContext)({code:``}),cN=()=>(0,d.useContext)(sN),lN=({language:e})=>{let t=nN();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})})},uN=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
171
|
+
`;)t--;return e.slice(0,t)},dN=(0,d.lazy)(()=>$(()=>import(`./highlighted-body-OFNGDK62-0FuBVb0_.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1]))),fN=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=nN(),l=(0,d.useMemo)(()=>uN(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)(sN.Provider,{value:{code:e},children:(0,_.jsxs)(oN,{isIncomplete:i,language:t,children:[(0,_.jsx)(lN,{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)(aN,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,_.jsx)(dN,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},pN={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`})})},mN=(0,d.createContext)(pN),hN=(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},gN=({icons:e,children:t})=>{let n=(0,d.useRef)(e),r=(0,d.useRef)(e?{...pN,...e}:pN);hN(n.current,e)||(n.current=e,r.current=e?{...pN,...e}:pN);let i=r.current;return(0,_.jsx)(mN.Provider,{value:i,children:t})},_N=()=>(0,d.useContext)(mN),vN={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`},yN=(0,d.createContext)(vN),bN=()=>(0,d.useContext)(yN),xN=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=nN(),[c,l]=(0,d.useState)(!1),u=(0,d.useRef)(0),{code:f}=cN(),{isAnimating:p}=(0,d.useContext)(DF),m=bN(),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=_N(),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})})},SN={"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`},CN=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=nN(),{code:c}=cN(),{isAnimating:l}=(0,d.useContext)(DF),u=bN(),f=_N(),p=a??c,m=`file.${n&&n in SN?SN[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{eN(m,p,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,_.jsx)(f.DownloadIcon,{size:14})})},wN=()=>{let{Loader2Icon:e}=_N(),t=nN();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`)})})]})},TN=/\.[^/.]+$/,EN=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=_N(),c=nN(),l=(0,d.useRef)(null),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(!1),h=bN(),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(TN,``)}.${i}`}eN(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},DN=0,ON=()=>{DN+=1,DN===1&&(document.body.style.overflow=`hidden`)},kN=()=>{DN=Math.max(0,DN-1),DN===0&&(document.body.style.overflow=``)},AN=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=_N(),c=nN(),[l,u]=(0,d.useState)(!1),f=bN(),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){ON();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kN()}}},[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},jN=(0,d.createContext)(null),MN=()=>(0,d.useContext)(jN),NN=()=>MN()?.code??null,PN=()=>MN()?.mermaid??null,FN=e=>{var t;let n=MN();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},IN=(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}),LN=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=nN(),[s,c]=(0,d.useState)(!1),l=(0,d.useRef)(null),{isAnimating:u}=(0,d.useContext)(DF),f=_N(),p=PN(),m=bN(),h=async t=>{try{if(t===`mmd`){eN(`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`){eN(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){eN(`diagram.png`,await IN(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]})},RN=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=_N(),c=nN(),[l,u]=(0,d.useState)(!1),{isAnimating:f,controls:p}=(0,d.useContext)(DF),m=bN(),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){ON();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kN()}}},[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)(jF,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:h})})]}),document.body):null]})},zN=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}},BN=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
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
|
-
`)},
|
|
174
|
+
`)},VN=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
|
|
175
175
|
`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
|
|
176
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
|
-
`)},
|
|
178
|
-
`)},UN=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=tN(),[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)(EF),m=yN(),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=RN(t),o=({csv:zN,tsv:BN,md:HN}[e]||HN)(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=gN(),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]})},WN=({children:e,className:t,onDownload:n,onError:r})=>{let i=tN(),[a,o]=(0,d.useState)(!1),s=(0,d.useRef)(null),{isAnimating:c}=(0,d.useContext)(EF),l=yN(),u=gN(),f=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=RN(t),a=e===`csv`?zN(i):HN(i);$M(`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]})},GN=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=gN(),o=tN(),[s,c]=(0,d.useState)(!1),{isAnimating:l}=(0,d.useContext)(EF),u=yN(),f=()=>{c(!0)},p=()=>{c(!1)};return(0,d.useEffect)(()=>{if(s){DN();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),ON()}}},[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)(UN,{}):null,r?(0,_.jsx)(WN,{}):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]})},KN=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=tN(),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)(UN,{}):null,l?(0,_.jsx)(WN,{}):null,u?(0,_.jsx)(GN,{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})})]})},qN=/startLine=(\d+)/,JN=/\bnoLineNumbers\b/,YN=(0,d.lazy)(()=>$(()=>import(`./mermaid-GHXKKRXX-BuB6-G4r.js`).then(e=>({default:e.Mermaid})),[])),XN=/language-([^\s]+)/;function ZN(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 QN(e,t){return e.className===t.className&&ZN(e.node,t.node)}var $N=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,eP=(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},tP=(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},nP=(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},rP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`ol`,{className:tN()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>QN(e,t));rP.displayName=`MarkdownOl`;var iP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`li`,{className:tN()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&ZN(e.node,t.node));iP.displayName=`MarkdownLi`;var aP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`ul`,{className:tN()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>QN(e,t));aP.displayName=`MarkdownUl`;var oP=(0,d.memo)(({className:e,node:t,...n})=>(0,_.jsx)(`hr`,{className:tN()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>QN(e,t));oP.displayName=`MarkdownHr`;var sP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`span`,{className:tN()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>QN(e,t));sP.displayName=`MarkdownStrong`;var cP=(0,d.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=tN(),{linkSafety:o}=(0,d.useContext)(EF),[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)(kN,{...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)=>QN(e,t)&&e.href===t.href);cP.displayName=`MarkdownA`;var lP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h1`,{className:tN()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>QN(e,t));lP.displayName=`MarkdownH1`;var uP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h2`,{className:tN()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>QN(e,t));uP.displayName=`MarkdownH2`;var dP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h3`,{className:tN()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>QN(e,t));dP.displayName=`MarkdownH3`;var fP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h4`,{className:tN()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>QN(e,t));fP.displayName=`MarkdownH4`;var pP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h5`,{className:tN()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>QN(e,t));pP.displayName=`MarkdownH5`;var mP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h6`,{className:tN()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>QN(e,t));mP.displayName=`MarkdownH6`;var hP=(0,d.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,d.useContext)(EF);return(0,_.jsx)(KN,{className:t,showControls:$N(i,`table`),showCopy:eP(i,`copy`),showDownload:eP(i,`download`),showFullscreen:eP(i,`fullscreen`),...r,children:e})},(e,t)=>QN(e,t));hP.displayName=`MarkdownTable`;var gP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`thead`,{className:tN()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>QN(e,t));gP.displayName=`MarkdownThead`;var _P=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`tbody`,{className:tN()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>QN(e,t));_P.displayName=`MarkdownTbody`;var vP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`tr`,{className:tN()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>QN(e,t));vP.displayName=`MarkdownTr`;var yP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`th`,{className:tN()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>QN(e,t));yP.displayName=`MarkdownTh`;var bP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`td`,{className:tN()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>QN(e,t));bP.displayName=`MarkdownTd`;var xP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`blockquote`,{className:tN()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>QN(e,t));xP.displayName=`MarkdownBlockquote`;var SP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`sup`,{className:tN()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>QN(e,t));SP.displayName=`MarkdownSup`;var CP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`sub`,{className:tN()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>QN(e,t));CP.displayName=`MarkdownSub`;var wP=(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===rP){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)=>QN(e,t));wP.displayName=`MarkdownSection`;var TP=(0,d.memo)(({node:e,className:t,children:n,...r})=>{let i=tN(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,d.useContext)(EF),l=NN(),u=YM(),f=(t?.match(XN))?.at(1)??``,p=PN(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(qN),g=h?Number.parseInt(h[1],10):void 0,v=g!==void 0&&g>=1?g:void 0,y=!(m&&JN.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)(CN,{}),children:(0,_.jsx)(e,{code:b,isIncomplete:u,language:f,meta:m})})}if(f===`mermaid`&&l){let e=$N(s,`mermaid`),n=nP(s,`download`),r=nP(s,`copy`),a=nP(s,`fullscreen`),c=nP(s,`panZoom`),l=e&&(n||r||a);return(0,_.jsx)(d.Suspense,{fallback:(0,_.jsx)(CN,{}),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)(IN,{chart:b,config:o?.config}):null,r?(0,_.jsx)(bN,{code:b}):null,a?(0,_.jsx)(LN,{chart:b,config:o?.config}):null]})}):null,(0,_.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,_.jsx)(YN,{chart:b,config:o?.config,showControls:c})})]})})}let x=$N(s,`code`),S=tP(s,`download`),C=tP(s,`copy`);return(0,_.jsx)(dN,{className:t,code:b,isIncomplete:u,language:f,lineNumbers:y,startLine:v,children:x?(0,_.jsxs)(_.Fragment,{children:[S?(0,_.jsx)(SN,{code:b,language:f}):null,C?(0,_.jsx)(bN,{}):null]}):null})},(e,t)=>e.className===t.className&&ZN(e.node,t.node));TP.displayName=`MarkdownCode`;var EP=(0,d.memo)(TN,(e,t)=>e.className===t.className&&ZN(e.node,t.node));EP.displayName=`MarkdownImg`;var DP=(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)=>QN(e,t));DP.displayName=`MarkdownParagraph`;var OP={ol:rP,li:iP,ul:aP,hr:oP,strong:sP,a:cP,h1:lP,h2:uP,h3:dP,h4:fP,h5:pP,h6:mP,table:hP,thead:gP,tbody:_P,tr:vP,th:yP,td:bP,blockquote:xP,code:TP,img:EP,pre:({children:e})=>(0,d.isValidElement)(e)?(0,d.cloneElement)(e,{"data-block":`true`}):e,sup:SP,sub:CP,p:DP,section:wP},kP=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,AP=/\p{L}/u;function jP(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(kP.test(e))return`rtl`;if(AP.test(e))return`ltr`}return`ltr`}var MP=/^[ \t]{0,3}(`{3,}|~{3,})/,NP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,PP=e=>{let t=e.split(`
|
|
179
|
-
`),n=null,r=0;for(let e of t){let t=
|
|
180
|
-
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&
|
|
177
|
+
`)},HN=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(``)},UN=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=>HN(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?HN(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>HN(e)).join(` | `)} |`,i+=1;return r.join(`
|
|
178
|
+
`)},WN=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=nN(),[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)(DF),m=bN(),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=zN(t),o=({csv:BN,tsv:VN,md:UN}[e]||UN)(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=_N(),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]})},GN=({children:e,className:t,onDownload:n,onError:r})=>{let i=nN(),[a,o]=(0,d.useState)(!1),s=(0,d.useRef)(null),{isAnimating:c}=(0,d.useContext)(DF),l=bN(),u=_N(),f=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=zN(t),a=e===`csv`?BN(i):UN(i);eN(`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]})},KN=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=_N(),o=nN(),[s,c]=(0,d.useState)(!1),{isAnimating:l}=(0,d.useContext)(DF),u=bN(),f=()=>{c(!0)},p=()=>{c(!1)};return(0,d.useEffect)(()=>{if(s){ON();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kN()}}},[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)(WN,{}):null,r?(0,_.jsx)(GN,{}):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]})},qN=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=nN(),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)(WN,{}):null,l?(0,_.jsx)(GN,{}):null,u?(0,_.jsx)(KN,{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})})]})},JN=/startLine=(\d+)/,YN=/\bnoLineNumbers\b/,XN=(0,d.lazy)(()=>$(()=>import(`./mermaid-GHXKKRXX-BQrwnoIu.js`).then(e=>({default:e.Mermaid})),[])),ZN=/language-([^\s]+)/;function QN(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 $N(e,t){return e.className===t.className&&QN(e.node,t.node)}var eP=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,tP=(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},nP=(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},rP=(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},iP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`ol`,{className:nN()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>$N(e,t));iP.displayName=`MarkdownOl`;var aP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`li`,{className:nN()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&QN(e.node,t.node));aP.displayName=`MarkdownLi`;var oP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`ul`,{className:nN()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>$N(e,t));oP.displayName=`MarkdownUl`;var sP=(0,d.memo)(({className:e,node:t,...n})=>(0,_.jsx)(`hr`,{className:nN()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>$N(e,t));sP.displayName=`MarkdownHr`;var cP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`span`,{className:nN()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>$N(e,t));cP.displayName=`MarkdownStrong`;var lP=(0,d.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=nN(),{linkSafety:o}=(0,d.useContext)(DF),[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)(AN,{...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)=>$N(e,t)&&e.href===t.href);lP.displayName=`MarkdownA`;var uP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h1`,{className:nN()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>$N(e,t));uP.displayName=`MarkdownH1`;var dP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h2`,{className:nN()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>$N(e,t));dP.displayName=`MarkdownH2`;var fP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h3`,{className:nN()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>$N(e,t));fP.displayName=`MarkdownH3`;var pP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h4`,{className:nN()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>$N(e,t));pP.displayName=`MarkdownH4`;var mP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h5`,{className:nN()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>$N(e,t));mP.displayName=`MarkdownH5`;var hP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`h6`,{className:nN()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>$N(e,t));hP.displayName=`MarkdownH6`;var gP=(0,d.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,d.useContext)(DF);return(0,_.jsx)(qN,{className:t,showControls:eP(i,`table`),showCopy:tP(i,`copy`),showDownload:tP(i,`download`),showFullscreen:tP(i,`fullscreen`),...r,children:e})},(e,t)=>$N(e,t));gP.displayName=`MarkdownTable`;var _P=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`thead`,{className:nN()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>$N(e,t));_P.displayName=`MarkdownThead`;var vP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`tbody`,{className:nN()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>$N(e,t));vP.displayName=`MarkdownTbody`;var yP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`tr`,{className:nN()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>$N(e,t));yP.displayName=`MarkdownTr`;var bP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`th`,{className:nN()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>$N(e,t));bP.displayName=`MarkdownTh`;var xP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`td`,{className:nN()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>$N(e,t));xP.displayName=`MarkdownTd`;var SP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`blockquote`,{className:nN()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>$N(e,t));SP.displayName=`MarkdownBlockquote`;var CP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`sup`,{className:nN()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>$N(e,t));CP.displayName=`MarkdownSup`;var wP=(0,d.memo)(({children:e,className:t,node:n,...r})=>(0,_.jsx)(`sub`,{className:nN()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>$N(e,t));wP.displayName=`MarkdownSub`;var TP=(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===iP){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)=>$N(e,t));TP.displayName=`MarkdownSection`;var EP=(0,d.memo)(({node:e,className:t,children:n,...r})=>{let i=nN(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,d.useContext)(DF),l=PN(),u=XM(),f=(t?.match(ZN))?.at(1)??``,p=FN(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(JN),g=h?Number.parseInt(h[1],10):void 0,v=g!==void 0&&g>=1?g:void 0,y=!(m&&YN.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)(wN,{}),children:(0,_.jsx)(e,{code:b,isIncomplete:u,language:f,meta:m})})}if(f===`mermaid`&&l){let e=eP(s,`mermaid`),n=rP(s,`download`),r=rP(s,`copy`),a=rP(s,`fullscreen`),c=rP(s,`panZoom`),l=e&&(n||r||a);return(0,_.jsx)(d.Suspense,{fallback:(0,_.jsx)(wN,{}),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)(LN,{chart:b,config:o?.config}):null,r?(0,_.jsx)(xN,{code:b}):null,a?(0,_.jsx)(RN,{chart:b,config:o?.config}):null]})}):null,(0,_.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,_.jsx)(XN,{chart:b,config:o?.config,showControls:c})})]})})}let x=eP(s,`code`),S=nP(s,`download`),C=nP(s,`copy`);return(0,_.jsx)(fN,{className:t,code:b,isIncomplete:u,language:f,lineNumbers:y,startLine:v,children:x?(0,_.jsxs)(_.Fragment,{children:[S?(0,_.jsx)(CN,{code:b,language:f}):null,C?(0,_.jsx)(xN,{}):null]}):null})},(e,t)=>e.className===t.className&&QN(e.node,t.node));EP.displayName=`MarkdownCode`;var DP=(0,d.memo)(EN,(e,t)=>e.className===t.className&&QN(e.node,t.node));DP.displayName=`MarkdownImg`;var OP=(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)=>$N(e,t));OP.displayName=`MarkdownParagraph`;var kP={ol:iP,li:aP,ul:oP,hr:sP,strong:cP,a:lP,h1:uP,h2:dP,h3:fP,h4:pP,h5:mP,h6:hP,table:gP,thead:_P,tbody:vP,tr:yP,th:bP,td:xP,blockquote:SP,code:EP,img:DP,pre:({children:e})=>(0,d.isValidElement)(e)?(0,d.cloneElement)(e,{"data-block":`true`}):e,sup:CP,sub:wP,p:OP,section:TP},AP=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,jP=/\p{L}/u;function MP(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(AP.test(e))return`rtl`;if(jP.test(e))return`ltr`}return`ltr`}var NP=/^[ \t]{0,3}(`{3,}|~{3,})/,PP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,FP=e=>{let t=e.split(`
|
|
179
|
+
`),n=null,r=0;for(let e of t){let t=NP.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},IP=e=>{let t=e.split(`
|
|
180
|
+
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&PP.test(t))return!0}return!1},LP=()=>e=>{fm(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},RP=[],zP={allowDangerousHtml:!0},BP=new WeakMap,VP=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=BP.get(e);n||(n=e.name,BP.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=BP.get(r);e||(e=r.name,BP.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()}},HP=e=>{let t=UP(e),n=e.children||``;return XP(t.runSync(t.parse(n),n),e)},UP=e=>{let t=VP.get(e);if(t)return t;let n=GP(e);return VP.set(e,n),n},WP=e=>e.some(e=>Array.isArray(e)?e[0]===Fb:e===Fb),GP=e=>{let t=e.rehypePlugins||RP,n=e.remarkPlugins||RP,r=WP(t)?n:[...n,LP],i=e.remarkRehypeOptions?{...zP,...e.remarkRehypeOptions}:zP;return GA().use(Ek).use(r).use(_A,i).use(t)},KP=e=>e,qP=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},JP=(e,t)=>{for(let n in VO)if(Object.hasOwn(VO,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=VO[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},YP=(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},XP=(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||KP;fm(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return qP(c,s,a,e.value),s;if(e.type===`element`&&(JP(e,t),YP(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 yO(e,{Fragment:_.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0})},ZP=/\[\^[\w-]{1,200}\](?!:)/,QP=/\[\^[\w-]{1,200}\]:/,$P=/<(\w+)[\s>]/,eF=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),tF=new Map,nF=new Map,rF=e=>{let t=e.toLowerCase(),n=tF.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return tF.set(t,r),r},iF=e=>{let t=e.toLowerCase(),n=nF.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return nF.set(t,r),r},aF=(e,t)=>{if(eF.has(t.toLowerCase()))return 0;let n=e.match(rF(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},oF=(e,t)=>{let n=e.match(iF(t));return n?n.length:0},sF=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},cF=e=>{let t=ZP.test(e),n=QP.test(e);if(t||n)return[e];let r=wM.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=aF(t,e),o=oF(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($P);if(e){let n=e[1];aF(t,n)>oF(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(sF(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},lF=(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
181
|
|
|
182
182
|
`))return t+n+r;let i=n.replace(/\n\n/g,`
|
|
183
183
|
<!---->
|
|
@@ -187,9 +187,9 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
187
187
|
`)?``:`
|
|
188
188
|
`)}${r}
|
|
189
189
|
|
|
190
|
-
`})}return n},lF=/([\\`*_~[\]|])/g,uF=e=>e.replace(lF,`\\$1`),dF=(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+uF(n).replace(/\n\n/g,` `)+r)}return n},fF=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(fF).join(``):``,pF=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));dm(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=fF(e);e.children=t?[{type:`text`,value:t}]:[]}})},mF=()=>e=>{dm(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},hF=/^[ \t]*<[\w!/?-]/,gF=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,_F=e=>typeof e!=`string`||e.length===0||!hF.test(e)?e:e.replace(gF,`$1`),vF={...Ib,protocols:{...Ib.protocols,href:[...Ib.protocols?.href??[],`tel`]},attributes:{...Ib.attributes,code:[...Ib.attributes?.code??[],`metastring`]}},yF={raw:Pb,sanitize:[$b,vF],harden:[pm,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},bF={gfm:[hE,{}],codeMeta:mF},xF=Object.values(yF),SF=Object.values(bF),CF={block:` ▋`,circle:` ●`},wF=[`github-light`,`github-dark`],TF={enabled:!0},EF=(0,d.createContext)({shikiTheme:wF,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:TF}),DF=(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?_F(e):e,l=(0,_.jsx)(VP,{...s,children:c});return(0,_.jsx)(JM.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)});DF.displayName=`Block`;var OF=(0,d.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=xF,remarkPlugins:s=SF,className:c,shikiTheme:l=wF,mermaid:u,controls:f=!0,isAnimating:p=!1,animated:m,BlockComponent:h=DF,parseMarkdownIntoBlocksFn:g=sF,caret:v,plugins:y,remend:b,linkSafety:x=TF,lineNumbers:S=!0,allowedTags:C,literalTagContent:w,translations:T,icons:E,prefix:D,onAnimationStart:O,onAnimationEnd:ee,...te})=>{let k=(0,d.useId)(),[A,j]=(0,d.useTransition)(),ne=(0,d.useMemo)(()=>QM(D),[D]),re=(0,d.useRef)(null),M=(0,d.useRef)(O),N=(0,d.useRef)(ee);M.current=O,N.current=ee,(0,d.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=re.current;if(re.current=p,i===null){p&&((e=M.current)==null||e.call(M));return}p&&!i?(n=M.current)==null||n.call(M):!p&&i&&((r=N.current)==null||r.call(N))},[p,t]);let P=(0,d.useMemo)(()=>C?Object.keys(C):[],[C]),ie=(0,d.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?JD(e,b):e;return w&&w.length>0&&(n=dF(n,w)),P.length>0&&(n=cF(n,P)),n},[e,t,r,b,P,w]),ae=(0,d.useMemo)(()=>g(ie),[ie,g]),[oe,F]=(0,d.useState)(ae);(0,d.useEffect)(()=>{t===`streaming`&&!ue?j(()=>{F(ae)}):F(ae)},[ae,t]);let I=t===`streaming`?oe:ae,se=(0,d.useMemo)(()=>n===`auto`?I.map(jP):void 0,[I,n]),ce=(0,d.useMemo)(()=>I.map((e,t)=>`${k}-${t}`),[I.length,k]),le=(0,d.useMemo)(()=>m===!0?`true`:m?JSON.stringify(m):``,[m]),ue=(0,d.useMemo)(()=>le?le===`true`?qM():qM(m):null,[le]),de=(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]),fe=(0,d.useMemo)(()=>({..._N,...T}),[(0,d.useMemo)(()=>T?JSON.stringify(T):``,[T])]),pe=(0,d.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...OP,...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]),me=(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]),he=(0,d.useMemo)(()=>{let e=o;if(C&&Object.keys(C).length>0&&o===xF){let t={...vF,tagNames:[...vF.tagNames??[],...Object.keys(C)],attributes:{...vF.attributes,...C}};e=[yF.raw,[$b,t],yF.harden]}return w&&w.length>0&&(e=[...e,[pF,w]]),y!=null&&y.math&&(e=[...e,y.math.rehypePlugin]),ue&&p&&(e=[...e,ue.rehypePlugin]),e},[o,y?.math,ue,p,C,w]),ge=(0,d.useMemo)(()=>{if(!p||I.length===0)return!1;let e=I.at(-1);return PP(e)||FP(e)},[p,I]),_e=(0,d.useMemo)(()=>v&&p&&!ge?{"--streamdown-caret":`"${CF[v]}"`}:void 0,[v,p,ge]);return t===`static`?(0,_.jsx)(vN.Provider,{value:fe,children:(0,_.jsx)(AN.Provider,{value:y??null,children:(0,_.jsx)(EF.Provider,{value:de,children:(0,_.jsx)(hN,{icons:E,children:(0,_.jsx)(eN.Provider,{value:ne,children:(0,_.jsx)(`div`,{className:ne(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?jP(ie):n,children:(0,_.jsx)(VP,{components:pe,rehypePlugins:he,remarkPlugins:me,...te,children:ie})})})})})})}):(0,_.jsx)(vN.Provider,{value:fe,children:(0,_.jsx)(AN.Provider,{value:y??null,children:(0,_.jsx)(EF.Provider,{value:de,children:(0,_.jsx)(hN,{icons:E,children:(0,_.jsx)(eN.Provider,{value:ne,children:(0,_.jsxs)(`div`,{className:ne(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,v&&!ge?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:_e,children:[I.length===0&&v&&p&&(0,_.jsx)(`span`,{}),I.map((e,t)=>{let a=t===I.length-1,o=p&&a&&PP(e);return(0,_.jsx)(h,{animatePlugin:ue,components:pe,content:e,dir:se?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:he,remarkPlugins:me,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...te},ce[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);OF.displayName=`Streamdown`;var kF=({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}=gN(),f=tN(),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]),te=(0,d.useCallback)(e=>{e.preventDefault(),E(e.deltaY>0?-i:i)},[E,i]),k=(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]),A=(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]),j=(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`,te,{passive:!1}),()=>{e.removeEventListener(`wheel`,te)}},[te]),(0,d.useEffect)(()=>{let e=m.current;if(e&&b)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,A,{passive:!1}),e.addEventListener(`pointerup`,j),e.addEventListener(`pointercancel`,j),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,A),e.removeEventListener(`pointerup`,j),e.removeEventListener(`pointercancel`,j)}},[b,A,j]),(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:k,ref:m,role:`application`,style:{transform:`translate(${v.x}px, ${v.y}px) scale(${h})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},AF=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=tN(),[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)(EF),y=NN(),b=v?.errorComponent,{shouldRender:x,containerRef:S}=IM({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)(kF,{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`})})})},jF=Object.defineProperty,MF=Object.getOwnPropertyDescriptor,NF=Object.getOwnPropertyNames,PF=Object.prototype.hasOwnProperty,FF=(e,t)=>{let n={};for(var r in e)jF(n,r,{get:e[r],enumerable:!0});return t||jF(n,Symbol.toStringTag,{value:`Module`}),n},IF=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=NF(t),a=0,o=i.length,s;a<o;a++)s=i[a],!PF.call(e,s)&&s!==n&&jF(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=MF(t,s))||r.enumerable});return e},LF=(e,t,n)=>(IF(e,t,`default`),n&&IF(n,t,`default`)),RF=[{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-Cde9qVP5.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4,5])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-DefScAWP.js`),__vite__mapDeps([6,2,1,3,4,5,7])))},{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-w753UHCW.js`),__vite__mapDeps([8,4,1,3,5,9,10,11])))},{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-DBA9Da7s.js`),__vite__mapDeps([12,4,1,5,9,13,14,15])))},{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-Bs7YDhA3.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-B-u5p0Rp.js`),__vite__mapDeps([16,4,1,17,3,5,9,18,10,11])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-CPV9KqsG.js`),__vite__mapDeps([19,20])))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-Bv0tI3pq.js`).then(e=>e.n),__vite__mapDeps([21,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([22,23])))},{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-CkQrskif.js`),__vite__mapDeps([24,3,1,4,5,11])))},{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([25,5,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([26,1,27,21,28,18])))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-Dh09vXLx.js`),__vite__mapDeps([29,21,1,4,3,5,30,18])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-Ca2kU4Te.js`),[]))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-BTi88BmP.js`).then(e=>e.n),__vite__mapDeps([4,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-Czrjv-nr.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-CCRtknu5.js`),__vite__mapDeps([31,17,3,1,4,5,15])))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-5EYbFEoC.js`),__vite__mapDeps([32,3,1,4,5])))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-Cezz_HNz.js`),__vite__mapDeps([33,27,1,21])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-D4W-_rAk.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-C6pPz4fX.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-BC8wryba.js`),__vite__mapDeps([41,42])))},{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([43,44])))},{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([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-Cl3bohRI.js`),__vite__mapDeps([46,47,48])))},{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([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-BJE30GTP.js`),__vite__mapDeps([51,30,1])))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-B9ISJjDl.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-C4PTXfaW.js`),__vite__mapDeps([52,4,1,3,5,15])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-Df1V6YK_.js`),__vite__mapDeps([53,4,1,3,5,15])))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-C8VPaAWs.js`).then(e=>e.n),__vite__mapDeps([27,1,21])))},{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-BTh90-YS.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-WZCiqIl-.js`).then(e=>e.n),__vite__mapDeps([36,1,5,37,14,15])))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-lvGC2zUz.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-zJL_tEH0.js`),__vite__mapDeps([54,3,1,4,5,18])))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-qjVLLTZk.js`).then(e=>e.n),__vite__mapDeps([38,1,4,5])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-B3RyMMk0.js`),__vite__mapDeps([55,4,1,3,5,40])))},{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-DP-V-rfg.js`).then(e=>e.n),__vite__mapDeps([3,1,4,5])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-DB9UhNDN.js`),__vite__mapDeps([17,3,1,4,5])))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-Deln4Vyb.js`),__vite__mapDeps([56,36,1,5,37,14,15,9,30,10,11])))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-CYSuhGkj.js`),__vite__mapDeps([57,58,36,1,5,37,14,15,10,11])))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-BmF7ngDz.js`),__vite__mapDeps([59,60])))},{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([11,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-WC6XFf_S.js`).then(e=>e.n),__vite__mapDeps([5,1])))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-BcRTlqOI.js`),__vite__mapDeps([61,3,1,4,5])))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-DuNOGix6.js`),__vite__mapDeps([62,5,1])))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-CmuSmrUv.js`).then(e=>e.n),__vite__mapDeps([9,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([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-Cqc1ADyw.js`),__vite__mapDeps([63,26,1,27,21,28,18,5,23,64])))},{id:`just`,name:`Just`,import:(()=>$(()=>import(`./just-O9z-zIlY.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-CPujEk7a.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-GNGS6f4G.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-ByPWIc1b.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-BEPTKliI.js`),__vite__mapDeps([67,68,64,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-BK2PyMjt.js`),__vite__mapDeps([69,4,1,3,5,9])))},{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([39,1,21])))},{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-CTEKS39A.js`),__vite__mapDeps([70,4,1,71,7,15])))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-Buftnej6.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-BOaCYzzL.js`),__vite__mapDeps([72,17,3,1,4,5,42,40])))},{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-Cto1mpL3.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D1X5Yd05.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-Da_Uewgc.js`),__vite__mapDeps([75,39,1,21])))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-BZyx58NM.js`),__vite__mapDeps([76,21,1,4,27,3,5,42,10,11])))},{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-BW8t13Xq.js`),__vite__mapDeps([66,4,1,3,5,18,10,11])))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-Cq5FOhfR.js`),__vite__mapDeps([77,4,1,3,5,9,18,10,11])))},{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-B4WHazil.js`),__vite__mapDeps([78,4,1,3,5])))},{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([79,5,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([64,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-CQPYUgex.js`),__vite__mapDeps([80,81,3,1,4,5])))},{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([28,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-B-OS2pa5.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-BM15fmxz.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-BWAfVMY4.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-DYNukvU9.js`),__vite__mapDeps([84,18,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-C0BQ8YVM.js`).then(e=>e.n),__vite__mapDeps([7,1,4])))},{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([85,86])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-KUJZnuCi.js`).then(e=>e.n),__vite__mapDeps([30,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-BeWGuVoR.js`),__vite__mapDeps([87,30,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-C6D0Ibo9.js`),__vite__mapDeps([88,3,1,4,5])))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-DIFvSn1n.js`),__vite__mapDeps([89,90])))},{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([18,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([91,18,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([92,5,1])))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-DJ-0FpL2.js`),__vite__mapDeps([93,4,1,5,13,15])))},{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-7Bvm-rei.js`),__vite__mapDeps([94,4,1,95,5])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DUK0FOOj.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-ezg8IclB.js`),__vite__mapDeps([68,64,1])))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-X5n3zjEH.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-BfuR6EQ0.js`),__vite__mapDeps([96,4,1,27,21,3,5,18,15,10,11])))},{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([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-BsUuoeVK.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-_uxJ-QmX.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-C6LvTgbf.js`).then(e=>e.n),__vite__mapDeps([15,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-8nkhqWz6.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-DkOBu49o.js`),__vite__mapDeps([98,4,1,17,3,5,9,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-Bx2Sgp8M.js`),__vite__mapDeps([99,5,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-veyFk6GJ.js`),__vite__mapDeps([100,4,1,5,71,13,7,101])))},{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([10,1,11])))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-C66i1pDH.js`),__vite__mapDeps([102,10,1,11])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-D_uvhEF7.js`).then(e=>e.n),__vite__mapDeps([40,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-C6ZuzgrL.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-Do2h8XKj.js`),[]))}],zF=Object.fromEntries(RF.map(e=>[e.id,e.import])),BF=Object.fromEntries(RF.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),VF={...zF,...BF},HF=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:`light`,import:(()=>$(()=>import(`./horizon-bright-CpoqdULz.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])),UF=e({createOnigurumaEngine:()=>_I,getDefaultWasmLoader:()=>gI,loadWasm:()=>uI,setDefaultWasmLoader:()=>hI}),WF=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function GF(){return 2147483648}function KF(){return typeof performance<`u`?performance.now():Date.now()}var qF=(e,t)=>e+(t-e%t)%t;async function JF(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=GF();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,qF(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:KF,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 YF=Object.defineProperty,XF=(e,t,n)=>t in e?YF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZF=(e,t,n)=>XF(e,typeof t==`symbol`?t:t+``,n),QF=null;function $F(e){throw new WF(e.UTF8ToString(e.getLastOnigError()))}var eI=class e{constructor(t){ZF(this,`utf16Length`),ZF(this,`utf8Length`),ZF(this,`utf16Value`),ZF(this,`utf8Value`),ZF(this,`utf16OffsetToUtf8`),ZF(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}},tI=class e{constructor(t){if(ZF(this,`id`,++e.LAST_ID),ZF(this,`_onigBinding`),ZF(this,`content`),ZF(this,`utf16Length`),ZF(this,`utf8Length`),ZF(this,`utf16OffsetToUtf8`),ZF(this,`utf8OffsetToUtf16`),ZF(this,`ptr`),!QF)throw new WF(`Must invoke loadWasm first.`);this._onigBinding=QF,this.content=t;let n=new eI(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=QF.omalloc(1e4),e._sharedPtrInUse=!0,QF.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(QF)}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)}};ZF(tI,`LAST_ID`,0),ZF(tI,`_sharedPtr`,0),ZF(tI,`_sharedPtrInUse`,!1);var nI=tI,rI=class{constructor(e){if(ZF(this,`_onigBinding`),ZF(this,`_ptr`),!QF)throw new WF(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new eI(e[r]);t[r]=i.createString(QF),n[r]=i.utf8Length}let r=QF.omalloc(4*e.length);QF.HEAPU32.set(t,r/4);let i=QF.omalloc(4*e.length);QF.HEAPU32.set(n,i/4);let a=QF.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)QF.ofree(t[n]);QF.ofree(i),QF.ofree(r),a===0&&$F(QF),this._onigBinding=QF,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 nI(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 iI(e){return typeof e.instantiator==`function`}function aI(e){return typeof e.default==`function`}function oI(e){return e.data!==void 0}function sI(e){return typeof Response<`u`&&e instanceof Response}function cI(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 lI;function uI(e){if(lI)return lI;async function t(){QF=await JF(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),iI(n)?n=await n.instantiator(t):aI(n)?n=await n.default(t):(oI(n)&&(n=n.data),sI(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await fI(n)(t):await pI(n)(t):cI(n)||n instanceof WebAssembly.Module?n=await dI(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await dI(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return lI=t(),lI}function dI(e){return t=>WebAssembly.instantiate(e,t)}function fI(e){return t=>WebAssembly.instantiateStreaming(e,t)}function pI(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var mI;function hI(e){mI=e}function gI(){return mI}async function _I(e){return e&&await uI(e),{createScanner(e){return new rI(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new nI(e)}}}var vI=FF({});LF(vI,UF);var yI=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function bI(e){return xI(e)}function xI(e){return Array.isArray(e)?SI(e):e instanceof RegExp?e:typeof e==`object`?CI(e):e}function SI(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=xI(e[n]);return t}function CI(e){let t={};for(let n in e)t[n]=xI(e[n]);return t}function wI(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function TI(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?TI(e.substring(0,e.length-1)):e.substr(~t+1)}var EI=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,DI=class{static hasCaptures(e){return e===null?!1:(EI.lastIndex=0,EI.test(e))}static replaceCaptures(e,t,n){return e.replace(EI,(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 OI(e,t){return e<t?-1:+(e>t)}function kI(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=OI(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function AI(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 jI(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var MI=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}},NI=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(RI(e),t)}static createFromParsedTheme(e,t){return VI(e,t)}_cachedMatchRoot=new MI(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=>FI(e.parent,t.parentScopes));return n?new LI(n.fontStyle,n.foreground,n.background):null}},PI=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 FI(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&&!II(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function II(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var LI=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function RI(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`&&AI(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&AI(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 zI(l,u,e,o,s,c)}}return n}var zI=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}},BI=(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))(BI||{});function VI(e,t){e.sort((e,t)=>{let n=OI(e.scope,t.scope);return n!==0||(n=kI(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 HI(t),o=new LI(n,a.getId(r),a.getId(i)),s=new GI(new WI(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 NI(a,o,s)}var HI=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)}},UI=Object.freeze([]),WI=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||UI,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)}},GI=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(),WI.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(kI(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 WI(e,t,n,r,i))}},KI=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=JI(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 qI(e){return e}function JI(e){return e}function YI(e,t){let n=[],r=ZI(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(XI(i)){let e=[];do e.push(i),i=r.next();while(XI(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 XI(e){return!!e&&!!e.match(/[\w\.:]+/)}function ZI(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 QI(e){typeof e.dispose==`function`&&e.dispose()}var $I=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},eL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},tL=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))}},nL=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $I(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new tL;for(let n of e)rL(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof $I){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 rL(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 $I?aL({baseGrammar:a,selfGrammar:i},r):iL(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 $I(e))}function iL(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];oL([r],t,n)}}function aL(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&oL(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&oL(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function oL(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?wI({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&oL(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=fL(i);switch(a.kind){case 0:aL({...t,selfGrammar:t.baseGrammar},n);break;case 1:aL(t,n);break;case 2:iL(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?iL(a.ruleName,i,n):aL(i,n)}else a.kind===4?n.add(new eL(a.scopeName,a.ruleName)):n.add(new $I(a.scopeName));break}}}var sL=class{kind=0},cL=class{kind=1},lL=class{constructor(e){this.ruleName=e}kind=2},uL=class{constructor(e){this.scopeName=e}kind=3},dL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function fL(e){if(e===`$base`)return new sL;if(e===`$self`)return new cL;let t=e.indexOf(`#`);return t===-1?new uL(e):t===0?new lL(e.substring(1)):new dL(e.substring(0,t),e.substring(t+1))}var pL=/\\(\d+)/,mL=/\\(\d+)/g,hL=-1,gL=-2;function _L(e){return e}function vL(e){return e}var yL=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=DI.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=DI.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${TI(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:DI.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:DI.replaceCaptures(this._contentName,e,t)}},bL=class extends yL{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!`)}},xL=class extends yL{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new EL(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 DL,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},SL=class extends yL{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 DL,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},CL=class extends yL{_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 EL(i,this.id),this.beginCaptures=a,this._end=new EL(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 DL;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}},wL=class extends yL{_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 EL(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new EL(o,gL),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 DL;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 DL,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},TL=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new bL(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new xL(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=wI({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new SL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new wL(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 CL(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=fL(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 SL||e instanceof CL||e instanceof wL)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},EL=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=pL.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 mL.lastIndex=0,this.source.replace(mL,(e,t)=>jI(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}},DL=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 OL(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 OL(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},OL=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}},
|
|
192
|
-
`;let a=this.createOnigString(e),o=a.content.length,s=new $L(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=PL(this,a,i,0,t,s,!0,r);return QI(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function YL(e,t){return e=bI(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 XL=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=PI.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new PI(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new PI(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),KI.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}},ZL=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)?XL.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:vL(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=XL.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,_L(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,XL.fromExtension(r,n.contentNameScopesList))}},QL=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):YI(e,KL).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>YI(e,KL).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}},$L=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=KI.set(n,0,qI(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=KI.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}},eR=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,WL(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},tR=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eR(NI.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(NI.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 QL(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new nL(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)}},nR=ZL.NULL;function rR(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 iR(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function aR(e){return Array.isArray(e)?e:[e]}async function oR(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function sR(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function cR(e){return e===`ansi`||sR(e)}function lR(e){return e===`none`}function uR(e){return lR(e)}function dR(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 fR={light:`#333333`,dark:`#bbbbbb`},pR={light:`#fffffe`,dark:`#1e1e1e`},mR=`__shiki_resolved`;function hR(e){if(e?.[mR])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`?fR.light:fR.dark,n||=t.type===`light`?pR.light:pR.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,mR,{enumerable:!1,writable:!1,value:!0}),t}async function gR(e){return Array.from(new Set((await Promise.all(e.filter(e=>!cR(e)).map(async e=>await oR(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function _R(e){return(await Promise.all(e.map(async e=>uR(e)?null:hR(await oR(e))))).filter(e=>!!e)}function vR(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 yI(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var yR=class extends tR{_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=hR(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=NI.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=vR(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 yI(`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))}},bR=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}},xR=0;function SR(e){xR+=1,e.warnings!==!1&&xR>=10&&xR%10==0&&console.warn(`[Shiki] ${xR} 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 yI("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(hR),i=new yR(new bR(e.engine,n),r,n,e.langAlias),a;function o(t){return vR(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new yI(`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 yI(`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 gR(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await _R(e))}function g(){if(t)throw new yI(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--xR)}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 CR(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([_R(e.themes||[]),gR(e.langs||[]),e.engine]);return SR({...e,themes:t,langs:n,engine:r})}var wR=new WeakMap;function TR(e,t){wR.set(e,t)}function ER(e){return wR.get(e)}var DR=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(aR(n).map(e=>[e,nR])),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 OR(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function OR(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 kR(e,t){if(!(e instanceof DR))throw new yI(`Invalid grammar state`);return e.getInternalStack(t)}function AR(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(sR(e.resolveLangAlias(n.lang||`text`))||lR(r))return dR(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 yI(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new yI(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return MR(t,o,i,a,n)}function jR(...e){if(e.length===2)return ER(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(sR(i)||lR(a))throw new yI(`Plain language does not have grammar state`);if(i===`ansi`)throw new yI(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new DR(NR(n,c,o,s,r).stateStack,c.name,o.name)}function MR(e,t,n,r,i){let a=NR(e,t,n,r,i),o=new DR(a.stateStack,t.name,n.name);return TR(a.tokens,o),a.tokens}function NR(e,t,n,r,i){let a=rR(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=dR(e),l=i.grammarState?kR(i.grammarState,n.name)??nR:i.grammarContextCode==null?nR:NR(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=iR(r[KI.getForeground(s)],a),l=KI.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`?PR(t.scopes):FR(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function PR(e){return e.map(e=>({scopeName:e}))}function FR(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:RR(e,i,t.slice(0,r))}}return n}function IR(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function LR(e,t,n){if(!IR(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)IR(e[r],n[i])&&--r,--i;return r===-1}function RR(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(LR(e,t,n)){r.push(a);break}return r}function zR(e,t,n,r=AR){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:ER(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=BR(...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 DR(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&TR(s,c),s}function BR(...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 VR=/["&'<>`]/g,HR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,UR=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,WR=/[|\\{}()[\]^$+*?.]/g,GR=new WeakMap;function KR(e,t){if(e=e.replace(t.subset?qR(t.subset):VR,r),t.subset||t.escapeOnly)return e;return e.replace(HR,n).replace(UR,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 qR(e){let t=GR.get(e);return t||(t=JR(e),GR.set(e,t)),t}function JR(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(WR,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var YR=/[\dA-Fa-f]/;function XR(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!YR.test(String.fromCharCode(t))?r:r+`;`}var ZR=/\d/;function QR(e,t,n){let r=`&#`+String(e);return n&&t&&!ZR.test(String.fromCharCode(t))?r:r+`;`}var $R=`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(`.`),ez={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:`€`},tz=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],nz={}.hasOwnProperty,rz={},iz;for(iz in ez)nz.call(ez,iz)&&(rz[ez[iz]]=iz);var az=/[^\dA-Za-z]/;function oz(e,t,n,r){let i=String.fromCharCode(e);if(nz.call(rz,i)){let e=rz[i],a=`&`+e;return n&&$R.includes(e)&&!tz.includes(e)&&(!r||t&&t!==61&&az.test(String.fromCharCode(t)))?a:a+`;`}return``}function sz(e,t,n){let r=XR(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=oz(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=QR(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function cz(e,t){return KR(e,Object.assign({format:sz},t))}var lz=/^>|^->|<!--|-->|--!>|<!-$/g,uz=[`>`],dz=[`<`,`>`];function fz(e,t,n,r){return r.settings.bogusComments?`<?`+cz(e.value,Object.assign({},r.settings.characterReferences,{subset:uz}))+`>`:`<!--`+e.value.replace(lz,i)+`-->`;function i(e){return cz(e,Object.assign({},r.settings.characterReferences,{subset:dz}))}}function pz(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var mz=_z(1),hz=_z(-1),gz=[];function _z(e){return t;function t(t,n,r){let i=t?t.children:gz,a=(n||0)+e,o=i[a];if(!r)for(;o&&eO(o);)a+=e,o=i[a];return o}}var vz={}.hasOwnProperty;function yz(e){return t;function t(t,n,r){return vz.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var bz=yz({body:Cz,caption:xz,colgroup:xz,dd:Dz,dt:Ez,head:xz,html:Sz,li:Tz,optgroup:kz,option:Az,p:wz,rp:Oz,rt:Oz,tbody:Mz,td:Fz,tfoot:Nz,th:Fz,thead:jz,tr:Pz});function xz(e,t,n){let r=mz(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&eO(r.value.charAt(0)))}function Sz(e,t,n){let r=mz(n,t);return!r||r.type!==`comment`}function Cz(e,t,n){let r=mz(n,t);return!r||r.type!==`comment`}function wz(e,t,n){let r=mz(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 Tz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ez(e,t,n){let r=mz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Dz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Oz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function kz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Az(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function jz(e,t,n){let r=mz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Mz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Nz(e,t,n){return!mz(n,t)}function Pz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Fz(e,t,n){let r=mz(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Iz=yz({body:zz,colgroup:Bz,head:Rz,html:Lz,tbody:Vz});function Lz(e){let t=mz(e,-1);return!t||t.type!==`comment`}function Rz(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 zz(e){let t=mz(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&eO(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Bz(e,t,n){let r=hz(n,t),i=mz(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&bz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Vz(e,t,n){let r=hz(n,t),i=mz(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&bz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Hz={name:[[`
|
|
190
|
+
`})}return n},uF=/([\\`*_~[\]|])/g,dF=e=>e.replace(uF,`\\$1`),fF=(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+dF(n).replace(/\n\n/g,` `)+r)}return n},pF=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(pF).join(``):``,mF=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));fm(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=pF(e);e.children=t?[{type:`text`,value:t}]:[]}})},hF=()=>e=>{fm(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},gF=/^[ \t]*<[\w!/?-]/,_F=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,vF=e=>typeof e!=`string`||e.length===0||!gF.test(e)?e:e.replace(_F,`$1`),yF={...Lb,protocols:{...Lb.protocols,href:[...Lb.protocols?.href??[],`tel`]},attributes:{...Lb.attributes,code:[...Lb.attributes?.code??[],`metastring`]}},bF={raw:Fb,sanitize:[ex,yF],harden:[mm,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},xF={gfm:[gE,{}],codeMeta:hF},SF=Object.values(bF),CF=Object.values(xF),wF={block:` ▋`,circle:` ●`},TF=[`github-light`,`github-dark`],EF={enabled:!0},DF=(0,d.createContext)({shikiTheme:TF,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:EF}),OF=(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?vF(e):e,l=(0,_.jsx)(HP,{...s,children:c});return(0,_.jsx)(YM.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)});OF.displayName=`Block`;var kF=(0,d.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=SF,remarkPlugins:s=CF,className:c,shikiTheme:l=TF,mermaid:u,controls:f=!0,isAnimating:p=!1,animated:m,BlockComponent:h=OF,parseMarkdownIntoBlocksFn:g=cF,caret:v,plugins:y,remend:b,linkSafety:x=EF,lineNumbers:S=!0,allowedTags:C,literalTagContent:w,translations:T,icons:E,prefix:D,onAnimationStart:O,onAnimationEnd:ee,...te})=>{let k=(0,d.useId)(),[A,j]=(0,d.useTransition)(),ne=(0,d.useMemo)(()=>$M(D),[D]),re=(0,d.useRef)(null),M=(0,d.useRef)(O),N=(0,d.useRef)(ee);M.current=O,N.current=ee,(0,d.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=re.current;if(re.current=p,i===null){p&&((e=M.current)==null||e.call(M));return}p&&!i?(n=M.current)==null||n.call(M):!p&&i&&((r=N.current)==null||r.call(N))},[p,t]);let P=(0,d.useMemo)(()=>C?Object.keys(C):[],[C]),ie=(0,d.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?YD(e,b):e;return w&&w.length>0&&(n=fF(n,w)),P.length>0&&(n=lF(n,P)),n},[e,t,r,b,P,w]),ae=(0,d.useMemo)(()=>g(ie),[ie,g]),[oe,F]=(0,d.useState)(ae);(0,d.useEffect)(()=>{t===`streaming`&&!ue?j(()=>{F(ae)}):F(ae)},[ae,t]);let I=t===`streaming`?oe:ae,se=(0,d.useMemo)(()=>n===`auto`?I.map(MP):void 0,[I,n]),ce=(0,d.useMemo)(()=>I.map((e,t)=>`${k}-${t}`),[I.length,k]),le=(0,d.useMemo)(()=>m===!0?`true`:m?JSON.stringify(m):``,[m]),ue=(0,d.useMemo)(()=>le?le===`true`?JM():JM(m):null,[le]),de=(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]),fe=(0,d.useMemo)(()=>({...vN,...T}),[(0,d.useMemo)(()=>T?JSON.stringify(T):``,[T])]),pe=(0,d.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...kP,...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]),me=(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]),he=(0,d.useMemo)(()=>{let e=o;if(C&&Object.keys(C).length>0&&o===SF){let t={...yF,tagNames:[...yF.tagNames??[],...Object.keys(C)],attributes:{...yF.attributes,...C}};e=[bF.raw,[ex,t],bF.harden]}return w&&w.length>0&&(e=[...e,[mF,w]]),y!=null&&y.math&&(e=[...e,y.math.rehypePlugin]),ue&&p&&(e=[...e,ue.rehypePlugin]),e},[o,y?.math,ue,p,C,w]),ge=(0,d.useMemo)(()=>{if(!p||I.length===0)return!1;let e=I.at(-1);return FP(e)||IP(e)},[p,I]),_e=(0,d.useMemo)(()=>v&&p&&!ge?{"--streamdown-caret":`"${wF[v]}"`}:void 0,[v,p,ge]);return t===`static`?(0,_.jsx)(yN.Provider,{value:fe,children:(0,_.jsx)(jN.Provider,{value:y??null,children:(0,_.jsx)(DF.Provider,{value:de,children:(0,_.jsx)(gN,{icons:E,children:(0,_.jsx)(tN.Provider,{value:ne,children:(0,_.jsx)(`div`,{className:ne(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?MP(ie):n,children:(0,_.jsx)(HP,{components:pe,rehypePlugins:he,remarkPlugins:me,...te,children:ie})})})})})})}):(0,_.jsx)(yN.Provider,{value:fe,children:(0,_.jsx)(jN.Provider,{value:y??null,children:(0,_.jsx)(DF.Provider,{value:de,children:(0,_.jsx)(gN,{icons:E,children:(0,_.jsx)(tN.Provider,{value:ne,children:(0,_.jsxs)(`div`,{className:ne(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,v&&!ge?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:_e,children:[I.length===0&&v&&p&&(0,_.jsx)(`span`,{}),I.map((e,t)=>{let a=t===I.length-1,o=p&&a&&FP(e);return(0,_.jsx)(h,{animatePlugin:ue,components:pe,content:e,dir:se?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:he,remarkPlugins:me,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...te},ce[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);kF.displayName=`Streamdown`;var AF=({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}=_N(),f=nN(),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]),te=(0,d.useCallback)(e=>{e.preventDefault(),E(e.deltaY>0?-i:i)},[E,i]),k=(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]),A=(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]),j=(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`,te,{passive:!1}),()=>{e.removeEventListener(`wheel`,te)}},[te]),(0,d.useEffect)(()=>{let e=m.current;if(e&&b)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,A,{passive:!1}),e.addEventListener(`pointerup`,j),e.addEventListener(`pointercancel`,j),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,A),e.removeEventListener(`pointerup`,j),e.removeEventListener(`pointercancel`,j)}},[b,A,j]),(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:k,ref:m,role:`application`,style:{transform:`translate(${v.x}px, ${v.y}px) scale(${h})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},jF=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=nN(),[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)(DF),y=PN(),b=v?.errorComponent,{shouldRender:x,containerRef:S}=LM({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)(AF,{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`})})})},MF=Object.defineProperty,NF=Object.getOwnPropertyDescriptor,PF=Object.getOwnPropertyNames,FF=Object.prototype.hasOwnProperty,IF=(e,t)=>{let n={};for(var r in e)MF(n,r,{get:e[r],enumerable:!0});return t||MF(n,Symbol.toStringTag,{value:`Module`}),n},LF=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=PF(t),a=0,o=i.length,s;a<o;a++)s=i[a],!FF.call(e,s)&&s!==n&&MF(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=NF(t,s))||r.enumerable});return e},RF=(e,t,n)=>(LF(e,t,`default`),n&&LF(n,t,`default`)),zF=[{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-Cde9qVP5.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4,5])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-DefScAWP.js`),__vite__mapDeps([6,2,1,3,4,5,7])))},{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-w753UHCW.js`),__vite__mapDeps([8,4,1,3,5,9,10,11])))},{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-DBA9Da7s.js`),__vite__mapDeps([12,4,1,5,9,13,14,15])))},{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-Bs7YDhA3.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-B-u5p0Rp.js`),__vite__mapDeps([16,4,1,17,3,5,9,18,10,11])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-CPV9KqsG.js`),__vite__mapDeps([19,20])))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-Bv0tI3pq.js`).then(e=>e.n),__vite__mapDeps([21,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([22,23])))},{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-CkQrskif.js`),__vite__mapDeps([24,3,1,4,5,11])))},{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([25,5,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([26,1,27,21,28,18])))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-Dh09vXLx.js`),__vite__mapDeps([29,21,1,4,3,5,30,18])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-Ca2kU4Te.js`),[]))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-BTi88BmP.js`).then(e=>e.n),__vite__mapDeps([4,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-Czrjv-nr.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-CCRtknu5.js`),__vite__mapDeps([31,17,3,1,4,5,15])))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-5EYbFEoC.js`),__vite__mapDeps([32,3,1,4,5])))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-Cezz_HNz.js`),__vite__mapDeps([33,27,1,21])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-D4W-_rAk.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-C6pPz4fX.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-BC8wryba.js`),__vite__mapDeps([41,42])))},{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([43,44])))},{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([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-Cl3bohRI.js`),__vite__mapDeps([46,47,48])))},{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([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-BJE30GTP.js`),__vite__mapDeps([51,30,1])))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-B9ISJjDl.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-C4PTXfaW.js`),__vite__mapDeps([52,4,1,3,5,15])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-Df1V6YK_.js`),__vite__mapDeps([53,4,1,3,5,15])))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-C8VPaAWs.js`).then(e=>e.n),__vite__mapDeps([27,1,21])))},{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-BTh90-YS.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-WZCiqIl-.js`).then(e=>e.n),__vite__mapDeps([36,1,5,37,14,15])))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-lvGC2zUz.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-zJL_tEH0.js`),__vite__mapDeps([54,3,1,4,5,18])))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-qjVLLTZk.js`).then(e=>e.n),__vite__mapDeps([38,1,4,5])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-B3RyMMk0.js`),__vite__mapDeps([55,4,1,3,5,40])))},{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-DP-V-rfg.js`).then(e=>e.n),__vite__mapDeps([3,1,4,5])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-DB9UhNDN.js`),__vite__mapDeps([17,3,1,4,5])))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-Deln4Vyb.js`),__vite__mapDeps([56,36,1,5,37,14,15,9,30,10,11])))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-CYSuhGkj.js`),__vite__mapDeps([57,58,36,1,5,37,14,15,10,11])))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-BmF7ngDz.js`),__vite__mapDeps([59,60])))},{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([11,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-WC6XFf_S.js`).then(e=>e.n),__vite__mapDeps([5,1])))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-BcRTlqOI.js`),__vite__mapDeps([61,3,1,4,5])))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-DuNOGix6.js`),__vite__mapDeps([62,5,1])))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-CmuSmrUv.js`).then(e=>e.n),__vite__mapDeps([9,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([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-Cqc1ADyw.js`),__vite__mapDeps([63,26,1,27,21,28,18,5,23,64])))},{id:`just`,name:`Just`,import:(()=>$(()=>import(`./just-O9z-zIlY.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-CPujEk7a.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-GNGS6f4G.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-ByPWIc1b.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-BEPTKliI.js`),__vite__mapDeps([67,68,64,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-BK2PyMjt.js`),__vite__mapDeps([69,4,1,3,5,9])))},{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([39,1,21])))},{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-CTEKS39A.js`),__vite__mapDeps([70,4,1,71,7,15])))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-Buftnej6.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-BOaCYzzL.js`),__vite__mapDeps([72,17,3,1,4,5,42,40])))},{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-Cto1mpL3.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D1X5Yd05.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-Da_Uewgc.js`),__vite__mapDeps([75,39,1,21])))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-BZyx58NM.js`),__vite__mapDeps([76,21,1,4,27,3,5,42,10,11])))},{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-BW8t13Xq.js`),__vite__mapDeps([66,4,1,3,5,18,10,11])))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-Cq5FOhfR.js`),__vite__mapDeps([77,4,1,3,5,9,18,10,11])))},{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-B4WHazil.js`),__vite__mapDeps([78,4,1,3,5])))},{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([79,5,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([64,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-CQPYUgex.js`),__vite__mapDeps([80,81,3,1,4,5])))},{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([28,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-B-OS2pa5.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-BM15fmxz.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-BWAfVMY4.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-DYNukvU9.js`),__vite__mapDeps([84,18,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-C0BQ8YVM.js`).then(e=>e.n),__vite__mapDeps([7,1,4])))},{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([85,86])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-KUJZnuCi.js`).then(e=>e.n),__vite__mapDeps([30,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-BeWGuVoR.js`),__vite__mapDeps([87,30,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-C6D0Ibo9.js`),__vite__mapDeps([88,3,1,4,5])))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-DIFvSn1n.js`),__vite__mapDeps([89,90])))},{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([18,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([91,18,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([92,5,1])))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-DJ-0FpL2.js`),__vite__mapDeps([93,4,1,5,13,15])))},{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-7Bvm-rei.js`),__vite__mapDeps([94,4,1,95,5])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DUK0FOOj.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-ezg8IclB.js`),__vite__mapDeps([68,64,1])))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-X5n3zjEH.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-BfuR6EQ0.js`),__vite__mapDeps([96,4,1,27,21,3,5,18,15,10,11])))},{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([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-BsUuoeVK.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-_uxJ-QmX.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-C6LvTgbf.js`).then(e=>e.n),__vite__mapDeps([15,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-8nkhqWz6.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-DkOBu49o.js`),__vite__mapDeps([98,4,1,17,3,5,9,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-Bx2Sgp8M.js`),__vite__mapDeps([99,5,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-veyFk6GJ.js`),__vite__mapDeps([100,4,1,5,71,13,7,101])))},{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([10,1,11])))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-C66i1pDH.js`),__vite__mapDeps([102,10,1,11])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-D_uvhEF7.js`).then(e=>e.n),__vite__mapDeps([40,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-C6ZuzgrL.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-Do2h8XKj.js`),[]))}],BF=Object.fromEntries(zF.map(e=>[e.id,e.import])),VF=Object.fromEntries(zF.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),HF={...BF,...VF},UF=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:`light`,import:(()=>$(()=>import(`./horizon-bright-CpoqdULz.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])),WF=e({createOnigurumaEngine:()=>vI,getDefaultWasmLoader:()=>_I,loadWasm:()=>dI,setDefaultWasmLoader:()=>gI}),GF=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function KF(){return 2147483648}function qF(){return typeof performance<`u`?performance.now():Date.now()}var JF=(e,t)=>e+(t-e%t)%t;async function YF(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=KF();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,JF(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:qF,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 XF=Object.defineProperty,ZF=(e,t,n)=>t in e?XF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QF=(e,t,n)=>ZF(e,typeof t==`symbol`?t:t+``,n),$F=null;function eI(e){throw new GF(e.UTF8ToString(e.getLastOnigError()))}var tI=class e{constructor(t){QF(this,`utf16Length`),QF(this,`utf8Length`),QF(this,`utf16Value`),QF(this,`utf8Value`),QF(this,`utf16OffsetToUtf8`),QF(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}},nI=class e{constructor(t){if(QF(this,`id`,++e.LAST_ID),QF(this,`_onigBinding`),QF(this,`content`),QF(this,`utf16Length`),QF(this,`utf8Length`),QF(this,`utf16OffsetToUtf8`),QF(this,`utf8OffsetToUtf16`),QF(this,`ptr`),!$F)throw new GF(`Must invoke loadWasm first.`);this._onigBinding=$F,this.content=t;let n=new tI(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=$F.omalloc(1e4),e._sharedPtrInUse=!0,$F.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString($F)}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)}};QF(nI,`LAST_ID`,0),QF(nI,`_sharedPtr`,0),QF(nI,`_sharedPtrInUse`,!1);var rI=nI,iI=class{constructor(e){if(QF(this,`_onigBinding`),QF(this,`_ptr`),!$F)throw new GF(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new tI(e[r]);t[r]=i.createString($F),n[r]=i.utf8Length}let r=$F.omalloc(4*e.length);$F.HEAPU32.set(t,r/4);let i=$F.omalloc(4*e.length);$F.HEAPU32.set(n,i/4);let a=$F.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)$F.ofree(t[n]);$F.ofree(i),$F.ofree(r),a===0&&eI($F),this._onigBinding=$F,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 rI(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 aI(e){return typeof e.instantiator==`function`}function oI(e){return typeof e.default==`function`}function sI(e){return e.data!==void 0}function cI(e){return typeof Response<`u`&&e instanceof Response}function lI(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 uI;function dI(e){if(uI)return uI;async function t(){$F=await YF(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),aI(n)?n=await n.instantiator(t):oI(n)?n=await n.default(t):(sI(n)&&(n=n.data),cI(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await pI(n)(t):await mI(n)(t):lI(n)||n instanceof WebAssembly.Module?n=await fI(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await fI(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return uI=t(),uI}function fI(e){return t=>WebAssembly.instantiate(e,t)}function pI(e){return t=>WebAssembly.instantiateStreaming(e,t)}function mI(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var hI;function gI(e){hI=e}function _I(){return hI}async function vI(e){return e&&await dI(e),{createScanner(e){return new iI(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new rI(e)}}}var yI=IF({});RF(yI,WF);var bI=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function xI(e){return SI(e)}function SI(e){return Array.isArray(e)?CI(e):e instanceof RegExp?e:typeof e==`object`?wI(e):e}function CI(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=SI(e[n]);return t}function wI(e){let t={};for(let n in e)t[n]=SI(e[n]);return t}function TI(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function EI(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?EI(e.substring(0,e.length-1)):e.substr(~t+1)}var DI=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,OI=class{static hasCaptures(e){return e===null?!1:(DI.lastIndex=0,DI.test(e))}static replaceCaptures(e,t,n){return e.replace(DI,(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 kI(e,t){return e<t?-1:+(e>t)}function AI(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=kI(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function jI(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 MI(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var NI=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}},PI=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(zI(e),t)}static createFromParsedTheme(e,t){return HI(e,t)}_cachedMatchRoot=new NI(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=>II(e.parent,t.parentScopes));return n?new RI(n.fontStyle,n.foreground,n.background):null}},FI=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 II(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&&!LI(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function LI(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var RI=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function zI(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`&&jI(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&jI(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 BI(l,u,e,o,s,c)}}return n}var BI=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}},VI=(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))(VI||{});function HI(e,t){e.sort((e,t)=>{let n=kI(e.scope,t.scope);return n!==0||(n=AI(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 UI(t),o=new RI(n,a.getId(r),a.getId(i)),s=new KI(new GI(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 PI(a,o,s)}var UI=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)}},WI=Object.freeze([]),GI=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||WI,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)}},KI=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(),GI.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(AI(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 GI(e,t,n,r,i))}},qI=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=YI(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 JI(e){return e}function YI(e){return e}function XI(e,t){let n=[],r=QI(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(ZI(i)){let e=[];do e.push(i),i=r.next();while(ZI(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 ZI(e){return!!e&&!!e.match(/[\w\.:]+/)}function QI(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 $I(e){typeof e.dispose==`function`&&e.dispose()}var eL=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},tL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},nL=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))}},rL=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new eL(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new nL;for(let n of e)iL(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof eL){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 iL(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 eL?oL({baseGrammar:a,selfGrammar:i},r):aL(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 eL(e))}function aL(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];sL([r],t,n)}}function oL(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&sL(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&sL(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function sL(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?TI({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&sL(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=pL(i);switch(a.kind){case 0:oL({...t,selfGrammar:t.baseGrammar},n);break;case 1:oL(t,n);break;case 2:aL(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?aL(a.ruleName,i,n):oL(i,n)}else a.kind===4?n.add(new tL(a.scopeName,a.ruleName)):n.add(new eL(a.scopeName));break}}}var cL=class{kind=0},lL=class{kind=1},uL=class{constructor(e){this.ruleName=e}kind=2},dL=class{constructor(e){this.scopeName=e}kind=3},fL=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function pL(e){if(e===`$base`)return new cL;if(e===`$self`)return new lL;let t=e.indexOf(`#`);return t===-1?new dL(e):t===0?new uL(e.substring(1)):new fL(e.substring(0,t),e.substring(t+1))}var mL=/\\(\d+)/,hL=/\\(\d+)/g,gL=-1,_L=-2;function vL(e){return e}function yL(e){return e}var bL=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=OI.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=OI.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${EI(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:OI.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:OI.replaceCaptures(this._contentName,e,t)}},xL=class extends bL{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!`)}},SL=class extends bL{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new DL(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 OL,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},CL=class extends bL{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 OL,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},wL=class extends bL{_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 DL(i,this.id),this.beginCaptures=a,this._end=new DL(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 OL;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}},TL=class extends bL{_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 DL(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new DL(o,_L),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 OL;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 OL,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},EL=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new xL(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new SL(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=TI({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new CL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new TL(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 wL(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=pL(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 CL||e instanceof wL||e instanceof TL)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},DL=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=mL.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 hL.lastIndex=0,this.source.replace(hL,(e,t)=>MI(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}},OL=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 kL(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 kL(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},kL=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}},AL=class{constructor(e,t){this.languageId=e,this.tokenType=t}},jL=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new AL(e,8),this._embeddedLanguagesMatcher=new ML(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 AL(0,0);_getBasicScopeAttributes=new NI(e=>new AL(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/},ML=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])=>MI(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 NL=!1,PL=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function FL(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=IL(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 PL(i,!0);f()}return new PL(i,!1);function f(){let o=LL(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===gL){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),UL(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 wL){let r=o;UL(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 TL){let r=o;UL(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(UL(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 IL(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 TL&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=VL(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==_L){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),UL(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 LL(e,t,n,r,i,a){let o=RL(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=zL(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 RL(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=BL(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 zL(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}=BL(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 BL(e,t,n,r,i){return NL?{ruleScanner:e.compile(t,n),findOptions:HL(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function VL(e,t,n,r,i){return NL?{ruleScanner:e.compileWhile(t,n),findOptions:HL(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function HL(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function UL(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));FL(e,p,n&&d.start===0,d.start,f,i,!1,0),$I(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 WL(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var WL=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function GL(e,t,n,r,i,a,o,s){return new YL(e,t,n,r,i,a,o,s)}function KL(e,t,n,r,i){let a=XI(t,qL),o=EL.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 qL(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(JL(t[r],e))return n=r+1,!0;return!1})}function JL(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 YL=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new jL(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=XL(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=XI(e,qL);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)KL(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&&KL(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(vL(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[yL(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]=XL(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=EL.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===QL.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=qI.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?ZL.createRootAndLookUpScopeName(a,r,this):ZL.createRoot(`unknown`,r),t=new QL(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 eR(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=FL(this,a,i,0,t,s,!0,r);return $I(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function XL(e,t){return e=xI(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 ZL=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=FI.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new FI(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new FI(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),qI.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}},QL=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)?ZL.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:yL(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=ZL.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,vL(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ZL.fromExtension(r,n.contentNameScopesList))}},$L=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):XI(e,qL).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>XI(e,qL).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}},eR=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=qI.set(n,0,JI(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=qI.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}},tR=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,GL(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},nR=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new tR(PI.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(PI.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 $L(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new rL(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)}},rR=QL.NULL;function iR(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 aR(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function oR(e){return Array.isArray(e)?e:[e]}async function sR(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function cR(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function lR(e){return e===`ansi`||cR(e)}function uR(e){return e===`none`}function dR(e){return uR(e)}function fR(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 pR={light:`#333333`,dark:`#bbbbbb`},mR={light:`#fffffe`,dark:`#1e1e1e`},hR=`__shiki_resolved`;function gR(e){if(e?.[hR])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`?pR.light:pR.dark,n||=t.type===`light`?mR.light:mR.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,hR,{enumerable:!1,writable:!1,value:!0}),t}async function _R(e){return Array.from(new Set((await Promise.all(e.filter(e=>!lR(e)).map(async e=>await sR(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function vR(e){return(await Promise.all(e.map(async e=>dR(e)?null:gR(await sR(e))))).filter(e=>!!e)}function yR(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 bI(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var bR=class extends nR{_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=gR(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=PI.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=yR(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 bI(`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))}},xR=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}},SR=0;function CR(e){SR+=1,e.warnings!==!1&&SR>=10&&SR%10==0&&console.warn(`[Shiki] ${SR} 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 bI("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(gR),i=new bR(new xR(e.engine,n),r,n,e.langAlias),a;function o(t){return yR(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new bI(`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 bI(`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 _R(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await vR(e))}function g(){if(t)throw new bI(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--SR)}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 wR(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([vR(e.themes||[]),_R(e.langs||[]),e.engine]);return CR({...e,themes:t,langs:n,engine:r})}var TR=new WeakMap;function ER(e,t){TR.set(e,t)}function DR(e){return TR.get(e)}var OR=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(oR(n).map(e=>[e,rR])),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 kR(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function kR(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 AR(e,t){if(!(e instanceof OR))throw new bI(`Invalid grammar state`);return e.getInternalStack(t)}function jR(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(cR(e.resolveLangAlias(n.lang||`text`))||uR(r))return fR(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 bI(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new bI(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return NR(t,o,i,a,n)}function MR(...e){if(e.length===2)return DR(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(cR(i)||uR(a))throw new bI(`Plain language does not have grammar state`);if(i===`ansi`)throw new bI(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new OR(PR(n,c,o,s,r).stateStack,c.name,o.name)}function NR(e,t,n,r,i){let a=PR(e,t,n,r,i),o=new OR(a.stateStack,t.name,n.name);return ER(a.tokens,o),a.tokens}function PR(e,t,n,r,i){let a=iR(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=fR(e),l=i.grammarState?AR(i.grammarState,n.name)??rR:i.grammarContextCode==null?rR:PR(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=aR(r[qI.getForeground(s)],a),l=qI.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`?FR(t.scopes):IR(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function FR(e){return e.map(e=>({scopeName:e}))}function IR(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:zR(e,i,t.slice(0,r))}}return n}function LR(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function RR(e,t,n){if(!LR(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)LR(e[r],n[i])&&--r,--i;return r===-1}function zR(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(RR(e,t,n)){r.push(a);break}return r}function BR(e,t,n,r=jR){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:DR(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=VR(...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 OR(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&ER(s,c),s}function VR(...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 HR=/["&'<>`]/g,UR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,WR=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,GR=/[|\\{}()[\]^$+*?.]/g,KR=new WeakMap;function qR(e,t){if(e=e.replace(t.subset?JR(t.subset):HR,r),t.subset||t.escapeOnly)return e;return e.replace(UR,n).replace(WR,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 JR(e){let t=KR.get(e);return t||(t=YR(e),KR.set(e,t)),t}function YR(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(GR,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var XR=/[\dA-Fa-f]/;function ZR(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!XR.test(String.fromCharCode(t))?r:r+`;`}var QR=/\d/;function $R(e,t,n){let r=`&#`+String(e);return n&&t&&!QR.test(String.fromCharCode(t))?r:r+`;`}var ez=`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(`.`),tz={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:`€`},nz=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],rz={}.hasOwnProperty,iz={},az;for(az in tz)rz.call(tz,az)&&(iz[tz[az]]=az);var oz=/[^\dA-Za-z]/;function sz(e,t,n,r){let i=String.fromCharCode(e);if(rz.call(iz,i)){let e=iz[i],a=`&`+e;return n&&ez.includes(e)&&!nz.includes(e)&&(!r||t&&t!==61&&oz.test(String.fromCharCode(t)))?a:a+`;`}return``}function cz(e,t,n){let r=ZR(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=sz(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=$R(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function lz(e,t){return qR(e,Object.assign({format:cz},t))}var uz=/^>|^->|<!--|-->|--!>|<!-$/g,dz=[`>`],fz=[`<`,`>`];function pz(e,t,n,r){return r.settings.bogusComments?`<?`+lz(e.value,Object.assign({},r.settings.characterReferences,{subset:dz}))+`>`:`<!--`+e.value.replace(uz,i)+`-->`;function i(e){return lz(e,Object.assign({},r.settings.characterReferences,{subset:fz}))}}function mz(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var hz=vz(1),gz=vz(-1),_z=[];function vz(e){return t;function t(t,n,r){let i=t?t.children:_z,a=(n||0)+e,o=i[a];if(!r)for(;o&&tO(o);)a+=e,o=i[a];return o}}var yz={}.hasOwnProperty;function bz(e){return t;function t(t,n,r){return yz.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var xz=bz({body:wz,caption:Sz,colgroup:Sz,dd:Oz,dt:Dz,head:Sz,html:Cz,li:Ez,optgroup:Az,option:jz,p:Tz,rp:kz,rt:kz,tbody:Nz,td:Iz,tfoot:Pz,th:Iz,thead:Mz,tr:Fz});function Sz(e,t,n){let r=hz(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&tO(r.value.charAt(0)))}function Cz(e,t,n){let r=hz(n,t);return!r||r.type!==`comment`}function wz(e,t,n){let r=hz(n,t);return!r||r.type!==`comment`}function Tz(e,t,n){let r=hz(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 Ez(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Dz(e,t,n){let r=hz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Oz(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function kz(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Az(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function jz(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Mz(e,t,n){let r=hz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Nz(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Pz(e,t,n){return!hz(n,t)}function Fz(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Iz(e,t,n){let r=hz(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Lz=bz({body:Bz,colgroup:Vz,head:zz,html:Rz,tbody:Hz});function Rz(e){let t=hz(e,-1);return!t||t.type!==`comment`}function zz(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 Bz(e){let t=hz(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&tO(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Vz(e,t,n){let r=gz(n,t),i=hz(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&xz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Hz(e,t,n){let r=gz(n,t),i=hz(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&xz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Uz={name:[[`
|
|
193
193
|
\f\r &/=>`.split(``),`
|
|
194
194
|
\f\r "&'/=>\``.split(``)],[`\0
|
|
195
195
|
\f\r "&'/<=>`.split(``),`\0
|
|
@@ -197,10 +197,10 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
197
197
|
\f\r &>`.split(``),`\0
|
|
198
198
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
199
199
|
\f\r "&'<=>\``.split(``),`\0
|
|
200
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Uz(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=ph);let l=Wz(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Iz(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||!bz(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Wz(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Gz(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 Gz(e,t,n){let r=lh(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=cz(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Hz.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?hh:yh)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=cz(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Hz.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&ex(n,o)>ex(n,e.alternative)&&(o=e.alternative),s=o+cz(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Hz.single:Hz.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Kz=[`<`,`&`];function qz(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:cz(e.value,Object.assign({},r.settings.characterReferences,{subset:Kz}))}function Jz(e,t,n,r){return r.settings.allowDangerousHtml?e.value:qz(e,t,n,r)}function Yz(e,t,n,r){return r.all(e)}var Xz=Wh(`type`,{invalid:Zz,unknown:Qz,handlers:{comment:fz,doctype:pz,element:Uz,raw:Jz,root:Yz,text:qz}});function Zz(e){throw Error("Expected node, not `"+e+"`")}function Qz(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var $z={},eB={},tB=[];function nB(e,t){let n=t||$z,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:rB,all:iB,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||ig,characterReferences:n.characterReferences||eB,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?ph:fh,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function rB(e,t,n){return Xz(e,t,n,this)}function iB(e){let t=[],n=e&&e.children||tB,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function aB(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 oB(e){let t=dR(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 sB(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 cB=`light-dark()`,lB=[`color`,`background-color`];function uB(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 dB(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?uB(e,t):e})):e}function fB(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>pB(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&&lB.includes(a))if(r===cB&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new yI('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 pB(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&BI.Italic&&(t[`font-style`]=`italic`),e.fontStyle&BI.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&BI.Underline&&n.push(`underline`),e.fontStyle&BI.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function mB(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function hB(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=oB(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new yI(`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 yI(`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 yI(`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)}));gB(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 dB(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 yI(`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+=_B(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new yI(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new yI(`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&&aB(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 gB(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new yI(`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 yI(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function _B(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(_B).join(``):``}var vB=[hB()];function yB(e){let t=bB(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...vB]}function bB(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 xB=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],SB={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function CB(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 wB(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 TB(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)SB[r]&&t.push({type:`setDecoration`,value:SB[r]});else if(r<=29){let e=SB[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:xB[r-30]}});else if(r===38){let n=wB(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:xB[r-40]}});else if(r===48){let n=wB(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:xB[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:xB[r-100+8]}})}return t}function EB(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=CB(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=TB(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 DB={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 OB(e=DB){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<xB.length;e++)r.push(t(xB[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 kB={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 AB(e,t,n){let r=rR(e,n),i=dR(t),a=OB(Object.fromEntries(xB.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||kB[t]]}))),o=EB();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=iR(i,r),o=iR(o,r),n.decorations.has(`dim`)&&(i=jB(i));let s=BI.None;return n.decorations.has(`bold`)&&(s|=BI.Bold),n.decorations.has(`italic`)&&(s|=BI.Italic),n.decorations.has(`underline`)&&(s|=BI.Underline),n.decorations.has(`strikethrough`)&&(s|=BI.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function jB(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 MB(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!sR(r)&&!lR(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return AB(r,t,n)}return AR(e,t,n)}function NB(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 yI("`themes` option must not be empty");let p=zR(e,t,n,MB);if(c=ER(p),l&&cB!==l&&!f.find(e=>e.color===l))throw new yI(`\`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=>fB(e,h,u,l,d))),c&&TR(a,c);let g=f.map(e=>rR(e.theme,n));i=PB(f,m,g,u,l,`fg`,d),r=PB(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=rR(n.theme,n);a=MB(e,t,n);let l=e.getTheme(n.theme);r=iR(l.bg,s),i=iR(l.fg,s),o=l.name,c=ER(a)}else throw new yI("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function PB(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=iR(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===cB&&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 yI('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${iR(t[r][a],n[r])||`inherit`}, ${iR(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function FB(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>FB(e,t,n),codeToTokens:(t,n)=>NB(e,t,n)}){let i=t;for(let e of yB(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=NB(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=LB(a):d===`never`&&(a=RB(a)),f&&(a=zB(a));let p={...r,get source(){return i}};for(let e of yB(n))a=e.tokens?.call(p,a)||a;return IB(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function IB(e,t,n,r=ER(e)){let i=yB(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:aB,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=mB(a.htmlStyle||pB(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&&TR(m,r),m}function LB(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&BI.Underline||i.fontStyle&BI.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 RB(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 zB(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=mB(e.htmlStyle||pB(e)),i=mB(n.htmlStyle||pB(n)),a=e.fontStyle&&(e.fontStyle&BI.Underline||e.fontStyle&BI.Strikethrough),o=n.fontStyle&&(n.fontStyle&BI.Underline||n.fontStyle&BI.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var BB=nB;function VB(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>FB(e,t,n),codeToTokens:(t,n)=>NB(e,t,n)},i=BB(FB(e,t,n,r));for(let e of yB(n))i=e.postprocess?.call(r,i,n)||i;return i}async function HB(e){let t=await CR(e);return{getLastGrammarState:(...e)=>jR(t,...e),codeToTokensBase:(e,n)=>MB(t,e,n),codeToTokensWithThemes:(e,n)=>zR(t,e,n),codeToTokens:(e,n)=>NB(t,e,n),codeToHast:(e,n)=>FB(t,e,n),codeToHtml:(e,n)=>VB(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function UB(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,cR(n))return[];let r=t[n];if(!r)throw new yI(`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(uR(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new yI(`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 HB({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 WB(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 GB(e,t){let n=WB(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 KB=UB({langs:VF,themes:HF,engine:()=>(0,vI.createOnigurumaEngine)($(()=>import(`./wasm-DiIFv9DE.js`),[]))}),{codeToHtml:qB,codeToHast:JB,codeToTokens:YB,codeToTokensBase:XB,codeToTokensWithThemes:ZB,getSingletonHighlighter:QB,getLastGrammarState:$B}=GB(KB,{guessEmbeddedLanguages:sB}),eV=[`github-light`,`github-dark`],tV=null,nV=null;function rV(){return nV?Promise.resolve(nV):(tV||=KB({themes:eV,langs:[]}).then(e=>(nV=e,e)),tV)}var iV=new Set;async function aV(e){if(!e||iV.has(e))return;let t=await rV();try{t.getLoadedLanguages().includes(e)||await t.loadLanguage(e),iV.add(e)}catch{iV.add(e)}}function oV(){return rV().catch(()=>{}),{name:`shiki`,type:`code-highlighter`,getThemes:()=>eV,getSupportedLanguages:()=>nV?nV.getLoadedLanguages():[],supportsLanguage:e=>nV?nV.getLoadedLanguages().includes(e):!1,highlight:(e,t)=>{let{code:n,language:r}=e;return cV(n,r)||(aV(r).then(()=>{t&&t(cV(n,r)||sV(n))}),sV(n))}}}function sV(e){return{fg:void 0,bg:void 0,rootStyle:void 0,tokens:String(e??``).split(/\r?\n/).map(e=>[{content:e}])}}function cV(e,t){if(!nV)return null;try{if(!nV.getLoadedLanguages().includes(t))return null;let n=nV.codeToTokens(e,{lang:t,themes:{light:`github-light`,dark:`github-dark`},defaultColor:!1});return{fg:n.fg,bg:n.bg,rootStyle:n.rootStyle,tokens:n.tokens}}catch{return null}}var lV=oV(),uV=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 dV({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)(uV,{fallbackText:r,resetKey:i,children:(0,_.jsx)(`div`,{className:B(`msg-body`,t&&`streaming-cursor`,n),children:(0,_.jsx)(OF,{mode:i,isAnimating:t,parseIncompleteMarkdown:!0,showLineNumbers:!1,plugins:{code:lV},controls:{tables:!0,codeBlocks:!0,mermaid:{display:!0,wrap:!0}},children:r})})})}function fV({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 pV={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`}},mV={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)`},hV=3;function gV(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 _V({notice:e}){let t=e.status===`running`?cp: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 vV({cards:e}){let[t,n]=(0,d.useState)(!1),r=e.length,i=r>hV&&!t,a=r-hV,o=i?e.slice(r-hV):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)(Qp,{card:e},e.id)),t&&r>hV&&(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 yV(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 bV({text:e,skills:t=[]}){let n=String(e||``).match(/^(\/([A-Za-z0-9_-]+))(\s+[\s\S]*)?$/);if(!n)return(0,_.jsx)(dV,{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)(up,{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)(dV,{text:e,streaming:!1})}function xV({message:e,skills:t=[]}){let{role:n,segments:r,skillBadges:i,fileChanges:a,startupTodos:o,text:s,timestamp:c,planStep:l}=e,u=pV[n]||pV.general,f=c?Kp(c):``,p=(0,d.useMemo)(()=>yV(r||[]),[r]);if(n===`system`){let e=gV(s);return e?(0,_.jsx)(_V,{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)(fV,{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)(bV,{text:m,skills:t}),o&&(0,_.jsx)(fV,{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)(dV,{text:e.text,streaming:e.isStreaming},`t-${t}-${e.isStreaming?`s`:`d`}`):e.type===`tools`?(0,_.jsx)(vV,{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`,mV[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 SV({messages:e,projectCwd:t,skills:n=[]}){let r=(0,d.useRef)(null),[i,a]=(0,d.useState)(!0),[o,s]=(0,d.useState)(!1),[c,l]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{let e=r.current;if(!e)return;let t=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight<80;a(t),s(e.scrollTop>400),l(!t&&e.scrollTop>100)};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},[]),(0,d.useEffect)(()=>{i&&r.current&&requestAnimationFrame(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)})},[e,i]),(0,_.jsxs)(`div`,{className:`flex-1 relative overflow-hidden`,children:[e.length===0&&(0,_.jsx)(`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,_.jsxs)(`h1`,{className:`text-[clamp(24px,2.4vw,36px)] font-medium leading-tight tracking-normal`,children:[`要在 `,t||`qurio-coder`,` 中构建什么?`]})}),(0,_.jsx)(`div`,{ref:r,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)(xV,{message:e,skills:n},e.id))})}),(0,_.jsxs)(`div`,{className:`absolute right-7 bottom-[220px] flex flex-col gap-2 z-20`,children:[o&&(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:()=>r.current?.scrollTo({top:0,behavior:`smooth`}),children:(0,_.jsx)(Uf,{size:16})}),c&&(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:()=>{a(!0),r.current?.scrollTo({top:r.current.scrollHeight,behavior:`smooth`})},children:(0,_.jsx)(Hf,{size:16})})]})]})}var CV=new Set([`superpowers-lite`]);function wV(){return[{value:`auto`,label:V(`autoMode`),desc:V(`autoModeDesc`)},{value:`plan`,label:V(`planMode`),desc:V(`planModeDesc`)}]}var TV=[{name:`dream`,insert:`/dream `,icon:up,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:op,description:`Review pending memory inbox entries.`},{name:`reflect`,insert:`/reflect `,icon:vp,description:`Draft or update a reusable skill from the current workflow.`},{name:`retry`,insert:`/retry `,icon:mp,description:`Retry the last assistant turn.`}],EV=new Set(TV.map(e=>e.name));function DV({current:e,disabled:t=!1}){let[n,r]=(0,d.useState)(!1),[i,a]=(0,d.useState)(!1),o=wV(),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)(wp,{open:n,onOpenChange:e=>!t&&r(e),children:[(0,_.jsx)(Tp,{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)(_p,{size:14}),(0,_.jsx)(`span`,{className:`truncate`,children:s.label}),(0,_.jsx)(Yf,{size:11})]})}),(0,_.jsxs)(Ep,{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 OV(){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 Qd(),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 rf(e),r(e),a(!1),o()};return(0,_.jsxs)(wp,{open:i,onOpenChange:a,children:[(0,_.jsx)(Tp,{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)(Ep,{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 kV({query:e,onSelect:t,visible:n}){let[r,i]=(0,d.useState)([]),[a,o]=(0,d.useState)(null);(0,d.useEffect)(()=>{n&&Kd().then(e=>{i(Array.isArray(e)?e.filter(e=>e.enabled!==!1&&!CV.has(e.name)&&!EV.has(e.name)):[])}).catch(()=>{})},[n]);let s=e.trim().toLowerCase(),c=(0,d.useMemo)(()=>TV.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:ap,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)(vp,{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 AV({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)(kV,{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)(dp,{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)(rp,{size:13,className:`shrink-0`}),(0,_.jsx)(`span`,{className:`truncate max-w-[80px]`,children:l||`...`}),(0,_.jsx)(Yf,{size:11})]}),(0,_.jsx)(DV,{current:T,disabled:E}),(0,_.jsx)(OV,{})]}),(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)(lp,{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 jV={thinking:`bg-(--accent-blue)`,streaming:`bg-(--accent-green)`,tooling:`bg-(--accent-orange)`,live:`bg-(--accent-cyan)`};function MV({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(jV).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)(fp,{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?jV[c]:`bg-(--text-muted)`,t&&`animate-pulse`)}),(0,_.jsx)(`span`,{children:t?n:V(`idle`)})]})]})}function NV({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 PV(){return[{value:`fast`,label:V(`generationDepthFast`)},{value:`standard`,label:V(`generationDepthStandard`)},{value:`deep`,label:V(`generationDepthDeep`)}]}function FV(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 IV(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 LV(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 RV({steps:e,stageLabel:t,compact:n=!1}){let r=LV(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)(NV,{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 zV(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 BV(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 VV(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 HV(e,t){let n=String(t||``);if(!n)return Array.isArray(e)?e:[];let r=VV(e),i=r[r.length-1];return[...r.slice(0,-1),{...i,text:`${i.text||``}${n}`,isStreaming:!0}]}function UV(e,t){let n=VV(e),r=n.length-1;return n.map((e,n)=>n===r&&e.type===`text`?{...e,text:t,isStreaming:!1}:e)}function WV(e){return(Array.isArray(e)?e:[]).map(e=>e.type===`text`?{...e,isStreaming:!1}:e)}function GV(e,t){switch(t?.type){case`assistant:delta`:return{...e,segments:HV(e.segments,t.text)};case`assistant:response`:return{...e,segments:t.text?UV(e.segments,t.text):WV(e.segments)};case`tool:start`:return{...e,segments:zV(e.segments,{id:t.id,name:t.name,arguments:t.arguments,status:`running`,durationMs:null,summary:``,result:``})};case`tool:result`:return{...e,segments:BV(e.segments,t.id,e=>({...e,result:t.content||e.result||``}))};case`tool:end`:return{...e,segments:BV(e.segments,t.id,e=>({...e,status:`done`,durationMs:t.durationMs,summary:t.summary||e.summary||``}))};case`tool:error`:return{...e,segments:BV(e.segments,t.id,e=>({...e,status:`error`,durationMs:t.durationMs,summary:t.summary||e.summary||``}))};case`tool:blocked`:return{...e,segments:BV(e.segments,t.id,e=>({...e,status:`blocked`,summary:e.summary||`Tool blocked`}))};case`codewiki:done`:return{...e,loading:!1,segments:WV(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 KV({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,te]=(0,d.useState)(`standard`),[k,A]=(0,d.useState)([]),[j,ne]=(0,d.useState)(!1),re=(0,d.useRef)(null),M=(0,d.useMemo)(()=>a.find(e=>e.file===s)||null,[a,s]),N=M?`/api/codewiki/report/${encodeURIComponent(M.file)}`:``,P=(0,d.useCallback)(async({preferNewest:e=!1}={})=>{u(!0),h(``);try{let t=await af(),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(``),A([]),ne(!1),P({preferNewest:!0})},[P,t]),(0,d.useEffect)(()=>{let e=re.current;e&&requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight})},[k,j]),(0,d.useEffect)(()=>{f&&n&&w(!0)},[n,f]),(0,d.useEffect)(()=>{!f||n||!C||(P({preferNewest:!0}),p(!1),w(!1))},[n,f,P,C]);let ie=async()=>{if(!(n||f)){h(``),p(!0),w(!1);try{let e=await of(ee);e?.error&&(p(!1),h(e.message||V(`failedToStart`)))}catch(e){p(!1),h(e?.message||V(`failedToStart`))}}},ae=async e=>{e.preventDefault();let t=y.trim();if(!t||F||j)return;let n=Date.now(),r=`cw-assistant-${n}`;S(t),b(``),h(``),A(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}]),ne(!0);try{await sf({question:t,reportFile:M?.file||``,onEvent:e=>{A(t=>t.map(t=>t.id===r?GV(t,e):t))}})}catch(e){A(t=>t.map(t=>t.id===r?{...t,role:`error`,loading:!1,segments:[{type:`text`,text:e?.message||V(`codewikiFailed`),isStreaming:!1}]}:t))}finally{ne(!1)}},oe=async()=>{if(T){O(!0),h(``);try{let e=await cf(T.file);e?.error?h(e.message||V(`failedToDelete`)):(E(null),v(!1),await P({preferNewest:!1}))}catch(e){h(e?.message||V(`failedToDelete`))}finally{O(!1)}}},F=n||f,I=F||j;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:PV().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:F,onClick:()=>te(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:ie,disabled:F,children:[f?(0,_.jsx)(cp,{size:15,className:`animate-spin`}):(0,_.jsx)(vp,{size:15}),V(f?`generating`:`generateNew`)]}),f&&(0,_.jsx)(RV,{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:()=>P({preferNewest:!0}),title:V(`refreshReport`),"aria-label":V(`refreshReport`),children:(0,_.jsx)(pp,{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)(cp,{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)(np,{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)(wp,{children:[(0,_.jsx)(Tp,{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)(Ep,{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:[FV(e.mtime),IV(e.size)?` · ${IV(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:!M&&!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:ie,disabled:F,children:[f?(0,_.jsx)(cp,{size:16,className:`animate-spin`}):(0,_.jsx)(vp,{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:PV().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:F,onClick:()=>te(e.value),children:e.label},e.value))}),f&&(0,_.jsx)(RV,{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`)})]}):M?(0,_.jsx)(`iframe`,{title:`CodeWiki ${M.file}`,src:N,sandbox:`allow-scripts`,className:`h-full w-full border-0 bg-white`,onLoad:()=>v(!1),onError:()=>v(!0)},M.file):(0,_.jsxs)(`div`,{className:`h-full flex items-center justify-center text-[13px] text-(--text-muted)`,children:[(0,_.jsx)(cp,{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:re,className:`flex-1 min-h-0 overflow-y-auto px-4 py-3`,children:k.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`:j||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:k.map(e=>(0,_.jsxs)(`div`,{children:[(0,_.jsx)(xV,{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)(cp,{size:14,className:`animate-spin`}),V(`answering`)]})]},e.id))})}),(0,_.jsx)(`form`,{className:`p-4 border-t border-(--border-default)`,onSubmit:ae,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`):j||n?V(`answering`):`Ask about this repository`,disabled:I,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:I||!y.trim(),"aria-label":V(`sendingQuestion`),children:j?(0,_.jsx)(cp,{size:15,className:`animate-spin`}):(0,_.jsx)(hp,{size:15})})]})})]})]}),(0,_.jsx)(Bp,{open:!!T,title:V(`deleteReportConfirm`),description:V(`deleteReportDescription`).replace(`{{report}}`,T?.title||T?.file||``),loading:D,onOpenChange:e=>!e&&E(null),onConfirm:oe})]})}function qV(e,t){return e===`delete`?`delete`:e===`run`?`run`:t?.planApproval?`plan`:t?.reflectApproval?`reflect`:`generic`}function JV(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 YV({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 XV({variant:e,args:t,details:n}){if(e===`delete`){let e=JV(t);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(YV,{label:`File`,value:e.path||e.name||`-`}),(0,_.jsx)(YV,{label:`Type`,value:e.type||`file`})]})}return e===`run`?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(YV,{label:`Command`,value:JV(t).command||`-`}),n?.risk&&(0,_.jsx)(YV,{label:`Risk`,value:n.risk}),n?.description&&(0,_.jsx)(YV,{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)(YV,{label:`Scope`,value:n.scope}),n?.skillName&&(0,_.jsx)(YV,{label:`Skill`,value:n.skillName}),n?.targetPath&&(0,_.jsx)(YV,{label:`Path`,value:n.targetPath})]}):(0,_.jsx)(YV,{label:`Tool`,value:JV(t)._raw||`-`})}function ZV({request:e,open:t,onDecision:n}){if(!e)return null;let{id:r,toolName:i,displayName:a,arguments:o,details:s}=e,c=qV(i,s);return(0,_.jsx)(Mp,{open:t,onOpenChange:e=>{e||n(r,!1)},children:(0,_.jsxs)(Fp,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Ip,{children:(0,_.jsx)(Rp,{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)(XV,{variant:c,args:o,details:s})}),(0,_.jsxs)(Lp,{className:`gap-2`,children:[(0,_.jsx)(jp,{variant:`outline`,onClick:()=>n(r,!1),children:V(`deny`)}),(0,_.jsx)(jp,{onClick:()=>n(r,!0),children:V(`approve`)})]})]})})}var QV=kp(`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 $V({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,_.jsx)(n?y:`span`,{"data-slot":`badge`,"data-variant":t,className:B(QV({variant:t}),e),...r})}function eH({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 tH={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 nH({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)($V,{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)(NV,{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)($V,{variant:`outline`,className:B(`text-[11px] px-1.5 py-0`,tH[e.role]||`bg-(--muted) text-(--muted-foreground)`),children:e.role?.toUpperCase()}),(0,_.jsx)(`span`,{className:`truncate text-(--text-secondary)`,children:e.title})]},t))})]})}function rH({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)($V,{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)($V,{variant:`outline`,className:B(`text-[11px] px-1.5 py-0 shrink-0`,tH[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)(eH,{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)(jp,{variant:`destructive`,size:`xs`,disabled:n,onClick:()=>t(`reject`),children:V(`planReject`)}),(0,_.jsx)(jp,{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)(jp,{size:`xs`,disabled:n,onClick:()=>t(`approve`),children:V(`planApprove`)})]})]})}function iH({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 aH({...e}){return(0,_.jsx)(Ic,{"data-slot":`select`,...e})}function oH({...e}){return(0,_.jsx)(Rc,{"data-slot":`select-value`,...e})}function sH({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 cH({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)(uH,{}),(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)(dH,{})]})})}function lH({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 uH({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 dH({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 fH(e,t){return t.split(`.`).reduce((e,t)=>e?.[t],e)}function pH({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:`ui.reply_language`,label:V(`replyLanguage`),options:[`zh`,`en`]}]},{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(fH(r,e)??``):``,l=Object.keys(a).length>0;return(0,_.jsx)(Mp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Fp,{className:`sm:max-w-[640px] max-h-[80vh] overflow-y-auto`,children:[(0,_.jsx)(Ip,{children:(0,_.jsx)(Rp,{children:V(`settingsTitle`)})}),(0,_.jsx)(`div`,{className:`space-y-5 py-1`,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)(aH,{value:c(e.path),onValueChange:t=>s(e.path,t),children:[(0,_.jsx)(sH,{className:`flex-1 h-8 text-[13px]`,children:(0,_.jsx)(oH,{})}),(0,_.jsx)(cH,{children:e.options.map(e=>(0,_.jsx)(lH,{value:e,children:e},e))})]}):(0,_.jsx)(iH,{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)(Cp,{className:`mt-4 bg-(--border-default)`})]},e.title))}),(0,_.jsxs)(Lp,{className:`gap-2`,children:[(0,_.jsx)(jp,{variant:`outline`,onClick:()=>t(!1),className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(jp,{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 mH({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)(hH,{}),(0,_.jsx)(Ss,{})]})}function hH({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 gH({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 Gd(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)(Mp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Fp,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Ip,{children:(0,_.jsx)(Rp,{children:V(`selectProject`)})}),(0,_.jsxs)(`div`,{className:`flex gap-2`,children:[(0,_.jsx)(iH,{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)(jp,{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)(mH,{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`)})]})})]})]})})}function _H({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)(()=>{e&&(u(!0),qd(e.name).then(e=>{c(e.content||``)}).catch(()=>{}).finally(()=>u(!1)))},[e]),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-20 shrink-0`,children:V(`name`)}),(0,_.jsx)(iH,{value:r,onChange:e=>i(e.target.value),disabled:!f,placeholder:`my-skill`,className:`flex-1 h-8 text-[13px]`})]}),f&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-20 shrink-0`,children:V(`description`)}),(0,_.jsx)(iH,{value:a,onChange:e=>o(e.target.value),placeholder:`Skill description...`,className:`flex-1 h-8 text-[13px]`})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) mb-1.5 block`,children:V(`skillContent`)}),l?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(eH,{value:s,onChange:e=>c(e.target.value),className:`min-h-[200px] text-[13px] font-mono`,placeholder:`---
|
|
200
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Wz(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=mh);let l=Gz(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Lz(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||!xz(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Gz(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Kz(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 Kz(e,t,n){let r=uh(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=lz(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Uz.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?gh:bh)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=lz(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Uz.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&tx(n,o)>tx(n,e.alternative)&&(o=e.alternative),s=o+lz(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Uz.single:Uz.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var qz=[`<`,`&`];function Jz(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:lz(e.value,Object.assign({},r.settings.characterReferences,{subset:qz}))}function Yz(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Jz(e,t,n,r)}function Xz(e,t,n,r){return r.all(e)}var Zz=Gh(`type`,{invalid:Qz,unknown:$z,handlers:{comment:pz,doctype:mz,element:Wz,raw:Yz,root:Xz,text:Jz}});function Qz(e){throw Error("Expected node, not `"+e+"`")}function $z(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var eB={},tB={},nB=[];function rB(e,t){let n=t||eB,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:iB,all:aB,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||ag,characterReferences:n.characterReferences||tB,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?mh:ph,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function iB(e,t,n){return Zz(e,t,n,this)}function aB(e){let t=[],n=e&&e.children||nB,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function oB(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 sB(e){let t=fR(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 cB(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 lB=`light-dark()`,uB=[`color`,`background-color`];function dB(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 fB(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?dB(e,t):e})):e}function pB(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>mB(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&&uB.includes(a))if(r===lB&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new bI('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 mB(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&VI.Italic&&(t[`font-style`]=`italic`),e.fontStyle&VI.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&VI.Underline&&n.push(`underline`),e.fontStyle&VI.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function hB(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function gB(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=sB(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new bI(`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 bI(`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 bI(`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)}));_B(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 fB(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 bI(`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+=vB(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new bI(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new bI(`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&&oB(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 _B(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new bI(`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 bI(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function vB(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(vB).join(``):``}var yB=[gB()];function bB(e){let t=xB(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...yB]}function xB(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 SB=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],CB={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function wB(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 TB(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 EB(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)CB[r]&&t.push({type:`setDecoration`,value:CB[r]});else if(r<=29){let e=CB[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:SB[r-30]}});else if(r===38){let n=TB(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:SB[r-40]}});else if(r===48){let n=TB(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:SB[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:SB[r-100+8]}})}return t}function DB(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=wB(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=EB(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 OB={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 kB(e=OB){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<SB.length;e++)r.push(t(SB[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 AB={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 jB(e,t,n){let r=iR(e,n),i=fR(t),a=kB(Object.fromEntries(SB.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||AB[t]]}))),o=DB();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=aR(i,r),o=aR(o,r),n.decorations.has(`dim`)&&(i=MB(i));let s=VI.None;return n.decorations.has(`bold`)&&(s|=VI.Bold),n.decorations.has(`italic`)&&(s|=VI.Italic),n.decorations.has(`underline`)&&(s|=VI.Underline),n.decorations.has(`strikethrough`)&&(s|=VI.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function MB(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 NB(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!cR(r)&&!uR(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return jB(r,t,n)}return jR(e,t,n)}function PB(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 bI("`themes` option must not be empty");let p=BR(e,t,n,NB);if(c=DR(p),l&&lB!==l&&!f.find(e=>e.color===l))throw new bI(`\`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=>pB(e,h,u,l,d))),c&&ER(a,c);let g=f.map(e=>iR(e.theme,n));i=FB(f,m,g,u,l,`fg`,d),r=FB(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=iR(n.theme,n);a=NB(e,t,n);let l=e.getTheme(n.theme);r=aR(l.bg,s),i=aR(l.fg,s),o=l.name,c=DR(a)}else throw new bI("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function FB(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=aR(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===lB&&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 bI('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${aR(t[r][a],n[r])||`inherit`}, ${aR(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function IB(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>IB(e,t,n),codeToTokens:(t,n)=>PB(e,t,n)}){let i=t;for(let e of bB(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=PB(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=RB(a):d===`never`&&(a=zB(a)),f&&(a=BB(a));let p={...r,get source(){return i}};for(let e of bB(n))a=e.tokens?.call(p,a)||a;return LB(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function LB(e,t,n,r=DR(e)){let i=bB(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:oB,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=hB(a.htmlStyle||mB(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&&ER(m,r),m}function RB(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&VI.Underline||i.fontStyle&VI.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 zB(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 BB(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=hB(e.htmlStyle||mB(e)),i=hB(n.htmlStyle||mB(n)),a=e.fontStyle&&(e.fontStyle&VI.Underline||e.fontStyle&VI.Strikethrough),o=n.fontStyle&&(n.fontStyle&VI.Underline||n.fontStyle&VI.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var VB=rB;function HB(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>IB(e,t,n),codeToTokens:(t,n)=>PB(e,t,n)},i=VB(IB(e,t,n,r));for(let e of bB(n))i=e.postprocess?.call(r,i,n)||i;return i}async function UB(e){let t=await wR(e);return{getLastGrammarState:(...e)=>MR(t,...e),codeToTokensBase:(e,n)=>NB(t,e,n),codeToTokensWithThemes:(e,n)=>BR(t,e,n),codeToTokens:(e,n)=>PB(t,e,n),codeToHast:(e,n)=>IB(t,e,n),codeToHtml:(e,n)=>HB(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function WB(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,lR(n))return[];let r=t[n];if(!r)throw new bI(`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(dR(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new bI(`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 UB({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 GB(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 KB(e,t){let n=GB(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 qB=WB({langs:HF,themes:UF,engine:()=>(0,yI.createOnigurumaEngine)($(()=>import(`./wasm-DiIFv9DE.js`),[]))}),{codeToHtml:JB,codeToHast:YB,codeToTokens:XB,codeToTokensBase:ZB,codeToTokensWithThemes:QB,getSingletonHighlighter:$B,getLastGrammarState:eV}=KB(qB,{guessEmbeddedLanguages:cB}),tV=[`github-light`,`github-dark`],nV=null,rV=null;function iV(){return rV?Promise.resolve(rV):(nV||=qB({themes:tV,langs:[]}).then(e=>(rV=e,e)),nV)}var aV=new Set;async function oV(e){if(!e||aV.has(e))return;let t=await iV();try{t.getLoadedLanguages().includes(e)||await t.loadLanguage(e),aV.add(e)}catch{aV.add(e)}}function sV(){return iV().catch(()=>{}),{name:`shiki`,type:`code-highlighter`,getThemes:()=>tV,getSupportedLanguages:()=>rV?rV.getLoadedLanguages():[],supportsLanguage:e=>rV?rV.getLoadedLanguages().includes(e):!1,highlight:(e,t)=>{let{code:n,language:r}=e;return lV(n,r)||(oV(r).then(()=>{t&&t(lV(n,r)||cV(n))}),cV(n))}}}function cV(e){return{fg:void 0,bg:void 0,rootStyle:void 0,tokens:String(e??``).split(/\r?\n/).map(e=>[{content:e}])}}function lV(e,t){if(!rV)return null;try{if(!rV.getLoadedLanguages().includes(t))return null;let n=rV.codeToTokens(e,{lang:t,themes:{light:`github-light`,dark:`github-dark`},defaultColor:!1});return{fg:n.fg,bg:n.bg,rootStyle:n.rootStyle,tokens:n.tokens}}catch{return null}}var uV=sV(),dV=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 fV({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)(dV,{fallbackText:r,resetKey:i,children:(0,_.jsx)(`div`,{className:B(`msg-body`,t&&`streaming-cursor`,n),children:(0,_.jsx)(kF,{mode:i,isAnimating:t,parseIncompleteMarkdown:!0,showLineNumbers:!1,plugins:{code:uV},controls:{tables:!0,codeBlocks:!0,mermaid:{display:!0,wrap:!0}},children:r})})})}function pV({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 mV={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`}},hV={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)`},gV=3;function _V(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 vV({notice:e}){let t=e.status===`running`?lp: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 yV({cards:e}){let[t,n]=(0,d.useState)(!1),r=e.length,i=r>gV&&!t,a=r-gV,o=i?e.slice(r-gV):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)($p,{card:e},e.id)),t&&r>gV&&(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 bV(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 xV({text:e,skills:t=[]}){let n=String(e||``).match(/^(\/([A-Za-z0-9_-]+))(\s+[\s\S]*)?$/);if(!n)return(0,_.jsx)(fV,{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)(dp,{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)(fV,{text:e,streaming:!1})}function SV({message:e,skills:t=[]}){let{role:n,segments:r,skillBadges:i,fileChanges:a,startupTodos:o,text:s,timestamp:c,planStep:l}=e,u=mV[n]||mV.general,f=c?qp(c):``,p=(0,d.useMemo)(()=>bV(r||[]),[r]);if(n===`system`){let e=_V(s);return e?(0,_.jsx)(vV,{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)(pV,{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)(xV,{text:m,skills:t}),o&&(0,_.jsx)(pV,{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)(fV,{text:e.text,streaming:e.isStreaming},`t-${t}-${e.isStreaming?`s`:`d`}`):e.type===`tools`?(0,_.jsx)(yV,{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`,hV[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 CV({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)(ip,{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)(SV,{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 wV=new Set([`superpowers-lite`]);function TV(){return[{value:`auto`,label:V(`autoMode`),desc:V(`autoModeDesc`)},{value:`plan`,label:V(`planMode`),desc:V(`planModeDesc`)}]}var EV=[{name:`dream`,insert:`/dream `,icon:dp,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:sp,description:`Review pending memory inbox entries.`},{name:`reflect`,insert:`/reflect `,icon:yp,description:`Draft or update a reusable skill from the current workflow.`},{name:`retry`,insert:`/retry `,icon:hp,description:`Retry the last assistant turn.`}],DV=new Set(EV.map(e=>e.name));function OV({current:e,disabled:t=!1}){let[n,r]=(0,d.useState)(!1),[i,a]=(0,d.useState)(!1),o=TV(),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)(Tp,{open:n,onOpenChange:e=>!t&&r(e),children:[(0,_.jsx)(Ep,{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)(vp,{size:14}),(0,_.jsx)(`span`,{className:`truncate`,children:s.label}),(0,_.jsx)(Yf,{size:11})]})}),(0,_.jsxs)(Dp,{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 kV(){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 Qd(),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 rf(e),r(e),a(!1),o()};return(0,_.jsxs)(Tp,{open:i,onOpenChange:a,children:[(0,_.jsx)(Ep,{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)(Dp,{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 AV({query:e,onSelect:t,visible:n}){let[r,i]=(0,d.useState)([]),[a,o]=(0,d.useState)(null);(0,d.useEffect)(()=>{n&&Kd().then(e=>{i(Array.isArray(e)?e.filter(e=>e.enabled!==!1&&!wV.has(e.name)&&!DV.has(e.name)):[])}).catch(()=>{})},[n]);let s=e.trim().toLowerCase(),c=(0,d.useMemo)(()=>EV.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:op,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)(yp,{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 jV({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)(AV,{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)(fp,{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)(rp,{size:13,className:`shrink-0`}),(0,_.jsx)(`span`,{className:`truncate max-w-[80px]`,children:l||`...`}),(0,_.jsx)(Yf,{size:11})]}),(0,_.jsx)(OV,{current:T,disabled:E}),(0,_.jsx)(kV,{})]}),(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)(up,{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 MV={thinking:`bg-(--accent-blue)`,streaming:`bg-(--accent-green)`,tooling:`bg-(--accent-orange)`,live:`bg-(--accent-cyan)`};function NV({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(MV).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)(pp,{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?MV[c]:`bg-(--text-muted)`,t&&`animate-pulse`)}),(0,_.jsx)(`span`,{children:t?n:V(`idle`)})]})]})}function PV({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 FV(){return[{value:`fast`,label:V(`generationDepthFast`)},{value:`standard`,label:V(`generationDepthStandard`)},{value:`deep`,label:V(`generationDepthDeep`)}]}function IV(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 LV(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 RV(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 zV({steps:e,stageLabel:t,compact:n=!1}){let r=RV(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)(PV,{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 BV(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 VV(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 HV(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 UV(e,t){let n=String(t||``);if(!n)return Array.isArray(e)?e:[];let r=HV(e),i=r[r.length-1];return[...r.slice(0,-1),{...i,text:`${i.text||``}${n}`,isStreaming:!0}]}function WV(e,t){let n=HV(e),r=n.length-1;return n.map((e,n)=>n===r&&e.type===`text`?{...e,text:t,isStreaming:!1}:e)}function GV(e){return(Array.isArray(e)?e:[]).map(e=>e.type===`text`?{...e,isStreaming:!1}:e)}function KV(e,t){switch(t?.type){case`assistant:delta`:return{...e,segments:UV(e.segments,t.text)};case`assistant:response`:return{...e,segments:t.text?WV(e.segments,t.text):GV(e.segments)};case`tool:start`:return{...e,segments:BV(e.segments,{id:t.id,name:t.name,arguments:t.arguments,status:`running`,durationMs:null,summary:``,result:``})};case`tool:result`:return{...e,segments:VV(e.segments,t.id,e=>({...e,result:t.content||e.result||``}))};case`tool:end`:return{...e,segments:VV(e.segments,t.id,e=>({...e,status:`done`,durationMs:t.durationMs,summary:t.summary||e.summary||``}))};case`tool:error`:return{...e,segments:VV(e.segments,t.id,e=>({...e,status:`error`,durationMs:t.durationMs,summary:t.summary||e.summary||``}))};case`tool:blocked`:return{...e,segments:VV(e.segments,t.id,e=>({...e,status:`blocked`,summary:e.summary||`Tool blocked`}))};case`codewiki:done`:return{...e,loading:!1,segments:GV(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 qV({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,te]=(0,d.useState)(`standard`),[k,A]=(0,d.useState)([]),[j,ne]=(0,d.useState)(!1),re=(0,d.useRef)(null),M=(0,d.useMemo)(()=>a.find(e=>e.file===s)||null,[a,s]),N=M?`/api/codewiki/report/${encodeURIComponent(M.file)}`:``,P=(0,d.useCallback)(async({preferNewest:e=!1}={})=>{u(!0),h(``);try{let t=await af(),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(``),A([]),ne(!1),P({preferNewest:!0})},[P,t]),(0,d.useEffect)(()=>{let e=re.current;e&&requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight})},[k,j]),(0,d.useEffect)(()=>{f&&n&&w(!0)},[n,f]),(0,d.useEffect)(()=>{!f||n||!C||(P({preferNewest:!0}),p(!1),w(!1))},[n,f,P,C]);let ie=async()=>{if(!(n||f)){h(``),p(!0),w(!1);try{let e=await of(ee);e?.error&&(p(!1),h(e.message||V(`failedToStart`)))}catch(e){p(!1),h(e?.message||V(`failedToStart`))}}},ae=async e=>{e.preventDefault();let t=y.trim();if(!t||F||j)return;let n=Date.now(),r=`cw-assistant-${n}`;S(t),b(``),h(``),A(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}]),ne(!0);try{await sf({question:t,reportFile:M?.file||``,onEvent:e=>{A(t=>t.map(t=>t.id===r?KV(t,e):t))}})}catch(e){A(t=>t.map(t=>t.id===r?{...t,role:`error`,loading:!1,segments:[{type:`text`,text:e?.message||V(`codewikiFailed`),isStreaming:!1}]}:t))}finally{ne(!1)}},oe=async()=>{if(T){O(!0),h(``);try{let e=await cf(T.file);e?.error?h(e.message||V(`failedToDelete`)):(E(null),v(!1),await P({preferNewest:!1}))}catch(e){h(e?.message||V(`failedToDelete`))}finally{O(!1)}}},F=n||f,I=F||j;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:FV().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:F,onClick:()=>te(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:ie,disabled:F,children:[f?(0,_.jsx)(lp,{size:15,className:`animate-spin`}):(0,_.jsx)(yp,{size:15}),V(f?`generating`:`generateNew`)]}),f&&(0,_.jsx)(zV,{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:()=>P({preferNewest:!0}),title:V(`refreshReport`),"aria-label":V(`refreshReport`),children:(0,_.jsx)(mp,{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)(lp,{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)(np,{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)(Tp,{children:[(0,_.jsx)(Ep,{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)(Dp,{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:[IV(e.mtime),LV(e.size)?` · ${LV(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:!M&&!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:ie,disabled:F,children:[f?(0,_.jsx)(lp,{size:16,className:`animate-spin`}):(0,_.jsx)(yp,{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:FV().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:F,onClick:()=>te(e.value),children:e.label},e.value))}),f&&(0,_.jsx)(zV,{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`)})]}):M?(0,_.jsx)(`iframe`,{title:`CodeWiki ${M.file}`,src:N,sandbox:`allow-scripts`,className:`h-full w-full border-0 bg-white`,onLoad:()=>v(!1),onError:()=>v(!0)},M.file):(0,_.jsxs)(`div`,{className:`h-full flex items-center justify-center text-[13px] text-(--text-muted)`,children:[(0,_.jsx)(lp,{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:re,className:`flex-1 min-h-0 overflow-y-auto px-4 py-3`,children:k.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`:j||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:k.map(e=>(0,_.jsxs)(`div`,{children:[(0,_.jsx)(SV,{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)(lp,{size:14,className:`animate-spin`}),V(`answering`)]})]},e.id))})}),(0,_.jsx)(`form`,{className:`p-4 border-t border-(--border-default)`,onSubmit:ae,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`):j||n?V(`answering`):`Ask about this repository`,disabled:I,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:I||!y.trim(),"aria-label":V(`sendingQuestion`),children:j?(0,_.jsx)(lp,{size:15,className:`animate-spin`}):(0,_.jsx)(gp,{size:15})})]})})]})]}),(0,_.jsx)(Vp,{open:!!T,title:V(`deleteReportConfirm`),description:V(`deleteReportDescription`).replace(`{{report}}`,T?.title||T?.file||``),loading:D,onOpenChange:e=>!e&&E(null),onConfirm:oe})]})}function JV(e,t){return e===`delete`?`delete`:e===`run`?`run`:t?.planApproval?`plan`:t?.reflectApproval?`reflect`:`generic`}function YV(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 XV({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 ZV({variant:e,args:t,details:n}){if(e===`delete`){let e=YV(t);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(XV,{label:`File`,value:e.path||e.name||`-`}),(0,_.jsx)(XV,{label:`Type`,value:e.type||`file`})]})}return e===`run`?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(XV,{label:`Command`,value:YV(t).command||`-`}),n?.risk&&(0,_.jsx)(XV,{label:`Risk`,value:n.risk}),n?.description&&(0,_.jsx)(XV,{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)(XV,{label:`Scope`,value:n.scope}),n?.skillName&&(0,_.jsx)(XV,{label:`Skill`,value:n.skillName}),n?.targetPath&&(0,_.jsx)(XV,{label:`Path`,value:n.targetPath})]}):(0,_.jsx)(XV,{label:`Tool`,value:YV(t)._raw||`-`})}function QV({request:e,open:t,onDecision:n}){if(!e)return null;let{id:r,toolName:i,displayName:a,arguments:o,details:s}=e,c=JV(i,s);return(0,_.jsx)(Np,{open:t,onOpenChange:e=>{e||n(r,!1)},children:(0,_.jsxs)(Ip,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Lp,{children:(0,_.jsx)(zp,{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)(ZV,{variant:c,args:o,details:s})}),(0,_.jsxs)(Rp,{className:`gap-2`,children:[(0,_.jsx)(Mp,{variant:`outline`,onClick:()=>n(r,!1),children:V(`deny`)}),(0,_.jsx)(Mp,{onClick:()=>n(r,!0),children:V(`approve`)})]})]})})}var $V=Ap(`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 eH({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,_.jsx)(n?y:`span`,{"data-slot":`badge`,"data-variant":t,className:B($V({variant:t}),e),...r})}function tH({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 nH={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 rH({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)(eH,{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)(PV,{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)(eH,{variant:`outline`,className:B(`text-[11px] px-1.5 py-0`,nH[e.role]||`bg-(--muted) text-(--muted-foreground)`),children:e.role?.toUpperCase()}),(0,_.jsx)(`span`,{className:`truncate text-(--text-secondary)`,children:e.title})]},t))})]})}function iH({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)(eH,{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)(eH,{variant:`outline`,className:B(`text-[11px] px-1.5 py-0 shrink-0`,nH[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)(tH,{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)(Mp,{variant:`destructive`,size:`xs`,disabled:n,onClick:()=>t(`reject`),children:V(`planReject`)}),(0,_.jsx)(Mp,{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)(Mp,{size:`xs`,disabled:n,onClick:()=>t(`approve`),children:V(`planApprove`)})]})]})}function aH({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 oH({...e}){return(0,_.jsx)(Ic,{"data-slot":`select`,...e})}function sH({...e}){return(0,_.jsx)(Rc,{"data-slot":`select-value`,...e})}function cH({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 lH({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)(dH,{}),(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)(fH,{})]})})}function uH({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 dH({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 fH({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 pH(e,t){return t.split(`.`).reduce((e,t)=>e?.[t],e)}function mH({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:`ui.reply_language`,label:V(`replyLanguage`),options:[`zh`,`en`]}]},{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(pH(r,e)??``):``,l=Object.keys(a).length>0;return(0,_.jsx)(Np,{open:e,onOpenChange:t,children:(0,_.jsxs)(Ip,{className:`sm:max-w-[640px] max-h-[80vh] overflow-y-auto`,children:[(0,_.jsx)(Lp,{children:(0,_.jsx)(zp,{children:V(`settingsTitle`)})}),(0,_.jsx)(`div`,{className:`space-y-5 py-1`,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)(oH,{value:c(e.path),onValueChange:t=>s(e.path,t),children:[(0,_.jsx)(cH,{className:`flex-1 h-8 text-[13px]`,children:(0,_.jsx)(sH,{})}),(0,_.jsx)(lH,{children:e.options.map(e=>(0,_.jsx)(uH,{value:e,children:e},e))})]}):(0,_.jsx)(aH,{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)(wp,{className:`mt-4 bg-(--border-default)`})]},e.title))}),(0,_.jsxs)(Rp,{className:`gap-2`,children:[(0,_.jsx)(Mp,{variant:`outline`,onClick:()=>t(!1),className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(Mp,{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 hH({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)(gH,{}),(0,_.jsx)(Ss,{})]})}function gH({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 _H({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 Gd(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)(Np,{open:e,onOpenChange:t,children:(0,_.jsxs)(Ip,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Lp,{children:(0,_.jsx)(zp,{children:V(`selectProject`)})}),(0,_.jsxs)(`div`,{className:`flex gap-2`,children:[(0,_.jsx)(aH,{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)(Mp,{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)(hH,{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`)})]})})]})]})})}function vH({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)(()=>{e&&(u(!0),qd(e.name).then(e=>{c(e.content||``)}).catch(()=>{}).finally(()=>u(!1)))},[e]),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-20 shrink-0`,children:V(`name`)}),(0,_.jsx)(aH,{value:r,onChange:e=>i(e.target.value),disabled:!f,placeholder:`my-skill`,className:`flex-1 h-8 text-[13px]`})]}),f&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-20 shrink-0`,children:V(`description`)}),(0,_.jsx)(aH,{value:a,onChange:e=>o(e.target.value),placeholder:`Skill description...`,className:`flex-1 h-8 text-[13px]`})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) mb-1.5 block`,children:V(`skillContent`)}),l?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(tH,{value:s,onChange:e=>c(e.target.value),className:`min-h-[200px] text-[13px] font-mono`,placeholder:`---
|
|
202
202
|
name: my-skill
|
|
203
203
|
description: ...
|
|
204
204
|
---
|
|
205
205
|
|
|
206
|
-
Skill instructions...`})]}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(jp,{variant:`outline`,onClick:n,className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(jp,{onClick:async()=>{f?await Jd({name:r,description:a,content:s}):await Yd(e.name,s),t()},disabled:l||!s||f&&!r,className:`text-[13px]`,children:V(f?`create`:`save`)})]})]})}function vH({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),qd(e.name).then(e=>{i(e.content||``)}).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,_.jsx)(Mp,{open:t,onOpenChange:n,children:(0,_.jsxs)(Fp,{className:`sm:max-w-[600px] max-h-[80vh] overflow-y-auto`,children:[(0,_.jsx)(Ip,{children:(0,_.jsxs)(Rp,{children:[e?.name,` `,V(`contentPreview`)]})}),a?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(`pre`,{className:`text-[13px] whitespace-pre-wrap break-all bg-(--bg-secondary) rounded-lg p-3 max-h-[400px] overflow-y-auto font-mono`,children:r}),(0,_.jsx)(Lp,{children:(0,_.jsx)(jp,{variant:`outline`,onClick:()=>n(!1),className:`text-[13px]`,children:V(`close`)})})]})})}function yH(){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=(0,d.useCallback)(async()=>{try{let e=await Kd();t(Array.isArray(e)?e:[])}catch{}r(!1)},[]);(0,d.useEffect)(()=>{c()},[c]);let l=async(e,t)=>{await Zd(e,t),c()},u=async e=>{await Xd(e),c()},f=()=>{a(null),c()},p=e=>V(e===`builtin`?`builtin`:e===`global`?`globalScope`:`projectScope`);return n?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,_.jsx)(jp,{onClick:()=>a(`new`),size:`xs`,children:V(`addSkill`)})}),i&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Cp,{className:`bg-(--border-default)`}),(0,_.jsx)(_H,{skill:i===`new`?null:i,onSave:f,onCancel:()=>a(null)}),(0,_.jsx)(Cp,{className:`bg-(--border-default)`})]}),e.length===0&&!i&&(0,_.jsx)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:V(`noSkills`)}),(0,_.jsx)(`div`,{className:`space-y-1.5 max-h-[320px] overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:e.map(e=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg border border-(--border-default) bg-(--bg-secondary) group`,children:[(0,_.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary) truncate`,children:e.name}),(0,_.jsx)($V,{variant:e.scope===`builtin`?`secondary`:`outline`,className:`text-[10px] px-1.5 py-0 h-4`,children:p(e.scope)}),e.version&&e.version!==`0.0.0`&&(0,_.jsxs)(`span`,{className:`text-[10px] text-(--text-muted)`,children:[`v`,e.version]})]}),e.description&&(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) truncate mt-0.5`,children:e.description})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[e.scope!==`builtin`&&(0,_.jsxs)(`label`,{className:`flex items-center gap-1 cursor-pointer text-[12px] text-(--text-muted)`,children:[(0,_.jsx)(`input`,{type:`checkbox`,checked:e.enabled!==!1,onChange:t=>l(e.name,t.target.checked),className:`accent-blue-500`}),V(`enable`)]}),(0,_.jsx)(jp,{variant:`ghost`,size:`sm`,onClick:()=>s(e),className:`text-[11px] h-6 px-2`,children:V(`view`)}),e.scope!==`builtin`&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(jp,{variant:`ghost`,size:`sm`,onClick:()=>a(e),className:`text-[11px] h-6 px-2`,children:V(`edit`)}),(0,_.jsx)(jp,{variant:`ghost`,size:`sm`,onClick:()=>{confirm(V(`confirmDeleteSkill`).replace(`{{name}}`,e.name))&&u(e.name)},className:`text-[11px] h-6 px-2 text-red-500 hover:text-red-400`,children:V(`delete`)})]})]})]},e.name))}),(0,_.jsx)(vH,{skill:o,open:!!o,onOpenChange:e=>{e||s(null)}})]})}function bH({open:e,onOpenChange:t}){return(0,_.jsx)(Mp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Fp,{className:`sm:max-w-160 max-h-[80vh] overflow-hidden flex flex-col`,children:[(0,_.jsx)(Ip,{children:(0,_.jsx)(Rp,{children:V(`skills`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:(0,_.jsx)(yH,{})})]})})}function xH({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)(()=>{e&&(c(!0),$d(e.name).then(e=>{o(e.content||``)}).catch(()=>{}).finally(()=>c(!1)))},[e]),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-20 shrink-0`,children:V(`name`)}),(0,_.jsx)(iH,{value:r,onChange:e=>i(e.target.value),disabled:!l,placeholder:`my-soul`,className:`flex-1 h-8 text-[13px]`})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) mb-1.5 block`,children:V(`soulContent`)}),s?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(eH,{value:a,onChange:e=>o(e.target.value),className:`min-h-[200px] text-[13px] font-mono`,placeholder:`You are a helpful assistant with a specific personality...`})]}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(jp,{variant:`outline`,onClick:n,className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(jp,{onClick:async()=>{l?await ef({name:r,content:a}):await tf(e.name,a),t()},disabled:s||!a||l&&!r,className:`text-[13px]`,children:V(l?`create`:`save`)})]})]})}function SH({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),$d(e.name).then(e=>{i(e.content||``)}).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,_.jsx)(Mp,{open:t,onOpenChange:n,children:(0,_.jsxs)(Fp,{className:`sm:max-w-[600px] max-h-[80vh] overflow-y-auto`,children:[(0,_.jsx)(Ip,{children:(0,_.jsxs)(Rp,{children:[e?.name,` `,V(`contentPreview`)]})}),a?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(`pre`,{className:`text-[13px] whitespace-pre-wrap break-all bg-(--bg-secondary) rounded-lg p-3 max-h-[400px] overflow-y-auto font-mono`,children:r}),(0,_.jsx)(Lp,{children:(0,_.jsx)(jp,{variant:`outline`,onClick:()=>n(!1),className:`text-[13px]`,children:V(`close`)})})]})})}function CH(){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=(0,d.useCallback)(async()=>{try{let e=await Qd();t(Array.isArray(e)?e:[])}catch{}r(!1)},[]);(0,d.useEffect)(()=>{c()},[c]);let l=async e=>{await rf(e),c()},u=async e=>{await nf(e),c()};return n?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,_.jsxs)(jp,{onClick:()=>a(`new`),size:`xs`,children:[(0,_.jsx)(dp,{size:12}),V(`addSoul`)]})}),i&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Cp,{className:`bg-(--border-default)`}),(0,_.jsx)(xH,{soul:i===`new`?null:i,onSave:()=>{a(null),c()},onCancel:()=>a(null)}),(0,_.jsx)(Cp,{className:`bg-(--border-default)`})]}),e.length===0&&!i&&(0,_.jsx)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:V(`noSouls`)}),(0,_.jsx)(`div`,{className:`space-y-1 max-h-[320px] overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:e.map(e=>(0,_.jsxs)(`div`,{className:B(`flex items-center gap-2.5 px-3 py-2 rounded-lg border transition-colors`,e.active?`border-(--border-strong) bg-(--bg-active)`:`border-(--border-default) bg-transparent hover:bg-(--bg-hover)`),children:[(0,_.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary) truncate`,children:e.name}),(0,_.jsx)($V,{variant:`outline`,className:`text-[10px] px-1.5 py-0 h-4 rounded-md font-normal`,children:e.scope===`builtin`?V(`builtin`):V(`custom`)}),e.active&&(0,_.jsx)($V,{className:`text-[10px] px-1.5 py-0 h-4 rounded-md bg-(--text-primary) text-(--bg-primary) border-0 font-normal`,children:V(`current`)})]}),e.preview&&(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) truncate mt-0.5`,children:e.preview})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,_.jsx)(jp,{variant:`ghost`,size:`xs`,onClick:()=>s(e),children:V(`view`)}),!e.active&&(0,_.jsx)(jp,{variant:`ghost`,size:`xs`,onClick:()=>l(e.name),children:V(`activate`)}),e.scope!==`builtin`&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(jp,{variant:`ghost`,size:`xs`,onClick:()=>a(e),children:V(`edit`)}),(0,_.jsx)(jp,{variant:`ghost`,size:`xs`,onClick:()=>{confirm(V(`confirmDeleteSoul`).replace(`{{name}}`,e.name))&&u(e.name)},className:`text-(--accent-red) hover:text-(--accent-red)`,children:V(`delete`)})]})]})]},`${e.scope}-${e.name}`))}),(0,_.jsx)(SH,{soul:o,open:!!o,onOpenChange:e=>{e||s(null)}})]})}function wH({open:e,onOpenChange:t}){return(0,_.jsx)(Mp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Fp,{className:`sm:max-w-160 max-h-[80vh] overflow-hidden flex flex-col`,children:[(0,_.jsx)(Ip,{children:(0,_.jsx)(Rp,{children:V(`souls`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:(0,_.jsx)(CH,{})})]})})}function TH({open:e,onOpenChange:t,version:n}){return(0,_.jsx)(Mp,{open:e,onOpenChange:t,children:(0,_.jsxs)(Fp,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Ip,{children:(0,_.jsx)(Rp,{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)(Cp,{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)(Cp,{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)(Cp,{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`]})]})})}function EH({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)(jp,{size:`sm`,onClick:r,className:`text-[13px]`,children:[`+ `,V(`newChat`)]})]}),(0,_.jsx)(mH,{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)($V,{variant:`secondary`,className:`text-[11px]`,children:V(`current`)}),(0,_.jsxs)(wp,{children:[(0,_.jsx)(Tp,{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)(Ep,{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:Kp(e.updatedAt)})]},e.id))]})}),(0,_.jsx)(Bp,{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 DH({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 OH=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 kH(){let{state:e,actions:t}=Af(),n=(e.runtimeState||{}).sessionId;return(0,_.jsxs)(`div`,{className:`flex h-screen bg-(--bg-primary) text-(--text-primary)`,children:[(0,_.jsx)(Wp,{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)(EH,{sessions:e.sessions,currentId:n,onSwitch:t.switchSession,onNew:t.newSession,onDelete:t.deleteSession}):e.currentView===`codewiki`?(0,_.jsx)(KV,{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)(DH,{size:13}),(0,_.jsx)(`span`,{children:e.gitInfo.branch})]})]}),(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)(nH,{steps:e.planSteps})}),(0,_.jsx)(SV,{messages:e.messages,projectCwd:e.projectCwd,skills:e.skills}),(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)(rH,{plan:e.pendingPlanApproval,onAction:t.approvePlan,disabled:e.busy})}),(0,_.jsx)(AV,{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)(bp,{size:11}),`CodeMini CLI@`,e.versionInfo.current]}),(0,_.jsx)(MV,{runtimeState:e.runtimeState,live:e.live,stageLabel:e.stageLabel})]})]})]})}),(0,_.jsx)(ZV,{request:e.approvalRequest,open:!!e.approvalRequest,onDecision:t.approve}),(0,_.jsx)(pH,{open:e.configOpen,onOpenChange:t.setConfigOpen}),(0,_.jsx)(bH,{open:e.skillsOpen,onOpenChange:t.setSkillsOpen}),(0,_.jsx)(wH,{open:e.soulsOpen,onOpenChange:t.setSoulsOpen}),(0,_.jsx)(TH,{open:e.aboutOpen,onOpenChange:t.setAboutOpen,version:e.versionInfo?.current}),(0,_.jsx)(gH,{open:e.projectOpen,onOpenChange:t.setProjectOpen,onOpenProject:t.openProject})]})}function AH(){return(0,_.jsx)(OH,{children:(0,_.jsx)(pd,{children:(0,_.jsx)(kf,{children:(0,_.jsx)(kH,{})})})})}(0,Bl.createRoot)(document.getElementById(`root`)).render((0,_.jsx)(AH,{}));export{g as a,AF as i,MN as n,i as o,EF as r,iN as t};
|
|
206
|
+
Skill instructions...`})]}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(Mp,{variant:`outline`,onClick:n,className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(Mp,{onClick:async()=>{f?await Jd({name:r,description:a,content:s}):await Yd(e.name,s),t()},disabled:l||!s||f&&!r,className:`text-[13px]`,children:V(f?`create`:`save`)})]})]})}function yH({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),qd(e.name).then(e=>{i(e.content||``)}).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,_.jsx)(Np,{open:t,onOpenChange:n,children:(0,_.jsxs)(Ip,{className:`sm:max-w-[600px] max-h-[80vh] overflow-y-auto`,children:[(0,_.jsx)(Lp,{children:(0,_.jsxs)(zp,{children:[e?.name,` `,V(`contentPreview`)]})}),a?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(`pre`,{className:`text-[13px] whitespace-pre-wrap break-all bg-(--bg-secondary) rounded-lg p-3 max-h-[400px] overflow-y-auto font-mono`,children:r}),(0,_.jsx)(Rp,{children:(0,_.jsx)(Mp,{variant:`outline`,onClick:()=>n(!1),className:`text-[13px]`,children:V(`close`)})})]})})}function bH(){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=(0,d.useCallback)(async()=>{try{let e=await Kd();t(Array.isArray(e)?e:[])}catch{}r(!1)},[]);(0,d.useEffect)(()=>{c()},[c]);let l=async(e,t)=>{await Zd(e,t),c()},u=async e=>{await Xd(e),c()},f=()=>{a(null),c()},p=e=>V(e===`builtin`?`builtin`:e===`global`?`globalScope`:`projectScope`);return n?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,_.jsx)(Mp,{onClick:()=>a(`new`),size:`xs`,children:V(`addSkill`)})}),i&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wp,{className:`bg-(--border-default)`}),(0,_.jsx)(vH,{skill:i===`new`?null:i,onSave:f,onCancel:()=>a(null)}),(0,_.jsx)(wp,{className:`bg-(--border-default)`})]}),e.length===0&&!i&&(0,_.jsx)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:V(`noSkills`)}),(0,_.jsx)(`div`,{className:`space-y-1.5 max-h-[320px] overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:e.map(e=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg border border-(--border-default) bg-(--bg-secondary) group`,children:[(0,_.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary) truncate`,children:e.name}),(0,_.jsx)(eH,{variant:e.scope===`builtin`?`secondary`:`outline`,className:`text-[10px] px-1.5 py-0 h-4`,children:p(e.scope)}),e.version&&e.version!==`0.0.0`&&(0,_.jsxs)(`span`,{className:`text-[10px] text-(--text-muted)`,children:[`v`,e.version]})]}),e.description&&(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) truncate mt-0.5`,children:e.description})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[e.scope!==`builtin`&&(0,_.jsxs)(`label`,{className:`flex items-center gap-1 cursor-pointer text-[12px] text-(--text-muted)`,children:[(0,_.jsx)(`input`,{type:`checkbox`,checked:e.enabled!==!1,onChange:t=>l(e.name,t.target.checked),className:`accent-blue-500`}),V(`enable`)]}),(0,_.jsx)(Mp,{variant:`ghost`,size:`sm`,onClick:()=>s(e),className:`text-[11px] h-6 px-2`,children:V(`view`)}),e.scope!==`builtin`&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Mp,{variant:`ghost`,size:`sm`,onClick:()=>a(e),className:`text-[11px] h-6 px-2`,children:V(`edit`)}),(0,_.jsx)(Mp,{variant:`ghost`,size:`sm`,onClick:()=>{confirm(V(`confirmDeleteSkill`).replace(`{{name}}`,e.name))&&u(e.name)},className:`text-[11px] h-6 px-2 text-red-500 hover:text-red-400`,children:V(`delete`)})]})]})]},e.name))}),(0,_.jsx)(yH,{skill:o,open:!!o,onOpenChange:e=>{e||s(null)}})]})}function xH({open:e,onOpenChange:t}){return(0,_.jsx)(Np,{open:e,onOpenChange:t,children:(0,_.jsxs)(Ip,{className:`sm:max-w-160 max-h-[80vh] overflow-hidden flex flex-col`,children:[(0,_.jsx)(Lp,{children:(0,_.jsx)(zp,{children:V(`skills`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:(0,_.jsx)(bH,{})})]})})}function SH({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)(()=>{e&&(c(!0),$d(e.name).then(e=>{o(e.content||``)}).catch(()=>{}).finally(()=>c(!1)))},[e]),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) w-20 shrink-0`,children:V(`name`)}),(0,_.jsx)(aH,{value:r,onChange:e=>i(e.target.value),disabled:!l,placeholder:`my-soul`,className:`flex-1 h-8 text-[13px]`})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`label`,{className:`text-[13px] text-(--text-muted) mb-1.5 block`,children:V(`soulContent`)}),s?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(tH,{value:a,onChange:e=>o(e.target.value),className:`min-h-[200px] text-[13px] font-mono`,placeholder:`You are a helpful assistant with a specific personality...`})]}),(0,_.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,_.jsx)(Mp,{variant:`outline`,onClick:n,className:`text-[13px]`,children:V(`cancel`)}),(0,_.jsx)(Mp,{onClick:async()=>{l?await ef({name:r,content:a}):await tf(e.name,a),t()},disabled:s||!a||l&&!r,className:`text-[13px]`,children:V(l?`create`:`save`)})]})]})}function CH({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),$d(e.name).then(e=>{i(e.content||``)}).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,_.jsx)(Np,{open:t,onOpenChange:n,children:(0,_.jsxs)(Ip,{className:`sm:max-w-[600px] max-h-[80vh] overflow-y-auto`,children:[(0,_.jsx)(Lp,{children:(0,_.jsxs)(zp,{children:[e?.name,` `,V(`contentPreview`)]})}),a?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsx)(`pre`,{className:`text-[13px] whitespace-pre-wrap break-all bg-(--bg-secondary) rounded-lg p-3 max-h-[400px] overflow-y-auto font-mono`,children:r}),(0,_.jsx)(Rp,{children:(0,_.jsx)(Mp,{variant:`outline`,onClick:()=>n(!1),className:`text-[13px]`,children:V(`close`)})})]})})}function wH(){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=(0,d.useCallback)(async()=>{try{let e=await Qd();t(Array.isArray(e)?e:[])}catch{}r(!1)},[]);(0,d.useEffect)(()=>{c()},[c]);let l=async e=>{await rf(e),c()},u=async e=>{await nf(e),c()};return n?(0,_.jsxs)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:[V(`loading`),`...`]}):(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,_.jsxs)(Mp,{onClick:()=>a(`new`),size:`xs`,children:[(0,_.jsx)(fp,{size:12}),V(`addSoul`)]})}),i&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wp,{className:`bg-(--border-default)`}),(0,_.jsx)(SH,{soul:i===`new`?null:i,onSave:()=>{a(null),c()},onCancel:()=>a(null)}),(0,_.jsx)(wp,{className:`bg-(--border-default)`})]}),e.length===0&&!i&&(0,_.jsx)(`div`,{className:`text-[12px] text-(--text-muted) py-4 text-center`,children:V(`noSouls`)}),(0,_.jsx)(`div`,{className:`space-y-1 max-h-[320px] overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:e.map(e=>(0,_.jsxs)(`div`,{className:B(`flex items-center gap-2.5 px-3 py-2 rounded-lg border transition-colors`,e.active?`border-(--border-strong) bg-(--bg-active)`:`border-(--border-default) bg-transparent hover:bg-(--bg-hover)`),children:[(0,_.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary) truncate`,children:e.name}),(0,_.jsx)(eH,{variant:`outline`,className:`text-[10px] px-1.5 py-0 h-4 rounded-md font-normal`,children:e.scope===`builtin`?V(`builtin`):V(`custom`)}),e.active&&(0,_.jsx)(eH,{className:`text-[10px] px-1.5 py-0 h-4 rounded-md bg-(--text-primary) text-(--bg-primary) border-0 font-normal`,children:V(`current`)})]}),e.preview&&(0,_.jsx)(`div`,{className:`text-[11px] text-(--text-muted) truncate mt-0.5`,children:e.preview})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,_.jsx)(Mp,{variant:`ghost`,size:`xs`,onClick:()=>s(e),children:V(`view`)}),!e.active&&(0,_.jsx)(Mp,{variant:`ghost`,size:`xs`,onClick:()=>l(e.name),children:V(`activate`)}),e.scope!==`builtin`&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Mp,{variant:`ghost`,size:`xs`,onClick:()=>a(e),children:V(`edit`)}),(0,_.jsx)(Mp,{variant:`ghost`,size:`xs`,onClick:()=>{confirm(V(`confirmDeleteSoul`).replace(`{{name}}`,e.name))&&u(e.name)},className:`text-(--accent-red) hover:text-(--accent-red)`,children:V(`delete`)})]})]})]},`${e.scope}-${e.name}`))}),(0,_.jsx)(CH,{soul:o,open:!!o,onOpenChange:e=>{e||s(null)}})]})}function TH({open:e,onOpenChange:t}){return(0,_.jsx)(Np,{open:e,onOpenChange:t,children:(0,_.jsxs)(Ip,{className:`sm:max-w-160 max-h-[80vh] overflow-hidden flex flex-col`,children:[(0,_.jsx)(Lp,{children:(0,_.jsx)(zp,{children:V(`souls`)})}),(0,_.jsx)(`div`,{className:`flex-1 overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:(0,_.jsx)(wH,{})})]})})}function EH({open:e,onOpenChange:t,version:n}){return(0,_.jsx)(Np,{open:e,onOpenChange:t,children:(0,_.jsxs)(Ip,{className:`sm:max-w-lg`,children:[(0,_.jsx)(Lp,{children:(0,_.jsx)(zp,{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)(wp,{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)(wp,{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)(wp,{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`]})]})})}function DH({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)(Mp,{size:`sm`,onClick:r,className:`text-[13px]`,children:[`+ `,V(`newChat`)]})]}),(0,_.jsx)(hH,{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)(eH,{variant:`secondary`,className:`text-[11px]`,children:V(`current`)}),(0,_.jsxs)(Tp,{children:[(0,_.jsx)(Ep,{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)(Dp,{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:qp(e.updatedAt)})]},e.id))]})}),(0,_.jsx)(Vp,{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 OH({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 kH=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 AH(){let{state:e,actions:t}=Af(),n=(e.runtimeState||{}).sessionId;return(0,_.jsxs)(`div`,{className:`flex h-screen bg-(--bg-primary) text-(--text-primary)`,children:[(0,_.jsx)(Gp,{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)(DH,{sessions:e.sessions,currentId:n,onSwitch:t.switchSession,onNew:t.newSession,onDelete:t.deleteSession}):e.currentView===`codewiki`?(0,_.jsx)(qV,{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)(OH,{size:13}),(0,_.jsx)(`span`,{children:e.gitInfo.branch})]})]}),(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)(rH,{steps:e.planSteps})}),(0,_.jsx)(CV,{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)(iH,{plan:e.pendingPlanApproval,onAction:t.approvePlan,disabled:e.busy})}),(0,_.jsx)(jV,{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)(xp,{size:11}),`CodeMini CLI@`,e.versionInfo.current]}),(0,_.jsx)(NV,{runtimeState:e.runtimeState,live:e.live,stageLabel:e.stageLabel})]})]})]})}),(0,_.jsx)(QV,{request:e.approvalRequest,open:!!e.approvalRequest,onDecision:t.approve}),(0,_.jsx)(mH,{open:e.configOpen,onOpenChange:t.setConfigOpen}),(0,_.jsx)(xH,{open:e.skillsOpen,onOpenChange:t.setSkillsOpen}),(0,_.jsx)(TH,{open:e.soulsOpen,onOpenChange:t.setSoulsOpen}),(0,_.jsx)(EH,{open:e.aboutOpen,onOpenChange:t.setAboutOpen,version:e.versionInfo?.current}),(0,_.jsx)(_H,{open:e.projectOpen,onOpenChange:t.setProjectOpen,onOpenProject:t.openProject})]})}function jH(){return(0,_.jsx)(kH,{children:(0,_.jsx)(pd,{children:(0,_.jsx)(kf,{children:(0,_.jsx)(AH,{})})})})}(0,Bl.createRoot)(document.getElementById(`root`)).render((0,_.jsx)(jH,{}));export{g as a,jF as i,NN as n,i as o,DF as r,aN as t};
|