learnforge 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/LICENSE +21 -0
- package/README.md +142 -2
- package/demo/sample/README.md +8 -0
- package/demo/sample/src/backoff.ts +6 -0
- package/demo/sample/src/index.ts +12 -0
- package/demo/sample/src/queue.ts +58 -0
- package/demo/sample/src/worker.ts +20 -0
- package/dist/cli.js +3549 -0
- package/dist/web/assets/Map-CWWYq8VB.js +1 -0
- package/dist/web/assets/Practice-BrxN0TfX.js +25 -0
- package/dist/web/assets/_baseUniq-D3A4Knms.js +1 -0
- package/dist/web/assets/abap-DsBKuouk.js +1 -0
- package/dist/web/assets/actionscript-3-D_z4Izcz.js +1 -0
- package/dist/web/assets/ada-727ZlQH0.js +1 -0
- package/dist/web/assets/andromeeda-C3khCPGq.js +1 -0
- package/dist/web/assets/angular-html-LfdN0zeE.js +1 -0
- package/dist/web/assets/angular-ts-CKsD7JZE.js +1 -0
- package/dist/web/assets/apache-Dn00JSTd.js +1 -0
- package/dist/web/assets/apex-COJ4H7py.js +1 -0
- package/dist/web/assets/apl-B4CMkyY2.js +1 -0
- package/dist/web/assets/apl-BBq3IX1j.js +1 -0
- package/dist/web/assets/applescript-Bu5BbsvL.js +1 -0
- package/dist/web/assets/ara-7O62HKoU.js +1 -0
- package/dist/web/assets/architectureDiagram-UYN6MBPD-CtGxP8ms.js +36 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js +1 -0
- package/dist/web/assets/asciidoc-BPT9niGB.js +1 -0
- package/dist/web/assets/asm-Dhn9LcZ4.js +1 -0
- package/dist/web/assets/asn1-EdZsLKOL.js +1 -0
- package/dist/web/assets/asterisk-B-8jnY81.js +1 -0
- package/dist/web/assets/astro-CqkE3fuf.js +1 -0
- package/dist/web/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/web/assets/awk-eg146-Ew.js +1 -0
- package/dist/web/assets/ayu-dark-Cv9koXgw.js +1 -0
- package/dist/web/assets/ballerina-Du268qiB.js +1 -0
- package/dist/web/assets/bat-fje9CFhw.js +1 -0
- package/dist/web/assets/beancount-BwXTMy5W.js +1 -0
- package/dist/web/assets/berry-3xVqZejG.js +1 -0
- package/dist/web/assets/bibtex-xW4inM5L.js +1 -0
- package/dist/web/assets/bicep-DHo0CJ0O.js +1 -0
- package/dist/web/assets/blade-a8OxSdnT.js +1 -0
- package/dist/web/assets/blockDiagram-ZHA2E4KO-CQ2sgLCo.js +121 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js +1 -0
- package/dist/web/assets/bsl-Dgyn0ogV.js +1 -0
- package/dist/web/assets/c-C3t2pwGQ.js +1 -0
- package/dist/web/assets/c4Diagram-6F5ED5ID-CWKXGBe-.js +10 -0
- package/dist/web/assets/cadence-DNquZEk8.js +1 -0
- package/dist/web/assets/cairo--RitsXJZ.js +1 -0
- package/dist/web/assets/catppuccin-frappe-CD_QflpE.js +1 -0
- package/dist/web/assets/catppuccin-latte-DRW-0cLl.js +1 -0
- package/dist/web/assets/catppuccin-macchiato-C-_shW-Y.js +1 -0
- package/dist/web/assets/catppuccin-mocha-LGGdnPYs.js +1 -0
- package/dist/web/assets/channel-Dh2DBgYr.js +1 -0
- package/dist/web/assets/chunk-5HRBRIJM-DFVbwlkG.js +1 -0
- package/dist/web/assets/chunk-7U56Z5CX-gak83OWB.js +220 -0
- package/dist/web/assets/chunk-ASOPGD6M-cNXbP4zQ.js +1 -0
- package/dist/web/assets/chunk-KFBOBJHC-yO5uhU2i.js +1 -0
- package/dist/web/assets/chunk-T2TOU4HS-BbXMDtlZ.js +164 -0
- package/dist/web/assets/chunk-TMUBEWPD-CxPE7zW_.js +1 -0
- package/dist/web/assets/clarity-BHOwM8T6.js +1 -0
- package/dist/web/assets/classDiagram-LNE6IOMH-BiiTLJy-.js +1 -0
- package/dist/web/assets/classDiagram-v2-MQ7JQ4JX-BiiTLJy-.js +1 -0
- package/dist/web/assets/clike-B9uivgTg.js +1 -0
- package/dist/web/assets/clojure-BMjYHr_A.js +1 -0
- package/dist/web/assets/clojure-DxSadP1t.js +1 -0
- package/dist/web/assets/clone-XVPeJFtd.js +1 -0
- package/dist/web/assets/cmake-BQqOBYOt.js +1 -0
- package/dist/web/assets/cmake-DbXoA79R.js +1 -0
- package/dist/web/assets/cobol-CWcv1MsR.js +1 -0
- package/dist/web/assets/cobol-PTqiYgYu.js +1 -0
- package/dist/web/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/web/assets/codeql-sacFqUAJ.js +1 -0
- package/dist/web/assets/coffee-dyiR41kL.js +1 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js +1 -0
- package/dist/web/assets/common-lisp-C7gG9l05.js +1 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js +1 -0
- package/dist/web/assets/coq-Dsg_Bt_b.js +1 -0
- package/dist/web/assets/cpp-BksuvNSY.js +1 -0
- package/dist/web/assets/crystal-DtDmRg-F.js +1 -0
- package/dist/web/assets/crystal-SjHAIU92.js +1 -0
- package/dist/web/assets/csharp-D9R-vmeu.js +1 -0
- package/dist/web/assets/css-BPhBrDlE.js +1 -0
- package/dist/web/assets/css-BnMrqG3P.js +1 -0
- package/dist/web/assets/csv-B0qRVHPH.js +1 -0
- package/dist/web/assets/cue-DtFQj3wx.js +1 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js +1 -0
- package/dist/web/assets/cypher-m2LEI-9-.js +1 -0
- package/dist/web/assets/cytoscape.esm-DgFJg4rT.js +331 -0
- package/dist/web/assets/d-BoXegm-a.js +1 -0
- package/dist/web/assets/d-pRatUO7H.js +1 -0
- package/dist/web/assets/d3-scale-35hnzshu.js +1 -0
- package/dist/web/assets/dagre-4EVJKHTY-CBDUYbRw.js +4 -0
- package/dist/web/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/web/assets/dart-B9wLZaAG.js +1 -0
- package/dist/web/assets/dax-ClGRhx96.js +1 -0
- package/dist/web/assets/desktop-DEIpsLCJ.js +1 -0
- package/dist/web/assets/diagram-QW4FP2JN-C7TmMevO.js +24 -0
- package/dist/web/assets/diff-BgYniUM_.js +1 -0
- package/dist/web/assets/diff-DbItnlRl.js +1 -0
- package/dist/web/assets/docker-COcR7UxN.js +1 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js +1 -0
- package/dist/web/assets/dotenv-BjQB5zDj.js +1 -0
- package/dist/web/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/web/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/web/assets/dream-maker-C-nORZOA.js +1 -0
- package/dist/web/assets/dtd-DF_7sFjM.js +1 -0
- package/dist/web/assets/dylan-DwRh75JA.js +1 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js +1 -0
- package/dist/web/assets/ecl-Cabwm37j.js +1 -0
- package/dist/web/assets/edge-D5gP-w-T.js +1 -0
- package/dist/web/assets/eiffel-CnydiIhH.js +1 -0
- package/dist/web/assets/elixir-CLiX3zqd.js +1 -0
- package/dist/web/assets/elm-CmHSxxaM.js +1 -0
- package/dist/web/assets/elm-vLlmbW-K.js +1 -0
- package/dist/web/assets/emacs-lisp-BX77sIaO.js +1 -0
- package/dist/web/assets/erDiagram-6RL3IURR-BrIhLTf-.js +51 -0
- package/dist/web/assets/erb-BYTLMnw6.js +1 -0
- package/dist/web/assets/erlang-B-DoSBHF.js +1 -0
- package/dist/web/assets/erlang-BNw1qcRV.js +1 -0
- package/dist/web/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/web/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/web/assets/factor-kuTfRLto.js +1 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js +1 -0
- package/dist/web/assets/fennel-bCA53EVm.js +1 -0
- package/dist/web/assets/fish-w-ucz2PV.js +1 -0
- package/dist/web/assets/flowDiagram-7ASYPVHJ-xplSH1V5.js +160 -0
- package/dist/web/assets/fluent-Dayu4EKP.js +1 -0
- package/dist/web/assets/forth-Ffai-XNe.js +1 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js +1 -0
- package/dist/web/assets/fortran-fixed-form-TqA4NnZg.js +1 -0
- package/dist/web/assets/fortran-free-form-DKXYxT9g.js +1 -0
- package/dist/web/assets/fsharp-XplgxFYe.js +1 -0
- package/dist/web/assets/ganttDiagram-NTVNEXSI-CTjkBoVW.js +257 -0
- package/dist/web/assets/gas-Bneqetm1.js +1 -0
- package/dist/web/assets/gdresource-BHYsBjWJ.js +1 -0
- package/dist/web/assets/gdscript-DfxzS6Rs.js +1 -0
- package/dist/web/assets/gdshader-SKMF96pI.js +1 -0
- package/dist/web/assets/genie-ajMbGru0.js +1 -0
- package/dist/web/assets/gherkin--30QC5Em.js +1 -0
- package/dist/web/assets/gherkin-heZmZLOM.js +1 -0
- package/dist/web/assets/git-commit-i4q6IMui.js +1 -0
- package/dist/web/assets/git-rebase-B-v9cOL2.js +1 -0
- package/dist/web/assets/gitGraph-YCYPL57B-CMCcQH9Z.js +127 -0
- package/dist/web/assets/gitGraphDiagram-NRZ2UAAF-I2RXCZiV.js +65 -0
- package/dist/web/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/web/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/web/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/web/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/web/assets/gleam-B430Bg39.js +1 -0
- package/dist/web/assets/glimmer-js-D-cwc0-E.js +1 -0
- package/dist/web/assets/glimmer-ts-pgjy16dm.js +1 -0
- package/dist/web/assets/glsl-DBO2IWDn.js +1 -0
- package/dist/web/assets/gnuplot-CM8KxXT1.js +1 -0
- package/dist/web/assets/go-B1SYOhNW.js +1 -0
- package/dist/web/assets/graph-DfxUDGeH.js +1 -0
- package/dist/web/assets/graphql-cDcHW_If.js +1 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js +1 -0
- package/dist/web/assets/groovy-DkBy-JyN.js +1 -0
- package/dist/web/assets/hack-D1yCygmZ.js +1 -0
- package/dist/web/assets/haml-B2EZWmdv.js +1 -0
- package/dist/web/assets/handlebars-BQGss363.js +1 -0
- package/dist/web/assets/haskell-BILxekzW.js +1 -0
- package/dist/web/assets/haskell-BWDZoCOh.js +1 -0
- package/dist/web/assets/haxe-C5wWYbrZ.js +1 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js +1 -0
- package/dist/web/assets/hcl-HzYwdGDm.js +1 -0
- package/dist/web/assets/hjson-T-Tgc4AT.js +1 -0
- package/dist/web/assets/hlsl-ifBTmRxC.js +1 -0
- package/dist/web/assets/houston-DnULxvSX.js +1 -0
- package/dist/web/assets/html-C2L_23MC.js +1 -0
- package/dist/web/assets/html-derivative-CSfWNPLT.js +1 -0
- package/dist/web/assets/http-DBlCnlav.js +1 -0
- package/dist/web/assets/http-FRrOvY1W.js +1 -0
- package/dist/web/assets/hxml-TIA70rKU.js +1 -0
- package/dist/web/assets/hy-BMj5Y0dO.js +1 -0
- package/dist/web/assets/idl-BEugSyMb.js +1 -0
- package/dist/web/assets/imba-bv_oIlVt.js +1 -0
- package/dist/web/assets/index-4dQXSykb.js +1 -0
- package/dist/web/assets/index-BCcuEbgc.js +1 -0
- package/dist/web/assets/index-BN9_IkPV.js +1 -0
- package/dist/web/assets/index-BbAVe1TP.js +6 -0
- package/dist/web/assets/index-Bi0iU3Po.js +3 -0
- package/dist/web/assets/index-Biw9rLAa.css +1 -0
- package/dist/web/assets/index-BoyLgAJJ.js +13 -0
- package/dist/web/assets/index-BqXQJR28.js +1 -0
- package/dist/web/assets/index-BwoEv7R1.js +493 -0
- package/dist/web/assets/index-BzKIqhZn.js +1 -0
- package/dist/web/assets/index-C2PIUqbt.js +1 -0
- package/dist/web/assets/index-C7DbozeE.js +7 -0
- package/dist/web/assets/index-CDpPKe18.js +1 -0
- package/dist/web/assets/index-CTkcLj9F.js +1 -0
- package/dist/web/assets/index-CWD7Tiz8.js +1 -0
- package/dist/web/assets/index-Cm8ah4T0.js +1 -0
- package/dist/web/assets/index-D-vErHI8.js +1 -0
- package/dist/web/assets/index-D3sNRgEi.js +1 -0
- package/dist/web/assets/index-D91ZBf2I.js +1 -0
- package/dist/web/assets/index-D94n50FM.js +2 -0
- package/dist/web/assets/index-D9KG0kJs.js +1 -0
- package/dist/web/assets/index-DdahRhN3.js +1 -0
- package/dist/web/assets/index-Dl9E7_vZ.js +1 -0
- package/dist/web/assets/index-DnmHf2in.js +149 -0
- package/dist/web/assets/infoDiagram-A4XQUW5V-BcjfRCXi.js +2 -0
- package/dist/web/assets/ini-BjABl1g7.js +1 -0
- package/dist/web/assets/java-xI-RfyKK.js +1 -0
- package/dist/web/assets/javascript-qCveANmP.js +1 -0
- package/dist/web/assets/javascript-ySlJ1b_l.js +1 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-wght-normal-BptiBwAt.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-wght-normal-BW1JPxja.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-wght-normal-Com2F4yK.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-wght-normal-Ajscav9D.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-wght-normal-By-yputv.woff2 +0 -0
- package/dist/web/assets/jinja-DGy0s7-h.js +1 -0
- package/dist/web/assets/jinja2-C4DGRd-O.js +1 -0
- package/dist/web/assets/jison-BqZprYcd.js +1 -0
- package/dist/web/assets/journeyDiagram-G5WM74LC-BrvwR6gO.js +139 -0
- package/dist/web/assets/json-BQoSv7ci.js +1 -0
- package/dist/web/assets/json5-w8dY5SsB.js +1 -0
- package/dist/web/assets/jsonc-TU54ms6u.js +1 -0
- package/dist/web/assets/jsonl-DREVFZK8.js +1 -0
- package/dist/web/assets/jsonnet-BfivnA6A.js +1 -0
- package/dist/web/assets/jssm-P4WzXJd0.js +1 -0
- package/dist/web/assets/jsx-BAng5TT0.js +1 -0
- package/dist/web/assets/julia-BBuGR-5E.js +1 -0
- package/dist/web/assets/julia-DuME0IfC.js +1 -0
- package/dist/web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/web/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/web/assets/kanban-definition-QRCXZQQD-Ds9WLUQu.js +88 -0
- package/dist/web/assets/katex-C5jXJg4s.js +257 -0
- package/dist/web/assets/kotlin-B5lbUyaz.js +1 -0
- package/dist/web/assets/kusto-mebxcVVE.js +1 -0
- package/dist/web/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/web/assets/latex-C-cWTeAZ.js +1 -0
- package/dist/web/assets/layout-ktpd0Z4b.js +1 -0
- package/dist/web/assets/lean-XBlWyCtg.js +1 -0
- package/dist/web/assets/less-BfCpw3nA.js +1 -0
- package/dist/web/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/web/assets/liquid-D3W5UaiH.js +1 -0
- package/dist/web/assets/livescript-BwQOo05w.js +1 -0
- package/dist/web/assets/log-Cc5clBb7.js +1 -0
- package/dist/web/assets/logo-IuBKFhSY.js +1 -0
- package/dist/web/assets/lua-CvWAzNxB.js +1 -0
- package/dist/web/assets/lua-VAEuO923.js +1 -0
- package/dist/web/assets/luau-Du5NY7AG.js +1 -0
- package/dist/web/assets/make-Bvotw-X0.js +1 -0
- package/dist/web/assets/markdown-UIAJJxZW.js +1 -0
- package/dist/web/assets/marko-z0MBrx5-.js +1 -0
- package/dist/web/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/web/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/web/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js +1 -0
- package/dist/web/assets/matlab-D9-PGadD.js +1 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js +1 -0
- package/dist/web/assets/mdc-DB_EDNY_.js +1 -0
- package/dist/web/assets/mdx-sdHcTMYB.js +1 -0
- package/dist/web/assets/mermaid-Ci6OQyBP.js +1 -0
- package/dist/web/assets/mermaid.core-BGuQYGS_.js +190 -0
- package/dist/web/assets/min-C7naItsZ.js +1 -0
- package/dist/web/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/web/assets/min-light-CTRr51gU.js +1 -0
- package/dist/web/assets/mindmap-definition-GWI6TPTV-BwBiBSTc.js +95 -0
- package/dist/web/assets/mipsasm-BC5c_5Pe.js +1 -0
- package/dist/web/assets/mirc-CjQqDB4T.js +1 -0
- package/dist/web/assets/mllike-CXdrOF99.js +1 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js +1 -0
- package/dist/web/assets/mojo-Tz6hzZYG.js +1 -0
- package/dist/web/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/web/assets/move-DB_GagMm.js +1 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js +1 -0
- package/dist/web/assets/mumps-BT43cFF4.js +1 -0
- package/dist/web/assets/narrat-DLbgOhZU.js +1 -0
- package/dist/web/assets/nextflow-B0XVJmRM.js +1 -0
- package/dist/web/assets/nginx-D_VnBJ67.js +1 -0
- package/dist/web/assets/nginx-DdIZxoE0.js +1 -0
- package/dist/web/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/web/assets/nim-ZlGxZxc3.js +1 -0
- package/dist/web/assets/nix-shcSOmrb.js +1 -0
- package/dist/web/assets/nord-Ddv68eIx.js +1 -0
- package/dist/web/assets/nsis-LY0VT_u5.js +1 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js +1 -0
- package/dist/web/assets/nushell-D4Tzg5kh.js +1 -0
- package/dist/web/assets/objective-c-Deuh7S70.js +1 -0
- package/dist/web/assets/objective-cpp-BUEGK8hf.js +1 -0
- package/dist/web/assets/ocaml-BNioltXt.js +1 -0
- package/dist/web/assets/octave-Ck1zUtKM.js +1 -0
- package/dist/web/assets/one-dark-pro-GBQ2dnAY.js +1 -0
- package/dist/web/assets/one-light-PoHY5YXO.js +1 -0
- package/dist/web/assets/oz-BzwKVEFT.js +1 -0
- package/dist/web/assets/pascal--L3eBynH.js +1 -0
- package/dist/web/assets/pascal-JqZropPD.js +1 -0
- package/dist/web/assets/perl-CHQXSrWU.js +1 -0
- package/dist/web/assets/perl-CdXCOZ3F.js +1 -0
- package/dist/web/assets/php-B5ebYQev.js +1 -0
- package/dist/web/assets/pieDiagram-YF2LJOPJ-DeXhe8wW.js +30 -0
- package/dist/web/assets/pig-CevX1Tat.js +1 -0
- package/dist/web/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/web/assets/plsql-LKU2TuZ1.js +1 -0
- package/dist/web/assets/po-BFLt1xDp.js +1 -0
- package/dist/web/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/web/assets/polar-DKykz6zU.js +1 -0
- package/dist/web/assets/postcss-B3ZDOciz.js +1 -0
- package/dist/web/assets/powerquery-CSHBycmS.js +1 -0
- package/dist/web/assets/powershell-BIEUsx6d.js +1 -0
- package/dist/web/assets/powershell-CFHJl5sT.js +1 -0
- package/dist/web/assets/prisma-B48N-Iqd.js +1 -0
- package/dist/web/assets/prolog-BY-TUvya.js +1 -0
- package/dist/web/assets/properties-C78fOPTZ.js +1 -0
- package/dist/web/assets/proto-zocC4JxJ.js +1 -0
- package/dist/web/assets/protobuf-ChK-085T.js +1 -0
- package/dist/web/assets/pug-CM9l7STV.js +1 -0
- package/dist/web/assets/pug-DukmZTjD.js +1 -0
- package/dist/web/assets/puppet-Cza_XSSt.js +1 -0
- package/dist/web/assets/puppet-DMA9R1ak.js +1 -0
- package/dist/web/assets/purescript-Bg-kzb6g.js +1 -0
- package/dist/web/assets/python-BuPzkPfP.js +1 -0
- package/dist/web/assets/python-DhUJRlN_.js +1 -0
- package/dist/web/assets/q-pXgVlZs6.js +1 -0
- package/dist/web/assets/qml-D8XfuvdV.js +1 -0
- package/dist/web/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/web/assets/qss-DhMKtDLN.js +1 -0
- package/dist/web/assets/quadrantDiagram-OS5C2QUG-qIwp82jR.js +7 -0
- package/dist/web/assets/r-CwjWoCRV.js +1 -0
- package/dist/web/assets/r-DUYO_cvP.js +1 -0
- package/dist/web/assets/racket-CzouJOBO.js +1 -0
- package/dist/web/assets/raku-B1bQXN8T.js +1 -0
- package/dist/web/assets/razor-CNLDkMZG.js +1 -0
- package/dist/web/assets/red-bN70gL4F.js +1 -0
- package/dist/web/assets/reg-5LuOXUq_.js +1 -0
- package/dist/web/assets/regexp-DWJ3fJO_.js +1 -0
- package/dist/web/assets/rel-DJlmqQ1C.js +1 -0
- package/dist/web/assets/requirementDiagram-MIRIMTAZ-BMNoO9OJ.js +52 -0
- package/dist/web/assets/riscv-QhoSD0DR.js +1 -0
- package/dist/web/assets/rose-pine-CmCqftbK.js +1 -0
- package/dist/web/assets/rose-pine-dawn-Ds-gbosJ.js +1 -0
- package/dist/web/assets/rose-pine-moon-CjDtw9vr.js +1 -0
- package/dist/web/assets/rpm-CTu-6PCP.js +1 -0
- package/dist/web/assets/rst-4NLicBqY.js +1 -0
- package/dist/web/assets/ruby-BK5aLJev.js +1 -0
- package/dist/web/assets/ruby-DeZ3UC14.js +1 -0
- package/dist/web/assets/rust-Be6lgOlo.js +1 -0
- package/dist/web/assets/sankeyDiagram-Y46BX6SQ-BcWhv667.js +8 -0
- package/dist/web/assets/sas-B4kiWyti.js +1 -0
- package/dist/web/assets/sas-BmTFh92c.js +1 -0
- package/dist/web/assets/sass-BJ4Li9vH.js +1 -0
- package/dist/web/assets/scala-DQVVAn-B.js +1 -0
- package/dist/web/assets/scheme-BJGe-b2p.js +1 -0
- package/dist/web/assets/scheme-C41bIUwD.js +1 -0
- package/dist/web/assets/scss-C31hgJw-.js +1 -0
- package/dist/web/assets/sdbl-BLhTXw86.js +1 -0
- package/dist/web/assets/sequenceDiagram-G6AWOVSC-C4AgKjJQ.js +122 -0
- package/dist/web/assets/shaderlab-B7qAK45m.js +1 -0
- package/dist/web/assets/shell-CjFT_Tl9.js +1 -0
- package/dist/web/assets/shellscript-atvbtKCR.js +1 -0
- package/dist/web/assets/shellsession-C_rIy8kc.js +1 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js +1 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js +1 -0
- package/dist/web/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/web/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js +1 -0
- package/dist/web/assets/smalltalk-DkLiglaE.js +1 -0
- package/dist/web/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/web/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/web/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/web/assets/solidity-C1w2a3ep.js +1 -0
- package/dist/web/assets/solr-DehyRSwq.js +1 -0
- package/dist/web/assets/source-serif-4-cyrillic-ext-opsz-italic-Bl6DJqma.woff2 +0 -0
- package/dist/web/assets/source-serif-4-cyrillic-ext-opsz-normal-DIwfbPUE.woff2 +0 -0
- package/dist/web/assets/source-serif-4-cyrillic-opsz-italic-Dibx14aP.woff2 +0 -0
- package/dist/web/assets/source-serif-4-cyrillic-opsz-normal-C0olyEE-.woff2 +0 -0
- package/dist/web/assets/source-serif-4-greek-opsz-italic-CMW9dfKg.woff2 +0 -0
- package/dist/web/assets/source-serif-4-greek-opsz-normal-DrHU7SY7.woff2 +0 -0
- package/dist/web/assets/source-serif-4-latin-ext-opsz-italic-BhUEwDRF.woff2 +0 -0
- package/dist/web/assets/source-serif-4-latin-ext-opsz-normal-HoL-AExg.woff2 +0 -0
- package/dist/web/assets/source-serif-4-latin-opsz-italic-BOLXpvkj.woff2 +0 -0
- package/dist/web/assets/source-serif-4-latin-opsz-normal-BpEBLj1O.woff2 +0 -0
- package/dist/web/assets/source-serif-4-vietnamese-opsz-italic-C-k5pZlm.woff2 +0 -0
- package/dist/web/assets/source-serif-4-vietnamese-opsz-normal-BOyYyU_V.woff2 +0 -0
- package/dist/web/assets/soy-C-lX7w71.js +1 -0
- package/dist/web/assets/sparql-DkYu6x3z.js +1 -0
- package/dist/web/assets/sparql-bYkjHRlG.js +1 -0
- package/dist/web/assets/splunk-Cf8iN4DR.js +1 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js +1 -0
- package/dist/web/assets/sql-COK4E0Yg.js +1 -0
- package/dist/web/assets/sql-D0XecflT.js +1 -0
- package/dist/web/assets/ssh-config-BknIz3MU.js +1 -0
- package/dist/web/assets/stata-DorPZHa4.js +1 -0
- package/dist/web/assets/stateDiagram-MAYHULR4-D13_SEW-.js +1 -0
- package/dist/web/assets/stateDiagram-v2-4JROLMXI-B54Ohb2s.js +1 -0
- package/dist/web/assets/stex-C3f8Ysf7.js +1 -0
- package/dist/web/assets/stylus-B533Al4x.js +1 -0
- package/dist/web/assets/stylus-BeQkCIfX.js +1 -0
- package/dist/web/assets/svelte-MSaWC3Je.js +1 -0
- package/dist/web/assets/swift-BSxZ-RaX.js +1 -0
- package/dist/web/assets/swift-BzpIVaGY.js +1 -0
- package/dist/web/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/web/assets/system-verilog-C7L56vO4.js +1 -0
- package/dist/web/assets/systemd-CUnW07Te.js +1 -0
- package/dist/web/assets/talonscript-C1XDQQGZ.js +1 -0
- package/dist/web/assets/tasl-CQjiPCtT.js +1 -0
- package/dist/web/assets/tcl-DQ1-QYvQ.js +1 -0
- package/dist/web/assets/tcl-DVfN8rqt.js +1 -0
- package/dist/web/assets/templ-dwX3ZSMB.js +1 -0
- package/dist/web/assets/terraform-BbSNqyBO.js +1 -0
- package/dist/web/assets/tex-rYs2v40G.js +1 -0
- package/dist/web/assets/textile-CnDTJFAw.js +1 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js +1 -0
- package/dist/web/assets/tiki-DGYXhP31.js +1 -0
- package/dist/web/assets/timeline-definition-U7ZMHBDA-D1EAZC5t.js +61 -0
- package/dist/web/assets/tokyo-night-DBQeEorK.js +1 -0
- package/dist/web/assets/toml-Bm5Em-hy.js +1 -0
- package/dist/web/assets/toml-CB2ApiWb.js +1 -0
- package/dist/web/assets/troff-wAsdV37c.js +1 -0
- package/dist/web/assets/ts-tags-CipyTH0X.js +1 -0
- package/dist/web/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/web/assets/tsx-B6W0miNI.js +1 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js +1 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js +1 -0
- package/dist/web/assets/turtle-B1tBg_DP.js +1 -0
- package/dist/web/assets/turtle-BMR_PYu6.js +1 -0
- package/dist/web/assets/twig-NC5TFiHP.js +1 -0
- package/dist/web/assets/typescript-Dj6nwHGl.js +1 -0
- package/dist/web/assets/typespec-BpWG_bgh.js +1 -0
- package/dist/web/assets/typst-BVUVsWT6.js +1 -0
- package/dist/web/assets/v-CAQ2eGtk.js +1 -0
- package/dist/web/assets/vala-BFOHcciG.js +1 -0
- package/dist/web/assets/vb-CdO5JTpU.js +1 -0
- package/dist/web/assets/vb-CmGdzxic.js +1 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js +1 -0
- package/dist/web/assets/velocity-D8B20fx6.js +1 -0
- package/dist/web/assets/verilog-C6RDOZhf.js +1 -0
- package/dist/web/assets/verilog-CJaU5se_.js +1 -0
- package/dist/web/assets/vesper-BEBZ7ncR.js +1 -0
- package/dist/web/assets/vhdl-DYoNaHQp.js +1 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js +1 -0
- package/dist/web/assets/viml-m4uW47V2.js +1 -0
- package/dist/web/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/web/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/web/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/web/assets/vue-BuYVFjOK.js +1 -0
- package/dist/web/assets/vue-html-xdeiXROB.js +1 -0
- package/dist/web/assets/vyper-nyqBNV6O.js +1 -0
- package/dist/web/assets/wasm-C6j12Q_x.js +1 -0
- package/dist/web/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js +1 -0
- package/dist/web/assets/wenyan-7A4Fjokl.js +1 -0
- package/dist/web/assets/wgsl-CB0Krxn9.js +1 -0
- package/dist/web/assets/wikitext-DCE3LsBG.js +1 -0
- package/dist/web/assets/wolfram-C3FkfJm5.js +1 -0
- package/dist/web/assets/xml-e3z08dGr.js +1 -0
- package/dist/web/assets/xquery-CQfU5ijd.js +1 -0
- package/dist/web/assets/xsl-Dd0NUgwM.js +1 -0
- package/dist/web/assets/xychartDiagram-6QU3TZC5-9fhTIPRM.js +7 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js +1 -0
- package/dist/web/assets/yaml-CVw76BM1.js +1 -0
- package/dist/web/assets/z80-Hz9HOZM7.js +1 -0
- package/dist/web/assets/zenscript-HnGAYVZD.js +1 -0
- package/dist/web/assets/zig-BVz_zdnA.js +1 -0
- package/dist/web/index.html +22 -0
- package/package.json +80 -4
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
var Tp=e=>{throw TypeError(e)};var oc=(e,t,n)=>t.has(e)||Tp("Cannot "+n);var E=(e,t,n)=>(oc(e,t,"read from private field"),n?n.call(e):t.get(e)),ie=(e,t,n)=>t.has(e)?Tp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Q=(e,t,n,r)=>(oc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),oe=(e,t,n)=>(oc(e,t,"access private method"),n);var eo=(e,t,n,r)=>({set _(i){Q(e,t,i,n)},get _(){return E(e,t,r)}});function Ax(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Cw="modulepreload",Ew=function(e){return"/"+e},Lp={},Pu=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),o=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=Ew(u),u in Lp)return;Lp[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":Cw,c||(h.as="script"),h.crossOrigin="",h.href=u,o&&h.setAttribute("nonce",o),document.head.appendChild(h),c)return new Promise((p,f)=>{h.addEventListener("load",p),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return i.then(l=>{for(const o of l||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};var qT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ix={exports:{}},Tu={},Fx={exports:{}},Ne={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ia=Symbol.for("react.element"),Pw=Symbol.for("react.portal"),Tw=Symbol.for("react.fragment"),Lw=Symbol.for("react.strict_mode"),Mw=Symbol.for("react.profiler"),Rw=Symbol.for("react.provider"),zw=Symbol.for("react.context"),Aw=Symbol.for("react.forward_ref"),Iw=Symbol.for("react.suspense"),Fw=Symbol.for("react.memo"),Dw=Symbol.for("react.lazy"),Mp=Symbol.iterator;function Ow(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Dx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ox=Object.assign,_x={};function ul(e,t,n){this.props=e,this.context=t,this.refs=_x,this.updater=n||Dx}ul.prototype.isReactComponent={};ul.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};ul.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $x(){}$x.prototype=ul.prototype;function Bh(e,t,n){this.props=e,this.context=t,this.refs=_x,this.updater=n||Dx}var Uh=Bh.prototype=new $x;Uh.constructor=Bh;Ox(Uh,ul.prototype);Uh.isPureReactComponent=!0;var Rp=Array.isArray,Bx=Object.prototype.hasOwnProperty,qh={current:null},Ux={key:!0,ref:!0,__self:!0,__source:!0};function qx(e,t,n){var r,i={},s=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(s=""+t.key),t)Bx.call(t,r)&&!Ux.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var u=Array(o),c=0;c<o;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:Ia,type:e,key:s,ref:l,props:i,_owner:qh.current}}function _w(e,t){return{$$typeof:Ia,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Hh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ia}function $w(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zp=/\/+/g;function uc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?$w(""+e.key):t.toString(36)}function Co(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Ia:case Pw:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+uc(l,0):r,Rp(i)?(n="",e!=null&&(n=e.replace(zp,"$&/")+"/"),Co(i,t,n,"",function(c){return c})):i!=null&&(Hh(i)&&(i=_w(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(zp,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",Rp(e))for(var o=0;o<e.length;o++){s=e[o];var u=r+uc(s,o);l+=Co(s,t,n,u,i)}else if(u=Ow(e),typeof u=="function")for(e=u.call(e),o=0;!(s=e.next()).done;)s=s.value,u=r+uc(s,o++),l+=Co(s,t,n,u,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function to(e,t,n){if(e==null)return e;var r=[],i=0;return Co(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Bw(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ht={current:null},Eo={transition:null},Uw={ReactCurrentDispatcher:Ht,ReactCurrentBatchConfig:Eo,ReactCurrentOwner:qh};function Hx(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:to,forEach:function(e,t,n){to(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return to(e,function(){t++}),t},toArray:function(e){return to(e,function(t){return t})||[]},only:function(e){if(!Hh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ne.Component=ul;Ne.Fragment=Tw;Ne.Profiler=Mw;Ne.PureComponent=Bh;Ne.StrictMode=Lw;Ne.Suspense=Iw;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Uw;Ne.act=Hx;Ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ox({},e.props),i=e.key,s=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,l=qh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Bx.call(t,u)&&!Ux.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var c=0;c<u;c++)o[c]=arguments[c+2];r.children=o}return{$$typeof:Ia,type:e.type,key:i,ref:s,props:r,_owner:l}};Ne.createContext=function(e){return e={$$typeof:zw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Rw,_context:e},e.Consumer=e};Ne.createElement=qx;Ne.createFactory=function(e){var t=qx.bind(null,e);return t.type=e,t};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(e){return{$$typeof:Aw,render:e}};Ne.isValidElement=Hh;Ne.lazy=function(e){return{$$typeof:Dw,_payload:{_status:-1,_result:e},_init:Bw}};Ne.memo=function(e,t){return{$$typeof:Fw,type:e,compare:t===void 0?null:t}};Ne.startTransition=function(e){var t=Eo.transition;Eo.transition={};try{e()}finally{Eo.transition=t}};Ne.unstable_act=Hx;Ne.useCallback=function(e,t){return Ht.current.useCallback(e,t)};Ne.useContext=function(e){return Ht.current.useContext(e)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(e){return Ht.current.useDeferredValue(e)};Ne.useEffect=function(e,t){return Ht.current.useEffect(e,t)};Ne.useId=function(){return Ht.current.useId()};Ne.useImperativeHandle=function(e,t,n){return Ht.current.useImperativeHandle(e,t,n)};Ne.useInsertionEffect=function(e,t){return Ht.current.useInsertionEffect(e,t)};Ne.useLayoutEffect=function(e,t){return Ht.current.useLayoutEffect(e,t)};Ne.useMemo=function(e,t){return Ht.current.useMemo(e,t)};Ne.useReducer=function(e,t,n){return Ht.current.useReducer(e,t,n)};Ne.useRef=function(e){return Ht.current.useRef(e)};Ne.useState=function(e){return Ht.current.useState(e)};Ne.useSyncExternalStore=function(e,t,n){return Ht.current.useSyncExternalStore(e,t,n)};Ne.useTransition=function(){return Ht.current.useTransition()};Ne.version="18.3.1";Fx.exports=Ne;var b=Fx.exports;const qw=$h(b),Hw=Ax({__proto__:null,default:qw},[b]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vw=b,Ww=Symbol.for("react.element"),Qw=Symbol.for("react.fragment"),Kw=Object.prototype.hasOwnProperty,Gw=Vw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yw={key:!0,ref:!0,__self:!0,__source:!0};function Vx(e,t,n){var r,i={},s=null,l=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Kw.call(t,r)&&!Yw.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Ww,type:e,key:s,ref:l,props:i,_owner:Gw.current}}Tu.Fragment=Qw;Tu.jsx=Vx;Tu.jsxs=Vx;Ix.exports=Tu;var a=Ix.exports;const Wx=()=>window.matchMedia("(prefers-color-scheme: dark)");function Ap(e){const t=e==="dark"||e==="system"&&Wx().matches;document.documentElement.classList.toggle("dark",t),window.dispatchEvent(new CustomEvent("gl-theme",{detail:t}))}function Qx(){const[e,t]=b.useState(()=>{try{return localStorage.getItem("learnforge.theme")||"system"}catch{return"system"}});return b.useEffect(()=>{try{localStorage.setItem("learnforge.theme",e)}catch{}if(Ap(e),e!=="system")return;const n=Wx(),r=()=>Ap("system");return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[e]),{pref:e,setPref:t}}function Xw(){const[e,t]=b.useState(()=>document.documentElement.classList.contains("dark"));return b.useEffect(()=>{const n=r=>t(r.detail);return window.addEventListener("gl-theme",n),()=>window.removeEventListener("gl-theme",n)},[]),e}function Kx(){try{return localStorage.getItem("learnforge.readingFont2")==="sans"?"sans":"serif"}catch{return"serif"}}function Gx(e=Kx()){document.documentElement.dataset.read=e}function Jw(){const[e,t]=b.useState(Kx);return b.useEffect(()=>{try{localStorage.setItem("learnforge.readingFont2",e)}catch{}Gx(e)},[e]),{font:e,setFont:t}}var Yx={exports:{}},pn={},Xx={exports:{}},Jx={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(H,ee){var S=H.length;H.push(ee);e:for(;0<S;){var ce=S-1>>>1,ye=H[ce];if(0<i(ye,ee))H[ce]=ee,H[S]=ye,S=ce;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ee=H[0],S=H.pop();if(S!==ee){H[0]=S;e:for(var ce=0,ye=H.length,P=ye>>>1;ce<P;){var Ee=2*(ce+1)-1,Fe=H[Ee],ve=Ee+1,je=H[ve];if(0>i(Fe,S))ve<ye&&0>i(je,Fe)?(H[ce]=je,H[ve]=S,ce=ve):(H[ce]=Fe,H[Ee]=S,ce=Ee);else if(ve<ye&&0>i(je,S))H[ce]=je,H[ve]=S,ce=ve;else break e}}return ee}function i(H,ee){var S=H.sortIndex-ee.sortIndex;return S!==0?S:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var u=[],c=[],d=1,h=null,p=3,f=!1,g=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(H){for(var ee=n(c);ee!==null;){if(ee.callback===null)r(c);else if(ee.startTime<=H)r(c),ee.sortIndex=ee.expirationTime,t(u,ee);else break;ee=n(c)}}function j(H){if(x=!1,v(H),!g)if(n(u)!==null)g=!0,Y(C);else{var ee=n(c);ee!==null&&K(j,ee.startTime-H)}}function C(H,ee){g=!1,x&&(x=!1,m(z),z=-1),f=!0;var S=p;try{for(v(ee),h=n(u);h!==null&&(!(h.expirationTime>ee)||H&&!R());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,p=h.priorityLevel;var ye=ce(h.expirationTime<=ee);ee=e.unstable_now(),typeof ye=="function"?h.callback=ye:h===n(u)&&r(u),v(ee)}else r(u);h=n(u)}if(h!==null)var P=!0;else{var Ee=n(c);Ee!==null&&K(j,Ee.startTime-ee),P=!1}return P}finally{h=null,p=S,f=!1}}var k=!1,L=null,z=-1,A=5,N=-1;function R(){return!(e.unstable_now()-N<A)}function I(){if(L!==null){var H=e.unstable_now();N=H;var ee=!0;try{ee=L(!0,H)}finally{ee?W():(k=!1,L=null)}}else k=!1}var W;if(typeof y=="function")W=function(){y(I)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,_=V.port2;V.port1.onmessage=I,W=function(){_.postMessage(null)}}else W=function(){w(I,0)};function Y(H){L=H,k||(k=!0,W())}function K(H,ee){z=w(function(){H(e.unstable_now())},ee)}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(H){H.callback=null},e.unstable_continueExecution=function(){g||f||(g=!0,Y(C))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(H){switch(p){case 1:case 2:case 3:var ee=3;break;default:ee=p}var S=p;p=ee;try{return H()}finally{p=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,ee){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var S=p;p=H;try{return ee()}finally{p=S}},e.unstable_scheduleCallback=function(H,ee,S){var ce=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?ce+S:ce):S=ce,H){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=S+ye,H={id:d++,callback:ee,priorityLevel:H,startTime:S,expirationTime:ye,sortIndex:-1},S>ce?(H.sortIndex=S,t(c,H),n(u)===null&&H===n(c)&&(x?(m(z),z=-1):x=!0,K(j,S-ce))):(H.sortIndex=ye,t(u,H),g||f||(g=!0,Y(C))),H},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(H){var ee=p;return function(){var S=p;p=ee;try{return H.apply(this,arguments)}finally{p=S}}}})(Jx);Xx.exports=Jx;var Zw=Xx.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var ek=b,fn=Zw;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Zx=new Set,ta={};function rs(e,t){Ys(e,t),Ys(e+"Capture",t)}function Ys(e,t){for(ta[e]=t,e=0;e<t.length;e++)Zx.add(t[e])}var Cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sd=Object.prototype.hasOwnProperty,tk=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ip={},Fp={};function nk(e){return sd.call(Fp,e)?!0:sd.call(Ip,e)?!1:tk.test(e)?Fp[e]=!0:(Ip[e]=!0,!1)}function rk(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ik(e,t,n,r){if(t===null||typeof t>"u"||rk(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Vt(e,t,n,r,i,s,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=l}var jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jt[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jt[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jt[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jt[e]=new Vt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){jt[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jt[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jt[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jt[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jt[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vh=/[\-:]([a-z])/g;function Wh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Vh,Wh);jt[t]=new Vt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Vh,Wh);jt[t]=new Vt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Vh,Wh);jt[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});jt.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qh(e,t,n,r){var i=jt.hasOwnProperty(t)?jt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ik(t,n,i,r)&&(n=null),r||i===null?nk(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Mr=ek.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,no=Symbol.for("react.element"),ms=Symbol.for("react.portal"),gs=Symbol.for("react.fragment"),Kh=Symbol.for("react.strict_mode"),ld=Symbol.for("react.profiler"),ey=Symbol.for("react.provider"),ty=Symbol.for("react.context"),Gh=Symbol.for("react.forward_ref"),ad=Symbol.for("react.suspense"),od=Symbol.for("react.suspense_list"),Yh=Symbol.for("react.memo"),Br=Symbol.for("react.lazy"),ny=Symbol.for("react.offscreen"),Dp=Symbol.iterator;function kl(e){return e===null||typeof e!="object"?null:(e=Dp&&e[Dp]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,cc;function Il(e){if(cc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);cc=t&&t[1]||""}return`
|
|
34
|
+
`+cc+e}var dc=!1;function hc(e,t){if(!e||dc)return"";dc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),l=i.length-1,o=s.length-1;1<=l&&0<=o&&i[l]!==s[o];)o--;for(;1<=l&&0<=o;l--,o--)if(i[l]!==s[o]){if(l!==1||o!==1)do if(l--,o--,0>o||i[l]!==s[o]){var u=`
|
|
37
|
+
`+i[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=o);break}}}finally{dc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Il(e):""}function sk(e){switch(e.tag){case 5:return Il(e.type);case 16:return Il("Lazy");case 13:return Il("Suspense");case 19:return Il("SuspenseList");case 0:case 2:case 15:return e=hc(e.type,!1),e;case 11:return e=hc(e.type.render,!1),e;case 1:return e=hc(e.type,!0),e;default:return""}}function ud(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gs:return"Fragment";case ms:return"Portal";case ld:return"Profiler";case Kh:return"StrictMode";case ad:return"Suspense";case od:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ty:return(e.displayName||"Context")+".Consumer";case ey:return(e._context.displayName||"Context")+".Provider";case Gh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yh:return t=e.displayName||null,t!==null?t:ud(e.type)||"Memo";case Br:t=e._payload,e=e._init;try{return ud(e(t))}catch{}}return null}function lk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ud(t);case 8:return t===Kh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ry(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ak(e){var t=ry(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,s.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ro(e){e._valueTracker||(e._valueTracker=ak(e))}function iy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ry(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function cd(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Op(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sy(e,t){t=t.checked,t!=null&&Qh(e,"checked",t,!1)}function dd(e,t){sy(e,t);var n=hi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hd(e,t.type,n):t.hasOwnProperty("defaultValue")&&hd(e,t.type,hi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _p(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hd(e,t,n){(t!=="number"||qo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fl=Array.isArray;function Es(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+hi(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function fd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $p(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(Fl(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:hi(n)}}function ly(e,t){var n=hi(t.value),r=hi(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Bp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ay(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ay(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var io,oy=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(io=io||document.createElement("div"),io.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=io.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function na(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ok=["Webkit","ms","Moz","O"];Object.keys(Bl).forEach(function(e){ok.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bl[t]=Bl[e]})});function uy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bl.hasOwnProperty(e)&&Bl[e]?(""+t).trim():t+"px"}function cy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=uy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var uk=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function md(e,t){if(t){if(uk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function gd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xd=null;function Xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yd=null,Ps=null,Ts=null;function Up(e){if(e=Oa(e)){if(typeof yd!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Au(t),yd(e.stateNode,e.type,t))}}function dy(e){Ps?Ts?Ts.push(e):Ts=[e]:Ps=e}function hy(){if(Ps){var e=Ps,t=Ts;if(Ts=Ps=null,Up(e),t)for(e=0;e<t.length;e++)Up(t[e])}}function fy(e,t){return e(t)}function py(){}var fc=!1;function my(e,t,n){if(fc)return e(t,n);fc=!0;try{return fy(e,t,n)}finally{fc=!1,(Ps!==null||Ts!==null)&&(py(),hy())}}function ra(e,t){var n=e.stateNode;if(n===null)return null;var r=Au(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var vd=!1;if(Cr)try{var bl={};Object.defineProperty(bl,"passive",{get:function(){vd=!0}}),window.addEventListener("test",bl,bl),window.removeEventListener("test",bl,bl)}catch{vd=!1}function ck(e,t,n,r,i,s,l,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Ul=!1,Ho=null,Vo=!1,wd=null,dk={onError:function(e){Ul=!0,Ho=e}};function hk(e,t,n,r,i,s,l,o,u){Ul=!1,Ho=null,ck.apply(dk,arguments)}function fk(e,t,n,r,i,s,l,o,u){if(hk.apply(this,arguments),Ul){if(Ul){var c=Ho;Ul=!1,Ho=null}else throw Error(U(198));Vo||(Vo=!0,wd=c)}}function is(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 gy(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 qp(e){if(is(e)!==e)throw Error(U(188))}function pk(e){var t=e.alternate;if(!t){if(t=is(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return qp(i),e;if(s===r)return qp(i),t;s=s.sibling}throw Error(U(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,o=i.child;o;){if(o===n){l=!0,n=i,r=s;break}if(o===r){l=!0,r=i,n=s;break}o=o.sibling}if(!l){for(o=s.child;o;){if(o===n){l=!0,n=s,r=i;break}if(o===r){l=!0,r=s,n=i;break}o=o.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function xy(e){return e=pk(e),e!==null?yy(e):null}function yy(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=yy(e);if(t!==null)return t;e=e.sibling}return null}var vy=fn.unstable_scheduleCallback,Hp=fn.unstable_cancelCallback,mk=fn.unstable_shouldYield,gk=fn.unstable_requestPaint,rt=fn.unstable_now,xk=fn.unstable_getCurrentPriorityLevel,Jh=fn.unstable_ImmediatePriority,wy=fn.unstable_UserBlockingPriority,Wo=fn.unstable_NormalPriority,yk=fn.unstable_LowPriority,ky=fn.unstable_IdlePriority,Lu=null,or=null;function vk(e){if(or&&typeof or.onCommitFiberRoot=="function")try{or.onCommitFiberRoot(Lu,e,void 0,(e.current.flags&128)===128)}catch{}}var _n=Math.clz32?Math.clz32:bk,wk=Math.log,kk=Math.LN2;function bk(e){return e>>>=0,e===0?32:31-(wk(e)/kk|0)|0}var so=64,lo=4194304;function Dl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Qo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,l=n&268435455;if(l!==0){var o=l&~i;o!==0?r=Dl(o):(s&=l,s!==0&&(r=Dl(s)))}else l=n&~i,l!==0?r=Dl(l):s!==0&&(r=Dl(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-_n(t),i=1<<n,r|=e[n],t&=~i;return r}function jk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-_n(s),o=1<<l,u=i[l];u===-1?(!(o&n)||o&r)&&(i[l]=jk(o,t)):u<=t&&(e.expiredLanes|=o),s&=~o}}function kd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function by(){var e=so;return so<<=1,!(so&4194240)&&(so=64),e}function pc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_n(t),e[t]=n}function Sk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-_n(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Zh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_n(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ie=0;function jy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ny,ef,Sy,Cy,Ey,bd=!1,ao=[],ii=null,si=null,li=null,ia=new Map,sa=new Map,qr=[],Ck="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vp(e,t){switch(e){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":si=null;break;case"mouseover":case"mouseout":li=null;break;case"pointerover":case"pointerout":ia.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sa.delete(t.pointerId)}}function jl(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Oa(t),t!==null&&ef(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ek(e,t,n,r,i){switch(t){case"focusin":return ii=jl(ii,e,t,n,r,i),!0;case"dragenter":return si=jl(si,e,t,n,r,i),!0;case"mouseover":return li=jl(li,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return ia.set(s,jl(ia.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,sa.set(s,jl(sa.get(s)||null,e,t,n,r,i)),!0}return!1}function Py(e){var t=zi(e.target);if(t!==null){var n=is(t);if(n!==null){if(t=n.tag,t===13){if(t=gy(n),t!==null){e.blockedOn=t,Ey(e.priority,function(){Sy(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Po(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xd=r,n.target.dispatchEvent(r),xd=null}else return t=Oa(n),t!==null&&ef(t),e.blockedOn=n,!1;t.shift()}return!0}function Wp(e,t,n){Po(e)&&n.delete(t)}function Pk(){bd=!1,ii!==null&&Po(ii)&&(ii=null),si!==null&&Po(si)&&(si=null),li!==null&&Po(li)&&(li=null),ia.forEach(Wp),sa.forEach(Wp)}function Nl(e,t){e.blockedOn===t&&(e.blockedOn=null,bd||(bd=!0,fn.unstable_scheduleCallback(fn.unstable_NormalPriority,Pk)))}function la(e){function t(i){return Nl(i,e)}if(0<ao.length){Nl(ao[0],e);for(var n=1;n<ao.length;n++){var r=ao[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ii!==null&&Nl(ii,e),si!==null&&Nl(si,e),li!==null&&Nl(li,e),ia.forEach(t),sa.forEach(t),n=0;n<qr.length;n++)r=qr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qr.length&&(n=qr[0],n.blockedOn===null);)Py(n),n.blockedOn===null&&qr.shift()}var Ls=Mr.ReactCurrentBatchConfig,Ko=!0;function Tk(e,t,n,r){var i=Ie,s=Ls.transition;Ls.transition=null;try{Ie=1,tf(e,t,n,r)}finally{Ie=i,Ls.transition=s}}function Lk(e,t,n,r){var i=Ie,s=Ls.transition;Ls.transition=null;try{Ie=4,tf(e,t,n,r)}finally{Ie=i,Ls.transition=s}}function tf(e,t,n,r){if(Ko){var i=jd(e,t,n,r);if(i===null)Nc(e,t,r,Go,n),Vp(e,r);else if(Ek(i,e,t,n,r))r.stopPropagation();else if(Vp(e,r),t&4&&-1<Ck.indexOf(e)){for(;i!==null;){var s=Oa(i);if(s!==null&&Ny(s),s=jd(e,t,n,r),s===null&&Nc(e,t,r,Go,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Nc(e,t,r,null,n)}}var Go=null;function jd(e,t,n,r){if(Go=null,e=Xh(r),e=zi(e),e!==null)if(t=is(e),t===null)e=null;else if(n=t.tag,n===13){if(e=gy(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Go=e,null}function Ty(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xk()){case Jh:return 1;case wy:return 4;case Wo:case yk:return 16;case ky:return 536870912;default:return 16}default:return 16}}var ti=null,nf=null,To=null;function Ly(){if(To)return To;var e,t=nf,n=t.length,r,i="value"in ti?ti.value:ti.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[s-r];r++);return To=i.slice(e,1<r?1-r:void 0)}function Lo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function oo(){return!0}function Qp(){return!1}function mn(e){function t(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?oo:Qp,this.isPropagationStopped=Qp,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=oo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=oo)},persist:function(){},isPersistent:oo}),t}var cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rf=mn(cl),Da=Ge({},cl,{view:0,detail:0}),Mk=mn(Da),mc,gc,Sl,Mu=Ge({},Da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Sl&&(Sl&&e.type==="mousemove"?(mc=e.screenX-Sl.screenX,gc=e.screenY-Sl.screenY):gc=mc=0,Sl=e),mc)},movementY:function(e){return"movementY"in e?e.movementY:gc}}),Kp=mn(Mu),Rk=Ge({},Mu,{dataTransfer:0}),zk=mn(Rk),Ak=Ge({},Da,{relatedTarget:0}),xc=mn(Ak),Ik=Ge({},cl,{animationName:0,elapsedTime:0,pseudoElement:0}),Fk=mn(Ik),Dk=Ge({},cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ok=mn(Dk),_k=Ge({},cl,{data:0}),Gp=mn(_k),$k={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Uk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uk[e])?!!t[e]:!1}function sf(){return qk}var Hk=Ge({},Da,{key:function(e){if(e.key){var t=$k[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Lo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sf,charCode:function(e){return e.type==="keypress"?Lo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Lo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vk=mn(Hk),Wk=Ge({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yp=mn(Wk),Qk=Ge({},Da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sf}),Kk=mn(Qk),Gk=Ge({},cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yk=mn(Gk),Xk=Ge({},Mu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jk=mn(Xk),Zk=[9,13,27,32],lf=Cr&&"CompositionEvent"in window,ql=null;Cr&&"documentMode"in document&&(ql=document.documentMode);var eb=Cr&&"TextEvent"in window&&!ql,My=Cr&&(!lf||ql&&8<ql&&11>=ql),Xp=" ",Jp=!1;function Ry(e,t){switch(e){case"keyup":return Zk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function tb(e,t){switch(e){case"compositionend":return zy(t);case"keypress":return t.which!==32?null:(Jp=!0,Xp);case"textInput":return e=t.data,e===Xp&&Jp?null:e;default:return null}}function nb(e,t){if(xs)return e==="compositionend"||!lf&&Ry(e,t)?(e=Ly(),To=nf=ti=null,xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return My&&t.locale!=="ko"?null:t.data;default:return null}}var rb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rb[e.type]:t==="textarea"}function Ay(e,t,n,r){dy(r),t=Yo(t,"onChange"),0<t.length&&(n=new rf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hl=null,aa=null;function ib(e){Vy(e,0)}function Ru(e){var t=ws(e);if(iy(t))return e}function sb(e,t){if(e==="change")return t}var Iy=!1;if(Cr){var yc;if(Cr){var vc="oninput"in document;if(!vc){var em=document.createElement("div");em.setAttribute("oninput","return;"),vc=typeof em.oninput=="function"}yc=vc}else yc=!1;Iy=yc&&(!document.documentMode||9<document.documentMode)}function tm(){Hl&&(Hl.detachEvent("onpropertychange",Fy),aa=Hl=null)}function Fy(e){if(e.propertyName==="value"&&Ru(aa)){var t=[];Ay(t,aa,e,Xh(e)),my(ib,t)}}function lb(e,t,n){e==="focusin"?(tm(),Hl=t,aa=n,Hl.attachEvent("onpropertychange",Fy)):e==="focusout"&&tm()}function ab(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(aa)}function ob(e,t){if(e==="click")return Ru(t)}function ub(e,t){if(e==="input"||e==="change")return Ru(t)}function cb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qn=typeof Object.is=="function"?Object.is:cb;function oa(e,t){if(qn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!sd.call(t,i)||!qn(e[i],t[i]))return!1}return!0}function nm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rm(e,t){var n=nm(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=nm(n)}}function Dy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oy(){for(var e=window,t=qo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qo(e.document)}return t}function af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function db(e){var t=Oy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dy(n.ownerDocument.documentElement,n)){if(r!==null&&af(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=rm(n,s);var l=rm(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hb=Cr&&"documentMode"in document&&11>=document.documentMode,ys=null,Nd=null,Vl=null,Sd=!1;function im(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sd||ys==null||ys!==qo(r)||(r=ys,"selectionStart"in r&&af(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vl&&oa(Vl,r)||(Vl=r,r=Yo(Nd,"onSelect"),0<r.length&&(t=new rf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ys)))}function uo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vs={animationend:uo("Animation","AnimationEnd"),animationiteration:uo("Animation","AnimationIteration"),animationstart:uo("Animation","AnimationStart"),transitionend:uo("Transition","TransitionEnd")},wc={},_y={};Cr&&(_y=document.createElement("div").style,"AnimationEvent"in window||(delete vs.animationend.animation,delete vs.animationiteration.animation,delete vs.animationstart.animation),"TransitionEvent"in window||delete vs.transitionend.transition);function zu(e){if(wc[e])return wc[e];if(!vs[e])return e;var t=vs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _y)return wc[e]=t[n];return e}var $y=zu("animationend"),By=zu("animationiteration"),Uy=zu("animationstart"),qy=zu("transitionend"),Hy=new Map,sm="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function gi(e,t){Hy.set(e,t),rs(t,[e])}for(var kc=0;kc<sm.length;kc++){var bc=sm[kc],fb=bc.toLowerCase(),pb=bc[0].toUpperCase()+bc.slice(1);gi(fb,"on"+pb)}gi($y,"onAnimationEnd");gi(By,"onAnimationIteration");gi(Uy,"onAnimationStart");gi("dblclick","onDoubleClick");gi("focusin","onFocus");gi("focusout","onBlur");gi(qy,"onTransitionEnd");Ys("onMouseEnter",["mouseout","mouseover"]);Ys("onMouseLeave",["mouseout","mouseover"]);Ys("onPointerEnter",["pointerout","pointerover"]);Ys("onPointerLeave",["pointerout","pointerover"]);rs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rs("onBeforeInput",["compositionend","keypress","textInput","paste"]);rs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ol="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mb=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ol));function lm(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,fk(r,t,void 0,e),e.currentTarget=null}function Vy(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],u=o.instance,c=o.currentTarget;if(o=o.listener,u!==s&&i.isPropagationStopped())break e;lm(i,o,c),s=u}else for(l=0;l<r.length;l++){if(o=r[l],u=o.instance,c=o.currentTarget,o=o.listener,u!==s&&i.isPropagationStopped())break e;lm(i,o,c),s=u}}}if(Vo)throw e=wd,Vo=!1,wd=null,e}function qe(e,t){var n=t[Ld];n===void 0&&(n=t[Ld]=new Set);var r=e+"__bubble";n.has(r)||(Wy(t,e,2,!1),n.add(r))}function jc(e,t,n){var r=0;t&&(r|=4),Wy(n,e,r,t)}var co="_reactListening"+Math.random().toString(36).slice(2);function ua(e){if(!e[co]){e[co]=!0,Zx.forEach(function(n){n!=="selectionchange"&&(mb.has(n)||jc(n,!1,e),jc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[co]||(t[co]=!0,jc("selectionchange",!1,t))}}function Wy(e,t,n,r){switch(Ty(t)){case 1:var i=Tk;break;case 4:i=Lk;break;default:i=tf}n=i.bind(null,t,n,e),i=void 0,!vd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Nc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var u=l.tag;if((u===3||u===4)&&(u=l.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;l=l.return}for(;o!==null;){if(l=zi(o),l===null)return;if(u=l.tag,u===5||u===6){r=s=l;continue e}o=o.parentNode}}r=r.return}my(function(){var c=s,d=Xh(n),h=[];e:{var p=Hy.get(e);if(p!==void 0){var f=rf,g=e;switch(e){case"keypress":if(Lo(n)===0)break e;case"keydown":case"keyup":f=Vk;break;case"focusin":g="focus",f=xc;break;case"focusout":g="blur",f=xc;break;case"beforeblur":case"afterblur":f=xc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Kp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=zk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Kk;break;case $y:case By:case Uy:f=Fk;break;case qy:f=Yk;break;case"scroll":f=Mk;break;case"wheel":f=Jk;break;case"copy":case"cut":case"paste":f=Ok;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Yp}var x=(t&4)!==0,w=!x&&e==="scroll",m=x?p!==null?p+"Capture":null:p;x=[];for(var y=c,v;y!==null;){v=y;var j=v.stateNode;if(v.tag===5&&j!==null&&(v=j,m!==null&&(j=ra(y,m),j!=null&&x.push(ca(y,j,v)))),w)break;y=y.return}0<x.length&&(p=new f(p,g,null,n,d),h.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&n!==xd&&(g=n.relatedTarget||n.fromElement)&&(zi(g)||g[Er]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(g=n.relatedTarget||n.toElement,f=c,g=g?zi(g):null,g!==null&&(w=is(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(f=null,g=c),f!==g)){if(x=Kp,j="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=Yp,j="onPointerLeave",m="onPointerEnter",y="pointer"),w=f==null?p:ws(f),v=g==null?p:ws(g),p=new x(j,y+"leave",f,n,d),p.target=w,p.relatedTarget=v,j=null,zi(d)===c&&(x=new x(m,y+"enter",g,n,d),x.target=v,x.relatedTarget=w,j=x),w=j,f&&g)t:{for(x=f,m=g,y=0,v=x;v;v=ds(v))y++;for(v=0,j=m;j;j=ds(j))v++;for(;0<y-v;)x=ds(x),y--;for(;0<v-y;)m=ds(m),v--;for(;y--;){if(x===m||m!==null&&x===m.alternate)break t;x=ds(x),m=ds(m)}x=null}else x=null;f!==null&&am(h,p,f,x,!1),g!==null&&w!==null&&am(h,w,g,x,!0)}}e:{if(p=c?ws(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var C=sb;else if(Zp(p))if(Iy)C=ub;else{C=ab;var k=lb}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=ob);if(C&&(C=C(e,c))){Ay(h,C,n,d);break e}k&&k(e,p,c),e==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&hd(p,"number",p.value)}switch(k=c?ws(c):window,e){case"focusin":(Zp(k)||k.contentEditable==="true")&&(ys=k,Nd=c,Vl=null);break;case"focusout":Vl=Nd=ys=null;break;case"mousedown":Sd=!0;break;case"contextmenu":case"mouseup":case"dragend":Sd=!1,im(h,n,d);break;case"selectionchange":if(hb)break;case"keydown":case"keyup":im(h,n,d)}var L;if(lf)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else xs?Ry(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(My&&n.locale!=="ko"&&(xs||z!=="onCompositionStart"?z==="onCompositionEnd"&&xs&&(L=Ly()):(ti=d,nf="value"in ti?ti.value:ti.textContent,xs=!0)),k=Yo(c,z),0<k.length&&(z=new Gp(z,e,null,n,d),h.push({event:z,listeners:k}),L?z.data=L:(L=zy(n),L!==null&&(z.data=L)))),(L=eb?tb(e,n):nb(e,n))&&(c=Yo(c,"onBeforeInput"),0<c.length&&(d=new Gp("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:c}),d.data=L))}Vy(h,t)})}function ca(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yo(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ra(e,n),s!=null&&r.unshift(ca(e,s,i)),s=ra(e,t),s!=null&&r.push(ca(e,s,i))),e=e.return}return r}function ds(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function am(e,t,n,r,i){for(var s=t._reactName,l=[];n!==null&&n!==r;){var o=n,u=o.alternate,c=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&c!==null&&(o=c,i?(u=ra(n,s),u!=null&&l.unshift(ca(n,u,o))):i||(u=ra(n,s),u!=null&&l.push(ca(n,u,o)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var gb=/\r\n?/g,xb=/\u0000|\uFFFD/g;function om(e){return(typeof e=="string"?e:""+e).replace(gb,`
|
|
38
|
+
`).replace(xb,"")}function ho(e,t,n){if(t=om(t),om(e)!==t&&n)throw Error(U(425))}function Xo(){}var Cd=null,Ed=null;function Pd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Td=typeof setTimeout=="function"?setTimeout:void 0,yb=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,vb=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(e){return um.resolve(null).then(e).catch(wb)}:Td;function wb(e){setTimeout(function(){throw e})}function Sc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),la(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);la(t)}function ai(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function cm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var dl=Math.random().toString(36).slice(2),lr="__reactFiber$"+dl,da="__reactProps$"+dl,Er="__reactContainer$"+dl,Ld="__reactEvents$"+dl,kb="__reactListeners$"+dl,bb="__reactHandles$"+dl;function zi(e){var t=e[lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Er]||n[lr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cm(e);e!==null;){if(n=e[lr])return n;e=cm(e)}return t}e=n,n=e.parentNode}return null}function Oa(e){return e=e[lr]||e[Er],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ws(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Au(e){return e[da]||null}var Md=[],ks=-1;function xi(e){return{current:e}}function He(e){0>ks||(e.current=Md[ks],Md[ks]=null,ks--)}function Ue(e,t){ks++,Md[ks]=e.current,e.current=t}var fi={},zt=xi(fi),Zt=xi(!1),Ki=fi;function Xs(e,t){var n=e.type.contextTypes;if(!n)return fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function en(e){return e=e.childContextTypes,e!=null}function Jo(){He(Zt),He(zt)}function dm(e,t,n){if(zt.current!==fi)throw Error(U(168));Ue(zt,t),Ue(Zt,n)}function Qy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(U(108,lk(e)||"Unknown",i));return Ge({},n,r)}function Zo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fi,Ki=zt.current,Ue(zt,e),Ue(Zt,Zt.current),!0}function hm(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=Qy(e,t,Ki),r.__reactInternalMemoizedMergedChildContext=e,He(Zt),He(zt),Ue(zt,e)):He(Zt),Ue(Zt,n)}var vr=null,Iu=!1,Cc=!1;function Ky(e){vr===null?vr=[e]:vr.push(e)}function jb(e){Iu=!0,Ky(e)}function yi(){if(!Cc&&vr!==null){Cc=!0;var e=0,t=Ie;try{var n=vr;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}vr=null,Iu=!1}catch(i){throw vr!==null&&(vr=vr.slice(e+1)),vy(Jh,yi),i}finally{Ie=t,Cc=!1}}return null}var bs=[],js=0,eu=null,tu=0,kn=[],bn=0,Gi=null,kr=1,br="";function Pi(e,t){bs[js++]=tu,bs[js++]=eu,eu=e,tu=t}function Gy(e,t,n){kn[bn++]=kr,kn[bn++]=br,kn[bn++]=Gi,Gi=e;var r=kr;e=br;var i=32-_n(r)-1;r&=~(1<<i),n+=1;var s=32-_n(t)+i;if(30<s){var l=i-i%5;s=(r&(1<<l)-1).toString(32),r>>=l,i-=l,kr=1<<32-_n(t)+i|n<<i|r,br=s+e}else kr=1<<s|n<<i|r,br=e}function of(e){e.return!==null&&(Pi(e,1),Gy(e,1,0))}function uf(e){for(;e===eu;)eu=bs[--js],bs[js]=null,tu=bs[--js],bs[js]=null;for(;e===Gi;)Gi=kn[--bn],kn[bn]=null,br=kn[--bn],kn[bn]=null,kr=kn[--bn],kn[bn]=null}var hn=null,dn=null,We=!1,Dn=null;function Yy(e,t){var n=Nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function fm(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,hn=e,dn=ai(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hn=e,dn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Gi!==null?{id:kr,overflow:br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hn=e,dn=null,!0):!1;default:return!1}}function Rd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zd(e){if(We){var t=dn;if(t){var n=t;if(!fm(e,t)){if(Rd(e))throw Error(U(418));t=ai(n.nextSibling);var r=hn;t&&fm(e,t)?Yy(r,n):(e.flags=e.flags&-4097|2,We=!1,hn=e)}}else{if(Rd(e))throw Error(U(418));e.flags=e.flags&-4097|2,We=!1,hn=e}}}function pm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function fo(e){if(e!==hn)return!1;if(!We)return pm(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pd(e.type,e.memoizedProps)),t&&(t=dn)){if(Rd(e))throw Xy(),Error(U(418));for(;t;)Yy(e,t),t=ai(t.nextSibling)}if(pm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){dn=ai(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}dn=null}}else dn=hn?ai(e.stateNode.nextSibling):null;return!0}function Xy(){for(var e=dn;e;)e=ai(e.nextSibling)}function Js(){dn=hn=null,We=!1}function cf(e){Dn===null?Dn=[e]:Dn.push(e)}var Nb=Mr.ReactCurrentBatchConfig;function Cl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(l){var o=i.refs;l===null?delete o[s]:o[s]=l},t._stringRef=s,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function po(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mm(e){var t=e._init;return t(e._payload)}function Jy(e){function t(m,y){if(e){var v=m.deletions;v===null?(m.deletions=[y],m.flags|=16):v.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m,y){for(m=new Map;y!==null;)y.key!==null?m.set(y.key,y):m.set(y.index,y),y=y.sibling;return m}function i(m,y){return m=di(m,y),m.index=0,m.sibling=null,m}function s(m,y,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<y?(m.flags|=2,y):v):(m.flags|=2,y)):(m.flags|=1048576,y)}function l(m){return e&&m.alternate===null&&(m.flags|=2),m}function o(m,y,v,j){return y===null||y.tag!==6?(y=zc(v,m.mode,j),y.return=m,y):(y=i(y,v),y.return=m,y)}function u(m,y,v,j){var C=v.type;return C===gs?d(m,y,v.props.children,j,v.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Br&&mm(C)===y.type)?(j=i(y,v.props),j.ref=Cl(m,y,v),j.return=m,j):(j=Do(v.type,v.key,v.props,null,m.mode,j),j.ref=Cl(m,y,v),j.return=m,j)}function c(m,y,v,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=Ac(v,m.mode,j),y.return=m,y):(y=i(y,v.children||[]),y.return=m,y)}function d(m,y,v,j,C){return y===null||y.tag!==7?(y=Wi(v,m.mode,j,C),y.return=m,y):(y=i(y,v),y.return=m,y)}function h(m,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=zc(""+y,m.mode,v),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case no:return v=Do(y.type,y.key,y.props,null,m.mode,v),v.ref=Cl(m,null,y),v.return=m,v;case ms:return y=Ac(y,m.mode,v),y.return=m,y;case Br:var j=y._init;return h(m,j(y._payload),v)}if(Fl(y)||kl(y))return y=Wi(y,m.mode,v,null),y.return=m,y;po(m,y)}return null}function p(m,y,v,j){var C=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return C!==null?null:o(m,y,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case no:return v.key===C?u(m,y,v,j):null;case ms:return v.key===C?c(m,y,v,j):null;case Br:return C=v._init,p(m,y,C(v._payload),j)}if(Fl(v)||kl(v))return C!==null?null:d(m,y,v,j,null);po(m,v)}return null}function f(m,y,v,j,C){if(typeof j=="string"&&j!==""||typeof j=="number")return m=m.get(v)||null,o(y,m,""+j,C);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case no:return m=m.get(j.key===null?v:j.key)||null,u(y,m,j,C);case ms:return m=m.get(j.key===null?v:j.key)||null,c(y,m,j,C);case Br:var k=j._init;return f(m,y,v,k(j._payload),C)}if(Fl(j)||kl(j))return m=m.get(v)||null,d(y,m,j,C,null);po(y,j)}return null}function g(m,y,v,j){for(var C=null,k=null,L=y,z=y=0,A=null;L!==null&&z<v.length;z++){L.index>z?(A=L,L=null):A=L.sibling;var N=p(m,L,v[z],j);if(N===null){L===null&&(L=A);break}e&&L&&N.alternate===null&&t(m,L),y=s(N,y,z),k===null?C=N:k.sibling=N,k=N,L=A}if(z===v.length)return n(m,L),We&&Pi(m,z),C;if(L===null){for(;z<v.length;z++)L=h(m,v[z],j),L!==null&&(y=s(L,y,z),k===null?C=L:k.sibling=L,k=L);return We&&Pi(m,z),C}for(L=r(m,L);z<v.length;z++)A=f(L,m,z,v[z],j),A!==null&&(e&&A.alternate!==null&&L.delete(A.key===null?z:A.key),y=s(A,y,z),k===null?C=A:k.sibling=A,k=A);return e&&L.forEach(function(R){return t(m,R)}),We&&Pi(m,z),C}function x(m,y,v,j){var C=kl(v);if(typeof C!="function")throw Error(U(150));if(v=C.call(v),v==null)throw Error(U(151));for(var k=C=null,L=y,z=y=0,A=null,N=v.next();L!==null&&!N.done;z++,N=v.next()){L.index>z?(A=L,L=null):A=L.sibling;var R=p(m,L,N.value,j);if(R===null){L===null&&(L=A);break}e&&L&&R.alternate===null&&t(m,L),y=s(R,y,z),k===null?C=R:k.sibling=R,k=R,L=A}if(N.done)return n(m,L),We&&Pi(m,z),C;if(L===null){for(;!N.done;z++,N=v.next())N=h(m,N.value,j),N!==null&&(y=s(N,y,z),k===null?C=N:k.sibling=N,k=N);return We&&Pi(m,z),C}for(L=r(m,L);!N.done;z++,N=v.next())N=f(L,m,z,N.value,j),N!==null&&(e&&N.alternate!==null&&L.delete(N.key===null?z:N.key),y=s(N,y,z),k===null?C=N:k.sibling=N,k=N);return e&&L.forEach(function(I){return t(m,I)}),We&&Pi(m,z),C}function w(m,y,v,j){if(typeof v=="object"&&v!==null&&v.type===gs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case no:e:{for(var C=v.key,k=y;k!==null;){if(k.key===C){if(C=v.type,C===gs){if(k.tag===7){n(m,k.sibling),y=i(k,v.props.children),y.return=m,m=y;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Br&&mm(C)===k.type){n(m,k.sibling),y=i(k,v.props),y.ref=Cl(m,k,v),y.return=m,m=y;break e}n(m,k);break}else t(m,k);k=k.sibling}v.type===gs?(y=Wi(v.props.children,m.mode,j,v.key),y.return=m,m=y):(j=Do(v.type,v.key,v.props,null,m.mode,j),j.ref=Cl(m,y,v),j.return=m,m=j)}return l(m);case ms:e:{for(k=v.key;y!==null;){if(y.key===k)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(m,y.sibling),y=i(y,v.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=Ac(v,m.mode,j),y.return=m,m=y}return l(m);case Br:return k=v._init,w(m,y,k(v._payload),j)}if(Fl(v))return g(m,y,v,j);if(kl(v))return x(m,y,v,j);po(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(m,y.sibling),y=i(y,v),y.return=m,m=y):(n(m,y),y=zc(v,m.mode,j),y.return=m,m=y),l(m)):n(m,y)}return w}var Zs=Jy(!0),Zy=Jy(!1),nu=xi(null),ru=null,Ns=null,df=null;function hf(){df=Ns=ru=null}function ff(e){var t=nu.current;He(nu),e._currentValue=t}function Ad(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ms(e,t){ru=e,df=Ns=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jt=!0),e.firstContext=null)}function Cn(e){var t=e._currentValue;if(df!==e)if(e={context:e,memoizedValue:t,next:null},Ns===null){if(ru===null)throw Error(U(308));Ns=e,ru.dependencies={lanes:0,firstContext:e}}else Ns=Ns.next=e;return t}var Ai=null;function pf(e){Ai===null?Ai=[e]:Ai.push(e)}function ev(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,pf(t)):(n.next=i.next,i.next=n),t.interleaved=n,Pr(e,r)}function Pr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ur=!1;function mf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function oi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Pr(e,n)}return i=r.interleaved,i===null?(t.next=t,pf(r)):(t.next=i.next,i.next=t),r.interleaved=t,Pr(e,n)}function Mo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zh(e,n)}}function gm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function iu(e,t,n,r){var i=e.updateQueue;Ur=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,c=u.next;u.next=null,l===null?s=c:l.next=c,l=u;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==l&&(o===null?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=u))}if(s!==null){var h=i.baseState;l=0,d=c=u=null,o=s;do{var p=o.lane,f=o.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,x=o;switch(p=t,f=n,x.tag){case 1:if(g=x.payload,typeof g=="function"){h=g.call(f,h,p);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,p=typeof g=="function"?g.call(f,h,p):g,p==null)break e;h=Ge({},h,p);break e;case 2:Ur=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[o]:p.push(o))}else f={eventTime:f,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(c=d=f,u=h):d=d.next=f,l|=p;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;p=o,o=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(d===null&&(u=h),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Xi|=l,e.lanes=l,e.memoizedState=h}}function xm(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(U(191,i));i.call(r)}}}var _a={},ur=xi(_a),ha=xi(_a),fa=xi(_a);function Ii(e){if(e===_a)throw Error(U(174));return e}function gf(e,t){switch(Ue(fa,t),Ue(ha,e),Ue(ur,_a),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=pd(t,e)}He(ur),Ue(ur,t)}function el(){He(ur),He(ha),He(fa)}function nv(e){Ii(fa.current);var t=Ii(ur.current),n=pd(t,e.type);t!==n&&(Ue(ha,e),Ue(ur,n))}function xf(e){ha.current===e&&(He(ur),He(ha))}var Qe=xi(0);function su(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ec=[];function yf(){for(var e=0;e<Ec.length;e++)Ec[e]._workInProgressVersionPrimary=null;Ec.length=0}var Ro=Mr.ReactCurrentDispatcher,Pc=Mr.ReactCurrentBatchConfig,Yi=0,Ke=null,ct=null,ft=null,lu=!1,Wl=!1,pa=0,Sb=0;function Pt(){throw Error(U(321))}function vf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qn(e[n],t[n]))return!1;return!0}function wf(e,t,n,r,i,s){if(Yi=s,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ro.current=e===null||e.memoizedState===null?Tb:Lb,e=n(r,i),Wl){s=0;do{if(Wl=!1,pa=0,25<=s)throw Error(U(301));s+=1,ft=ct=null,t.updateQueue=null,Ro.current=Mb,e=n(r,i)}while(Wl)}if(Ro.current=au,t=ct!==null&&ct.next!==null,Yi=0,ft=ct=Ke=null,lu=!1,t)throw Error(U(300));return e}function kf(){var e=pa!==0;return pa=0,e}function er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Ke.memoizedState=ft=e:ft=ft.next=e,ft}function En(){if(ct===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=ft===null?Ke.memoizedState:ft.next;if(t!==null)ft=t,ct=e;else{if(e===null)throw Error(U(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},ft===null?Ke.memoizedState=ft=e:ft=ft.next=e}return ft}function ma(e,t){return typeof t=="function"?t(e):t}function Tc(e){var t=En(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=ct,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=l=null,u=null,c=s;do{var d=c.lane;if((Yi&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(o=u=h,l=r):u=u.next=h,Ke.lanes|=d,Xi|=d}c=c.next}while(c!==null&&c!==s);u===null?l=r:u.next=o,qn(r,t.memoizedState)||(Jt=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ke.lanes|=s,Xi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Lc(e){var t=En(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=e(s,l.action),l=l.next;while(l!==i);qn(s,t.memoizedState)||(Jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function rv(){}function iv(e,t){var n=Ke,r=En(),i=t(),s=!qn(r.memoizedState,i);if(s&&(r.memoizedState=i,Jt=!0),r=r.queue,bf(av.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ft!==null&&ft.memoizedState.tag&1){if(n.flags|=2048,ga(9,lv.bind(null,n,r,i,t),void 0,null),pt===null)throw Error(U(349));Yi&30||sv(n,t,i)}return i}function sv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lv(e,t,n,r){t.value=n,t.getSnapshot=r,ov(t)&&uv(e)}function av(e,t,n){return n(function(){ov(t)&&uv(e)})}function ov(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qn(e,n)}catch{return!0}}function uv(e){var t=Pr(e,1);t!==null&&$n(t,e,1,-1)}function ym(e){var t=er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t.queue=e,e=e.dispatch=Pb.bind(null,Ke,e),[t.memoizedState,e]}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function cv(){return En().memoizedState}function zo(e,t,n,r){var i=er();Ke.flags|=e,i.memoizedState=ga(1|t,n,void 0,r===void 0?null:r)}function Fu(e,t,n,r){var i=En();r=r===void 0?null:r;var s=void 0;if(ct!==null){var l=ct.memoizedState;if(s=l.destroy,r!==null&&vf(r,l.deps)){i.memoizedState=ga(t,n,s,r);return}}Ke.flags|=e,i.memoizedState=ga(1|t,n,s,r)}function vm(e,t){return zo(8390656,8,e,t)}function bf(e,t){return Fu(2048,8,e,t)}function dv(e,t){return Fu(4,2,e,t)}function hv(e,t){return Fu(4,4,e,t)}function fv(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function pv(e,t,n){return n=n!=null?n.concat([e]):null,Fu(4,4,fv.bind(null,t,e),n)}function jf(){}function mv(e,t){var n=En();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gv(e,t){var n=En();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xv(e,t,n){return Yi&21?(qn(n,t)||(n=by(),Ke.lanes|=n,Xi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Jt=!0),e.memoizedState=n)}function Cb(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=Pc.transition;Pc.transition={};try{e(!1),t()}finally{Ie=n,Pc.transition=r}}function yv(){return En().memoizedState}function Eb(e,t,n){var r=ci(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vv(e))wv(t,n);else if(n=ev(e,t,n,r),n!==null){var i=Ut();$n(n,e,r,i),kv(n,t,r)}}function Pb(e,t,n){var r=ci(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vv(e))wv(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,o=s(l,n);if(i.hasEagerState=!0,i.eagerState=o,qn(o,l)){var u=t.interleaved;u===null?(i.next=i,pf(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=ev(e,t,i,r),n!==null&&(i=Ut(),$n(n,e,r,i),kv(n,t,r))}}function vv(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function wv(e,t){Wl=lu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zh(e,n)}}var au={readContext:Cn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},Tb={readContext:Cn,useCallback:function(e,t){return er().memoizedState=[e,t===void 0?null:t],e},useContext:Cn,useEffect:vm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zo(4194308,4,fv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return zo(4,2,e,t)},useMemo:function(e,t){var n=er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=er();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Eb.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=er();return e={current:e},t.memoizedState=e},useState:ym,useDebugValue:jf,useDeferredValue:function(e){return er().memoizedState=e},useTransition:function(){var e=ym(!1),t=e[0];return e=Cb.bind(null,e[1]),er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,i=er();if(We){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),pt===null)throw Error(U(349));Yi&30||sv(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,vm(av.bind(null,r,s,e),[e]),r.flags|=2048,ga(9,lv.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=er(),t=pt.identifierPrefix;if(We){var n=br,r=kr;n=(r&~(1<<32-_n(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Sb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Lb={readContext:Cn,useCallback:mv,useContext:Cn,useEffect:bf,useImperativeHandle:pv,useInsertionEffect:dv,useLayoutEffect:hv,useMemo:gv,useReducer:Tc,useRef:cv,useState:function(){return Tc(ma)},useDebugValue:jf,useDeferredValue:function(e){var t=En();return xv(t,ct.memoizedState,e)},useTransition:function(){var e=Tc(ma)[0],t=En().memoizedState;return[e,t]},useMutableSource:rv,useSyncExternalStore:iv,useId:yv,unstable_isNewReconciler:!1},Mb={readContext:Cn,useCallback:mv,useContext:Cn,useEffect:bf,useImperativeHandle:pv,useInsertionEffect:dv,useLayoutEffect:hv,useMemo:gv,useReducer:Lc,useRef:cv,useState:function(){return Lc(ma)},useDebugValue:jf,useDeferredValue:function(e){var t=En();return ct===null?t.memoizedState=e:xv(t,ct.memoizedState,e)},useTransition:function(){var e=Lc(ma)[0],t=En().memoizedState;return[e,t]},useMutableSource:rv,useSyncExternalStore:iv,useId:yv,unstable_isNewReconciler:!1};function zn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Id(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Du={isMounted:function(e){return(e=e._reactInternals)?is(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),i=ci(e),s=jr(r,i);s.payload=t,n!=null&&(s.callback=n),t=oi(e,s,i),t!==null&&($n(t,e,i,r),Mo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),i=ci(e),s=jr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=oi(e,s,i),t!==null&&($n(t,e,i,r),Mo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=ci(e),i=jr(n,r);i.tag=2,t!=null&&(i.callback=t),t=oi(e,i,r),t!==null&&($n(t,e,r,n),Mo(t,e,r))}};function wm(e,t,n,r,i,s,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,l):t.prototype&&t.prototype.isPureReactComponent?!oa(n,r)||!oa(i,s):!0}function bv(e,t,n){var r=!1,i=fi,s=t.contextType;return typeof s=="object"&&s!==null?s=Cn(s):(i=en(t)?Ki:zt.current,r=t.contextTypes,s=(r=r!=null)?Xs(e,i):fi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function km(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Du.enqueueReplaceState(t,t.state,null)}function Fd(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},mf(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Cn(s):(s=en(t)?Ki:zt.current,i.context=Xs(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Id(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Du.enqueueReplaceState(i,i.state,null),iu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function tl(e,t){try{var n="",r=t;do n+=sk(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Mc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Dd(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Rb=typeof WeakMap=="function"?WeakMap:Map;function jv(e,t,n){n=jr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uu||(uu=!0,Qd=r),Dd(e,t)},n}function Nv(e,t,n){n=jr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Dd(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Dd(e,t),typeof r!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function bm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rb;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Wb.bind(null,e,t,n),t.then(e,e))}function jm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Nm(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=jr(-1,1),t.tag=2,oi(n,t,1))),n.lanes|=1),e)}var zb=Mr.ReactCurrentOwner,Jt=!1;function $t(e,t,n,r){t.child=e===null?Zy(t,null,n,r):Zs(t,e.child,n,r)}function Sm(e,t,n,r,i){n=n.render;var s=t.ref;return Ms(t,i),r=wf(e,t,n,r,s,i),n=kf(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Tr(e,t,i)):(We&&n&&of(t),t.flags|=1,$t(e,t,r,i),t.child)}function Cm(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Mf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Sv(e,t,s,r,i)):(e=Do(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:oa,n(l,r)&&e.ref===t.ref)return Tr(e,t,i)}return t.flags|=1,e=di(s,r),e.ref=t.ref,e.return=t,t.child=e}function Sv(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(oa(s,r)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Jt=!0);else return t.lanes=e.lanes,Tr(e,t,i)}return Od(e,t,n,r,i)}function Cv(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ue(Cs,un),un|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ue(Cs,un),un|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ue(Cs,un),un|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Ue(Cs,un),un|=r;return $t(e,t,i,n),t.child}function Ev(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Od(e,t,n,r,i){var s=en(n)?Ki:zt.current;return s=Xs(t,s),Ms(t,i),n=wf(e,t,n,r,s,i),r=kf(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Tr(e,t,i)):(We&&r&&of(t),t.flags|=1,$t(e,t,n,i),t.child)}function Em(e,t,n,r,i){if(en(n)){var s=!0;Zo(t)}else s=!1;if(Ms(t,i),t.stateNode===null)Ao(e,t),bv(t,n,r),Fd(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var u=l.context,c=n.contextType;typeof c=="object"&&c!==null?c=Cn(c):(c=en(n)?Ki:zt.current,c=Xs(t,c));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof l.getSnapshotBeforeUpdate=="function";h||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==r||u!==c)&&km(t,l,r,c),Ur=!1;var p=t.memoizedState;l.state=p,iu(t,r,l,i),u=t.memoizedState,o!==r||p!==u||Zt.current||Ur?(typeof d=="function"&&(Id(t,n,d,r),u=t.memoizedState),(o=Ur||wm(t,n,o,r,p,u,c))?(h||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),l.props=r,l.state=u,l.context=c,r=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,tv(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:zn(t.type,o),l.props=c,h=t.pendingProps,p=l.context,u=n.contextType,typeof u=="object"&&u!==null?u=Cn(u):(u=en(n)?Ki:zt.current,u=Xs(t,u));var f=n.getDerivedStateFromProps;(d=typeof f=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==h||p!==u)&&km(t,l,r,u),Ur=!1,p=t.memoizedState,l.state=p,iu(t,r,l,i);var g=t.memoizedState;o!==h||p!==g||Zt.current||Ur?(typeof f=="function"&&(Id(t,n,f,r),g=t.memoizedState),(c=Ur||wm(t,n,c,r,p,g,u)||!1)?(d||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,g,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,g,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),l.props=r,l.state=g,l.context=u,r=c):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return _d(e,t,n,r,s,i)}function _d(e,t,n,r,i,s){Ev(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&hm(t,n,!1),Tr(e,t,s);r=t.stateNode,zb.current=t;var o=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Zs(t,e.child,null,s),t.child=Zs(t,null,o,s)):$t(e,t,o,s),t.memoizedState=r.state,i&&hm(t,n,!0),t.child}function Pv(e){var t=e.stateNode;t.pendingContext?dm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dm(e,t.context,!1),gf(e,t.containerInfo)}function Pm(e,t,n,r,i){return Js(),cf(i),t.flags|=256,$t(e,t,n,r),t.child}var $d={dehydrated:null,treeContext:null,retryLane:0};function Bd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Tv(e,t,n){var r=t.pendingProps,i=Qe.current,s=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ue(Qe,i&1),e===null)return zd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=$u(l,r,0,null),e=Wi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Bd(n),t.memoizedState=$d,e):Nf(t,l));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Ab(e,t,l,r,o,i,n);if(s){s=r.fallback,l=t.mode,i=e.child,o=i.sibling;var u={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=di(i,u),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=di(o,s):(s=Wi(s,l,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=e.child.memoizedState,l=l===null?Bd(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=$d,r}return s=e.child,e=s.sibling,r=di(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Nf(e,t){return t=$u({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function mo(e,t,n,r){return r!==null&&cf(r),Zs(t,e.child,null,n),e=Nf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ab(e,t,n,r,i,s,l){if(n)return t.flags&256?(t.flags&=-257,r=Mc(Error(U(422))),mo(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=$u({mode:"visible",children:r.children},i,0,null),s=Wi(s,i,l,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Zs(t,e.child,null,l),t.child.memoizedState=Bd(l),t.memoizedState=$d,s);if(!(t.mode&1))return mo(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(U(419)),r=Mc(s,r,void 0),mo(e,t,l,r)}if(o=(l&e.childLanes)!==0,Jt||o){if(r=pt,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Pr(e,i),$n(r,e,i,-1))}return Lf(),r=Mc(Error(U(421))),mo(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Qb.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,dn=ai(i.nextSibling),hn=t,We=!0,Dn=null,e!==null&&(kn[bn++]=kr,kn[bn++]=br,kn[bn++]=Gi,kr=e.id,br=e.overflow,Gi=t),t=Nf(t,r.children),t.flags|=4096,t)}function Tm(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ad(e.return,t,n)}function Rc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Lv(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if($t(e,t,r.children,n),r=Qe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tm(e,n,t);else if(e.tag===19)Tm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ue(Qe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&su(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Rc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&su(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Rc(t,!0,n,null,s);break;case"together":Rc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ao(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ib(e,t,n){switch(t.tag){case 3:Pv(t),Js();break;case 5:nv(t);break;case 1:en(t.type)&&Zo(t);break;case 4:gf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ue(nu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ue(Qe,Qe.current&1),t.flags|=128,null):n&t.child.childLanes?Tv(e,t,n):(Ue(Qe,Qe.current&1),e=Tr(e,t,n),e!==null?e.sibling:null);Ue(Qe,Qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Lv(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ue(Qe,Qe.current),r)break;return null;case 22:case 23:return t.lanes=0,Cv(e,t,n)}return Tr(e,t,n)}var Mv,Ud,Rv,zv;Mv=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ud=function(){};Rv=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ii(ur.current);var s=null;switch(n){case"input":i=cd(e,i),r=cd(e,r),s=[];break;case"select":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),s=[];break;case"textarea":i=fd(e,i),r=fd(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xo)}md(n,r);var l;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(l in o)o.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ta.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(o=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==o&&(u!=null||o!=null))if(c==="style")if(o){for(l in o)!o.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&o[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(s||(s=[]),s.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(s=s||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ta.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&qe("scroll",e),s||o===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};zv=function(e,t,n,r){n!==r&&(t.flags|=4)};function El(e,t){if(!We)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fb(e,t,n){var r=t.pendingProps;switch(uf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return en(t.type)&&Jo(),Tt(t),null;case 3:return r=t.stateNode,el(),He(Zt),He(zt),yf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dn!==null&&(Yd(Dn),Dn=null))),Ud(e,t),Tt(t),null;case 5:xf(t);var i=Ii(fa.current);if(n=t.type,e!==null&&t.stateNode!=null)Rv(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Tt(t),null}if(e=Ii(ur.current),fo(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[lr]=t,r[da]=s,e=(t.mode&1)!==0,n){case"dialog":qe("cancel",r),qe("close",r);break;case"iframe":case"object":case"embed":qe("load",r);break;case"video":case"audio":for(i=0;i<Ol.length;i++)qe(Ol[i],r);break;case"source":qe("error",r);break;case"img":case"image":case"link":qe("error",r),qe("load",r);break;case"details":qe("toggle",r);break;case"input":Op(r,s),qe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},qe("invalid",r);break;case"textarea":$p(r,s),qe("invalid",r)}md(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var o=s[l];l==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&ho(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&ho(r.textContent,o,e),i=["children",""+o]):ta.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&qe("scroll",r)}switch(n){case"input":ro(r),_p(r,s,!0);break;case"textarea":ro(r),Bp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Xo)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ay(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[lr]=t,e[da]=r,Mv(e,t,!1,!1),t.stateNode=e;e:{switch(l=gd(n,r),n){case"dialog":qe("cancel",e),qe("close",e),i=r;break;case"iframe":case"object":case"embed":qe("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ol.length;i++)qe(Ol[i],e);i=r;break;case"source":qe("error",e),i=r;break;case"img":case"image":case"link":qe("error",e),qe("load",e),i=r;break;case"details":qe("toggle",e),i=r;break;case"input":Op(e,r),i=cd(e,r),qe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),qe("invalid",e);break;case"textarea":$p(e,r),i=fd(e,r),qe("invalid",e);break;default:i=r}md(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var u=o[s];s==="style"?cy(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&oy(e,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&na(e,u):typeof u=="number"&&na(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ta.hasOwnProperty(s)?u!=null&&s==="onScroll"&&qe("scroll",e):u!=null&&Qh(e,s,u,l))}switch(n){case"input":ro(e),_p(e,r,!1);break;case"textarea":ro(e),Bp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+hi(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Es(e,!!r.multiple,s,!1):r.defaultValue!=null&&Es(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Xo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Tt(t),null;case 6:if(e&&t.stateNode!=null)zv(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=Ii(fa.current),Ii(ur.current),fo(t)){if(r=t.stateNode,n=t.memoizedProps,r[lr]=t,(s=r.nodeValue!==n)&&(e=hn,e!==null))switch(e.tag){case 3:ho(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ho(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[lr]=t,t.stateNode=r}return Tt(t),null;case 13:if(He(Qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&dn!==null&&t.mode&1&&!(t.flags&128))Xy(),Js(),t.flags|=98560,s=!1;else if(s=fo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(U(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(U(317));s[lr]=t}else Js(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tt(t),s=!1}else Dn!==null&&(Yd(Dn),Dn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Qe.current&1?dt===0&&(dt=3):Lf())),t.updateQueue!==null&&(t.flags|=4),Tt(t),null);case 4:return el(),Ud(e,t),e===null&&ua(t.stateNode.containerInfo),Tt(t),null;case 10:return ff(t.type._context),Tt(t),null;case 17:return en(t.type)&&Jo(),Tt(t),null;case 19:if(He(Qe),s=t.memoizedState,s===null)return Tt(t),null;if(r=(t.flags&128)!==0,l=s.rendering,l===null)if(r)El(s,!1);else{if(dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=su(e),l!==null){for(t.flags|=128,El(s,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ue(Qe,Qe.current&1|2),t.child}e=e.sibling}s.tail!==null&&rt()>nl&&(t.flags|=128,r=!0,El(s,!1),t.lanes=4194304)}else{if(!r)if(e=su(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),El(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!We)return Tt(t),null}else 2*rt()-s.renderingStartTime>nl&&n!==1073741824&&(t.flags|=128,r=!0,El(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(n=s.last,n!==null?n.sibling=l:t.child=l,s.last=l)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=rt(),t.sibling=null,n=Qe.current,Ue(Qe,r?n&1|2:n&1),t):(Tt(t),null);case 22:case 23:return Tf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?un&1073741824&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function Db(e,t){switch(uf(t),t.tag){case 1:return en(t.type)&&Jo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return el(),He(Zt),He(zt),yf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xf(t),null;case 13:if(He(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Js()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(Qe),null;case 4:return el(),null;case 10:return ff(t.type._context),null;case 22:case 23:return Tf(),null;case 24:return null;default:return null}}var go=!1,Rt=!1,Ob=typeof WeakSet=="function"?WeakSet:Set,X=null;function Ss(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ze(e,t,r)}else n.current=null}function qd(e,t,n){try{n()}catch(r){Ze(e,t,r)}}var Lm=!1;function _b(e,t){if(Cd=Ko,e=Oy(),af(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=0,o=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||i!==0&&h.nodeType!==3||(o=l+i),h!==s||r!==0&&h.nodeType!==3||(u=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++c===i&&(o=l),p===s&&++d===r&&(u=l),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ed={focusedElem:e,selectionRange:n},Ko=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,w=g.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?x:zn(t.type,x),w);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(j){Ze(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return g=Lm,Lm=!1,g}function Ql(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&qd(t,n,s)}i=i.next}while(i!==r)}}function Ou(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Av(e){var t=e.alternate;t!==null&&(e.alternate=null,Av(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lr],delete t[da],delete t[Ld],delete t[kb],delete t[bb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Iv(e){return e.tag===5||e.tag===3||e.tag===4}function Mm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Iv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xo));else if(r!==4&&(e=e.child,e!==null))for(Vd(e,t,n),e=e.sibling;e!==null;)Vd(e,t,n),e=e.sibling}function Wd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wd(e,t,n),e=e.sibling;e!==null;)Wd(e,t,n),e=e.sibling}var vt=null,In=!1;function Dr(e,t,n){for(n=n.child;n!==null;)Fv(e,t,n),n=n.sibling}function Fv(e,t,n){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(Lu,n)}catch{}switch(n.tag){case 5:Rt||Ss(n,t);case 6:var r=vt,i=In;vt=null,Dr(e,t,n),vt=r,In=i,vt!==null&&(In?(e=vt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):vt.removeChild(n.stateNode));break;case 18:vt!==null&&(In?(e=vt,n=n.stateNode,e.nodeType===8?Sc(e.parentNode,n):e.nodeType===1&&Sc(e,n),la(e)):Sc(vt,n.stateNode));break;case 4:r=vt,i=In,vt=n.stateNode.containerInfo,In=!0,Dr(e,t,n),vt=r,In=i;break;case 0:case 11:case 14:case 15:if(!Rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&qd(n,t,l),i=i.next}while(i!==r)}Dr(e,t,n);break;case 1:if(!Rt&&(Ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Ze(n,t,o)}Dr(e,t,n);break;case 21:Dr(e,t,n);break;case 22:n.mode&1?(Rt=(r=Rt)||n.memoizedState!==null,Dr(e,t,n),Rt=r):Dr(e,t,n);break;default:Dr(e,t,n)}}function Rm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ob),t.forEach(function(r){var i=Kb.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:vt=o.stateNode,In=!1;break e;case 3:vt=o.stateNode.containerInfo,In=!0;break e;case 4:vt=o.stateNode.containerInfo,In=!0;break e}o=o.return}if(vt===null)throw Error(U(160));Fv(s,l,i),vt=null,In=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){Ze(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dv(t,e),t=t.sibling}function Dv(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Rn(t,e),Zn(e),r&4){try{Ql(3,e,e.return),Ou(3,e)}catch(x){Ze(e,e.return,x)}try{Ql(5,e,e.return)}catch(x){Ze(e,e.return,x)}}break;case 1:Rn(t,e),Zn(e),r&512&&n!==null&&Ss(n,n.return);break;case 5:if(Rn(t,e),Zn(e),r&512&&n!==null&&Ss(n,n.return),e.flags&32){var i=e.stateNode;try{na(i,"")}catch(x){Ze(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,l=n!==null?n.memoizedProps:s,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&sy(i,s),gd(o,l);var c=gd(o,s);for(l=0;l<u.length;l+=2){var d=u[l],h=u[l+1];d==="style"?cy(i,h):d==="dangerouslySetInnerHTML"?oy(i,h):d==="children"?na(i,h):Qh(i,d,h,c)}switch(o){case"input":dd(i,s);break;case"textarea":ly(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var f=s.value;f!=null?Es(i,!!s.multiple,f,!1):p!==!!s.multiple&&(s.defaultValue!=null?Es(i,!!s.multiple,s.defaultValue,!0):Es(i,!!s.multiple,s.multiple?[]:"",!1))}i[da]=s}catch(x){Ze(e,e.return,x)}}break;case 6:if(Rn(t,e),Zn(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){Ze(e,e.return,x)}}break;case 3:if(Rn(t,e),Zn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{la(t.containerInfo)}catch(x){Ze(e,e.return,x)}break;case 4:Rn(t,e),Zn(e);break;case 13:Rn(t,e),Zn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Ef=rt())),r&4&&Rm(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Rt=(c=Rt)||d,Rn(t,e),Rt=c):Rn(t,e),Zn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(X=e,d=e.child;d!==null;){for(h=X=d;X!==null;){switch(p=X,f=p.child,p.tag){case 0:case 11:case 14:case 15:Ql(4,p,p.return);break;case 1:Ss(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(x){Ze(r,n,x)}}break;case 5:Ss(p,p.return);break;case 22:if(p.memoizedState!==null){Am(h);continue}}f!==null?(f.return=p,X=f):Am(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{i=h.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=h.stateNode,u=h.memoizedProps.style,l=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=uy("display",l))}catch(x){Ze(e,e.return,x)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(x){Ze(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Rn(t,e),Zn(e),r&4&&Rm(e);break;case 21:break;default:Rn(t,e),Zn(e)}}function Zn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Iv(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(na(i,""),r.flags&=-33);var s=Mm(e);Wd(e,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,o=Mm(e);Vd(e,o,l);break;default:throw Error(U(161))}}catch(u){Ze(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $b(e,t,n){X=e,Ov(e)}function Ov(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var i=X,s=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||go;if(!l){var o=i.alternate,u=o!==null&&o.memoizedState!==null||Rt;o=go;var c=Rt;if(go=l,(Rt=u)&&!c)for(X=i;X!==null;)l=X,u=l.child,l.tag===22&&l.memoizedState!==null?Im(i):u!==null?(u.return=l,X=u):Im(i);for(;s!==null;)X=s,Ov(s),s=s.sibling;X=i,go=o,Rt=c}zm(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,X=s):zm(e)}}function zm(e){for(;X!==null;){var t=X;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Rt||Ou(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Rt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:zn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&xm(t,s,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xm(t,l,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&la(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Rt||t.flags&512&&Hd(t)}catch(p){Ze(t,t.return,p)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function Am(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function Im(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ou(4,t)}catch(u){Ze(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){Ze(t,i,u)}}var s=t.return;try{Hd(t)}catch(u){Ze(t,s,u)}break;case 5:var l=t.return;try{Hd(t)}catch(u){Ze(t,l,u)}}}catch(u){Ze(t,t.return,u)}if(t===e){X=null;break}var o=t.sibling;if(o!==null){o.return=t.return,X=o;break}X=t.return}}var Bb=Math.ceil,ou=Mr.ReactCurrentDispatcher,Sf=Mr.ReactCurrentOwner,Sn=Mr.ReactCurrentBatchConfig,Le=0,pt=null,ot=null,bt=0,un=0,Cs=xi(0),dt=0,xa=null,Xi=0,_u=0,Cf=0,Kl=null,Xt=null,Ef=0,nl=1/0,yr=null,uu=!1,Qd=null,ui=null,xo=!1,ni=null,cu=0,Gl=0,Kd=null,Io=-1,Fo=0;function Ut(){return Le&6?rt():Io!==-1?Io:Io=rt()}function ci(e){return e.mode&1?Le&2&&bt!==0?bt&-bt:Nb.transition!==null?(Fo===0&&(Fo=by()),Fo):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:Ty(e.type)),e):1}function $n(e,t,n,r){if(50<Gl)throw Gl=0,Kd=null,Error(U(185));Fa(e,n,r),(!(Le&2)||e!==pt)&&(e===pt&&(!(Le&2)&&(_u|=n),dt===4&&Hr(e,bt)),tn(e,r),n===1&&Le===0&&!(t.mode&1)&&(nl=rt()+500,Iu&&yi()))}function tn(e,t){var n=e.callbackNode;Nk(e,t);var r=Qo(e,e===pt?bt:0);if(r===0)n!==null&&Hp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Hp(n),t===1)e.tag===0?jb(Fm.bind(null,e)):Ky(Fm.bind(null,e)),vb(function(){!(Le&6)&&yi()}),n=null;else{switch(jy(r)){case 1:n=Jh;break;case 4:n=wy;break;case 16:n=Wo;break;case 536870912:n=ky;break;default:n=Wo}n=Wv(n,_v.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _v(e,t){if(Io=-1,Fo=0,Le&6)throw Error(U(327));var n=e.callbackNode;if(Rs()&&e.callbackNode!==n)return null;var r=Qo(e,e===pt?bt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=du(e,r);else{t=r;var i=Le;Le|=2;var s=Bv();(pt!==e||bt!==t)&&(yr=null,nl=rt()+500,Vi(e,t));do try{Hb();break}catch(o){$v(e,o)}while(!0);hf(),ou.current=s,Le=i,ot!==null?t=0:(pt=null,bt=0,t=dt)}if(t!==0){if(t===2&&(i=kd(e),i!==0&&(r=i,t=Gd(e,i))),t===1)throw n=xa,Vi(e,0),Hr(e,r),tn(e,rt()),n;if(t===6)Hr(e,r);else{if(i=e.current.alternate,!(r&30)&&!Ub(i)&&(t=du(e,r),t===2&&(s=kd(e),s!==0&&(r=s,t=Gd(e,s))),t===1))throw n=xa,Vi(e,0),Hr(e,r),tn(e,rt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Ti(e,Xt,yr);break;case 3:if(Hr(e,r),(r&130023424)===r&&(t=Ef+500-rt(),10<t)){if(Qo(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Td(Ti.bind(null,e,Xt,yr),t);break}Ti(e,Xt,yr);break;case 4:if(Hr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-_n(r);s=1<<l,l=t[l],l>i&&(i=l),r&=~s}if(r=i,r=rt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bb(r/1960))-r,10<r){e.timeoutHandle=Td(Ti.bind(null,e,Xt,yr),r);break}Ti(e,Xt,yr);break;case 5:Ti(e,Xt,yr);break;default:throw Error(U(329))}}}return tn(e,rt()),e.callbackNode===n?_v.bind(null,e):null}function Gd(e,t){var n=Kl;return e.current.memoizedState.isDehydrated&&(Vi(e,t).flags|=256),e=du(e,t),e!==2&&(t=Xt,Xt=n,t!==null&&Yd(t)),e}function Yd(e){Xt===null?Xt=e:Xt.push.apply(Xt,e)}function Ub(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!qn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Hr(e,t){for(t&=~Cf,t&=~_u,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_n(t),r=1<<n;e[n]=-1,t&=~r}}function Fm(e){if(Le&6)throw Error(U(327));Rs();var t=Qo(e,0);if(!(t&1))return tn(e,rt()),null;var n=du(e,t);if(e.tag!==0&&n===2){var r=kd(e);r!==0&&(t=r,n=Gd(e,r))}if(n===1)throw n=xa,Vi(e,0),Hr(e,t),tn(e,rt()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ti(e,Xt,yr),tn(e,rt()),null}function Pf(e,t){var n=Le;Le|=1;try{return e(t)}finally{Le=n,Le===0&&(nl=rt()+500,Iu&&yi())}}function Ji(e){ni!==null&&ni.tag===0&&!(Le&6)&&Rs();var t=Le;Le|=1;var n=Sn.transition,r=Ie;try{if(Sn.transition=null,Ie=1,e)return e()}finally{Ie=r,Sn.transition=n,Le=t,!(Le&6)&&yi()}}function Tf(){un=Cs.current,He(Cs)}function Vi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yb(n)),ot!==null)for(n=ot.return;n!==null;){var r=n;switch(uf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jo();break;case 3:el(),He(Zt),He(zt),yf();break;case 5:xf(r);break;case 4:el();break;case 13:He(Qe);break;case 19:He(Qe);break;case 10:ff(r.type._context);break;case 22:case 23:Tf()}n=n.return}if(pt=e,ot=e=di(e.current,null),bt=un=t,dt=0,xa=null,Cf=_u=Xi=0,Xt=Kl=null,Ai!==null){for(t=0;t<Ai.length;t++)if(n=Ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}Ai=null}return e}function $v(e,t){do{var n=ot;try{if(hf(),Ro.current=au,lu){for(var r=Ke.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}lu=!1}if(Yi=0,ft=ct=Ke=null,Wl=!1,pa=0,Sf.current=null,n===null||n.return===null){dt=1,xa=t,ot=null;break}e:{var s=e,l=n.return,o=n,u=t;if(t=bt,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=o,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=jm(l);if(f!==null){f.flags&=-257,Nm(f,l,o,s,t),f.mode&1&&bm(s,c,t),t=f,u=c;var g=t.updateQueue;if(g===null){var x=new Set;x.add(u),t.updateQueue=x}else g.add(u);break e}else{if(!(t&1)){bm(s,c,t),Lf();break e}u=Error(U(426))}}else if(We&&o.mode&1){var w=jm(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Nm(w,l,o,s,t),cf(tl(u,o));break e}}s=u=tl(u,o),dt!==4&&(dt=2),Kl===null?Kl=[s]:Kl.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=jv(s,u,t);gm(s,m);break e;case 1:o=u;var y=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ui===null||!ui.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var j=Nv(s,o,t);gm(s,j);break e}}s=s.return}while(s!==null)}qv(n)}catch(C){t=C,ot===n&&n!==null&&(ot=n=n.return);continue}break}while(!0)}function Bv(){var e=ou.current;return ou.current=au,e===null?au:e}function Lf(){(dt===0||dt===3||dt===2)&&(dt=4),pt===null||!(Xi&268435455)&&!(_u&268435455)||Hr(pt,bt)}function du(e,t){var n=Le;Le|=2;var r=Bv();(pt!==e||bt!==t)&&(yr=null,Vi(e,t));do try{qb();break}catch(i){$v(e,i)}while(!0);if(hf(),Le=n,ou.current=r,ot!==null)throw Error(U(261));return pt=null,bt=0,dt}function qb(){for(;ot!==null;)Uv(ot)}function Hb(){for(;ot!==null&&!mk();)Uv(ot)}function Uv(e){var t=Vv(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?qv(e):ot=t,Sf.current=null}function qv(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Db(n,t),n!==null){n.flags&=32767,ot=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dt=6,ot=null;return}}else if(n=Fb(n,t,un),n!==null){ot=n;return}if(t=t.sibling,t!==null){ot=t;return}ot=t=e}while(t!==null);dt===0&&(dt=5)}function Ti(e,t,n){var r=Ie,i=Sn.transition;try{Sn.transition=null,Ie=1,Vb(e,t,n,r)}finally{Sn.transition=i,Ie=r}return null}function Vb(e,t,n,r){do Rs();while(ni!==null);if(Le&6)throw Error(U(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Sk(e,s),e===pt&&(ot=pt=null,bt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||xo||(xo=!0,Wv(Wo,function(){return Rs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Sn.transition,Sn.transition=null;var l=Ie;Ie=1;var o=Le;Le|=4,Sf.current=null,_b(e,n),Dv(n,e),db(Ed),Ko=!!Cd,Ed=Cd=null,e.current=n,$b(n),gk(),Le=o,Ie=l,Sn.transition=s}else e.current=n;if(xo&&(xo=!1,ni=e,cu=i),s=e.pendingLanes,s===0&&(ui=null),vk(n.stateNode),tn(e,rt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(uu)throw uu=!1,e=Qd,Qd=null,e;return cu&1&&e.tag!==0&&Rs(),s=e.pendingLanes,s&1?e===Kd?Gl++:(Gl=0,Kd=e):Gl=0,yi(),null}function Rs(){if(ni!==null){var e=jy(cu),t=Sn.transition,n=Ie;try{if(Sn.transition=null,Ie=16>e?16:e,ni===null)var r=!1;else{if(e=ni,ni=null,cu=0,Le&6)throw Error(U(331));var i=Le;for(Le|=4,X=e.current;X!==null;){var s=X,l=s.child;if(X.flags&16){var o=s.deletions;if(o!==null){for(var u=0;u<o.length;u++){var c=o[u];for(X=c;X!==null;){var d=X;switch(d.tag){case 0:case 11:case 15:Ql(8,d,s)}var h=d.child;if(h!==null)h.return=d,X=h;else for(;X!==null;){d=X;var p=d.sibling,f=d.return;if(Av(d),d===c){X=null;break}if(p!==null){p.return=f,X=p;break}X=f}}}var g=s.alternate;if(g!==null){var x=g.child;if(x!==null){g.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}X=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,X=l;else e:for(;X!==null;){if(s=X,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ql(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,X=m;break e}X=s.return}}var y=e.current;for(X=y;X!==null;){l=X;var v=l.child;if(l.subtreeFlags&2064&&v!==null)v.return=l,X=v;else e:for(l=y;X!==null;){if(o=X,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Ou(9,o)}}catch(C){Ze(o,o.return,C)}if(o===l){X=null;break e}var j=o.sibling;if(j!==null){j.return=o.return,X=j;break e}X=o.return}}if(Le=i,yi(),or&&typeof or.onPostCommitFiberRoot=="function")try{or.onPostCommitFiberRoot(Lu,e)}catch{}r=!0}return r}finally{Ie=n,Sn.transition=t}}return!1}function Dm(e,t,n){t=tl(n,t),t=jv(e,t,1),e=oi(e,t,1),t=Ut(),e!==null&&(Fa(e,1,t),tn(e,t))}function Ze(e,t,n){if(e.tag===3)Dm(e,e,n);else for(;t!==null;){if(t.tag===3){Dm(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ui===null||!ui.has(r))){e=tl(n,e),e=Nv(t,e,1),t=oi(t,e,1),e=Ut(),t!==null&&(Fa(t,1,e),tn(t,e));break}}t=t.return}}function Wb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,pt===e&&(bt&n)===n&&(dt===4||dt===3&&(bt&130023424)===bt&&500>rt()-Ef?Vi(e,0):Cf|=n),tn(e,t)}function Hv(e,t){t===0&&(e.mode&1?(t=lo,lo<<=1,!(lo&130023424)&&(lo=4194304)):t=1);var n=Ut();e=Pr(e,t),e!==null&&(Fa(e,t,n),tn(e,n))}function Qb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hv(e,n)}function Kb(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),Hv(e,n)}var Vv;Vv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zt.current)Jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jt=!1,Ib(e,t,n);Jt=!!(e.flags&131072)}else Jt=!1,We&&t.flags&1048576&&Gy(t,tu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ao(e,t),e=t.pendingProps;var i=Xs(t,zt.current);Ms(t,n),i=wf(null,t,r,e,i,n);var s=kf();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,en(r)?(s=!0,Zo(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mf(t),i.updater=Du,t.stateNode=i,i._reactInternals=t,Fd(t,r,e,n),t=_d(null,t,r,!0,s,n)):(t.tag=0,We&&s&&of(t),$t(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ao(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Yb(r),e=zn(r,e),i){case 0:t=Od(null,t,r,e,n);break e;case 1:t=Em(null,t,r,e,n);break e;case 11:t=Sm(null,t,r,e,n);break e;case 14:t=Cm(null,t,r,zn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zn(r,i),Od(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zn(r,i),Em(e,t,r,i,n);case 3:e:{if(Pv(t),e===null)throw Error(U(387));r=t.pendingProps,s=t.memoizedState,i=s.element,tv(e,t),iu(t,r,null,n);var l=t.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=tl(Error(U(423)),t),t=Pm(e,t,r,n,i);break e}else if(r!==i){i=tl(Error(U(424)),t),t=Pm(e,t,r,n,i);break e}else for(dn=ai(t.stateNode.containerInfo.firstChild),hn=t,We=!0,Dn=null,n=Zy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Js(),r===i){t=Tr(e,t,n);break e}$t(e,t,r,n)}t=t.child}return t;case 5:return nv(t),e===null&&zd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,l=i.children,Pd(r,i)?l=null:s!==null&&Pd(r,s)&&(t.flags|=32),Ev(e,t),$t(e,t,l,n),t.child;case 6:return e===null&&zd(t),null;case 13:return Tv(e,t,n);case 4:return gf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zs(t,null,r,n):$t(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zn(r,i),Sm(e,t,r,i,n);case 7:return $t(e,t,t.pendingProps,n),t.child;case 8:return $t(e,t,t.pendingProps.children,n),t.child;case 12:return $t(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,l=i.value,Ue(nu,r._currentValue),r._currentValue=l,s!==null)if(qn(s.value,l)){if(s.children===i.children&&!Zt.current){t=Tr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){l=s.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=jr(-1,n&-n),u.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),Ad(s.return,n,t),o.lanes|=n;break}u=u.next}}else if(s.tag===10)l=s.type===t.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(U(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Ad(l,n,t),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===t){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}$t(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ms(t,n),i=Cn(i),r=r(i),t.flags|=1,$t(e,t,r,n),t.child;case 14:return r=t.type,i=zn(r,t.pendingProps),i=zn(r.type,i),Cm(e,t,r,i,n);case 15:return Sv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zn(r,i),Ao(e,t),t.tag=1,en(r)?(e=!0,Zo(t)):e=!1,Ms(t,n),bv(t,r,i),Fd(t,r,i,n),_d(null,t,r,!0,e,n);case 19:return Lv(e,t,n);case 22:return Cv(e,t,n)}throw Error(U(156,t.tag))};function Wv(e,t){return vy(e,t)}function Gb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nn(e,t,n,r){return new Gb(e,t,n,r)}function Mf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yb(e){if(typeof e=="function")return Mf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gh)return 11;if(e===Yh)return 14}return 2}function di(e,t){var n=e.alternate;return n===null?(n=Nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Do(e,t,n,r,i,s){var l=2;if(r=e,typeof e=="function")Mf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case gs:return Wi(n.children,i,s,t);case Kh:l=8,i|=8;break;case ld:return e=Nn(12,n,t,i|2),e.elementType=ld,e.lanes=s,e;case ad:return e=Nn(13,n,t,i),e.elementType=ad,e.lanes=s,e;case od:return e=Nn(19,n,t,i),e.elementType=od,e.lanes=s,e;case ny:return $u(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ey:l=10;break e;case ty:l=9;break e;case Gh:l=11;break e;case Yh:l=14;break e;case Br:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Nn(l,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Wi(e,t,n,r){return e=Nn(7,e,r,t),e.lanes=n,e}function $u(e,t,n,r){return e=Nn(22,e,r,t),e.elementType=ny,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return e=Nn(6,e,null,t),e.lanes=n,e}function Ac(e,t,n){return t=Nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xb(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pc(0),this.expirationTimes=pc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Rf(e,t,n,r,i,s,l,o,u){return e=new Xb(e,t,n,o,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Nn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mf(s),e}function Jb(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ms,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qv(e){if(!e)return fi;e=e._reactInternals;e:{if(is(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(en(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(en(n))return Qy(e,n,t)}return t}function Kv(e,t,n,r,i,s,l,o,u){return e=Rf(n,r,!0,e,i,s,l,o,u),e.context=Qv(null),n=e.current,r=Ut(),i=ci(n),s=jr(r,i),s.callback=t??null,oi(n,s,i),e.current.lanes=i,Fa(e,i,r),tn(e,r),e}function Bu(e,t,n,r){var i=t.current,s=Ut(),l=ci(i);return n=Qv(n),t.context===null?t.context=n:t.pendingContext=n,t=jr(s,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=oi(i,t,l),e!==null&&($n(e,i,l,s),Mo(e,i,l)),l}function hu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Om(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zf(e,t){Om(e,t),(e=e.alternate)&&Om(e,t)}function Zb(){return null}var Gv=typeof reportError=="function"?reportError:function(e){console.error(e)};function Af(e){this._internalRoot=e}Uu.prototype.render=Af.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Bu(e,t,null,null)};Uu.prototype.unmount=Af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ji(function(){Bu(null,e,null,null)}),t[Er]=null}};function Uu(e){this._internalRoot=e}Uu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qr.length&&t!==0&&t<qr[n].priority;n++);qr.splice(n,0,e),n===0&&Py(e)}};function If(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _m(){}function ej(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=hu(l);s.call(c)}}var l=Kv(t,r,e,0,null,!1,!1,"",_m);return e._reactRootContainer=l,e[Er]=l.current,ua(e.nodeType===8?e.parentNode:e),Ji(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var c=hu(u);o.call(c)}}var u=Rf(e,0,!1,null,null,!1,!1,"",_m);return e._reactRootContainer=u,e[Er]=u.current,ua(e.nodeType===8?e.parentNode:e),Ji(function(){Bu(t,u,n,r)}),u}function Hu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i=="function"){var o=i;i=function(){var u=hu(l);o.call(u)}}Bu(t,l,e,i)}else l=ej(n,t,e,i,r);return hu(l)}Ny=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dl(t.pendingLanes);n!==0&&(Zh(t,n|1),tn(t,rt()),!(Le&6)&&(nl=rt()+500,yi()))}break;case 13:Ji(function(){var r=Pr(e,1);if(r!==null){var i=Ut();$n(r,e,1,i)}}),zf(e,1)}};ef=function(e){if(e.tag===13){var t=Pr(e,134217728);if(t!==null){var n=Ut();$n(t,e,134217728,n)}zf(e,134217728)}};Sy=function(e){if(e.tag===13){var t=ci(e),n=Pr(e,t);if(n!==null){var r=Ut();$n(n,e,t,r)}zf(e,t)}};Cy=function(){return Ie};Ey=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};yd=function(e,t,n){switch(t){case"input":if(dd(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Au(r);if(!i)throw Error(U(90));iy(r),dd(r,i)}}}break;case"textarea":ly(e,n);break;case"select":t=n.value,t!=null&&Es(e,!!n.multiple,t,!1)}};fy=Pf;py=Ji;var tj={usingClientEntryPoint:!1,Events:[Oa,ws,Au,dy,hy,Pf]},Pl={findFiberByHostInstance:zi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nj={bundleType:Pl.bundleType,version:Pl.version,rendererPackageName:Pl.rendererPackageName,rendererConfig:Pl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Mr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xy(e),e===null?null:e.stateNode},findFiberByHostInstance:Pl.findFiberByHostInstance||Zb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{Lu=yo.inject(nj),or=yo}catch{}}pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tj;pn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!If(t))throw Error(U(200));return Jb(e,t,null,n)};pn.createRoot=function(e,t){if(!If(e))throw Error(U(299));var n=!1,r="",i=Gv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Rf(e,1,!1,null,null,n,!1,r,i),e[Er]=t.current,ua(e.nodeType===8?e.parentNode:e),new Af(t)};pn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=xy(t),e=e===null?null:e.stateNode,e};pn.flushSync=function(e){return Ji(e)};pn.hydrate=function(e,t,n){if(!qu(t))throw Error(U(200));return Hu(null,e,t,!0,n)};pn.hydrateRoot=function(e,t,n){if(!If(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",l=Gv;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=Kv(t,null,e,1,n??null,i,!1,s,l),e[Er]=t.current,ua(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Uu(t)};pn.render=function(e,t,n){if(!qu(t))throw Error(U(200));return Hu(null,e,t,!1,n)};pn.unmountComponentAtNode=function(e){if(!qu(e))throw Error(U(40));return e._reactRootContainer?(Ji(function(){Hu(null,null,e,!1,function(){e._reactRootContainer=null,e[Er]=null})}),!0):!1};pn.unstable_batchedUpdates=Pf;pn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qu(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return Hu(e,t,n,!1,r)};pn.version="18.3.1-next-f1338f8080-20240426";function Yv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yv)}catch(e){console.error(e)}}Yv(),Yx.exports=pn;var Ff=Yx.exports;const rj=$h(Ff),ij=Ax({__proto__:null,default:rj},[Ff]);var Xv,$m=Ff;Xv=$m.createRoot,$m.hydrateRoot;var ss=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zi=typeof window>"u"||"Deno"in globalThis;function wn(){}function sj(e,t){return typeof e=="function"?e(t):e}function Xd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zs(e,t){return typeof e=="function"?e(t):e}function On(e,t){return typeof e=="function"?e(t):e}function Bm(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==Df(l,t.options))return!1}else if(!ya(t.queryKey,l))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||s&&!s(t))}function Um(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(es(t.options.mutationKey)!==es(s))return!1}else if(!ya(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Df(e,t){return((t==null?void 0:t.queryKeyHashFn)||es)(e)}function es(e){return JSON.stringify(e,(t,n)=>Jd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ya(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ya(e[n],t[n])):!1}function Of(e,t){if(e===t)return e;const n=qm(e)&&qm(t);if(n||Jd(e)&&Jd(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),l=s.length,o=n?[]:{};let u=0;for(let c=0;c<l;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,u++):(o[d]=Of(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&u++)}return i===l&&u===i?e:o}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function qm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jd(e){if(!Hm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Hm(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Hm(e){return Object.prototype.toString.call(e)==="[object Object]"}function lj(e){return new Promise(t=>{setTimeout(t,e)})}function Zd(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Of(e,t):t}function aj(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function oj(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var _f=Symbol();function Zv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===_f?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Di,Vr,Is,jx,uj=(jx=class extends ss{constructor(){super();ie(this,Di);ie(this,Vr);ie(this,Is);Q(this,Is,t=>{if(!Zi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,Vr)||this.setEventListener(E(this,Is))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Vr))==null||t.call(this),Q(this,Vr,void 0))}setEventListener(t){var n;Q(this,Is,t),(n=E(this,Vr))==null||n.call(this),Q(this,Vr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,Di)!==t&&(Q(this,Di,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,Di)=="boolean"?E(this,Di):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Di=new WeakMap,Vr=new WeakMap,Is=new WeakMap,jx),$f=new uj,Fs,Wr,Ds,Nx,cj=(Nx=class extends ss{constructor(){super();ie(this,Fs,!0);ie(this,Wr);ie(this,Ds);Q(this,Ds,t=>{if(!Zi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,Wr)||this.setEventListener(E(this,Ds))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Wr))==null||t.call(this),Q(this,Wr,void 0))}setEventListener(t){var n;Q(this,Ds,t),(n=E(this,Wr))==null||n.call(this),Q(this,Wr,t(this.setOnline.bind(this)))}setOnline(t){E(this,Fs)!==t&&(Q(this,Fs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,Fs)}},Fs=new WeakMap,Wr=new WeakMap,Ds=new WeakMap,Nx),pu=new cj;function eh(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function dj(e){return Math.min(1e3*2**e,3e4)}function e1(e){return(e??"online")==="online"?pu.isOnline():!0}var t1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ic(e){return e instanceof t1}function n1(e){let t=!1,n=0,r=!1,i;const s=eh(),l=x=>{var w;r||(p(new t1(x)),(w=e.abort)==null||w.call(e))},o=()=>{t=!0},u=()=>{t=!1},c=()=>$f.isFocused()&&(e.networkMode==="always"||pu.isOnline())&&e.canRun(),d=()=>e1(e.networkMode)&&e.canRun(),h=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},p=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},f=()=>new Promise(x=>{var w;i=m=>{(r||c())&&x(m)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),g=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(m){x=Promise.reject(m)}Promise.resolve(x).then(h).catch(m=>{var k;if(r)return;const y=e.retry??(Zi?0:3),v=e.retryDelay??dj,j=typeof v=="function"?v(n,m):v,C=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,m);if(t||!C){p(m);return}n++,(k=e.onFail)==null||k.call(e,n,m),lj(j).then(()=>c()?void 0:f()).then(()=>{t?p(m):g()})})};return{promise:s,cancel:l,continue:()=>(i==null||i(),s),cancelRetry:o,continueRetry:u,canStart:d,start:()=>(d()?g():f().then(g),s)}}function hj(){let e=[],t=0,n=o=>{o()},r=o=>{o()},i=o=>setTimeout(o,0);const s=o=>{t?e.push(o):i(()=>{n(o)})},l=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(u=>{n(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||l()}return u},batchCalls:o=>(...u)=>{s(()=>{o(...u)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var et=hj(),Oi,Sx,r1=(Sx=class{constructor(){ie(this,Oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xd(this.gcTime)&&Q(this,Oi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zi?1/0:5*60*1e3))}clearGcTimeout(){E(this,Oi)&&(clearTimeout(E(this,Oi)),Q(this,Oi,void 0))}},Oi=new WeakMap,Sx),Os,_s,xn,Lt,Ta,_i,An,xr,Cx,fj=(Cx=class extends r1{constructor(t){super();ie(this,An);ie(this,Os);ie(this,_s);ie(this,xn);ie(this,Lt);ie(this,Ta);ie(this,_i);Q(this,_i,!1),Q(this,Ta,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,xn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,Os,pj(this.options)),this.state=t.state??E(this,Os),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Lt))==null?void 0:t.promise}setOptions(t){this.options={...E(this,Ta),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,xn).remove(this)}setData(t,n){const r=Zd(this.state.data,t,this.options);return oe(this,An,xr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){oe(this,An,xr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=E(this,Lt))==null?void 0:r.promise;return(i=E(this,Lt))==null||i.cancel(t),n?n.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,Os))}isActive(){return this.observers.some(t=>On(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_f||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Jv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Lt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Lt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,xn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Lt)&&(E(this,_i)?E(this,Lt).cancel({revert:!0}):E(this,Lt).cancelRetry()),this.scheduleGc()),E(this,xn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||oe(this,An,xr).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Lt))return E(this,Lt).continueRetry(),E(this,Lt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(Q(this,_i,!0),r.signal)})},s=()=>{const h=Zv(this.options,n),p={queryKey:this.queryKey,meta:this.meta};return i(p),Q(this,_i,!1),this.options.persister?this.options.persister(h,p,this):h(p)},l={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(l),(u=this.options.behavior)==null||u.onFetch(l,this),Q(this,_s,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=l.fetchOptions)==null?void 0:c.meta))&&oe(this,An,xr).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta});const o=h=>{var p,f,g,x;Ic(h)&&h.silent||oe(this,An,xr).call(this,{type:"error",error:h}),Ic(h)||((f=(p=E(this,xn).config).onError)==null||f.call(p,h,this),(x=(g=E(this,xn).config).onSettled)==null||x.call(g,this.state.data,h,this)),this.scheduleGc()};return Q(this,Lt,n1({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,f,g,x;if(h===void 0){o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){o(w);return}(f=(p=E(this,xn).config).onSuccess)==null||f.call(p,h,this),(x=(g=E(this,xn).config).onSettled)==null||x.call(g,h,this.state.error,this),this.scheduleGc()},onError:o,onFail:(h,p)=>{oe(this,An,xr).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{oe(this,An,xr).call(this,{type:"pause"})},onContinue:()=>{oe(this,An,xr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),E(this,Lt).start()}},Os=new WeakMap,_s=new WeakMap,xn=new WeakMap,Lt=new WeakMap,Ta=new WeakMap,_i=new WeakMap,An=new WeakSet,xr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...i1(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Ic(i)&&i.revert&&E(this,_s)?{...E(this,_s),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,xn).notify({query:this,type:"updated",action:t})})},Cx);function i1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:e1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pj(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nr,Ex,mj=(Ex=class extends ss{constructor(t={}){super();ie(this,nr);this.config=t,Q(this,nr,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Df(i,n);let l=this.get(s);return l||(l=new fj({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){E(this,nr).has(t.queryHash)||(E(this,nr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,nr).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,nr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,nr).get(t)}getAll(){return[...E(this,nr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bm(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Bm(t,r)):n}notify(t){et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nr=new WeakMap,Ex),rr,Ot,$i,ir,_r,Px,gj=(Px=class extends r1{constructor(t){super();ie(this,ir);ie(this,rr);ie(this,Ot);ie(this,$i);this.mutationId=t.mutationId,Q(this,Ot,t.mutationCache),Q(this,rr,[]),this.state=t.state||s1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,rr).includes(t)||(E(this,rr).push(t),this.clearGcTimeout(),E(this,Ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,rr,E(this,rr).filter(n=>n!==t)),this.scheduleGc(),E(this,Ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,rr).length||(this.state.status==="pending"?this.scheduleGc():E(this,Ot).remove(this))}continue(){var t;return((t=E(this,$i))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,l,o,u,c,d,h,p,f,g,x,w,m,y,v,j,C,k,L;Q(this,$i,n1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(z,A)=>{oe(this,ir,_r).call(this,{type:"failed",failureCount:z,error:A})},onPause:()=>{oe(this,ir,_r).call(this,{type:"pause"})},onContinue:()=>{oe(this,ir,_r).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Ot).canRun(this)}));const n=this.state.status==="pending",r=!E(this,$i).canStart();try{if(!n){oe(this,ir,_r).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=E(this,Ot).config).onMutate)==null?void 0:s.call(i,t,this));const A=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,t));A!==this.state.context&&oe(this,ir,_r).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const z=await E(this,$i).start();return await((c=(u=E(this,Ot).config).onSuccess)==null?void 0:c.call(u,z,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,z,t,this.state.context)),await((f=(p=E(this,Ot).config).onSettled)==null?void 0:f.call(p,z,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,z,null,t,this.state.context)),oe(this,ir,_r).call(this,{type:"success",data:z}),z}catch(z){try{throw await((m=(w=E(this,Ot).config).onError)==null?void 0:m.call(w,z,t,this.state.context,this)),await((v=(y=this.options).onError)==null?void 0:v.call(y,z,t,this.state.context)),await((C=(j=E(this,Ot).config).onSettled)==null?void 0:C.call(j,void 0,z,this.state.variables,this.state.context,this)),await((L=(k=this.options).onSettled)==null?void 0:L.call(k,void 0,z,t,this.state.context)),z}finally{oe(this,ir,_r).call(this,{type:"error",error:z})}}finally{E(this,Ot).runNext(this)}}},rr=new WeakMap,Ot=new WeakMap,$i=new WeakMap,ir=new WeakSet,_r=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),et.batch(()=>{E(this,rr).forEach(r=>{r.onMutationUpdate(t)}),E(this,Ot).notify({mutation:this,type:"updated",action:t})})},Px);function s1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var on,La,Tx,xj=(Tx=class extends ss{constructor(t={}){super();ie(this,on);ie(this,La);this.config=t,Q(this,on,new Map),Q(this,La,Date.now())}build(t,n,r){const i=new gj({mutationCache:this,mutationId:++eo(this,La)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=vo(t),r=E(this,on).get(n)??[];r.push(t),E(this,on).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=vo(t);if(E(this,on).has(n)){const i=(r=E(this,on).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?E(this,on).delete(n):E(this,on).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=E(this,on).get(vo(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=E(this,on).get(vo(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...E(this,on).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Um(n,r))}findAll(t={}){return this.getAll().filter(n=>Um(t,n))}notify(t){et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return et.batch(()=>Promise.all(t.map(n=>n.continue().catch(wn))))}},on=new WeakMap,La=new WeakMap,Tx);function vo(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Vm(e){return{onFetch:(t,n)=>{var d,h,p,f,g;const r=t.options,i=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,s=((f=t.state.data)==null?void 0:f.pages)||[],l=((g=t.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const c=async()=>{let x=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},m=Zv(t.options,t.fetchOptions),y=async(v,j,C)=>{if(x)return Promise.reject();if(j==null&&v.pages.length)return Promise.resolve(v);const k={queryKey:t.queryKey,pageParam:j,direction:C?"backward":"forward",meta:t.options.meta};w(k);const L=await m(k),{maxPages:z}=t.options,A=C?oj:aj;return{pages:A(v.pages,L,z),pageParams:A(v.pageParams,j,z)}};if(i&&s.length){const v=i==="backward",j=v?yj:Wm,C={pages:s,pageParams:l},k=j(r,C);o=await y(C,k,v)}else{const v=e??s.length;do{const j=u===0?l[0]??r.initialPageParam:Wm(r,o);if(u>0&&j==null)break;o=await y(o,j),u++}while(u<v)}return o};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Wm(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function yj(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Je,Qr,Kr,$s,Bs,Gr,Us,qs,Lx,vj=(Lx=class{constructor(e={}){ie(this,Je);ie(this,Qr);ie(this,Kr);ie(this,$s);ie(this,Bs);ie(this,Gr);ie(this,Us);ie(this,qs);Q(this,Je,e.queryCache||new mj),Q(this,Qr,e.mutationCache||new xj),Q(this,Kr,e.defaultOptions||{}),Q(this,$s,new Map),Q(this,Bs,new Map),Q(this,Gr,0)}mount(){eo(this,Gr)._++,E(this,Gr)===1&&(Q(this,Us,$f.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Je).onFocus())})),Q(this,qs,pu.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Je).onOnline())})))}unmount(){var e,t;eo(this,Gr)._--,E(this,Gr)===0&&((e=E(this,Us))==null||e.call(this),Q(this,Us,void 0),(t=E(this,qs))==null||t.call(this),Q(this,qs,void 0))}isFetching(e){return E(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Qr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=E(this,Je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(zs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return E(this,Je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=E(this,Je).get(r.queryHash),s=i==null?void 0:i.state.data,l=sj(t,s);if(l!==void 0)return E(this,Je).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return et.batch(()=>E(this,Je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,Je);et.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,Je),r={type:"active",...e};return et.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=et.batch(()=>E(this,Je).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(wn).catch(wn)}invalidateQueries(e,t={}){return et.batch(()=>{if(E(this,Je).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=et.batch(()=>E(this,Je).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(wn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(wn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,Je).build(this,t);return n.isStaleByTime(zs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wn).catch(wn)}fetchInfiniteQuery(e){return e.behavior=Vm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wn).catch(wn)}ensureInfiniteQueryData(e){return e.behavior=Vm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pu.isOnline()?E(this,Qr).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Je)}getMutationCache(){return E(this,Qr)}getDefaultOptions(){return E(this,Kr)}setDefaultOptions(e){Q(this,Kr,e)}setQueryDefaults(e,t){E(this,$s).set(es(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,$s).values()],n={};return t.forEach(r=>{ya(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,Bs).set(es(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Bs).values()];let n={};return t.forEach(r=>{ya(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Kr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Df(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===_f&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Kr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Je).clear(),E(this,Qr).clear()}},Je=new WeakMap,Qr=new WeakMap,Kr=new WeakMap,$s=new WeakMap,Bs=new WeakMap,Gr=new WeakMap,Us=new WeakMap,qs=new WeakMap,Lx),Kt,Ce,Ma,_t,Bi,Hs,Yr,sr,Ra,Vs,Ws,Ui,qi,Xr,Qs,Ae,_l,th,nh,rh,ih,sh,lh,ah,l1,Mx,Bf=(Mx=class extends ss{constructor(t,n){super();ie(this,Ae);ie(this,Kt);ie(this,Ce);ie(this,Ma);ie(this,_t);ie(this,Bi);ie(this,Hs);ie(this,Yr);ie(this,sr);ie(this,Ra);ie(this,Vs);ie(this,Ws);ie(this,Ui);ie(this,qi);ie(this,Xr);ie(this,Qs,new Set);this.options=n,Q(this,Kt,t),Q(this,sr,null),Q(this,Yr,eh()),this.options.experimental_prefetchInRender||E(this,Yr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,Ce).addObserver(this),Qm(E(this,Ce),this.options)?oe(this,Ae,_l).call(this):this.updateResult(),oe(this,Ae,ih).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oh(E(this,Ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oh(E(this,Ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,oe(this,Ae,sh).call(this),oe(this,Ae,lh).call(this),E(this,Ce).removeObserver(this)}setOptions(t,n){const r=this.options,i=E(this,Ce);if(this.options=E(this,Kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof On(this.options.enabled,E(this,Ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");oe(this,Ae,ah).call(this),E(this,Ce).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&E(this,Kt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,Ce),observer:this});const s=this.hasListeners();s&&Km(E(this,Ce),i,this.options,r)&&oe(this,Ae,_l).call(this),this.updateResult(n),s&&(E(this,Ce)!==i||On(this.options.enabled,E(this,Ce))!==On(r.enabled,E(this,Ce))||zs(this.options.staleTime,E(this,Ce))!==zs(r.staleTime,E(this,Ce)))&&oe(this,Ae,th).call(this);const l=oe(this,Ae,nh).call(this);s&&(E(this,Ce)!==i||On(this.options.enabled,E(this,Ce))!==On(r.enabled,E(this,Ce))||l!==E(this,Xr))&&oe(this,Ae,rh).call(this,l)}getOptimisticResult(t){const n=E(this,Kt).getQueryCache().build(E(this,Kt),t),r=this.createResult(n,t);return kj(this,r)&&(Q(this,_t,r),Q(this,Hs,this.options),Q(this,Bi,E(this,Ce).state)),r}getCurrentResult(){return E(this,_t)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){E(this,Qs).add(t)}getCurrentQuery(){return E(this,Ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,Kt).defaultQueryOptions(t),r=E(this,Kt).getQueryCache().build(E(this,Kt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return oe(this,Ae,_l).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,_t)))}createResult(t,n){var z;const r=E(this,Ce),i=this.options,s=E(this,_t),l=E(this,Bi),o=E(this,Hs),c=t!==r?t.state:E(this,Ma),{state:d}=t;let h={...d},p=!1,f;if(n._optimisticResults){const A=this.hasListeners(),N=!A&&Qm(t,n),R=A&&Km(t,r,n,i);(N||R)&&(h={...h,...i1(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:x,status:w}=h;if(n.select&&h.data!==void 0)if(s&&h.data===(l==null?void 0:l.data)&&n.select===E(this,Ra))f=E(this,Vs);else try{Q(this,Ra,n.select),f=n.select(h.data),f=Zd(s==null?void 0:s.data,f,n),Q(this,Vs,f),Q(this,sr,null)}catch(A){Q(this,sr,A)}else f=h.data;if(n.placeholderData!==void 0&&f===void 0&&w==="pending"){let A;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))A=s.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((z=E(this,Ws))==null?void 0:z.state.data,E(this,Ws)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),Q(this,sr,null)}catch(N){Q(this,sr,N)}A!==void 0&&(w="success",f=Zd(s==null?void 0:s.data,A,n),p=!0)}E(this,sr)&&(g=E(this,sr),f=E(this,Vs),x=Date.now(),w="error");const m=h.fetchStatus==="fetching",y=w==="pending",v=w==="error",j=y&&m,C=f!==void 0,L={status:w,fetchStatus:h.fetchStatus,isPending:y,isSuccess:w==="success",isError:v,isInitialLoading:j,isLoading:j,data:f,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!y,isLoadingError:v&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:v&&C,isStale:Uf(t,n),refetch:this.refetch,promise:E(this,Yr)};if(this.options.experimental_prefetchInRender){const A=I=>{L.status==="error"?I.reject(L.error):L.data!==void 0&&I.resolve(L.data)},N=()=>{const I=Q(this,Yr,L.promise=eh());A(I)},R=E(this,Yr);switch(R.status){case"pending":t.queryHash===r.queryHash&&A(R);break;case"fulfilled":(L.status==="error"||L.data!==R.value)&&N();break;case"rejected":(L.status!=="error"||L.error!==R.reason)&&N();break}}return L}updateResult(t){const n=E(this,_t),r=this.createResult(E(this,Ce),this.options);if(Q(this,Bi,E(this,Ce).state),Q(this,Hs,this.options),E(this,Bi).data!==void 0&&Q(this,Ws,E(this,Ce)),fu(r,n))return;Q(this,_t,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,o=typeof l=="function"?l():l;if(o==="all"||!o&&!E(this,Qs).size)return!0;const u=new Set(o??E(this,Qs));return this.options.throwOnError&&u.add("error"),Object.keys(E(this,_t)).some(c=>{const d=c;return E(this,_t)[d]!==n[d]&&u.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),oe(this,Ae,l1).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&oe(this,Ae,ih).call(this)}},Kt=new WeakMap,Ce=new WeakMap,Ma=new WeakMap,_t=new WeakMap,Bi=new WeakMap,Hs=new WeakMap,Yr=new WeakMap,sr=new WeakMap,Ra=new WeakMap,Vs=new WeakMap,Ws=new WeakMap,Ui=new WeakMap,qi=new WeakMap,Xr=new WeakMap,Qs=new WeakMap,Ae=new WeakSet,_l=function(t){oe(this,Ae,ah).call(this);let n=E(this,Ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(wn)),n},th=function(){oe(this,Ae,sh).call(this);const t=zs(this.options.staleTime,E(this,Ce));if(Zi||E(this,_t).isStale||!Xd(t))return;const r=Jv(E(this,_t).dataUpdatedAt,t)+1;Q(this,Ui,setTimeout(()=>{E(this,_t).isStale||this.updateResult()},r))},nh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,Ce)):this.options.refetchInterval)??!1},rh=function(t){oe(this,Ae,lh).call(this),Q(this,Xr,t),!(Zi||On(this.options.enabled,E(this,Ce))===!1||!Xd(E(this,Xr))||E(this,Xr)===0)&&Q(this,qi,setInterval(()=>{(this.options.refetchIntervalInBackground||$f.isFocused())&&oe(this,Ae,_l).call(this)},E(this,Xr)))},ih=function(){oe(this,Ae,th).call(this),oe(this,Ae,rh).call(this,oe(this,Ae,nh).call(this))},sh=function(){E(this,Ui)&&(clearTimeout(E(this,Ui)),Q(this,Ui,void 0))},lh=function(){E(this,qi)&&(clearInterval(E(this,qi)),Q(this,qi,void 0))},ah=function(){const t=E(this,Kt).getQueryCache().build(E(this,Kt),this.options);if(t===E(this,Ce))return;const n=E(this,Ce);Q(this,Ce,t),Q(this,Ma,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},l1=function(t){et.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,_t))}),E(this,Kt).getQueryCache().notify({query:E(this,Ce),type:"observerResultsUpdated"})})},Mx);function wj(e,t){return On(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Qm(e,t){return wj(e,t)||e.state.data!==void 0&&oh(e,t,t.refetchOnMount)}function oh(e,t,n){if(On(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Uf(e,t)}return!1}function Km(e,t,n,r){return(e!==t||On(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Uf(e,n)}function Uf(e,t){return On(t.enabled,e)!==!1&&e.isStaleByTime(zs(t.staleTime,e))}function kj(e,t){return!fu(e.getCurrentResult(),t)}function Gm(e,t){return e.filter(n=>!t.includes(n))}function bj(e,t,n){const r=e.slice(0);return r[t]=n,r}var Ks,yn,Hi,Gs,vn,Jr,za,Aa,mt,uh,ch,Oo,dh,hh,Rx,jj=(Rx=class extends ss{constructor(t,n,r){super();ie(this,mt);ie(this,Ks);ie(this,yn);ie(this,Hi);ie(this,Gs);ie(this,vn);ie(this,Jr);ie(this,za);ie(this,Aa);Q(this,Ks,t),Q(this,Gs,r),Q(this,Hi,[]),Q(this,vn,[]),Q(this,yn,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&E(this,vn).forEach(t=>{t.subscribe(n=>{oe(this,mt,dh).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,E(this,vn).forEach(t=>{t.destroy()})}setQueries(t,n,r){Q(this,Hi,t),Q(this,Gs,n),et.batch(()=>{const i=E(this,vn),s=oe(this,mt,Oo).call(this,E(this,Hi));s.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions,r));const l=s.map(c=>c.observer),o=l.map(c=>c.getCurrentResult()),u=l.some((c,d)=>c!==i[d]);i.length===l.length&&!u||(Q(this,vn,l),Q(this,yn,o),this.hasListeners()&&(Gm(i,l).forEach(c=>{c.destroy()}),Gm(l,i).forEach(c=>{c.subscribe(d=>{oe(this,mt,dh).call(this,c,d)})}),oe(this,mt,hh).call(this)))})}getCurrentResult(){return E(this,yn)}getQueries(){return E(this,vn).map(t=>t.getCurrentQuery())}getObservers(){return E(this,vn)}getOptimisticResult(t,n){const i=oe(this,mt,Oo).call(this,t).map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions));return[i,s=>oe(this,mt,ch).call(this,s??i,n),()=>oe(this,mt,uh).call(this,i,t)]}},Ks=new WeakMap,yn=new WeakMap,Hi=new WeakMap,Gs=new WeakMap,vn=new WeakMap,Jr=new WeakMap,za=new WeakMap,Aa=new WeakMap,mt=new WeakSet,uh=function(t,n){const r=oe(this,mt,Oo).call(this,n);return r.map((i,s)=>{const l=t[s];return i.defaultedQueryOptions.notifyOnChangeProps?l:i.observer.trackResult(l,o=>{r.forEach(u=>{u.observer.trackProp(o)})})})},ch=function(t,n){return n?((!E(this,Jr)||E(this,yn)!==E(this,Aa)||n!==E(this,za))&&(Q(this,za,n),Q(this,Aa,E(this,yn)),Q(this,Jr,Of(E(this,Jr),n(t)))),E(this,Jr)):t},Oo=function(t){const n=new Map(E(this,vn).map(i=>[i.options.queryHash,i])),r=[];return t.forEach(i=>{const s=E(this,Ks).defaultQueryOptions(i),l=n.get(s.queryHash);l?r.push({defaultedQueryOptions:s,observer:l}):r.push({defaultedQueryOptions:s,observer:new Bf(E(this,Ks),s)})}),r},dh=function(t,n){const r=E(this,vn).indexOf(t);r!==-1&&(Q(this,yn,bj(E(this,yn),r,n)),oe(this,mt,hh).call(this))},hh=function(){var t;if(this.hasListeners()){const n=E(this,Jr),r=oe(this,mt,ch).call(this,oe(this,mt,uh).call(this,E(this,yn),E(this,Hi)),(t=E(this,Gs))==null?void 0:t.combine);n!==r&&et.batch(()=>{this.listeners.forEach(i=>{i(E(this,yn))})})}},Rx),Zr,ei,Gt,wr,Sr,_o,fh,zx,Nj=(zx=class extends ss{constructor(n,r){super();ie(this,Sr);ie(this,Zr);ie(this,ei);ie(this,Gt);ie(this,wr);Q(this,Zr,n),this.setOptions(r),this.bindMethods(),oe(this,Sr,_o).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=E(this,Zr).defaultMutationOptions(n),fu(this.options,r)||E(this,Zr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,Gt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&es(r.mutationKey)!==es(this.options.mutationKey)?this.reset():((i=E(this,Gt))==null?void 0:i.state.status)==="pending"&&E(this,Gt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=E(this,Gt))==null||n.removeObserver(this)}onMutationUpdate(n){oe(this,Sr,_o).call(this),oe(this,Sr,fh).call(this,n)}getCurrentResult(){return E(this,ei)}reset(){var n;(n=E(this,Gt))==null||n.removeObserver(this),Q(this,Gt,void 0),oe(this,Sr,_o).call(this),oe(this,Sr,fh).call(this)}mutate(n,r){var i;return Q(this,wr,r),(i=E(this,Gt))==null||i.removeObserver(this),Q(this,Gt,E(this,Zr).getMutationCache().build(E(this,Zr),this.options)),E(this,Gt).addObserver(this),E(this,Gt).execute(n)}},Zr=new WeakMap,ei=new WeakMap,Gt=new WeakMap,wr=new WeakMap,Sr=new WeakSet,_o=function(){var r;const n=((r=E(this,Gt))==null?void 0:r.state)??s1();Q(this,ei,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},fh=function(n){et.batch(()=>{var r,i,s,l,o,u,c,d;if(E(this,wr)&&this.hasListeners()){const h=E(this,ei).variables,p=E(this,ei).context;(n==null?void 0:n.type)==="success"?((i=(r=E(this,wr)).onSuccess)==null||i.call(r,n.data,h,p),(l=(s=E(this,wr)).onSettled)==null||l.call(s,n.data,null,h,p)):(n==null?void 0:n.type)==="error"&&((u=(o=E(this,wr)).onError)==null||u.call(o,n.error,h,p),(d=(c=E(this,wr)).onSettled)==null||d.call(c,void 0,n.error,h,p))}this.listeners.forEach(h=>{h(E(this,ei))})})},zx),a1=b.createContext(void 0),It=e=>{const t=b.useContext(a1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Sj=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(a1.Provider,{value:e,children:t})),o1=b.createContext(!1),u1=()=>b.useContext(o1);o1.Provider;function Cj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ej=b.createContext(Cj()),c1=()=>b.useContext(Ej);function d1(e,t){return typeof e=="function"?e(...t):!!e}function mu(){}var h1=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},f1=e=>{b.useEffect(()=>{e.clearReset()},[e])},p1=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&d1(n,[e.error,r]),m1=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},g1=(e,t)=>e.isLoading&&e.isFetching&&!t,ph=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,gu=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Pj({queries:e,...t},n){const r=It(),i=u1(),s=c1(),l=b.useMemo(()=>e.map(g=>{const x=r.defaultQueryOptions(g);return x._optimisticResults=i?"isRestoring":"optimistic",x}),[e,r,i]);l.forEach(g=>{m1(g),h1(g,s)}),f1(s);const[o]=b.useState(()=>new jj(r,l,t)),[u,c,d]=o.getOptimisticResult(l,t.combine);b.useSyncExternalStore(b.useCallback(g=>i?mu:o.subscribe(et.batchCalls(g)),[o,i]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),b.useEffect(()=>{o.setQueries(l,t,{listeners:!1})},[l,t,o]);const p=u.some((g,x)=>ph(l[x],g))?u.flatMap((g,x)=>{const w=l[x];if(w){const m=new Bf(r,w);if(ph(w,g))return gu(w,m,s);g1(g,i)&&gu(w,m,s)}return[]}):[];if(p.length>0)throw Promise.all(p);const f=u.find((g,x)=>{const w=l[x];return w&&p1({result:g,errorResetBoundary:s,throwOnError:w.throwOnError,query:r.getQueryCache().get(w.queryHash)})});if(f!=null&&f.error)throw f.error;return c(d())}function Tj(e,t,n){var d,h,p,f,g;const r=It(),i=u1(),s=c1(),l=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,l),l._optimisticResults=i?"isRestoring":"optimistic",m1(l),h1(l,s),f1(s);const o=!r.getQueryCache().get(l.queryHash),[u]=b.useState(()=>new t(r,l)),c=u.getOptimisticResult(l);if(b.useSyncExternalStore(b.useCallback(x=>{const w=i?mu:u.subscribe(et.batchCalls(x));return u.updateResult(),w},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(l,{listeners:!1})},[l,u]),ph(l,c))throw gu(l,u,s);if(p1({result:c,errorResetBoundary:s,throwOnError:l.throwOnError,query:r.getQueryCache().get(l.queryHash)}))throw c.error;if((f=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||f.call(p,l,c),l.experimental_prefetchInRender&&!Zi&&g1(c,i)){const x=o?gu(l,u,s):(g=r.getQueryCache().get(l.queryHash))==null?void 0:g.promise;x==null||x.catch(mu).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?c:u.trackResult(c)}function ge(e,t){return Tj(e,Bf)}function pi(e,t){const n=It(),[r]=b.useState(()=>new Nj(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const i=b.useSyncExternalStore(b.useCallback(l=>r.subscribe(et.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=b.useCallback((l,o)=>{r.mutate(l,o).catch(mu)},[r]);if(i.error&&d1(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function x1(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=x1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ae(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=x1(e))&&(r&&(r+=" "),r+=t);return r}/**
|
|
41
|
+
* @license lucide-react v0.468.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const Lj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.468.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var Mj={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"};/**
|
|
51
|
+
* @license lucide-react v0.468.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const Rj=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...o},u)=>b.createElement("svg",{ref:u,...Mj,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:y1("lucide",i),...o},[...l.map(([c,d])=>b.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
|
|
56
|
+
* @license lucide-react v0.468.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const G=(e,t)=>{const n=b.forwardRef(({className:r,...i},s)=>b.createElement(Rj,{ref:s,iconNode:t,className:y1(`lucide-${Lj(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
61
|
+
* @license lucide-react v0.468.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const zj=G("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
66
|
+
* @license lucide-react v0.468.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const qf=G("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
71
|
+
* @license lucide-react v0.468.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Vu=G("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
76
|
+
* @license lucide-react v0.468.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const v1=G("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
81
|
+
* @license lucide-react v0.468.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Ym=G("BookA",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"m8 13 4-7 4 7",key:"4rari8"}],["path",{d:"M9.1 11h5.7",key:"1gkovt"}]]);/**
|
|
86
|
+
* @license lucide-react v0.468.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Hf=G("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["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"}]]);/**
|
|
91
|
+
* @license lucide-react v0.468.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const va=G("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
96
|
+
* @license lucide-react v0.468.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const w1=G("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
101
|
+
* @license lucide-react v0.468.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Vf=G("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
106
|
+
* @license lucide-react v0.468.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const xu=G("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
111
|
+
* @license lucide-react v0.468.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const wa=G("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
116
|
+
* @license lucide-react v0.468.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Aj=G("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
121
|
+
* @license lucide-react v0.468.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const k1=G("CircleAlert",[["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"}]]);/**
|
|
126
|
+
* @license lucide-react v0.468.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const $a=G("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
131
|
+
* @license lucide-react v0.468.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const b1=G("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
|
|
136
|
+
* @license lucide-react v0.468.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const j1=G("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
141
|
+
* @license lucide-react v0.468.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const N1=G("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
|
|
146
|
+
* @license lucide-react v0.468.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Ij=G("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
151
|
+
* @license lucide-react v0.468.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Fj=G("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
156
|
+
* @license lucide-react v0.468.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Dj=G("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
161
|
+
* @license lucide-react v0.468.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const rl=G("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
166
|
+
* @license lucide-react v0.468.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Oj=G("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
|
|
171
|
+
* @license lucide-react v0.468.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const _j=G("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
176
|
+
* @license lucide-react v0.468.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Wf=G("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
181
|
+
* @license lucide-react v0.468.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const S1=G("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
186
|
+
* @license lucide-react v0.468.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const il=G("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
191
|
+
* @license lucide-react v0.468.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const $j=G("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
196
|
+
* @license lucide-react v0.468.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const C1=G("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
201
|
+
* @license lucide-react v0.468.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const Bj=G("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
|
206
|
+
* @license lucide-react v0.468.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const E1=G("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
|
|
211
|
+
* @license lucide-react v0.468.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const P1=G("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
216
|
+
* @license lucide-react v0.468.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const T1=G("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]]);/**
|
|
221
|
+
* @license lucide-react v0.468.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const L1=G("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"}]]);/**
|
|
226
|
+
* @license lucide-react v0.468.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const ka=G("Footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]);/**
|
|
231
|
+
* @license lucide-react v0.468.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const Uj=G("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
236
|
+
* @license lucide-react v0.468.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const qj=G("GitCompareArrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);/**
|
|
241
|
+
* @license lucide-react v0.468.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const M1=G("GitCompare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);/**
|
|
246
|
+
* @license lucide-react v0.468.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const ba=G("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
|
|
251
|
+
* @license lucide-react v0.468.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const ja=G("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
|
256
|
+
* @license lucide-react v0.468.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const Hj=G("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["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"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
261
|
+
* @license lucide-react v0.468.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Vj=G("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
266
|
+
* @license lucide-react v0.468.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const Wj=G("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
|
|
271
|
+
* @license lucide-react v0.468.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const cr=G("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
276
|
+
* @license lucide-react v0.468.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const Qf=G("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
281
|
+
* @license lucide-react v0.468.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const sl=G("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
286
|
+
* @license lucide-react v0.468.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const R1=G("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
291
|
+
* @license lucide-react v0.468.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const z1=G("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
|
296
|
+
* @license lucide-react v0.468.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const Qj=G("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
301
|
+
* @license lucide-react v0.468.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const Na=G("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
306
|
+
* @license lucide-react v0.468.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const Kj=G("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
311
|
+
* @license lucide-react v0.468.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Gj=G("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
316
|
+
* @license lucide-react v0.468.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const A1=G("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
321
|
+
* @license lucide-react v0.468.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const Yj=G("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
326
|
+
* @license lucide-react v0.468.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const I1=G("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
331
|
+
* @license lucide-react v0.468.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const Xj=G("RefreshCw",[["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"}]]);/**
|
|
336
|
+
* @license lucide-react v0.468.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const F1=G("RotateCcw",[["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"}]]);/**
|
|
341
|
+
* @license lucide-react v0.468.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const Kf=G("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
|
|
346
|
+
* @license lucide-react v0.468.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const hl=G("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
351
|
+
* @license lucide-react v0.468.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const D1=G("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
356
|
+
* @license lucide-react v0.468.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const Jj=G("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
361
|
+
* @license lucide-react v0.468.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const Gf=G("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
366
|
+
* @license lucide-react v0.468.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const Zj=G("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
371
|
+
* @license lucide-react v0.468.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const e2=G("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
376
|
+
* @license lucide-react v0.468.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const mh=G("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);/**
|
|
381
|
+
* @license lucide-react v0.468.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const t2=G("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"}]]);/**
|
|
386
|
+
* @license lucide-react v0.468.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const n2=G("Sunrise",[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]]);/**
|
|
391
|
+
* @license lucide-react v0.468.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const yu=G("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
|
396
|
+
* @license lucide-react v0.468.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const r2=G("TimerReset",[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]]);/**
|
|
401
|
+
* @license lucide-react v0.468.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const dr=G("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
406
|
+
* @license lucide-react v0.468.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const Yf=G("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
411
|
+
* @license lucide-react v0.468.0 - ISC
|
|
412
|
+
*
|
|
413
|
+
* This source code is licensed under the ISC license.
|
|
414
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
+
*/const vi=G("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
416
|
+
* @license lucide-react v0.468.0 - ISC
|
|
417
|
+
*
|
|
418
|
+
* This source code is licensed under the ISC license.
|
|
419
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
+
*/const Xm=G("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/**
|
|
421
|
+
* @remix-run/router v1.21.0
|
|
422
|
+
*
|
|
423
|
+
* Copyright (c) Remix Software Inc.
|
|
424
|
+
*
|
|
425
|
+
* This source code is licensed under the MIT license found in the
|
|
426
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
427
|
+
*
|
|
428
|
+
* @license MIT
|
|
429
|
+
*/function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ve.apply(this,arguments)}var at;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(at||(at={}));const Jm="popstate";function i2(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:l,hash:o}=r.location;return Sa("",{pathname:s,search:l,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ts(i)}return l2(t,n,null,e)}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ll(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function s2(){return Math.random().toString(36).substr(2,8)}function Zm(e,t){return{usr:e.state,key:e.key,idx:t}}function Sa(e,t,n,r){return n===void 0&&(n=null),Ve({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?wi(t):t,{state:n,key:t&&t.key||r||s2()})}function ts(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function wi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function l2(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,l=i.history,o=at.Pop,u=null,c=d();c==null&&(c=0,l.replaceState(Ve({},l.state,{idx:c}),""));function d(){return(l.state||{idx:null}).idx}function h(){o=at.Pop;let w=d(),m=w==null?null:w-c;c=w,u&&u({action:o,location:x.location,delta:m})}function p(w,m){o=at.Push;let y=Sa(x.location,w,m);c=d()+1;let v=Zm(y,c),j=x.createHref(y);try{l.pushState(v,"",j)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(j)}s&&u&&u({action:o,location:x.location,delta:1})}function f(w,m){o=at.Replace;let y=Sa(x.location,w,m);c=d();let v=Zm(y,c),j=x.createHref(y);l.replaceState(v,"",j),s&&u&&u({action:o,location:x.location,delta:0})}function g(w){let m=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof w=="string"?w:ts(w);return y=y.replace(/ $/,"%20"),ke(m,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,m)}let x={get action(){return o},get location(){return e(i,l)},listen(w){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(Jm,h),u=w,()=>{i.removeEventListener(Jm,h),u=null}},createHref(w){return t(i,w)},createURL:g,encodeLocation(w){let m=g(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:f,go(w){return l.go(w)}};return x}var De;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(De||(De={}));const a2=new Set(["lazy","caseSensitive","path","id","index","children"]);function o2(e){return e.index===!0}function vu(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,s)=>{let l=[...n,String(s)],o=typeof i.id=="string"?i.id:l.join("-");if(ke(i.index!==!0||!i.children,"Cannot specify children on an index route"),ke(!r[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),o2(i)){let u=Ve({},i,t(i),{id:o});return r[o]=u,u}else{let u=Ve({},i,t(i),{id:o,children:void 0});return r[o]=u,i.children&&(u.children=vu(i.children,t,l,r)),u}})}function Mi(e,t,n){return n===void 0&&(n="/"),$o(e,t,n,!1)}function $o(e,t,n,r){let i=typeof t=="string"?wi(t):t,s=Lr(i.pathname||"/",n);if(s==null)return null;let l=O1(e);c2(l);let o=null;for(let u=0;o==null&&u<l.length;++u){let c=k2(s);o=v2(l[u],c,r)}return o}function u2(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function O1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,l,o)=>{let u={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};u.relativePath.startsWith("/")&&(ke(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=Nr([r,u.relativePath]),d=n.concat(u);s.children&&s.children.length>0&&(ke(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),O1(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:x2(c,s.index),routesMeta:d})};return e.forEach((s,l)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,l);else for(let u of _1(s.path))i(s,l,u)}),t}function _1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let l=_1(r.join("/")),o=[];return o.push(...l.map(u=>u===""?s:[s,u].join("/"))),i&&o.push(...l),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function c2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:y2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const d2=/^:[\w-]+$/,h2=3,f2=2,p2=1,m2=10,g2=-2,eg=e=>e==="*";function x2(e,t){let n=e.split("/"),r=n.length;return n.some(eg)&&(r+=g2),t&&(r+=f2),n.filter(i=>!eg(i)).reduce((i,s)=>i+(d2.test(s)?h2:s===""?p2:m2),r)}function y2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function v2(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},s="/",l=[];for(let o=0;o<r.length;++o){let u=r[o],c=o===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",h=wu({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),p=u.route;if(!h&&c&&n&&!r[r.length-1].route.index&&(h=wu({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!h)return null;Object.assign(i,h.params),l.push({params:i,pathname:Nr([s,h.pathname]),pathnameBase:N2(Nr([s,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(s=Nr([s,h.pathnameBase]))}return l}function wu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=w2(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((c,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let x=o[h]||"";l=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const g=o[h];return f&&!g?c[p]=void 0:c[p]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:l,pattern:e}}function w2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ll(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function k2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ll(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Lr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function b2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?wi(e):e;return{pathname:n?n.startsWith("/")?n:j2(n,t):t,search:S2(r),hash:C2(i)}}function j2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Fc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function $1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Wu(e,t){let n=$1(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qu(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=wi(e):(i=Ve({},e),ke(!i.pathname||!i.pathname.includes("?"),Fc("?","pathname","search",i)),ke(!i.pathname||!i.pathname.includes("#"),Fc("#","pathname","hash",i)),ke(!i.search||!i.search.includes("#"),Fc("#","search","hash",i)));let s=e===""||i.pathname==="",l=s?"/":i.pathname,o;if(l==null)o=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}o=h>=0?t[h]:"/"}let u=b2(i,o),c=l&&l!=="/"&&l.endsWith("/"),d=(s||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Nr=e=>e.join("/").replace(/\/\/+/g,"/"),N2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),S2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,C2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ku{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ku(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const B1=["post","put","patch","delete"],E2=new Set(B1),P2=["get",...B1],T2=new Set(P2),L2=new Set([301,302,303,307,308]),M2=new Set([307,308]),Dc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},R2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,z2=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),U1="remix-router-transitions";function A2(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;i=F=>({hasErrorBoundary:M(F)})}else i=z2;let s={},l=vu(e.routes,i,void 0,s),o,u=e.basename||"/",c=e.dataStrategy||O2,d=e.patchRoutesOnNavigation,h=Ve({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,f=new Set,g=null,x=null,w=null,m=e.hydrationData!=null,y=Mi(l,e.history.location,u),v=null;if(y==null&&!d){let M=Yt(404,{pathname:e.history.location.pathname}),{matches:F,route:D}=dg(l);y=F,v={[D.id]:M}}y&&!e.hydrationData&&Ya(y,l,e.history.location.pathname).active&&(y=null);let j;if(y)if(y.some(M=>M.route.lazy))j=!1;else if(!y.some(M=>M.route.loader))j=!0;else if(h.v7_partialHydration){let M=e.hydrationData?e.hydrationData.loaderData:null,F=e.hydrationData?e.hydrationData.errors:null;if(F){let D=y.findIndex($=>F[$.route.id]!==void 0);j=y.slice(0,D+1).every($=>!xh($.route,M,F))}else j=y.every(D=>!xh(D.route,M,F))}else j=e.hydrationData!=null;else if(j=!1,y=[],h.v7_partialHydration){let M=Ya(null,l,e.history.location.pathname);M.active&&M.matches&&(y=M.matches)}let C,k={historyAction:e.history.action,location:e.history.location,matches:y,initialized:j,navigation:Dc,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},L=at.Pop,z=!1,A,N=!1,R=new Map,I=null,W=!1,V=!1,_=[],Y=new Set,K=new Map,H=0,ee=-1,S=new Map,ce=new Set,ye=new Map,P=new Map,Ee=new Set,Fe=new Map,ve=new Map,je;function Dt(){if(p=e.history.listen(M=>{let{action:F,location:D,delta:$}=M;if(je){je(),je=void 0;return}ll(ve.size===0||$!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let J=as({currentLocation:k.location,nextLocation:D,historyAction:F});if(J&&$!=null){let se=new Promise(pe=>{je=pe});e.history.go($*-1),Si(J,{state:"blocked",location:D,proceed(){Si(J,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),se.then(()=>e.history.go($))},reset(){let pe=new Map(k.blockers);pe.set(J,Tl),$e({blockers:pe})}});return}return Wt(F,D)}),n){J2(t,R);let M=()=>Z2(t,R);t.addEventListener("pagehide",M),I=()=>t.removeEventListener("pagehide",M)}return k.initialized||Wt(at.Pop,k.location,{initialHydration:!0}),C}function rn(){p&&p(),I&&I(),f.clear(),A&&A.abort(),k.fetchers.forEach((M,F)=>he(F)),k.blockers.forEach((M,F)=>Fr(F))}function Ct(M){return f.add(M),()=>f.delete(M)}function $e(M,F){F===void 0&&(F={}),k=Ve({},k,M);let D=[],$=[];h.v7_fetcherPersist&&k.fetchers.forEach((J,se)=>{J.state==="idle"&&(Ee.has(se)?$.push(se):D.push(se))}),[...f].forEach(J=>J(k,{deletedFetchers:$,viewTransitionOpts:F.viewTransitionOpts,flushSync:F.flushSync===!0})),h.v7_fetcherPersist&&(D.forEach(J=>k.fetchers.delete(J)),$.forEach(J=>he(J)))}function it(M,F,D){var $,J;let{flushSync:se}=D===void 0?{}:D,pe=k.actionData!=null&&k.navigation.formMethod!=null&&Fn(k.navigation.formMethod)&&k.navigation.state==="loading"&&(($=M.state)==null?void 0:$._isRedirect)!==!0,te;F.actionData?Object.keys(F.actionData).length>0?te=F.actionData:te=null:pe?te=k.actionData:te=null;let re=F.loaderData?ug(k.loaderData,F.loaderData,F.matches||[],F.errors):k.loaderData,Z=k.blockers;Z.size>0&&(Z=new Map(Z),Z.forEach((Te,yt)=>Z.set(yt,Tl)));let le=z===!0||k.navigation.formMethod!=null&&Fn(k.navigation.formMethod)&&((J=M.state)==null?void 0:J._isRedirect)!==!0;o&&(l=o,o=void 0),W||L===at.Pop||(L===at.Push?e.history.push(M,M.state):L===at.Replace&&e.history.replace(M,M.state));let Se;if(L===at.Pop){let Te=R.get(k.location.pathname);Te&&Te.has(M.pathname)?Se={currentLocation:k.location,nextLocation:M}:R.has(M.pathname)&&(Se={currentLocation:M,nextLocation:k.location})}else if(N){let Te=R.get(k.location.pathname);Te?Te.add(M.pathname):(Te=new Set([M.pathname]),R.set(k.location.pathname,Te)),Se={currentLocation:k.location,nextLocation:M}}$e(Ve({},F,{actionData:te,loaderData:re,historyAction:L,location:M,initialized:!0,navigation:Dc,revalidation:"idle",restoreScrollPosition:Ep(M,F.matches||k.matches),preventScrollReset:le,blockers:Z}),{viewTransitionOpts:Se,flushSync:se===!0}),L=at.Pop,z=!1,N=!1,W=!1,V=!1,_=[]}async function Pn(M,F){if(typeof M=="number"){e.history.go(M);return}let D=gh(k.location,k.matches,u,h.v7_prependBasename,M,h.v7_relativeSplatPath,F==null?void 0:F.fromRouteId,F==null?void 0:F.relative),{path:$,submission:J,error:se}=tg(h.v7_normalizeFormMethod,!1,D,F),pe=k.location,te=Sa(k.location,$,F&&F.state);te=Ve({},te,e.history.encodeLocation(te));let re=F&&F.replace!=null?F.replace:void 0,Z=at.Push;re===!0?Z=at.Replace:re===!1||J!=null&&Fn(J.formMethod)&&J.formAction===k.location.pathname+k.location.search&&(Z=at.Replace);let le=F&&"preventScrollReset"in F?F.preventScrollReset===!0:void 0,Se=(F&&F.flushSync)===!0,Te=as({currentLocation:pe,nextLocation:te,historyAction:Z});if(Te){Si(Te,{state:"blocked",location:te,proceed(){Si(Te,{state:"proceeding",proceed:void 0,reset:void 0,location:te}),Pn(M,F)},reset(){let yt=new Map(k.blockers);yt.set(Te,Tl),$e({blockers:yt})}});return}return await Wt(Z,te,{submission:J,pendingError:se,preventScrollReset:le,replace:F&&F.replace,enableViewTransition:F&&F.viewTransition,flushSync:Se})}function Tn(){if(Ln(),$e({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){Wt(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}Wt(L||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:N===!0})}}async function Wt(M,F,D){A&&A.abort(),A=null,L=M,W=(D&&D.startUninterruptedRevalidation)===!0,bw(k.location,k.matches),z=(D&&D.preventScrollReset)===!0,N=(D&&D.enableViewTransition)===!0;let $=o||l,J=D&&D.overrideNavigation,se=Mi($,F,u),pe=(D&&D.flushSync)===!0,te=Ya(se,$,F.pathname);if(te.active&&te.matches&&(se=te.matches),!se){let{error:Be,notFoundMatches:ze,route:Ye}=xt(F.pathname);it(F,{matches:ze,loaderData:{},errors:{[Ye.id]:Be}},{flushSync:pe});return}if(k.initialized&&!V&&H2(k.location,F)&&!(D&&D.submission&&Fn(D.submission.formMethod))){it(F,{matches:se},{flushSync:pe});return}A=new AbortController;let re=hs(e.history,F,A.signal,D&&D.submission),Z;if(D&&D.pendingError)Z=[Ri(se).route.id,{type:De.error,error:D.pendingError}];else if(D&&D.submission&&Fn(D.submission.formMethod)){let Be=await Qn(re,F,D.submission,se,te.active,{replace:D.replace,flushSync:pe});if(Be.shortCircuited)return;if(Be.pendingActionResult){let[ze,Ye]=Be.pendingActionResult;if(cn(Ye)&&Ku(Ye.error)&&Ye.error.status===404){A=null,it(F,{matches:Be.matches,loaderData:{},errors:{[ze]:Ye.error}});return}}se=Be.matches||se,Z=Be.pendingActionResult,J=Oc(F,D.submission),pe=!1,te.active=!1,re=hs(e.history,re.url,re.signal)}let{shortCircuited:le,matches:Se,loaderData:Te,errors:yt}=await sn(re,F,se,te.active,J,D&&D.submission,D&&D.fetcherSubmission,D&&D.replace,D&&D.initialHydration===!0,pe,Z);le||(A=null,it(F,Ve({matches:Se||se},cg(Z),{loaderData:Te,errors:yt})))}async function Qn(M,F,D,$,J,se){se===void 0&&(se={}),Ln();let pe=Y2(F,D);if($e({navigation:pe},{flushSync:se.flushSync===!0}),J){let Z=await Xa($,F.pathname,M.signal);if(Z.type==="aborted")return{shortCircuited:!0};if(Z.type==="error"){let le=Ri(Z.partialMatches).route.id;return{matches:Z.partialMatches,pendingActionResult:[le,{type:De.error,error:Z.error}]}}else if(Z.matches)$=Z.matches;else{let{notFoundMatches:le,error:Se,route:Te}=xt(F.pathname);return{matches:le,pendingActionResult:[Te.id,{type:De.error,error:Se}]}}}let te,re=$l($,F);if(!re.route.action&&!re.route.lazy)te={type:De.error,error:Yt(405,{method:M.method,pathname:F.pathname,routeId:re.route.id})};else if(te=(await xe("action",k,M,[re],$,null))[re.route.id],M.signal.aborted)return{shortCircuited:!0};if(Fi(te)){let Z;return se&&se.replace!=null?Z=se.replace:Z=lg(te.response.headers.get("Location"),new URL(M.url),u)===k.location.pathname+k.location.search,await T(M,te,!0,{submission:D,replace:Z}),{shortCircuited:!0}}if(ri(te))throw Yt(400,{type:"defer-action"});if(cn(te)){let Z=Ri($,re.route.id);return(se&&se.replace)!==!0&&(L=at.Push),{matches:$,pendingActionResult:[Z.route.id,te]}}return{matches:$,pendingActionResult:[re.route.id,te]}}async function sn(M,F,D,$,J,se,pe,te,re,Z,le){let Se=J||Oc(F,se),Te=se||pe||fg(Se),yt=!W&&(!h.v7_partialHydration||!re);if($){if(yt){let Xe=Kn(le);$e(Ve({navigation:Se},Xe!==void 0?{actionData:Xe}:{}),{flushSync:Z})}let Me=await Xa(D,F.pathname,M.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){let Xe=Ri(Me.partialMatches).route.id;return{matches:Me.partialMatches,loaderData:{},errors:{[Xe]:Me.error}}}else if(Me.matches)D=Me.matches;else{let{error:Xe,notFoundMatches:us,route:wl}=xt(F.pathname);return{matches:us,loaderData:{},errors:{[wl.id]:Xe}}}}let Be=o||l,[ze,Ye]=rg(e.history,k,D,Te,F,h.v7_partialHydration&&re===!0,h.v7_skipActionErrorRevalidation,V,_,Y,Ee,ye,ce,Be,u,le);if(Xn(Me=>!(D&&D.some(Xe=>Xe.route.id===Me))||ze&&ze.some(Xe=>Xe.route.id===Me)),ee=++H,ze.length===0&&Ye.length===0){let Me=ln();return it(F,Ve({matches:D,loaderData:{},errors:le&&cn(le[1])?{[le[0]]:le[1].error}:null},cg(le),Me?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Z}),{shortCircuited:!0}}if(yt){let Me={};if(!$){Me.navigation=Se;let Xe=Kn(le);Xe!==void 0&&(Me.actionData=Xe)}Ye.length>0&&(Me.fetchers=pr(Ye)),$e(Me,{flushSync:Z})}Ye.forEach(Me=>{Pe(Me.key),Me.controller&&K.set(Me.key,Me.controller)});let os=()=>Ye.forEach(Me=>Pe(Me.key));A&&A.signal.addEventListener("abort",os);let{loaderResults:yl,fetcherResults:gr}=await ut(k,D,ze,Ye,M);if(M.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",os),Ye.forEach(Me=>K.delete(Me.key));let Jn=wo(yl);if(Jn)return await T(M,Jn.result,!0,{replace:te}),{shortCircuited:!0};if(Jn=wo(gr),Jn)return ce.add(Jn.key),await T(M,Jn.result,!0,{replace:te}),{shortCircuited:!0};let{loaderData:ac,errors:vl}=og(k,D,yl,le,Ye,gr,Fe);Fe.forEach((Me,Xe)=>{Me.subscribe(us=>{(us||Me.done)&&Fe.delete(Xe)})}),h.v7_partialHydration&&re&&k.errors&&(vl=Ve({},k.errors,vl));let Ci=ln(),Ja=Ir(ee),Za=Ci||Ja||Ye.length>0;return Ve({matches:D,loaderData:ac,errors:vl},Za?{fetchers:new Map(k.fetchers)}:{})}function Kn(M){if(M&&!cn(M[1]))return{[M[0]]:M[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function pr(M){return M.forEach(F=>{let D=k.fetchers.get(F.key),$=Ll(void 0,D?D.data:void 0);k.fetchers.set(F.key,$)}),new Map(k.fetchers)}function Gn(M,F,D,$){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Pe(M);let J=($&&$.flushSync)===!0,se=o||l,pe=gh(k.location,k.matches,u,h.v7_prependBasename,D,h.v7_relativeSplatPath,F,$==null?void 0:$.relative),te=Mi(se,pe,u),re=Ya(te,se,pe);if(re.active&&re.matches&&(te=re.matches),!te){B(M,F,Yt(404,{pathname:pe}),{flushSync:J});return}let{path:Z,submission:le,error:Se}=tg(h.v7_normalizeFormMethod,!0,pe,$);if(Se){B(M,F,Se,{flushSync:J});return}let Te=$l(te,Z),yt=($&&$.preventScrollReset)===!0;if(le&&Fn(le.formMethod)){Yn(M,F,Z,Te,te,re.active,J,yt,le);return}ye.set(M,{routeId:F,path:Z}),mr(M,F,Z,Te,te,re.active,J,yt,le)}async function Yn(M,F,D,$,J,se,pe,te,re){Ln(),ye.delete(M);function Z(st){if(!st.route.action&&!st.route.lazy){let cs=Yt(405,{method:re.formMethod,pathname:D,routeId:F});return B(M,F,cs,{flushSync:pe}),!0}return!1}if(!se&&Z($))return;let le=k.fetchers.get(M);O(M,X2(re,le),{flushSync:pe});let Se=new AbortController,Te=hs(e.history,D,Se.signal,re);if(se){let st=await Xa(J,D,Te.signal);if(st.type==="aborted")return;if(st.type==="error"){B(M,F,st.error,{flushSync:pe});return}else if(st.matches){if(J=st.matches,$=$l(J,D),Z($))return}else{B(M,F,Yt(404,{pathname:D}),{flushSync:pe});return}}K.set(M,Se);let yt=H,ze=(await xe("action",k,Te,[$],J,M))[$.route.id];if(Te.signal.aborted){K.get(M)===Se&&K.delete(M);return}if(h.v7_fetcherPersist&&Ee.has(M)){if(Fi(ze)||cn(ze)){O(M,$r(void 0));return}}else{if(Fi(ze))if(K.delete(M),ee>yt){O(M,$r(void 0));return}else return ce.add(M),O(M,Ll(re)),T(Te,ze,!1,{fetcherSubmission:re,preventScrollReset:te});if(cn(ze)){B(M,F,ze.error);return}}if(ri(ze))throw Yt(400,{type:"defer-action"});let Ye=k.navigation.location||k.location,os=hs(e.history,Ye,Se.signal),yl=o||l,gr=k.navigation.state!=="idle"?Mi(yl,k.navigation.location,u):k.matches;ke(gr,"Didn't find any matches after fetcher action");let Jn=++H;S.set(M,Jn);let ac=Ll(re,ze.data);k.fetchers.set(M,ac);let[vl,Ci]=rg(e.history,k,gr,re,Ye,!1,h.v7_skipActionErrorRevalidation,V,_,Y,Ee,ye,ce,yl,u,[$.route.id,ze]);Ci.filter(st=>st.key!==M).forEach(st=>{let cs=st.key,Pp=k.fetchers.get(cs),Sw=Ll(void 0,Pp?Pp.data:void 0);k.fetchers.set(cs,Sw),Pe(cs),st.controller&&K.set(cs,st.controller)}),$e({fetchers:new Map(k.fetchers)});let Ja=()=>Ci.forEach(st=>Pe(st.key));Se.signal.addEventListener("abort",Ja);let{loaderResults:Za,fetcherResults:Me}=await ut(k,gr,vl,Ci,os);if(Se.signal.aborted)return;Se.signal.removeEventListener("abort",Ja),S.delete(M),K.delete(M),Ci.forEach(st=>K.delete(st.key));let Xe=wo(Za);if(Xe)return T(os,Xe.result,!1,{preventScrollReset:te});if(Xe=wo(Me),Xe)return ce.add(Xe.key),T(os,Xe.result,!1,{preventScrollReset:te});let{loaderData:us,errors:wl}=og(k,gr,Za,void 0,Ci,Me,Fe);if(k.fetchers.has(M)){let st=$r(ze.data);k.fetchers.set(M,st)}Ir(Jn),k.navigation.state==="loading"&&Jn>ee?(ke(L,"Expected pending action"),A&&A.abort(),it(k.navigation.location,{matches:gr,loaderData:us,errors:wl,fetchers:new Map(k.fetchers)})):($e({errors:wl,loaderData:ug(k.loaderData,us,gr,wl),fetchers:new Map(k.fetchers)}),V=!1)}async function mr(M,F,D,$,J,se,pe,te,re){let Z=k.fetchers.get(M);O(M,Ll(re,Z?Z.data:void 0),{flushSync:pe});let le=new AbortController,Se=hs(e.history,D,le.signal);if(se){let ze=await Xa(J,D,Se.signal);if(ze.type==="aborted")return;if(ze.type==="error"){B(M,F,ze.error,{flushSync:pe});return}else if(ze.matches)J=ze.matches,$=$l(J,D);else{B(M,F,Yt(404,{pathname:D}),{flushSync:pe});return}}K.set(M,le);let Te=H,Be=(await xe("loader",k,Se,[$],J,M))[$.route.id];if(ri(Be)&&(Be=await Jf(Be,Se.signal,!0)||Be),K.get(M)===le&&K.delete(M),!Se.signal.aborted){if(Ee.has(M)){O(M,$r(void 0));return}if(Fi(Be))if(ee>Te){O(M,$r(void 0));return}else{ce.add(M),await T(Se,Be,!1,{preventScrollReset:te});return}if(cn(Be)){B(M,F,Be.error);return}ke(!ri(Be),"Unhandled fetcher deferred data"),O(M,$r(Be.data))}}async function T(M,F,D,$){let{submission:J,fetcherSubmission:se,preventScrollReset:pe,replace:te}=$===void 0?{}:$;F.response.headers.has("X-Remix-Revalidate")&&(V=!0);let re=F.response.headers.get("Location");ke(re,"Expected a Location header on the redirect Response"),re=lg(re,new URL(M.url),u);let Z=Sa(k.location,re,{_isRedirect:!0});if(n){let ze=!1;if(F.response.headers.has("X-Remix-Reload-Document"))ze=!0;else if(Xf.test(re)){const Ye=e.history.createURL(re);ze=Ye.origin!==t.location.origin||Lr(Ye.pathname,u)==null}if(ze){te?t.location.replace(re):t.location.assign(re);return}}A=null;let le=te===!0||F.response.headers.has("X-Remix-Replace")?at.Replace:at.Push,{formMethod:Se,formAction:Te,formEncType:yt}=k.navigation;!J&&!se&&Se&&Te&&yt&&(J=fg(k.navigation));let Be=J||se;if(M2.has(F.response.status)&&Be&&Fn(Be.formMethod))await Wt(le,Z,{submission:Ve({},Be,{formAction:re}),preventScrollReset:pe||z,enableViewTransition:D?N:void 0});else{let ze=Oc(Z,J);await Wt(le,Z,{overrideNavigation:ze,fetcherSubmission:se,preventScrollReset:pe||z,enableViewTransition:D?N:void 0})}}async function xe(M,F,D,$,J,se){let pe,te={};try{pe=await _2(c,M,F,D,$,J,se,s,i)}catch(re){return $.forEach(Z=>{te[Z.route.id]={type:De.error,error:re}}),te}for(let[re,Z]of Object.entries(pe))if(V2(Z)){let le=Z.result;te[re]={type:De.redirect,response:U2(le,D,re,J,u,h.v7_relativeSplatPath)}}else te[re]=await B2(Z);return te}async function ut(M,F,D,$,J){let se=M.matches,pe=xe("loader",M,J,D,F,null),te=Promise.all($.map(async le=>{if(le.matches&&le.match&&le.controller){let Te=(await xe("loader",M,hs(e.history,le.path,le.controller.signal),[le.match],le.matches,le.key))[le.match.route.id];return{[le.key]:Te}}else return Promise.resolve({[le.key]:{type:De.error,error:Yt(404,{pathname:le.path})}})})),re=await pe,Z=(await te).reduce((le,Se)=>Object.assign(le,Se),{});return await Promise.all([K2(F,re,J.signal,se,M.loaderData),G2(F,Z,$)]),{loaderResults:re,fetcherResults:Z}}function Ln(){V=!0,_.push(...Xn()),ye.forEach((M,F)=>{K.has(F)&&Y.add(F),Pe(F)})}function O(M,F,D){D===void 0&&(D={}),k.fetchers.set(M,F),$e({fetchers:new Map(k.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function B(M,F,D,$){$===void 0&&($={});let J=Ri(k.matches,F);he(M),$e({errors:{[J.route.id]:D},fetchers:new Map(k.fetchers)},{flushSync:($&&$.flushSync)===!0})}function de(M){return h.v7_fetcherPersist&&(P.set(M,(P.get(M)||0)+1),Ee.has(M)&&Ee.delete(M)),k.fetchers.get(M)||R2}function he(M){let F=k.fetchers.get(M);K.has(M)&&!(F&&F.state==="loading"&&S.has(M))&&Pe(M),ye.delete(M),S.delete(M),ce.delete(M),Ee.delete(M),Y.delete(M),k.fetchers.delete(M)}function Et(M){if(h.v7_fetcherPersist){let F=(P.get(M)||0)-1;F<=0?(P.delete(M),Ee.add(M)):P.set(M,F)}else he(M);$e({fetchers:new Map(k.fetchers)})}function Pe(M){let F=K.get(M);F&&(F.abort(),K.delete(M))}function gt(M){for(let F of M){let D=de(F),$=$r(D.data);k.fetchers.set(F,$)}}function ln(){let M=[],F=!1;for(let D of ce){let $=k.fetchers.get(D);ke($,"Expected fetcher: "+D),$.state==="loading"&&(ce.delete(D),M.push(D),F=!0)}return gt(M),F}function Ir(M){let F=[];for(let[D,$]of S)if($<M){let J=k.fetchers.get(D);ke(J,"Expected fetcher: "+D),J.state==="loading"&&(Pe(D),S.delete(D),F.push(D))}return gt(F),F.length>0}function Ni(M,F){let D=k.blockers.get(M)||Tl;return ve.get(M)!==F&&ve.set(M,F),D}function Fr(M){k.blockers.delete(M),ve.delete(M)}function Si(M,F){let D=k.blockers.get(M)||Tl;ke(D.state==="unblocked"&&F.state==="blocked"||D.state==="blocked"&&F.state==="blocked"||D.state==="blocked"&&F.state==="proceeding"||D.state==="blocked"&&F.state==="unblocked"||D.state==="proceeding"&&F.state==="unblocked","Invalid blocker state transition: "+D.state+" -> "+F.state);let $=new Map(k.blockers);$.set(M,F),$e({blockers:$})}function as(M){let{currentLocation:F,nextLocation:D,historyAction:$}=M;if(ve.size===0)return;ve.size>1&&ll(!1,"A router only supports one blocker at a time");let J=Array.from(ve.entries()),[se,pe]=J[J.length-1],te=k.blockers.get(se);if(!(te&&te.state==="proceeding")&&pe({currentLocation:F,nextLocation:D,historyAction:$}))return se}function xt(M){let F=Yt(404,{pathname:M}),D=o||l,{matches:$,route:J}=dg(D);return Xn(),{notFoundMatches:$,route:J,error:F}}function Xn(M){let F=[];return Fe.forEach((D,$)=>{(!M||M($))&&(D.cancel(),F.push($),Fe.delete($))}),F}function Mn(M,F,D){if(g=M,w=F,x=D||null,!m&&k.navigation===Dc){m=!0;let $=Ep(k.location,k.matches);$!=null&&$e({restoreScrollPosition:$})}return()=>{g=null,w=null,x=null}}function Cp(M,F){return x&&x(M,F.map($=>u2($,k.loaderData)))||M.key}function bw(M,F){if(g&&w){let D=Cp(M,F);g[D]=w()}}function Ep(M,F){if(g){let D=Cp(M,F),$=g[D];if(typeof $=="number")return $}return null}function Ya(M,F,D){if(d)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:$o(F,D,u,!0)}}else return{active:!0,matches:$o(F,D,u,!0)||[]};return{active:!1,matches:null}}async function Xa(M,F,D){if(!d)return{type:"success",matches:M};let $=M;for(;;){let J=o==null,se=o||l,pe=s;try{await d({path:F,matches:$,patch:(Z,le)=>{D.aborted||sg(Z,le,se,pe,i)}})}catch(Z){return{type:"error",error:Z,partialMatches:$}}finally{J&&!D.aborted&&(l=[...l])}if(D.aborted)return{type:"aborted"};let te=Mi(se,F,u);if(te)return{type:"success",matches:te};let re=$o(se,F,u,!0);if(!re||$.length===re.length&&$.every((Z,le)=>Z.route.id===re[le].route.id))return{type:"success",matches:null};$=re}}function jw(M){s={},o=vu(M,i,void 0,s)}function Nw(M,F){let D=o==null;sg(M,F,o||l,s,i),D&&(l=[...l],$e({}))}return C={get basename(){return u},get future(){return h},get state(){return k},get routes(){return l},get window(){return t},initialize:Dt,subscribe:Ct,enableScrollRestoration:Mn,navigate:Pn,fetch:Gn,revalidate:Tn,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:de,deleteFetcher:Et,dispose:rn,getBlocker:Ni,deleteBlocker:Fr,patchRoutes:Nw,_internalFetchControllers:K,_internalActiveDeferreds:Fe,_internalSetRoutes:jw},C}function I2(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function gh(e,t,n,r,i,s,l,o){let u,c;if(l){u=[];for(let h of t)if(u.push(h),h.route.id===l){c=h;break}}else u=t,c=t[t.length-1];let d=Qu(i||".",Wu(u,s),Lr(e.pathname,n)||e.pathname,o==="path");if(i==null&&(d.search=e.search,d.hash=e.hash),(i==null||i===""||i===".")&&c){let h=Zf(d.search);if(c.route.index&&!h)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&h){let p=new URLSearchParams(d.search),f=p.getAll("index");p.delete("index"),f.filter(x=>x).forEach(x=>p.append("index",x));let g=p.toString();d.search=g?"?"+g:""}}return r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Nr([n,d.pathname])),ts(d)}function tg(e,t,n,r){if(!r||!I2(r))return{path:n};if(r.formMethod&&!Q2(r.formMethod))return{path:n,error:Yt(405,{method:r.formMethod})};let i=()=>({path:n,error:Yt(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),o=V1(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Fn(l))return i();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((f,g)=>{let[x,w]=g;return""+f+x+"="+w+`
|
|
430
|
+
`},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!Fn(l))return i();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:o,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return i()}}}ke(typeof FormData=="function","FormData is not available in this environment");let u,c;if(r.formData)u=yh(r.formData),c=r.formData;else if(r.body instanceof FormData)u=yh(r.body),c=r.body;else if(r.body instanceof URLSearchParams)u=r.body,c=ag(u);else if(r.body==null)u=new URLSearchParams,c=new FormData;else try{u=new URLSearchParams(r.body),c=ag(u)}catch{return i()}let d={formMethod:l,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Fn(d.formMethod))return{path:n,submission:d};let h=wi(n);return t&&h.search&&Zf(h.search)&&u.append("index",""),h.search="?"+u,{path:ts(h),submission:d}}function ng(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function rg(e,t,n,r,i,s,l,o,u,c,d,h,p,f,g,x){let w=x?cn(x[1])?x[1].error:x[1].data:void 0,m=e.createURL(t.location),y=e.createURL(i),v=n;s&&t.errors?v=ng(n,Object.keys(t.errors)[0],!0):x&&cn(x[1])&&(v=ng(n,x[0]));let j=x?x[1].statusCode:void 0,C=l&&j&&j>=400,k=v.filter((z,A)=>{let{route:N}=z;if(N.lazy)return!0;if(N.loader==null)return!1;if(s)return xh(N,t.loaderData,t.errors);if(F2(t.loaderData,t.matches[A],z)||u.some(W=>W===z.route.id))return!0;let R=t.matches[A],I=z;return ig(z,Ve({currentUrl:m,currentParams:R.params,nextUrl:y,nextParams:I.params},r,{actionResult:w,actionStatus:j,defaultShouldRevalidate:C?!1:o||m.pathname+m.search===y.pathname+y.search||m.search!==y.search||q1(R,I)}))}),L=[];return h.forEach((z,A)=>{if(s||!n.some(V=>V.route.id===z.routeId)||d.has(A))return;let N=Mi(f,z.path,g);if(!N){L.push({key:A,routeId:z.routeId,path:z.path,matches:null,match:null,controller:null});return}let R=t.fetchers.get(A),I=$l(N,z.path),W=!1;p.has(A)?W=!1:c.has(A)?(c.delete(A),W=!0):R&&R.state!=="idle"&&R.data===void 0?W=o:W=ig(I,Ve({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:j,defaultShouldRevalidate:C?!1:o})),W&&L.push({key:A,routeId:z.routeId,path:z.path,matches:N,match:I,controller:new AbortController})}),[k,L]}function xh(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function F2(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function q1(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ig(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function sg(e,t,n,r,i){var s;let l;if(e){let c=r[e];ke(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),l=c.children}else l=n;let o=t.filter(c=>!l.some(d=>H1(c,d))),u=vu(o,i,[e||"_","patch",String(((s=l)==null?void 0:s.length)||"0")],r);l.push(...u)}function H1(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(s=>H1(n,s))}):!1}async function D2(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];ke(i,"No route found in manifest");let s={};for(let l in r){let u=i[l]!==void 0&&l!=="hasErrorBoundary";ll(!u,'Route "'+i.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!u&&!a2.has(l)&&(s[l]=r[l])}Object.assign(i,s),Object.assign(i,Ve({},t(i),{lazy:void 0}))}async function O2(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,s,l)=>Object.assign(i,{[n[l].route.id]:s}),{})}async function _2(e,t,n,r,i,s,l,o,u,c){let d=s.map(f=>f.route.lazy?D2(f.route,u,o):void 0),h=s.map((f,g)=>{let x=d[g],w=i.some(y=>y.route.id===f.route.id);return Ve({},f,{shouldLoad:w,resolve:async y=>(y&&r.method==="GET"&&(f.route.lazy||f.route.loader)&&(w=!0),w?$2(t,r,f,x,y,c):Promise.resolve({type:De.data,result:void 0}))})}),p=await e({matches:h,request:r,params:s[0].params,fetcherKey:l,context:c});try{await Promise.all(d)}catch{}return p}async function $2(e,t,n,r,i,s){let l,o,u=c=>{let d,h=new Promise((g,x)=>d=x);o=()=>d(),t.signal.addEventListener("abort",o);let p=g=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:s},...g!==void 0?[g]:[]),f=(async()=>{try{return{type:"data",result:await(i?i(x=>p(x)):p())}}catch(g){return{type:"error",result:g}}})();return Promise.race([f,h])};try{let c=n.route[e];if(r)if(c){let d,[h]=await Promise.all([u(c).catch(p=>{d=p}),r]);if(d!==void 0)throw d;l=h}else if(await r,c=n.route[e],c)l=await u(c);else if(e==="action"){let d=new URL(t.url),h=d.pathname+d.search;throw Yt(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:De.data,result:void 0};else if(c)l=await u(c);else{let d=new URL(t.url),h=d.pathname+d.search;throw Yt(404,{pathname:h})}ke(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:De.error,result:c}}finally{o&&t.signal.removeEventListener("abort",o)}return l}async function B2(e){let{result:t,type:n}=e;if(W1(t)){let c;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?c=null:c=await t.json():c=await t.text()}catch(d){return{type:De.error,error:d}}return n===De.error?{type:De.error,error:new ku(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:De.data,data:c,statusCode:t.status,headers:t.headers}}if(n===De.error){if(hg(t)){var r;if(t.data instanceof Error){var i;return{type:De.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new ku(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:De.error,error:t,statusCode:Ku(t)?t.status:void 0}}if(W2(t)){var s,l;return{type:De.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(hg(t)){var o,u;return{type:De.data,data:t.data,statusCode:(o=t.init)==null?void 0:o.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:De.data,data:t}}function U2(e,t,n,r,i,s){let l=e.headers.get("Location");if(ke(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xf.test(l)){let o=r.slice(0,r.findIndex(u=>u.route.id===n)+1);l=gh(new URL(t.url),o,i,!0,l,s),e.headers.set("Location",l)}return e}function lg(e,t,n){if(Xf.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),s=Lr(i.pathname,n)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function hs(e,t,n,r){let i=e.createURL(V1(t)).toString(),s={signal:n};if(r&&Fn(r.formMethod)){let{formMethod:l,formEncType:o}=r;s.method=l.toUpperCase(),o==="application/json"?(s.headers=new Headers({"Content-Type":o}),s.body=JSON.stringify(r.json)):o==="text/plain"?s.body=r.text:o==="application/x-www-form-urlencoded"&&r.formData?s.body=yh(r.formData):s.body=r.formData}return new Request(i,s)}function yh(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ag(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function q2(e,t,n,r,i){let s={},l=null,o,u=!1,c={},d=n&&cn(n[1])?n[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let p=h.route.id,f=t[p];if(ke(!Fi(f),"Cannot handle redirect results in processLoaderData"),cn(f)){let g=f.error;d!==void 0&&(g=d,d=void 0),l=l||{};{let x=Ri(e,p);l[x.route.id]==null&&(l[x.route.id]=g)}s[p]=void 0,u||(u=!0,o=Ku(f.error)?f.error.status:500),f.headers&&(c[p]=f.headers)}else ri(f)?(r.set(p,f.deferredData),s[p]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!u&&(o=f.statusCode),f.headers&&(c[p]=f.headers)):(s[p]=f.data,f.statusCode&&f.statusCode!==200&&!u&&(o=f.statusCode),f.headers&&(c[p]=f.headers))}),d!==void 0&&n&&(l={[n[0]]:d},s[n[0]]=void 0),{loaderData:s,errors:l,statusCode:o||200,loaderHeaders:c}}function og(e,t,n,r,i,s,l){let{loaderData:o,errors:u}=q2(t,n,r,l);return i.forEach(c=>{let{key:d,match:h,controller:p}=c,f=s[d];if(ke(f,"Did not find corresponding fetcher result"),!(p&&p.signal.aborted))if(cn(f)){let g=Ri(e.matches,h==null?void 0:h.route.id);u&&u[g.route.id]||(u=Ve({},u,{[g.route.id]:f.error})),e.fetchers.delete(d)}else if(Fi(f))ke(!1,"Unhandled fetcher revalidation redirect");else if(ri(f))ke(!1,"Unhandled fetcher deferred data");else{let g=$r(f.data);e.fetchers.set(d,g)}}),{loaderData:o,errors:u}}function ug(e,t,n,r){let i=Ve({},t);for(let s of n){let l=s.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(i[l]=t[l]):e[l]!==void 0&&s.route.loader&&(i[l]=e[l]),r&&r.hasOwnProperty(l))break}return i}function cg(e){return e?cn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ri(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function dg(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Yt(e,t){let{pathname:n,routeId:r,method:i,type:s,message:l}=t===void 0?{}:t,o="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(o="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?u="defer() is not supported in actions":s==="invalid-body"&&(u="Unable to encode submission body")):e===403?(o="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(o="Not Found",u='No route matches URL "'+n+'"'):e===405&&(o="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new ku(e||500,o,new Error(u),!0)}function wo(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(Fi(i))return{key:r,result:i}}}function V1(e){let t=typeof e=="string"?wi(e):e;return ts(Ve({},t,{hash:""}))}function H2(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function V2(e){return W1(e.result)&&L2.has(e.result.status)}function ri(e){return e.type===De.deferred}function cn(e){return e.type===De.error}function Fi(e){return(e&&e.type)===De.redirect}function hg(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function W2(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function W1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Q2(e){return T2.has(e.toLowerCase())}function Fn(e){return E2.has(e.toLowerCase())}async function K2(e,t,n,r,i){let s=Object.entries(t);for(let l=0;l<s.length;l++){let[o,u]=s[l],c=e.find(p=>(p==null?void 0:p.route.id)===o);if(!c)continue;let d=r.find(p=>p.route.id===c.route.id),h=d!=null&&!q1(d,c)&&(i&&i[c.route.id])!==void 0;ri(u)&&h&&await Jf(u,n,!1).then(p=>{p&&(t[o]=p)})}}async function G2(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:s,controller:l}=n[r],o=t[i];e.find(c=>(c==null?void 0:c.route.id)===s)&&ri(o)&&(ke(l,"Expected an AbortController for revalidating fetcher deferred result"),await Jf(o,l.signal,!0).then(c=>{c&&(t[i]=c)}))}}async function Jf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:De.data,data:e.deferredData.unwrappedData}}catch(i){return{type:De.error,error:i}}return{type:De.data,data:e.deferredData.data}}}function Zf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function $l(e,t){let n=typeof t=="string"?wi(t).search:t.search;if(e[e.length-1].route.index&&Zf(n||""))return e[e.length-1];let r=$1(e);return r[r.length-1]}function fg(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:s,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Oc(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Y2(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ll(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function X2(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function $r(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function J2(e,t){try{let n=e.sessionStorage.getItem(U1);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function Z2(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(U1,JSON.stringify(n))}catch(r){ll(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
431
|
+
* React Router v6.28.0
|
|
432
|
+
*
|
|
433
|
+
* Copyright (c) Remix Software Inc.
|
|
434
|
+
*
|
|
435
|
+
* This source code is licensed under the MIT license found in the
|
|
436
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
437
|
+
*
|
|
438
|
+
* @license MIT
|
|
439
|
+
*/function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bu.apply(this,arguments)}const Ba=b.createContext(null),ep=b.createContext(null),Rr=b.createContext(null),tp=b.createContext(null),hr=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Q1=b.createContext(null);function eN(e,t){let{relative:n}=t===void 0?{}:t;fl()||ke(!1);let{basename:r,navigator:i}=b.useContext(Rr),{hash:s,pathname:l,search:o}=Gu(e,{relative:n}),u=l;return r!=="/"&&(u=l==="/"?r:Nr([r,l])),i.createHref({pathname:u,search:o,hash:s})}function fl(){return b.useContext(tp)!=null}function ki(){return fl()||ke(!1),b.useContext(tp).location}function K1(e){b.useContext(Rr).static||b.useLayoutEffect(e)}function St(){let{isDataRoute:e}=b.useContext(hr);return e?pN():tN()}function tN(){fl()||ke(!1);let e=b.useContext(Ba),{basename:t,future:n,navigator:r}=b.useContext(Rr),{matches:i}=b.useContext(hr),{pathname:s}=ki(),l=JSON.stringify(Wu(i,n.v7_relativeSplatPath)),o=b.useRef(!1);return K1(()=>{o.current=!0}),b.useCallback(function(c,d){if(d===void 0&&(d={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let h=Qu(c,JSON.parse(l),s,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Nr([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,l,s,e])}const nN=b.createContext(null);function rN(e){let t=b.useContext(hr).outlet;return t&&b.createElement(nN.Provider,{value:e},t)}function zr(){let{matches:e}=b.useContext(hr),t=e[e.length-1];return t?t.params:{}}function Gu(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Rr),{matches:i}=b.useContext(hr),{pathname:s}=ki(),l=JSON.stringify(Wu(i,r.v7_relativeSplatPath));return b.useMemo(()=>Qu(e,JSON.parse(l),s,n==="path"),[e,l,s,n])}function iN(e,t,n,r){fl()||ke(!1);let{navigator:i}=b.useContext(Rr),{matches:s}=b.useContext(hr),l=s[s.length-1],o=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let c=ki(),d;d=c;let h=d.pathname||"/",p=h;if(u!=="/"){let x=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let f=Mi(e,{pathname:p});return uN(f&&f.map(x=>Object.assign({},x,{params:Object.assign({},o,x.params),pathname:Nr([u,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:Nr([u,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r)}function sN(){let e=fN(),t=Ku(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const lN=b.createElement(sN,null);class aN extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(hr.Provider,{value:this.props.routeContext},b.createElement(Q1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oN(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(Ba);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(hr.Provider,{value:t},r)}function uN(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let d=l.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);d>=0||ke(!1),l=l.slice(0,Math.min(l.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<l.length;d++){let h=l[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:p,errors:f}=n,g=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||g){u=!0,c>=0?l=l.slice(0,c+1):l=[l[0]];break}}}return l.reduceRight((d,h,p)=>{let f,g=!1,x=null,w=null;n&&(f=o&&h.route.id?o[h.route.id]:void 0,x=h.route.errorElement||lN,u&&(c<0&&p===0?(mN("route-fallback"),g=!0,w=null):c===p&&(g=!0,w=h.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,p+1)),y=()=>{let v;return f?v=x:g?v=w:h.route.Component?v=b.createElement(h.route.Component,null):h.route.element?v=h.route.element:v=d,b.createElement(oN,{match:h,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:v})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(aN,{location:n.location,revalidation:n.revalidation,component:x,error:f,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):y()},null)}var G1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(G1||{}),Y1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Y1||{});function cN(e){let t=b.useContext(Ba);return t||ke(!1),t}function dN(e){let t=b.useContext(ep);return t||ke(!1),t}function hN(e){let t=b.useContext(hr);return t||ke(!1),t}function X1(e){let t=hN(),n=t.matches[t.matches.length-1];return n.route.id||ke(!1),n.route.id}function fN(){var e;let t=b.useContext(Q1),n=dN(),r=X1();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function pN(){let{router:e}=cN(G1.UseNavigateStable),t=X1(Y1.UseNavigateStable),n=b.useRef(!1);return K1(()=>{n.current=!0}),b.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,bu({fromRouteId:t},s)))},[e,t])}const pg={};function mN(e,t,n){pg[e]||(pg[e]=!0)}const mg={};function gN(e,t){mg[t]||(mg[t]=!0,console.warn(t))}const fs=(e,t,n)=>gN(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function xN(e,t){e!=null&&e.v7_startTransition||fs("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&(!t||!t.v7_relativeSplatPath)&&fs("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist||fs("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod||fs("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration||fs("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation||fs("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function yN(e){let{to:t,replace:n,state:r,relative:i}=e;fl()||ke(!1);let{future:s,static:l}=b.useContext(Rr),{matches:o}=b.useContext(hr),{pathname:u}=ki(),c=St(),d=Qu(t,Wu(o,s.v7_relativeSplatPath),u,i==="path"),h=JSON.stringify(d);return b.useEffect(()=>c(JSON.parse(h),{replace:n,state:r,relative:i}),[c,h,i,n,r]),null}function J1(e){return rN(e.context)}function vN(e){let{basename:t="/",children:n=null,location:r,navigationType:i=at.Pop,navigator:s,static:l=!1,future:o}=e;fl()&&ke(!1);let u=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:u,navigator:s,static:l,future:bu({v7_relativeSplatPath:!1},o)}),[u,o,s,l]);typeof r=="string"&&(r=wi(r));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:g="default"}=r,x=b.useMemo(()=>{let w=Lr(d,u);return w==null?null:{location:{pathname:w,search:h,hash:p,state:f,key:g},navigationType:i}},[u,d,h,p,f,g,i]);return x==null?null:b.createElement(Rr.Provider,{value:c},b.createElement(tp.Provider,{children:n,value:x}))}new Promise(()=>{});function wN(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:b.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
|
|
440
|
+
* React Router DOM v6.28.0
|
|
441
|
+
*
|
|
442
|
+
* Copyright (c) Remix Software Inc.
|
|
443
|
+
*
|
|
444
|
+
* This source code is licensed under the MIT license found in the
|
|
445
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
446
|
+
*
|
|
447
|
+
* @license MIT
|
|
448
|
+
*/function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},al.apply(this,arguments)}function Z1(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function kN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bN(e,t){return e.button===0&&(!t||t==="_self")&&!kN(e)}function vh(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function jN(e,t){let n=vh(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const NN=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],SN=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],CN="6";try{window.__reactRouterVersion=CN}catch{}function EN(e,t){return A2({basename:void 0,future:al({},void 0,{v7_prependBasename:!0}),history:i2({window:void 0}),hydrationData:PN(),routes:e,mapRouteProperties:wN,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function PN(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=al({},t,{errors:TN(t.errors)})),t}function TN(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new ku(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let l=new s(i.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}const e0=b.createContext({isTransitioning:!1}),LN=b.createContext(new Map),MN="startTransition",gg=Hw[MN],RN="flushSync",xg=ij[RN];function zN(e){gg?gg(e):e()}function Ml(e){xg?xg(e):e()}class AN{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function IN(e){let{fallbackElement:t,router:n,future:r}=e,[i,s]=b.useState(n.state),[l,o]=b.useState(),[u,c]=b.useState({isTransitioning:!1}),[d,h]=b.useState(),[p,f]=b.useState(),[g,x]=b.useState(),w=b.useRef(new Map),{v7_startTransition:m}=r||{},y=b.useCallback(z=>{m?zN(z):z()},[m]),v=b.useCallback((z,A)=>{let{deletedFetchers:N,flushSync:R,viewTransitionOpts:I}=A;N.forEach(V=>w.current.delete(V)),z.fetchers.forEach((V,_)=>{V.data!==void 0&&w.current.set(_,V.data)});let W=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!I||W){R?Ml(()=>s(z)):y(()=>s(z));return}if(R){Ml(()=>{p&&(d&&d.resolve(),p.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:I.currentLocation,nextLocation:I.nextLocation})});let V=n.window.document.startViewTransition(()=>{Ml(()=>s(z))});V.finished.finally(()=>{Ml(()=>{h(void 0),f(void 0),o(void 0),c({isTransitioning:!1})})}),Ml(()=>f(V));return}p?(d&&d.resolve(),p.skipTransition(),x({state:z,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(o(z),c({isTransitioning:!0,flushSync:!1,currentLocation:I.currentLocation,nextLocation:I.nextLocation}))},[n.window,p,d,w,y]);b.useLayoutEffect(()=>n.subscribe(v),[n,v]),b.useEffect(()=>{u.isTransitioning&&!u.flushSync&&h(new AN)},[u]),b.useEffect(()=>{if(d&&l&&n.window){let z=l,A=d.promise,N=n.window.document.startViewTransition(async()=>{y(()=>s(z)),await A});N.finished.finally(()=>{h(void 0),f(void 0),o(void 0),c({isTransitioning:!1})}),f(N)}},[y,l,d,n.window]),b.useEffect(()=>{d&&l&&i.location.key===l.location.key&&d.resolve()},[d,p,i.location,l]),b.useEffect(()=>{!u.isTransitioning&&g&&(o(g.state),c({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),x(void 0))},[u.isTransitioning,g]),b.useEffect(()=>{},[]);let j=b.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:z=>n.navigate(z),push:(z,A,N)=>n.navigate(z,{state:A,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(z,A,N)=>n.navigate(z,{replace:!0,state:A,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[n]),C=n.basename||"/",k=b.useMemo(()=>({router:n,navigator:j,static:!1,basename:C}),[n,j,C]),L=b.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return b.useEffect(()=>xN(r,n.future),[r,n.future]),b.createElement(b.Fragment,null,b.createElement(Ba.Provider,{value:k},b.createElement(ep.Provider,{value:i},b.createElement(LN.Provider,{value:w.current},b.createElement(e0.Provider,{value:u},b.createElement(vN,{basename:C,location:i.location,navigationType:i.historyAction,navigator:j,future:L},i.initialized||n.future.v7_partialHydration?b.createElement(FN,{routes:n.routes,future:n.future,state:i}):t))))),null)}const FN=b.memo(DN);function DN(e){let{routes:t,future:n,state:r}=e;return iN(t,void 0,r,n)}const ON=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_N=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mt=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:l,state:o,target:u,to:c,preventScrollReset:d,viewTransition:h}=t,p=Z1(t,NN),{basename:f}=b.useContext(Rr),g,x=!1;if(typeof c=="string"&&_N.test(c)&&(g=c,ON))try{let v=new URL(window.location.href),j=c.startsWith("//")?new URL(v.protocol+c):new URL(c),C=Lr(j.pathname,f);j.origin===v.origin&&C!=null?c=C+j.search+j.hash:x=!0}catch{}let w=eN(c,{relative:i}),m=BN(c,{replace:l,state:o,target:u,preventScrollReset:d,relative:i,viewTransition:h});function y(v){r&&r(v),v.defaultPrevented||m(v)}return b.createElement("a",al({},p,{href:g||w,onClick:x||s?r:y,ref:n,target:u}))}),wh=b.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:l=!1,style:o,to:u,viewTransition:c,children:d}=t,h=Z1(t,SN),p=Gu(u,{relative:h.relative}),f=ki(),g=b.useContext(ep),{navigator:x,basename:w}=b.useContext(Rr),m=g!=null&&UN(p)&&c===!0,y=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,v=f.pathname,j=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(v=v.toLowerCase(),j=j?j.toLowerCase():null,y=y.toLowerCase()),j&&w&&(j=Lr(j,w)||j);const C=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let k=v===y||!l&&v.startsWith(y)&&v.charAt(C)==="/",L=j!=null&&(j===y||!l&&j.startsWith(y)&&j.charAt(y.length)==="/"),z={isActive:k,isPending:L,isTransitioning:m},A=k?r:void 0,N;typeof s=="function"?N=s(z):N=[s,k?"active":null,L?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let R=typeof o=="function"?o(z):o;return b.createElement(Mt,al({},h,{"aria-current":A,className:N,ref:n,style:R,to:u,viewTransition:c}),typeof d=="function"?d(z):d)});var kh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(kh||(kh={}));var yg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yg||(yg={}));function $N(e){let t=b.useContext(Ba);return t||ke(!1),t}function BN(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:l,viewTransition:o}=t===void 0?{}:t,u=St(),c=ki(),d=Gu(e,{relative:l});return b.useCallback(h=>{if(bN(h,n)){h.preventDefault();let p=r!==void 0?r:ts(c)===ts(d);u(e,{replace:p,state:i,preventScrollReset:s,relative:l,viewTransition:o})}},[c,u,d,r,i,n,e,s,l,o])}function np(e){let t=b.useRef(vh(e)),n=b.useRef(!1),r=ki(),i=b.useMemo(()=>jN(r.search,n.current?null:t.current),[r.search]),s=St(),l=b.useCallback((o,u)=>{const c=vh(typeof o=="function"?o(i):o);n.current=!0,s("?"+c,u)},[s,i]);return[i,l]}function UN(e,t){t===void 0&&(t={});let n=b.useContext(e0);n==null&&ke(!1);let{basename:r}=$N(kh.useViewTransitionState),i=Gu(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return wu(i.pathname,l)!=null||wu(i.pathname,s)!=null}const vg=[{title:"Start here",sections:[{id:"start",title:"The idea in one minute",what:"learnforge helps you understand code, not just read it. It asks a model to explain, then makes you answer, explain back and find bugs, and it brings things back when you are about to forget them.",steps:["Open a folder (Projects page). learnforge only reads it. It never changes your files.","Go to Explore. Tick the files you want to understand.","Pick an activity on the right: Lens to read, Quiz or Teach to test yourself.","Wrong answers become Weak spots and review cards. Today shows what to do next."],examples:["First visit: Projects > Open a folder > Explore > tick src/queue.ts > Lens > Explain > Make lens.","Then: Quiz on the same file. Miss a question, and it shows up on Today under Weak spots."],notes:["Each model call takes about 20 to 90 seconds. A bar shows progress; you can keep browsing.","The model reads only the files you tick, plus the notes and context you add. Nothing else leaves your machine."]},{id:"projects",title:"Projects",what:"A project is one folder on your disk. Everything you make (lenses, quizzes, cards) is stored under that project.",steps:["Open a folder with Open folder. Type a path or browse.","Click a project card to enter it. The rail on the left changes to the project pages.","Remove (the button on the project card) takes it off the list. Its data moves to an archive and is deleted after the keep time (Settings > Storage). Opening the same folder again restores it."],examples:["Try the built-in sample: run learnforge with --demo. It opens a tiny queue project with a fake model."]},{id:"keys",title:"Keyboard shortcuts",what:"The short list. Press ? anywhere (outside a text box) to see it in a window.",examples:["Ctrl/Cmd + K : go to a page, file or project, or start an activity on the open file","Ctrl/Cmd + H : this help, opened at the section for the page you are on","? : shortcut list","[ and ] : fold or show the left and right panes","Space : Review, show the answer","1 2 3 4 : Review, rate again / hard / good / easy","Ctrl + Enter : Tutor, send the message","← → : Trace, step back and forward"]},{id:"palette",title:"Quick jump (Ctrl K)",what:"One box to go anywhere or start anything without the mouse.",steps:["Press Ctrl K (Cmd K on Mac).","Type a few letters. Pages, files in this project, other projects and activities are matched.","Press Enter to go. Esc closes."],examples:["Type: rev → Review","Type: queue → files with queue in the path","Type: quiz → start a quiz on the open file"]}]},{title:"Learn a codebase",sections:[{id:"today",title:"Today",what:"What to do now. The page picks the most useful next step so you do not have to decide.",steps:["Read the Suggested next card at the top. Start runs it.","Review cards: how many are due. Start review opens the flashcards.","Weak spots: things you got wrong. Quiz my weak spots builds a quiz from them.","Needs a refresh: files you passed a while ago, or that changed since. Click a file to quiz yourself on it.","Learning path: the next stop of a path you made."],notes:["The flame badge counts days in a row with any practice. Missing a day resets it; one review is enough to keep it."]},{id:"explore",title:"Explore: choose files and an activity",what:"The main workspace. File tree on the left, code in the middle, activities on the right.",steps:["Click a file name to open it and read it.","Tick the box beside a file or a folder to add it to the Context. The model reads only what is in Context.","Use the filter box above the tree to find a file by name.","Pick an activity (Lens, Quiz, Teach, Tutor, Walk, Practice, Bug hunt, Notes) in the right pane."],examples:["Understand one module: tick only src/queue.ts, Lens > Explain.","Understand how two files connect: tick both, Lens > Data flow.","A folder is ticked in one click; keep the selection small (1 to 5 files) for sharper answers."],notes:["Context · 3 means three files are selected. Add lets you pick files from the project or from a context folder (docs, notes, a session folder).","[ and ] fold the side panes to give the code more room."]},{id:"lens",title:"Lens: read an explanation through one question",what:"A lens is a written explanation of your selected files, built around one question. It is like a short blog post about the code, with a walkthrough, pitfalls and a check for each step.",steps:["Tick files in Explore. Open the Lens tab.","Pick a kind of lens (see the list below).","Choose depth: Overview (about 1.5 screens, 3 to 4 steps), Standard (at least 3 screens, enough to change the code safely), Deep (5 to 6 screens, like a long blog post: every branch and failure path). Deep takes several minutes because it is planned first, then written in parts.","Optional: type your own question for the lens to answer.","Click Make lens. A planner model first outlines the lesson, then a writer model writes it in parts. When it is ready, you land on the lens page."],examples:['Explain: "The tour: purpose, main pieces, how they connect." Best first lens for any file.',"Data flow: follow one value from where it enters to where it leaves. Try on a request handler.","State over time: what is stored, who changes it, in which order. Try on a class with fields.","Failure modes: bad input, timeouts, partial writes, retries. Try before changing error handling.","Contracts: inputs, outputs and invariants between parts. Try on an API or a module boundary.","Concepts: the vocabulary first, with the line where each term shows up. Try when the code uses words you do not know.","The change: pick it in Changes with a diff; gives intent, risk and what to check.","Trace a run: step by step through one example input, with the state at each line. Use the arrows to step.","History: what changed over time and why, from the commits."],notes:["On the lens page: Words you need first (click a term to see where it shows up), the walkthrough (each step has a code card, a pitfall and a check question), then gotchas and next steps.","Click open file on a step to jump the code pane to that range. The same file pane stays on the right.","Refresh rebuilds a lens when the code changed. A banner tells you when it did."]},{id:"quiz",title:"Quiz: answer in your own words",what:"Questions about your selected files. You type answers; the model grades each one and says what was missing.",steps:["Tick files. Open the Quiz tab. Choose how many questions (Default, 3, 5 or 8).","Click Make quiz. Answer every question in the box beneath it. Short answers are fine; the core idea is what counts.","Click Grade. Each answer gets a verdict, an explanation and the line it came from.","A wrong answer is saved as a Weak spot and turns into a review card."],examples:['Question: "What happens when pop() is called on an empty queue?" Answer: "It raises IndexError, the caller must catch it."',"Retake: open the quiz from Library > Quizzes. Your best score is kept; at most 20 attempts are stored."],notes:["Empty answers are not counted as misconceptions. They are just unanswered."]},{id:"teach",title:"Teach: explain it back",what:"You write an explanation as if teaching a colleague. The model grades it for what is right, what is missing and what is wrong.",steps:["Tick files. Open Teach.","Write your explanation in your own words. Do not look at the code more than you need.","Submit. You get strengths, gaps and corrections tied to lines.","Gaps become Weak spots, so they come back later."],examples:['"A queue stores items in order. push adds at the tail; pop removes the head. When it is empty, pop raises." Short and specific beats long and vague.']},{id:"tutor",title:"Tutor: get hints, not answers",what:"A chat that helps you reach the answer yourself. Hints come in steps. Ask for the answer when you are stuck.",steps:["Tick files. Open Tutor and type a question.","The tutor replies with a question or a small hint (level 1). Ask again for more help: level 2 is a stronger hint, level 3 nearly gives it away.","At level 4 it tells you directly. Use that when you are really stuck.","Ctrl + Enter sends the message."],examples:['You: "Why does flush() hold the lock while it writes?" Tutor: "What could happen to the buffer if another thread called push() in the middle?"'],notes:["Only the last 200 messages of a chat are kept."]},{id:"walk",title:"Walk: one block at a time",what:"A guided tour of one file in small blocks. After each block you answer a short check before moving on.",steps:["Open a file, tick it, open Walk, click Make walk.","Read the block. Answer the check below it. Press Check.","A right answer unlocks the next block. A wrong one explains and keeps you on the block."],examples:["Use it for a file you must understand fully before changing it, such as a parser or a state machine."]},{id:"practice",title:"Practice: write the key lines back",what:"The code with some lines removed. You type them from memory and get feedback.",steps:["Choose a level: 1 one short hole, 2 a condition and a computation, 3 core logic, 4 whole function bodies.","Click Make practice. Fill the gaps in the editor.","Submit. You see your version next to the real one, with differences explained.","The eye button hides or shows the original. Reset restores the gaps."],examples:["Start at level 1 on a function you read today. Move to level 3 a week later."]},{id:"hunt",title:"Bug hunt: find the planted bugs",what:"learnforge plants bugs in a copy of the code (your files are not touched). You mark the lines you think are wrong.",steps:["Choose difficulty: Easy (one visible bug), Medium (two, one needs the logic), Hard (two or three subtle ones).","Click Make hunt. Read the copy and click lines you think are buggy.","Press Grade. The real bugs show up, with what was wrong and how you did."],notes:["The bugs are hidden until you grade. Reloading the page does not reveal them."]},{id:"notes",title:"Notes",what:"Your own notes on a file or a line. They can be included in prompts so answers match what you already know.",steps:["Open a file. Click a line number, add a note, save.","A mark appears in the margin. Click it to read or edit.","Turn on Settings > Notes in prompts to let the model see your notes."],examples:['"I keep mixing up head and tail here. Head is where pop reads."']},{id:"changes",title:"Changes: learn from a diff",what:"Understand a commit, a branch or uncommitted work before you review or merge it.",steps:["Choose a repo, then what to compare (for example a branch against main, or a single commit).","Tick the changed files you care about.","Use the activity panel: Lens > The change gives intent, risk and what to check."],examples:["Before reviewing a colleague's branch: Changes > main..feature/x > tick the three biggest files > Lens > The change."]}]},{title:"Remember it",sections:[{id:"review",title:"Review: flashcards that come back on time",what:"Cards are spaced: easy ones return later, hard ones sooner (FSRS). Ten minutes a day beats an hour once.",steps:["Open Review (the badge shows how many are due).","Read the question. Say or type your answer in your head. Press Space to show the answer.","Rate yourself: 1 Again (forgot), 2 Hard, 3 Good, 4 Easy. The buttons show when each will return."],examples:["Forgot it completely → 1. It returns in minutes.","Got it but had to think → 2 or 3.","Got it instantly → 4. It goes weeks out."],notes:["Cards come from wrong quiz answers, teach-back gaps and weak spots (Settings > Cards from misses). You can also add a card from the file view with the card button.","Only the last 50 reviews of each card are kept."]},{id:"library",title:"Library: everything you made",what:"One place for every lens, quiz, practice, teach-back, walk, hunt, tutor chat, card, glossary term and note in this project.",steps:["Pick a tab. Use Search this tab to filter.","Click an item to open it. Items you delete go to an archive and are removed after the keep time.","Glossary is the list of terms the lenses defined, across all lenses."],examples:["Looking for the lens you made last week on the scheduler: Library > Lenses > search: scheduler."]},{id:"progress",title:"Progress",what:"A heatmap of when you practised and a level per file.",steps:["Levels: new, seen, understood, fading, stale. A file turns fading after a few weeks without practice, and stale when the code changed since you studied it (Settings > fade days).","Click a file to open it in Explore."]}]},{title:"See the shape",sections:[{id:"map",title:"Map: how files connect",what:"A graph of which files import which. Big dots are files many others depend on.",steps:["Open Map. Drag to move, scroll to zoom, click a node to open that file.","Use the selector at the top (same tree as Explore) to narrow the map to a folder or a few files.","Dot colours show your level on each file, so the new ones are what you have not studied."],examples:["Pick src/server only to see how the server files connect, ignoring the rest."],notes:["Import links are found by reading import lines (TypeScript, JavaScript and Python). Aliases from tsconfig paths are followed."]},{id:"paths",title:"Paths: an ordered tour",what:"A learning path is an ordered list of stops: where to start, what next, and how to check each stop.",steps:["Open Paths. Describe your goal, or leave it blank for a general tour.","Click Make a path. Each stop has files, why it matters and an activity.","Do this stop opens Explore with the files ticked and the activity ready.","Tick a stop off when done. Today shows the next stop."],examples:['Goal: "I need to add retries to the job runner." The path walks queue, worker, then error handling.']}]},{title:"Settings and storage",sections:[{id:"settings",title:"Settings",what:"Which model runs, how text looks, and what learnforge keeps.",steps:["Planning model (default claude-opus-5-5) plans lenses, quizzes, walks, practice, bug hunts and paths; the model above (default claude-sonnet-5-5) writes them. Plan first can be turned off for one-shot answers.","Model: choose the agent (Auto, Claude Code CLI, Codex CLI, GitHub Copilot CLI, an Anthropic API key, or Demo). Auto uses the first one installed.","Reading font: sans (default) or serif for lens pages.","Cards, progress and notes: switches for turning wrong answers into cards, how fast files fade, and whether notes go to the model.","Recent model calls: the last calls with how long they took and any error."]},{id:"storage",title:"Storage: keeping it small",what:"Everything is plain JSON files in your learnforge folder (shown in Settings). It stays bounded on its own and you can also remove things by hand.",steps:["Automatic: archived items and forgotten projects are removed after the keep time (30 days by default). The reply cache keeps to its size (50 MB). Quiz attempts, card history, tutor chats and the job log are capped.","Clean up now applies those limits at once.","Choose what to remove: open the list, filter by kind, tick the items, press Remove selected, then confirm. Select all shown ticks every row in the current filter."],examples:["Free space fast: Choose what to remove > kind: reply cache > Select all shown > Remove selected. Nothing you made is lost; answers are just asked again later.","Remove one old lens: kind: lenses > tick it > Remove selected."],notes:["Removing is permanent (no archive step). Your project folders are never touched."]}]}];function qN(e){const t=e.match(/^\/p\/[^/]+\/([^/]+)/),n=t==null?void 0:t[1];return e==="/settings"?"settings":e==="/"?"projects":n?{today:"today",explore:"explore",review:"review",map:"map",paths:"paths",path:"paths",library:"library",progress:"progress",changes:"changes",lens:"lens",quiz:"quiz",teach:"teach",tutor:"tutor",walk:"walk",practice:"practice",hunt:"hunt"}[n]??null:null}function HN(){const[e]=np(),t=ki(),[n,r]=b.useState(""),i=e.get("s"),[s,l]=b.useState(i??"start"),o=b.useMemo(()=>{const c=n.trim().toLowerCase();return c?vg.map(d=>({...d,sections:d.sections.filter(h=>[h.title,h.what,...h.steps??[],...h.examples??[],...h.notes??[]].join(" ").toLowerCase().includes(c))})).filter(d=>d.sections.length):vg},[n]);b.useEffect(()=>{i&&(l(i),requestAnimationFrame(()=>{var c;return(c=document.getElementById(`help-${i}`))==null?void 0:c.scrollIntoView({block:"start"})}))},[i,t.key]);const u=c=>{var d;l(c),(d=document.getElementById(`help-${c}`))==null||d.scrollIntoView({behavior:"smooth",block:"start"})};return a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"mx-auto flex max-w-6xl gap-10 px-8 py-10",children:[a.jsxs("nav",{className:"sticky top-0 hidden h-fit w-56 shrink-0 lg:block",children:[a.jsxs("div",{className:"relative",children:[a.jsx(hl,{className:"pointer-events-none absolute left-2.5 top-2.5 h-4 w-4 text-muted"}),a.jsx("input",{className:"input h-9 pl-8 text-[14px]",placeholder:"Search help",value:n,onChange:c=>r(c.target.value)})]}),a.jsx("div",{className:"mt-4 space-y-4",children:o.map(c=>a.jsxs("div",{children:[a.jsx("div",{className:"px-2 text-[11px] font-semibold uppercase tracking-wide text-muted",children:c.title}),a.jsx("ul",{className:"mt-1",children:c.sections.map(d=>a.jsx("li",{children:a.jsx("button",{onClick:()=>u(d.id),className:ae("w-full rounded-md px-2 py-1.5 text-left text-[14px] hover:bg-raised",s===d.id?"bg-accent/10 font-medium text-accent":"text-ink"),children:d.title.split(":")[0]})},d.id))})]},c.title))})]}),a.jsxs("main",{className:"min-w-0 flex-1",children:[a.jsx("h1",{className:"text-3xl font-semibold tracking-tight",children:"Help"}),a.jsxs("p",{className:"mt-2 max-w-2xl text-[16px] leading-relaxed text-muted",children:["What every part does, how to use it, and something to try. Press ",a.jsx("span",{className:"kbd",children:"Ctrl H"})," on any page to open this at the matching part."]}),a.jsx("div",{className:"mt-4 lg:hidden",children:a.jsx("input",{className:"input",placeholder:"Search help",value:n,onChange:c=>r(c.target.value)})}),o.map(c=>a.jsxs("div",{children:[a.jsx("h2",{className:"mt-12 border-b border-line pb-2 text-sm font-semibold uppercase tracking-wide text-muted",children:c.title}),c.sections.map(d=>a.jsxs("section",{id:`help-${d.id}`,className:"scroll-mt-6 pt-8",children:[a.jsx("h3",{className:"text-2xl font-semibold tracking-tight",children:d.title}),a.jsx("p",{className:"mt-2 max-w-3xl text-[17px] leading-[1.65]",children:d.what}),d.steps&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"mt-5 text-xs font-semibold uppercase tracking-wide text-accent",children:"How to use it"}),a.jsx("ol",{className:"mt-2 max-w-3xl list-decimal space-y-2 pl-6 text-[16px] leading-[1.6] marker:text-muted",children:d.steps.map(h=>a.jsx("li",{children:h},h))})]}),d.examples&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"mt-5 text-xs font-semibold uppercase tracking-wide text-accent",children:"Try this"}),a.jsx("div",{className:"mt-2 max-w-3xl space-y-2",children:d.examples.map(h=>a.jsx("div",{className:"rounded-lg border border-line bg-raised px-4 py-2.5 text-[15px] leading-[1.55]",children:h},h))})]}),d.notes&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"mt-5 text-xs font-semibold uppercase tracking-wide text-muted",children:"Good to know"}),a.jsx("ul",{className:"mt-2 max-w-3xl list-disc space-y-1.5 pl-6 text-[15px] leading-[1.6] text-muted marker:text-line",children:d.notes.map(h=>a.jsx("li",{children:h},h))})]})]},d.id))]},c.title)),!o.length&&a.jsxs("p",{className:"mt-10 text-muted",children:['Nothing matches "',n,'".']}),a.jsx("div",{className:"h-24"})]})]})})}async function Ua(e,t){const{json:n,...r}=t??{},i=await fetch(`/api${e}`,{...r,headers:{"content-type":"application/json",...r.headers??{}},body:n===void 0?r.body:JSON.stringify(n)}),s=await i.json().catch(()=>({}));if(!i.ok)throw new Error(s.error||`${i.status} ${i.statusText}`);return s}const me=e=>Ua(e),bi=(e,t={})=>Ua(e,{method:"POST",json:t}),bh=(e,t)=>Ua(e,{method:"PUT",json:t}),qa=(e,t)=>Ua(e,{method:"PATCH",json:t}),pl=e=>Ua(e,{method:"DELETE"}),VN=e=>new Promise(t=>setTimeout(t,e));function Hn(){const e=It(),[t,n]=b.useState(null),[r,i]=b.useState(null),[s,l]=b.useState(0),o=b.useRef(!0);return b.useEffect(()=>()=>void(o.current=!1),[]),b.useEffect(()=>{if((t==null?void 0:t.status)!=="running")return;const c=Date.parse(t.startedAt),d=setInterval(()=>l(Math.round((Date.now()-c)/1e3)),500);return()=>clearInterval(d)},[t==null?void 0:t.status,t==null?void 0:t.startedAt]),{run:b.useCallback(async(c,d,h)=>{i(null),l(0);try{let p=await bi(c,d);for(n(p);p.status==="running";){if(await VN(1e3),!o.current)return;p=await me(`/jobs/${p.id}`),n(p)}p.status==="failed"?i(p.error??"the job failed"):(await e.invalidateQueries(),h==null||h(p))}catch(p){i(p instanceof Error?p.message:String(p)),n(null)}},[e]),job:t,busy:(t==null?void 0:t.status)==="running",error:r,elapsed:s,clearError:()=>i(null)}}function qt(e){const t=Math.round((Date.now()-Date.parse(e))/1e3);return t<60?"just now":t<3600?`${Math.round(t/60)} min ago`:t<86400?`${Math.round(t/3600)} h ago`:`${Math.round(t/86400)} d ago`}function ne({variant:e="secondary",size:t="md",icon:n,className:r,children:i,loading:s,...l}){return a.jsxs("button",{...l,disabled:l.disabled||s,className:ae("inline-flex select-none items-center justify-center gap-2 rounded-sm font-medium transition","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",t==="sm"&&"h-[22px] px-2 text-xs",t==="md"&&"h-[26px] px-3 text-[13px]",t==="lg"&&"h-8 px-4 text-sm",e==="primary"&&"bg-accent text-accent-ink hover:brightness-110",e==="secondary"&&"border border-muted/40 bg-raised text-ink hover:border-muted/70 hover:brightness-95",e==="ghost"&&"text-muted hover:bg-raised hover:text-ink",e==="danger"&&"border border-bad/30 bg-bad/10 text-bad hover:bg-bad/15",r),children:[s?a.jsx(R1,{className:"h-4 w-4 animate-spin"}):n,i]})}function we({tone:e="muted",children:t,className:n}){return a.jsx("span",{className:ae("inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[11px] font-medium",e==="muted"&&"bg-raised text-muted",e==="accent"&&"bg-accent/12 text-accent",e==="good"&&"bg-good/12 text-good",e==="warn"&&"bg-warn/15 text-warn",e==="bad"&&"bg-bad/12 text-bad",n),children:t})}function t0({v:e}){return a.jsx(we,{tone:e==="right"?"good":e==="partial"?"warn":"bad",children:e})}function Nt({className:e}){return a.jsx(R1,{className:ae("h-4 w-4 animate-spin text-muted",e)})}function At({icon:e,title:t,children:n,action:r}){return a.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-16 text-center",children:[e&&a.jsx("div",{className:"mb-4 grid h-12 w-12 place-items-center rounded-2xl bg-accent/10 text-accent",children:e}),a.jsx("h3",{className:"text-base font-semibold",children:t}),n&&a.jsx("div",{className:"mt-1.5 max-w-md text-sm text-muted",children:n}),r&&a.jsx("div",{className:"mt-5",children:r})]})}function tt({error:e,onClose:t}){return a.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-bad/30 bg-bad/8 px-3 py-2 text-sm text-bad",children:[a.jsx(Yf,{className:"mt-0.5 h-4 w-4 shrink-0"}),a.jsx("div",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words",children:e}),t&&a.jsx("button",{onClick:t,className:"opacity-60 hover:opacity-100","aria-label":"Close",children:a.jsx(vi,{className:"h-4 w-4"})})]})}const WN={lens:["Reading the files","Finding the core idea","Writing the lesson"],quiz:["Reading the files","Choosing what matters","Writing questions"],grade:["Reading your answers","Checking against the code","Writing feedback"],practice:["Reading the file","Choosing the key logic","Cutting the holes"],review:["Reading your code","Comparing with the original","Writing feedback"],teachback:["Reading your explanation","Checking it against the code","Writing feedback"],tutor:["Reading the conversation","Thinking of a good question","Writing"],walk:["Reading the file","Finding the reading order","Writing check questions"],walkcheck:["Reading your answer","Checking the block"],hunt:["Reading the file","Choosing where to break it","Planting the bugs"],huntgrade:["Matching your marks","Checking your reasons","Writing feedback"],path:["Reading the repo layout","Ordering the stops","Writing the path"]};function Vn({kind:e,elapsed:t}){const n=WN[e]??["Working"],r=Math.min(n.length-1,Math.floor(t/12));return a.jsxs("div",{className:"shimmer card p-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Nt,{className:"text-accent"}),a.jsxs("div",{className:"text-sm font-medium",children:[n[r],"..."]}),a.jsxs("div",{className:"ml-auto font-mono text-xs text-muted",children:[t,"s"]})]}),a.jsx("div",{className:"mt-3 flex gap-1.5",children:n.map((i,s)=>a.jsx("div",{className:ae("h-1 flex-1 rounded-full transition-colors",s<=r?"bg-accent":"bg-line")},i))}),a.jsx("p",{className:"mt-2 text-xs text-muted",children:"Model calls take 20 seconds to 2 minutes. You can keep reading code meanwhile."})]})}function Bt({value:e,onChange:t,options:n}){return a.jsx("div",{className:"inline-flex rounded-sm border border-line bg-raised p-0.5",children:n.map(r=>a.jsx("button",{title:r.title,onClick:()=>t(r.value),className:ae("rounded-sm px-2.5 py-0.5 text-xs font-medium transition",r.value===e?"bg-panel text-ink":"text-muted hover:text-ink"),children:r.label},String(r.value)))})}function QN({value:e,onChange:t,tabs:n,className:r}){return a.jsx("div",{className:ae("flex overflow-x-auto border-b border-line bg-side",r),children:n.map(i=>a.jsxs("button",{onClick:()=>t(i.value),className:ae("relative flex h-[35px] shrink-0 items-center gap-1.5 whitespace-nowrap border-r border-line px-3 text-[13px] transition",i.value===e?"bg-bg text-ink":"text-muted hover:text-ink"),children:[i.icon,i.label,i.count!==void 0&&i.count>0&&a.jsx("span",{className:"rounded-full bg-raised px-1.5 text-[11.5px] text-muted",children:i.count}),i.value===e&&a.jsx("span",{className:"absolute inset-x-0 top-0 h-px bg-accent"})]},i.value))})}function Ca({score:e,size:t="md"}){const n=Math.round(e*100),r=e>=.67?"text-good":e>=.4?"text-warn":"text-bad";return a.jsxs("span",{className:ae("font-semibold tabular-nums",r,t==="sm"?"text-xs":"text-sm"),children:[n,"%"]})}function Yu({title:e,onClose:t,children:n,footer:r,wide:i}){return a.jsx("div",{className:"fixed inset-0 z-50 grid place-items-center bg-black/40 p-4",onClick:t,onKeyDown:s=>s.key==="Escape"&&t(),children:a.jsxs("div",{className:ae("card flex max-h-[85vh] w-full flex-col overflow-hidden",i?"max-w-2xl":"max-w-lg"),onClick:s=>s.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center border-b border-line px-4 py-2",children:[a.jsx("h2",{className:"text-sm font-semibold",children:e}),a.jsx("button",{className:"ml-auto text-muted hover:text-ink",onClick:t,"aria-label":"Close",children:a.jsx(vi,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-5 py-4",children:n}),r&&a.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:r})]})})}function Xu({back:e,badges:t,title:n,sub:r,actions:i}){return a.jsxs("div",{children:[e,t&&a.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:t}),a.jsxs("div",{className:"mt-2 flex items-start gap-3",children:[a.jsx("h1",{className:"min-w-0 flex-1 text-[20px] font-semibold leading-tight tracking-tight",children:n}),i&&a.jsx("div",{className:"flex shrink-0 gap-2",children:i})]}),r&&a.jsx("div",{className:"mt-1 text-sm text-muted",children:r})]})}function jh(e){const t=Math.max(0,Math.round((Date.parse(e)-Date.now())/1e3));return t<90?"now":t<3600?`${Math.round(t/60)} min`:t<86400?`${Math.round(t/3600)} h`:t<86400*60?`${Math.round(t/86400)} d`:`${Math.round(t/(86400*30))} mo`}const KN={"Go to":Xm,Do:Xm,Files:C1,Projects:E1};function n0(e,t){return e.flatMap(n=>n.kind==="file"?[{path:n.path,rel:n.path.startsWith(t+"/")?n.path.slice(t.length+1):n.path}]:n0(n.children??[],t))}function GN({pid:e,root:t,onClose:n,openFile:r}){const i=St(),[s,l]=b.useState(""),[o,u]=b.useState(0),c=b.useRef(null),d=ge({queryKey:["tree-flat",e],queryFn:()=>me(`/projects/${e}/tree`),enabled:!!e,staleTime:6e4}),h=ge({queryKey:["projects"],queryFn:()=>me("/projects")}),p=b.useMemo(()=>{const x=m=>()=>i(m),w=[];if(e){const m=`/p/${e}`;for(const[y,v]of[["Today","today"],["Explore","explore"],["Changes","changes"],["Review cards","review"],["Map","map"],["Learning paths","paths"],["Library","library"],["Progress","progress"]])w.push({id:`go-${v}`,label:y,group:"Go to",run:x(`${m}/${v}`)});for(const[y,v]of[["Lens on the open file","lens"],["Quiz me on the open file","quiz"],["Teach it back","teach"],["Ask the tutor","tutor"],["Walk through the open file","walk"],["Practice on the open file","practice"],["Bug hunt in the open file","hunt"],["Notes on the open file","notes"]])w.push({id:`do-${v}`,label:y,group:"Do",run:x(`${m}/explore?do=${v}`)});if(d.data&&t)for(const y of n0(d.data,t))w.push({id:`f-${y.path}`,label:y.rel,group:"Files",run:()=>r==null?void 0:r(y.path)})}w.push({id:"go-help",label:"Help (Ctrl H)",group:"Go to",run:x("/help")}),w.push({id:"go-settings",label:"Settings",group:"Go to",run:x("/settings")});for(const m of h.data??[])w.push({id:`p-${m.id}`,label:m.name,hint:m.root,group:"Projects",run:x(`/p/${m.id}/today`)});return w},[e,t,d.data,h.data,i,r]),f=b.useMemo(()=>{const x=s.toLowerCase().split(/\s+/).filter(Boolean);return(x.length?p.filter(m=>x.every(y=>`${m.label} ${m.hint??""} ${m.group}`.toLowerCase().includes(y))):p.filter(m=>m.group!=="Files")).slice(0,60)},[p,s]);b.useEffect(()=>{u(0)},[s]),b.useEffect(()=>{var x,w;(w=(x=c.current)==null?void 0:x.querySelector(`[data-i="${o}"]`))==null||w.scrollIntoView({block:"nearest"})},[o]);const g=x=>{x&&(n(),x.run())};return a.jsxs(Yu,{title:"Go to or do",onClose:n,wide:!0,children:[a.jsxs("div",{className:"relative",children:[a.jsx(hl,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-muted"}),a.jsx("input",{autoFocus:!0,className:"input pl-9",placeholder:"Type a page, an activity, a file or a project",value:s,onChange:x=>l(x.target.value),onKeyDown:x=>{x.key==="ArrowDown"&&(x.preventDefault(),u(w=>Math.min(f.length-1,w+1))),x.key==="ArrowUp"&&(x.preventDefault(),u(w=>Math.max(0,w-1))),x.key==="Enter"&&g(f[o]),x.key==="Escape"&&n()}})]}),a.jsxs("div",{ref:c,className:"mt-3 max-h-[50vh] overflow-auto",children:[f.map((x,w)=>{const m=KN[x.group],y=w===0||f[w-1].group!==x.group;return a.jsxs("div",{children:[y&&a.jsx("div",{className:"px-2 pb-1 pt-2 text-[11.5px] font-semibold uppercase tracking-wide text-muted",children:x.group}),a.jsxs("button",{"data-i":w,onMouseMove:()=>u(w),onClick:()=>g(x),className:ae("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-[14px]",w===o?"bg-accent/12 text-ink":"text-ink/85"),children:[a.jsx(m,{className:"h-3.5 w-3.5 shrink-0 text-muted"}),a.jsx("span",{className:ae("min-w-0 flex-1 truncate",x.group==="Files"&&"font-mono text-[13px]"),children:x.label}),x.hint&&a.jsx("span",{className:"truncate text-[12px] text-muted",children:x.hint}),w===o&&a.jsx(Oj,{className:"h-3.5 w-3.5 text-muted"})]})]},x.id)}),!f.length&&a.jsx("div",{className:"px-2 py-6 text-center text-sm text-muted",children:"Nothing matches."})]})]})}const YN=[["Ctrl/Cmd + K","Go to a page, file or project; start an activity"],["Ctrl/Cmd + H","Help, opened at the part for this page"],["?","This list"],["[ and ]","Fold or show the left and right panes"],["Space","Review: reveal the answer"],["1 2 3 4","Review: again, hard, good, easy"],["Ctrl + Enter","Tutor: send"],["← →","Trace: step back and forward"]];function XN({onClose:e}){return a.jsx(Yu,{title:"Keyboard shortcuts",onClose:e,children:a.jsx("table",{className:"w-full text-sm",children:a.jsx("tbody",{children:YN.map(([t,n])=>a.jsxs("tr",{className:"border-b border-line/60 last:border-0",children:[a.jsx("td",{className:"py-2 pr-4",children:a.jsx("span",{className:"kbd",children:t})}),a.jsx("td",{className:"py-2 text-muted",children:n})]},t))})})})}function r0({className:e}){return a.jsxs("svg",{viewBox:"0 0 32 32",className:e,"aria-hidden":!0,children:[a.jsx("rect",{width:"32",height:"32",rx:"6",fill:"rgb(var(--accent))"}),a.jsx("circle",{cx:"14",cy:"14",r:"6.5",fill:"none",stroke:"white",strokeWidth:"2.8"}),a.jsx("path",{d:"M19 19l6 6",stroke:"white",strokeWidth:"2.8",strokeLinecap:"round"})]})}function gn({to:e,icon:t,label:n,end:r,badge:i}){return a.jsxs(wh,{to:e,end:r,title:n,"aria-label":n,className:({isActive:s})=>ae("relative grid h-12 w-12 shrink-0 place-items-center transition-colors",s?"text-ink before:absolute before:inset-y-0 before:left-0 before:w-0.5 before:bg-accent":"text-muted hover:text-ink"),children:[t,!!i&&a.jsx("span",{className:"absolute bottom-2 right-1.5 min-w-[16px] rounded-full bg-accent px-1 text-center text-[10px] font-semibold leading-4 text-accent-ink",children:i>99?"99+":i})]})}const JN={system:"light",light:"dark",dark:"system"};function ZN(){var x,w,m,y,v;const{pid:e}=zr(),{pref:t,setPref:n}=Qx(),r=ge({queryKey:["health"],queryFn:()=>me("/health"),staleTime:6e4}),i=(x=r.data)==null?void 0:x.agent.ready,s=t==="dark"?Gj:t==="light"?t2:Kj,l=St(),[o,u]=b.useState(!1),[c,d]=b.useState(!1),h=ge({queryKey:["cards-due",e],queryFn:()=>me(`/projects/${e}/cards/due`),enabled:!!e,staleTime:6e4}),f=(m=(w=ge({queryKey:["projects"],queryFn:()=>me("/projects"),enabled:!!e,staleTime:6e4}).data)==null?void 0:w.find(j=>j.id===e))==null?void 0:m.root;b.useEffect(()=>{const j=C=>{if((C.ctrlKey||C.metaKey)&&C.key.toLowerCase()==="k"){C.preventDefault(),u(L=>!L);return}if((C.ctrlKey||C.metaKey)&&!C.shiftKey&&!C.altKey&&C.key.toLowerCase()==="h"){C.preventDefault();const L=qN(window.location.pathname);l(L?`/help?s=${L}`:"/help");return}!C.target.closest("input, textarea, [contenteditable], .cm-editor")&&C.key==="?"&&d(!0)};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[]);const g=i===void 0?"checking model":i?"model ready":"model off";return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("div",{className:"flex min-h-0 flex-1",children:[a.jsxs("aside",{className:"flex w-12 shrink-0 flex-col items-stretch overflow-y-auto bg-rail",children:[a.jsx(wh,{to:"/",className:"grid h-12 place-items-center",title:"learnforge: projects","aria-label":"learnforge: projects",children:a.jsx(r0,{className:"h-6 w-6"})}),e?a.jsxs(a.Fragment,{children:[a.jsx(gn,{to:`/p/${e}/today`,icon:a.jsx(n2,{className:"h-6 w-6",strokeWidth:1.5}),label:"Today"}),a.jsx(gn,{to:`/p/${e}/explore`,icon:a.jsx(rl,{className:"h-6 w-6",strokeWidth:1.5}),label:"Explore"}),a.jsx(gn,{to:`/p/${e}/changes`,icon:a.jsx(M1,{className:"h-6 w-6",strokeWidth:1.5}),label:"Changes"}),a.jsx(gn,{to:`/p/${e}/review`,icon:a.jsx(cr,{className:"h-6 w-6",strokeWidth:1.5}),label:"Review",badge:(y=h.data)==null?void 0:y.length}),a.jsx(gn,{to:`/p/${e}/map`,icon:a.jsx(z1,{className:"h-6 w-6",strokeWidth:1.5}),label:"Map"}),a.jsx(gn,{to:`/p/${e}/paths`,icon:a.jsx(Kf,{className:"h-6 w-6",strokeWidth:1.5}),label:"Paths"}),a.jsx(gn,{to:`/p/${e}/library`,icon:a.jsx(Hf,{className:"h-6 w-6",strokeWidth:1.5}),label:"Library"}),a.jsx(gn,{to:`/p/${e}/progress`,icon:a.jsx(w1,{className:"h-6 w-6",strokeWidth:1.5}),label:"Progress"})]}):a.jsx(gn,{to:"/",end:!0,icon:a.jsx(Wj,{className:"h-6 w-6",strokeWidth:1.5}),label:"Projects"}),a.jsx("div",{className:"flex-1"}),e&&a.jsx(gn,{to:"/",end:!0,icon:a.jsx(E1,{className:"h-6 w-6",strokeWidth:1.5}),label:"Projects"}),a.jsx(gn,{to:"/help",icon:a.jsx(j1,{className:"h-6 w-6",strokeWidth:1.5}),label:"Help"}),a.jsx(gn,{to:"/settings",icon:a.jsx(Jj,{className:"h-6 w-6",strokeWidth:1.5}),label:"Settings"})]}),a.jsx("main",{className:"min-w-0 flex-1",children:a.jsx(J1,{})})]}),a.jsxs("footer",{className:"flex h-[22px] shrink-0 items-center gap-1 border-t border-line bg-status px-2 text-[12px] text-muted",children:[f&&a.jsx("span",{className:"px-1.5",title:f,children:f.split("/").filter(Boolean).pop()}),a.jsxs(wh,{to:"/settings",title:((v=r.data)==null?void 0:v.agent.detail)??"checking the model",className:"flex items-center gap-1.5 px-1.5 hover:bg-raised",children:[a.jsx("span",{className:ae("h-2 w-2 rounded-full",i===void 0?"bg-line":i?"bg-good":"bg-bad")}),g]}),a.jsx("div",{className:"flex-1"}),a.jsxs("button",{onClick:()=>u(!0),title:"Go to or do (Ctrl/Cmd+K). Press ? for all shortcuts.",className:"flex items-center gap-1 px-1.5 hover:bg-raised",children:[a.jsx(Dj,{className:"h-3 w-3"})," Ctrl K"]}),a.jsxs("button",{onClick:()=>n(JN[t]),title:`Theme: ${t} (click to change)`,className:"flex items-center gap-1 px-1.5 hover:bg-raised",children:[a.jsx(s,{className:"h-3 w-3"})," ",a.jsx("span",{className:"capitalize",children:t})]})]}),o&&a.jsx(GN,{pid:e,root:f,onClose:()=>u(!1),openFile:j=>{try{sessionStorage.setItem(`gl.open.${e}`,JSON.stringify(j))}catch{}l(`/p/${e}/explore`),window.dispatchEvent(new CustomEvent("learnforge:open",{detail:j}))}}),c&&a.jsx(XN,{onClose:()=>d(!1)})]})}const i0=b.createContext(null);function wg(e,t){try{const n=sessionStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}function kg(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch{}}function eS({pid:e,children:t,fallback:n}){const r=ge({queryKey:["project",e],queryFn:()=>me(`/projects/${e}`)}),[i,s]=b.useState(()=>wg(`gl.sel.${e}`,[])),[l,o]=b.useState(()=>wg(`gl.open.${e}`,null)),[u,c]=b.useState(null);b.useEffect(()=>kg(`gl.sel.${e}`,i),[e,i]),b.useEffect(()=>{const g=x=>{o(x.detail),c(null)};return window.addEventListener("learnforge:open",g),()=>window.removeEventListener("learnforge:open",g)},[]),b.useEffect(()=>kg(`gl.open.${e}`,l),[e,l]);const d=b.useCallback(g=>s([...new Set(g)]),[]),h=b.useCallback((g,x)=>{s(w=>{const m=w.includes(g);return x??!m?m?w:[...w,g]:w.filter(v=>v!==g)})},[]),p=b.useCallback((g,x)=>{o(g),c(x??null)},[]),f=b.useMemo(()=>{const g=r.data;return g?{project:g,selected:i,toggle:h,setSelected:d,openFile:l,setOpenFile:p,focusLine:u,rel:w=>{if(w.startsWith(g.root+"/"))return w.slice(g.root.length+1);for(const m of g.contexts)if(w.startsWith(m+"/"))return`${m.split("/").pop()}/${w.slice(m.length+1)}`;return w}}:null},[r.data,i,h,d,l,p,u]);return r.error?a.jsx(a.Fragment,{children:n}):f?a.jsx(i0.Provider,{value:f,children:t}):null}function nt(){const e=b.useContext(i0);if(!e)throw new Error("useProject outside ProjectProvider");return e}function rp({title:e,start:t,onPick:n,onClose:r,cta:i="Open this folder"}){var h,p;const[s,l]=b.useState(t??""),[o,u]=b.useState(t??""),c=ge({queryKey:["browse",s],queryFn:()=>me(`/browse?path=${encodeURIComponent(s)}`)}),d=((h=c.data)==null?void 0:h.path)??s;return a.jsx("div",{className:"fixed inset-0 z-50 grid place-items-center bg-black/40 p-4 backdrop-blur-sm",onClick:r,children:a.jsxs("div",{className:"card flex max-h-[80vh] w-full max-w-xl flex-col overflow-hidden",onClick:f=>f.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-4 py-3",children:[a.jsx("h2",{className:"text-sm font-semibold",children:e}),a.jsx("button",{className:"ml-auto text-muted hover:text-ink",onClick:r,"aria-label":"Close",children:a.jsx(vi,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"flex gap-2 border-b border-line p-3",onSubmit:f=>{f.preventDefault(),l(o)},children:[a.jsx("input",{className:"input font-mono text-xs",value:o,onChange:f=>u(f.target.value),placeholder:"/path/to/folder"}),a.jsx(ne,{type:"submit",children:"Go"})]}),a.jsxs("div",{className:"min-h-[240px] flex-1 overflow-auto p-2",children:[c.isLoading&&a.jsx("div",{className:"p-4",children:a.jsx(Nt,{})}),c.error&&a.jsx("div",{className:"p-2",children:a.jsx(tt,{error:c.error.message})}),c.data&&a.jsxs(a.Fragment,{children:[c.data.parent&&a.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-muted hover:bg-raised",onClick:()=>{l(c.data.parent),u(c.data.parent)},children:[a.jsx(v1,{className:"h-4 w-4"})," .."]}),c.data.dirs.map(f=>{const g=`${c.data.path.replace(/\/$/,"")}/${f}`;return a.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm hover:bg-raised",onDoubleClick:()=>n(g),onClick:()=>{l(g),u(g)},children:[a.jsx(L1,{className:"h-4 w-4 text-accent/80"})," ",f]},f)}),!c.data.dirs.length&&a.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted",children:"No sub-folders."})]})]}),a.jsxs("div",{className:"flex items-center gap-2 border-t border-line px-4 py-3",children:[a.jsxs("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted",title:d,children:[((p=c.data)==null?void 0:p.isGit)&&a.jsx(Uj,{className:"mr-1 inline h-3.5 w-3.5 text-good"}),d]}),a.jsx(ne,{variant:"ghost",onClick:r,children:"Cancel"}),a.jsx(ne,{variant:"primary",disabled:!c.data,onClick:()=>n(d),children:i})]})]})})}const tS=[{icon:rl,title:"Lenses",text:"See code through one question: data flow, state, failure modes, contracts."},{icon:sl,title:"Quizzes",text:"Questions about behaviour, not names. Graded with feedback that names the line."},{icon:ja,title:"Practice",text:"Key logic cut out of your own code. Write it back, with hints when stuck."},{icon:Hf,title:"Progress",text:"What you understand, per file. A pass goes stale when the code changes."}];function nS(){var u;const e=St(),t=It(),[n,r]=b.useState(!1),i=ge({queryKey:["projects"],queryFn:()=>me("/projects")}),s=pi({mutationFn:c=>bi("/projects",{root:c}),onSuccess:c=>{t.invalidateQueries({queryKey:["projects"]}),e(`/p/${c.id}/today`)}}),l=pi({mutationFn:c=>pl(`/projects/${c}`),onSuccess:()=>t.invalidateQueries({queryKey:["projects"]})}),o=i.data??[];return a.jsxs("div",{className:"h-full overflow-auto",children:[a.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-12",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(r0,{className:"h-11 w-11"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"learnforge"}),a.jsx("p",{className:"text-sm text-muted",children:"Understand any codebase. Prove it to yourself."})]})]}),a.jsx("div",{className:"mt-10 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:tS.map(({icon:c,title:d,text:h})=>a.jsxs("div",{className:"card p-4",children:[a.jsx("div",{className:"mb-3 grid h-9 w-9 place-items-center rounded-lg bg-accent/10 text-accent",children:a.jsx(c,{className:"h-[18px] w-[18px]"})}),a.jsx("div",{className:"text-sm font-semibold",children:d}),a.jsx("p",{className:"mt-1 text-[14px] leading-snug text-muted",children:h})]},d))}),a.jsxs("div",{className:"mt-12 flex items-end justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:"Projects"}),a.jsx("p",{className:"text-sm text-muted",children:"A project is a folder of code. Nothing in it is written."})]}),a.jsx(ne,{variant:"primary",size:"lg",icon:a.jsx(P1,{className:"h-4 w-4"}),onClick:()=>r(!0),children:"Open a folder"})]}),s.error&&a.jsx("div",{className:"mt-4",children:a.jsx(tt,{error:s.error.message})}),a.jsxs("div",{className:"mt-5 grid gap-3 md:grid-cols-2",children:[o.map(c=>a.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s.mutate(c.root),onKeyDown:d=>d.key==="Enter"&&s.mutate(c.root),className:"card group flex cursor-pointer items-center gap-4 p-4 transition hover:-translate-y-0.5 hover:border-accent/40",children:[a.jsx("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-md bg-gradient-to-br from-accent/20 to-fuchsia-500/20 text-sm font-bold uppercase text-accent",children:c.name.slice(0,2)}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"truncate font-medium",children:c.name}),a.jsx("div",{className:"truncate font-mono text-xs text-muted",title:c.root,children:c.root}),a.jsxs("div",{className:"mt-1 text-[12px] text-muted",children:["opened ",qt(c.openedAt),c.contexts.length>0&&` · ${c.contexts.length} context folder${c.contexts.length>1?"s":""}`]})]}),a.jsx("button",{className:"rounded-md p-1.5 text-muted opacity-0 transition hover:bg-raised hover:text-bad group-hover:opacity-100",title:"Remove from the list (your lenses and quizzes stay on disk)",onClick:d=>{d.stopPropagation(),l.mutate(c.id)},children:a.jsx(dr,{className:"h-4 w-4"})}),a.jsx(Vu,{className:"h-4 w-4 text-muted transition group-hover:translate-x-0.5 group-hover:text-accent"})]},c.id)),!i.isLoading&&!o.length&&a.jsxs("div",{className:"card col-span-full border-dashed p-10 text-center text-sm text-muted",children:["No projects yet. Open a folder, or start from a terminal: ",a.jsx("span",{className:"kbd",children:"npx learnforge ./my-repo"})]})]})]}),n&&a.jsx(rp,{title:"Open a folder",start:((u=o[0])==null?void 0:u.root.split("/").slice(0,-1).join("/"))||void 0,onClose:()=>r(!1),onPick:c=>{r(!1),s.mutate(c)}})]})}function Ea(e,t=36){if(e.length<=t)return e;const n=e.split("/"),r=n.pop()??"";return[...n.map(s=>s===""?"":s.startsWith(".")?s.slice(0,2):s[0]),r].join("/")}const rS=/\.(ts|tsx|js|jsx|mjs|py|go|rs|java|kt|rb|php|cs|c|h|cpp|swift|scala|sh|sql|vue|svelte|lua|dart|ex)$/i,iS=/\.(md|txt|rst|json|ya?ml|toml|ini|cfg)$/i;function s0(e){return e.kind==="file"?[e.path]:(e.children??[]).flatMap(s0)}function l0(e,t){if(!t)return e;const n=t.toLowerCase(),r=[];for(const i of e)if(i.kind==="file")i.path.toLowerCase().includes(n)&&r.push(i);else{const s=l0(i.children??[],t);s.length&&r.push({...i,children:s})}return r}const sS={new:"",seen:"bg-muted/50",understood:"bg-good",fading:"bg-warn/50",stale:"bg-warn"};function ip({roots:e,selected:t,onToggle:n,openFile:r,onOpen:i,levels:s,meta:l,openAll:o=!1}){const[u,c]=b.useState(""),[d,h]=b.useState(()=>o?new Set:new Set(e.map(x=>x.path))),p=b.useMemo(()=>new Set(t),[t]),f=b.useMemo(()=>l0(e,u.trim()),[e,u]),g=(x,w)=>{var z;const m=u?!0:o?!d.has(x.path):d.has(x.path),y=x.kind==="dir"?s0(x):[x.path],v=y.filter(A=>p.has(A)).length,j=v>0&&v===y.length,C=v>0&&!j,k=s==null?void 0:s.get(x.path),L=x.kind==="dir"?m?P1:L1:rS.test(x.name)?il:iS.test(x.name)?$j:C1;return a.jsxs("div",{children:[a.jsxs("div",{className:ae("group flex h-[22px] cursor-pointer items-center gap-1 pr-2 text-[13px]",r===x.path?"bg-sel text-ink dark:text-white":"hover:bg-raised"),style:{paddingLeft:w*12+8},onClick:()=>{x.kind==="dir"?h(A=>{const N=new Set(A);return N.has(x.path)?N.delete(x.path):N.add(x.path),N}):i(x.path)},children:[a.jsx(wa,{className:ae("h-3.5 w-3.5 shrink-0 text-muted transition",x.kind==="file"&&"invisible",m&&"rotate-90")}),a.jsx("input",{type:"checkbox",className:"h-3.5 w-3.5 shrink-0 cursor-pointer accent-[rgb(var(--accent))]",checked:j,ref:A=>{A&&(A.indeterminate=C)},onClick:A=>A.stopPropagation(),onChange:()=>n(y,!j),title:x.kind==="dir"?`Tick all ${y.length} files`:"Use as context"}),a.jsx(L,{className:ae("h-4 w-4 shrink-0","text-muted")}),a.jsx("span",{className:"truncate",children:x.name}),k&&k!=="new"&&a.jsx("span",{title:k,className:ae("ml-auto h-1.5 w-1.5 shrink-0 rounded-full",sS[k])}),l&&x.kind==="file"&&a.jsx("span",{className:"ml-auto flex shrink-0 items-center gap-1.5",children:l(x.path)})]}),x.kind==="dir"&&m&&((z=x.children)==null?void 0:z.map(A=>g(A,w+1)))]},x.path)};return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsx("div",{className:"px-2 py-1.5",children:a.jsxs("div",{className:"relative",children:[a.jsx(hl,{className:"pointer-events-none absolute left-2 top-[6px] h-3.5 w-3.5 text-muted"}),a.jsx("input",{className:"input h-[26px] pl-7 text-[13px]",placeholder:"Filter files",value:u,onChange:x=>c(x.target.value)})]})}),a.jsx("div",{className:"min-h-0 flex-1 overflow-auto pb-4",children:f.map(x=>g(x,0))})]})}function lS({current:e,onApply:t,onClose:n}){const{project:r}=nt(),i=It(),[s,l]=b.useState(e),[o,u]=b.useState(null),[c,d]=b.useState(!1),h=ge({queryKey:["tree",r.id,r.contexts],queryFn:()=>me(`/projects/${r.id}/tree`)}),p=pi({mutationFn:f=>qa(`/projects/${r.id}`,{contexts:[...r.contexts,f]}),onSuccess:()=>i.invalidateQueries()});return a.jsxs("div",{className:"fixed inset-0 z-50 grid place-items-center bg-black/40 p-4 backdrop-blur-sm",onClick:n,children:[a.jsxs("div",{className:"card flex h-[80vh] w-full max-w-xl flex-col overflow-hidden",onClick:f=>f.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-4 py-3",children:[a.jsx("h2",{className:"text-sm font-semibold",children:"Add context"}),a.jsxs("span",{className:"text-xs text-muted",children:[s.length," ticked"]}),a.jsx("button",{className:"ml-auto text-muted hover:text-ink",onClick:n,"aria-label":"Close",children:a.jsx(vi,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-4 py-2 text-xs text-muted",children:[a.jsx("span",{className:"flex-1",children:"Tick files from the project or its context folders. The model reads them next to the change."}),a.jsx(ne,{size:"sm",icon:a.jsx(T1,{className:"h-3.5 w-3.5"}),onClick:()=>d(!0),children:"Add a folder"})]}),p.error&&a.jsx("div",{className:"p-2",children:a.jsx(tt,{error:p.error.message})}),a.jsxs("div",{className:"min-h-0 flex-1",children:[h.isLoading&&a.jsx("div",{className:"p-4",children:a.jsx(Nt,{})}),h.data&&a.jsx(ip,{roots:h.data,selected:s,onToggle:(f,g)=>l(g?[...new Set([...s,...f])]:s.filter(x=>!f.includes(x))),openFile:o,onOpen:f=>{u(f),l(s.includes(f)?s.filter(g=>g!==f):[...s,f])}})]}),a.jsxs("div",{className:"flex justify-end gap-2 border-t border-line px-4 py-3",children:[a.jsx(ne,{variant:"ghost",onClick:n,children:"Cancel"}),a.jsxs(ne,{variant:"primary",onClick:()=>{t(s),n()},children:["Use ",s.length," file",s.length===1?"":"s"]})]})]}),c&&a.jsx("div",{onClick:f=>f.stopPropagation(),children:a.jsx(rp,{title:"Add a context folder",cta:"Add as context",start:r.root.split("/").slice(0,-1).join("/"),onClose:()=>d(!1),onPick:f=>{d(!1),p.mutate(f)}})})]})}const _c=5,$c=[{id:"lens",label:"Lens",icon:rl,hint:"Read an explanation through one question"},{id:"quiz",label:"Quiz",icon:sl,hint:"Answer questions in your own words"},{id:"teach",label:"Teach",icon:ba,hint:"Explain it yourself; get graded"},{id:"tutor",label:"Tutor",icon:Na,hint:"Ask; get questions and hints back"},{id:"walk",label:"Walk",icon:ka,hint:"One block at a time, with a check each"},{id:"practice",label:"Practice",icon:ja,hint:"Write the key lines back"},{id:"hunt",label:"Bug hunt",icon:va,hint:"Find the bugs planted in a copy"},{id:"notes",label:"Notes",icon:mh,hint:"Your notes on this file"}],aS=["walk","hunt","notes"],bg=[{value:1,label:"1",title:"One short hole"},{value:2,label:"2",title:"A condition and a computation"},{value:3,label:"3",title:"Core logic"},{value:4,label:"4",title:"Whole function bodies"}],jg=[{value:1,label:"Easy",title:"One bug, fairly visible"},{value:2,label:"Medium",title:"Two bugs, one needs the logic"},{value:3,label:"Hard",title:"Two or three subtle bugs"}];function a0({files:e,diff:t,practiceFile:n,onRemove:r,onSetFiles:i}){var Gn,Yn,mr;const{project:s,rel:l,toggle:o,setSelected:u,focusLine:c}=nt(),d=r??(T=>o(T,!1)),h=i??u,[p,f]=np(),[g,x]=b.useState(!1),[w,m]=b.useState(!1),y=St(),[v,j]=b.useState(()=>$c.some(T=>T.id===p.get("do"))?p.get("do"):"lens"),[C,k]=b.useState(t?"change":"explain"),[L,z]=b.useState(""),[A,N]=b.useState(!1),[R,I]=b.useState(""),[W,V]=b.useState(""),[_,Y]=b.useState("standard"),[K,H]=b.useState(null),[ee,S]=b.useState(2),[ce,ye]=b.useState(""),[P,Ee]=b.useState(1),[Fe,ve]=b.useState(""),je=Hn(),Dt=ge({queryKey:["lens-kinds"],queryFn:()=>me("/lens-kinds"),staleTime:1/0}),rn=ge({queryKey:["misconceptions",s.id],queryFn:()=>me(`/projects/${s.id}/misconceptions`)});b.useEffect(()=>{if(!p.get("do"))return;const T=new URLSearchParams(p);T.delete("do"),f(T,{replace:!0})},[]);const Ct=`/projects/${s.id}`,$e=`/p/${s.id}`,it=e.length===0,Pn=aS.includes(v),Tn=ge({queryKey:["estimate",s.id,e],queryFn:()=>bi(`${Ct}/estimate`,{files:e}),enabled:!it&&!Pn,staleTime:3e4}),Wt=()=>je.run(`${Ct}/lenses`,{files:e,kind:L.trim()?"custom":C,question:L.trim()||void 0,diff:t,sketch:A&&R.trim()||void 0,traceInput:C==="trace"?W:void 0,depth:_},T=>y(`${$e}/lens/${T.resultId}`)),Qn=(T=!1)=>je.run(`${Ct}/quizzes`,T?{files:[],weak:!0}:{files:e,diff:t,count:K??void 0},xe=>y(`${$e}/quiz/${xe.resultId}`)),sn=(T,xe,ut)=>je.run(`${Ct}/${T}`,xe,Ln=>y(`${$e}/${ut}/${Ln.resultId}`)),Kn=$c.find(T=>T.id===v),pr=((Gn=rn.data)==null?void 0:Gn.length)??0;return a.jsxs("div",{className:"flex h-full flex-col bg-panel",children:[a.jsx("div",{className:"grid grid-cols-4 gap-1 border-b border-line p-2",children:$c.map(T=>a.jsxs("button",{onClick:()=>j(T.id),title:T.hint,className:ae("flex flex-col items-center gap-0.5 rounded-lg px-1 py-1.5 text-[12px] font-medium transition",v===T.id?"bg-accent/12 text-accent":"text-muted hover:bg-raised hover:text-ink"),children:[a.jsx(T.icon,{className:"h-4 w-4"}),T.label]},T.id))}),a.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-auto p-4",children:[a.jsxs("p",{className:"-mb-1 text-xs text-muted",children:[Kn.hint,"."]}),!Pn&&a.jsxs("section",{children:[a.jsxs("div",{className:"label flex items-center gap-1",children:[a.jsxs("span",{children:["Context · ",e.length]}),t&&a.jsxs("span",{className:"truncate normal-case tracking-normal",children:["· change ",t.base,"..",t.head||"working tree"]}),a.jsxs("button",{className:"ml-auto inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 normal-case tracking-normal text-accent hover:bg-accent/10",onClick:()=>x(!0),title:"Add files from the project or a context folder (docs, notes, a session)",children:[a.jsx(I1,{className:"h-3 w-3"})," Add"]})]}),it?a.jsx("p",{className:"rounded-lg border border-dashed border-line p-3 text-[14px] text-muted",children:"Tick files in the tree, open one, or use Add. The model reads only what you pick."}):a.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[(w?e:e.slice(0,_c)).map(T=>a.jsxs("span",{className:"group inline-flex max-w-full items-center gap-1 rounded-md bg-raised px-2 py-1 font-mono text-[12px]",title:T,children:[a.jsx("span",{className:"truncate",children:Ea(l(T))}),a.jsx("button",{className:"text-muted hover:text-bad",onClick:()=>d(T),"aria-label":"Remove",children:a.jsx(vi,{className:"h-3 w-3"})})]},T)),e.length>_c&&a.jsx("button",{className:"rounded-md px-2 py-1 text-[12px] font-medium text-accent hover:bg-accent/10",onClick:()=>m(T=>!T),children:w?"show less":`+${e.length-_c} more`})]}),Tn.data&&a.jsxs("div",{className:ae("mt-1.5 text-[12px]",Tn.data.cut?"text-warn":"text-muted"),children:["~",Tn.data.tokens.toLocaleString()," tokens",Tn.data.cut&&" · some files do not fit and will be left out"]})]}),Pn&&a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"File"}),n?a.jsx("div",{className:"truncate rounded-md bg-raised px-2 py-1.5 font-mono text-xs",title:n,children:l(n)}):a.jsx("p",{className:"rounded-lg border border-dashed border-line p-3 text-[14px] text-muted",children:"Open a file first."})]}),v==="lens"&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Pick a lens"}),a.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:(Dt.data??[]).map(T=>a.jsxs("button",{onClick:()=>{k(T.id),z("")},className:ae("rounded-lg border px-3 py-2 text-left transition",C===T.id&&!L.trim()?"border-accent/60 bg-accent/8 ring-1 ring-accent/30":"border-line hover:border-accent/30 hover:bg-raised"),children:[a.jsx("div",{className:"text-[14px] font-medium",children:T.label}),a.jsx("div",{className:"text-xs text-muted",children:T.blurb})]},T.id))})]}),C==="trace"&&!L.trim()&&a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Input to trace"}),a.jsx("input",{className:"input",placeholder:"e.g. add(3) (empty = the model picks one)",value:W,onChange:T=>V(T.target.value)})]}),a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Depth"}),a.jsx(Bt,{value:_,onChange:Y,options:[{value:"overview",label:"Overview",title:"About 1.5 screens: the big picture, 3-4 steps"},{value:"standard",label:"Standard",title:"At least 3 screens: enough to change it safely, 6-9 steps"},{value:"deep",label:"Deep",title:"5-6 screens, a long blog post: every branch and failure path, 11-15 steps"}]})]}),a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Or ask your own question"}),a.jsx("textarea",{className:"input min-h-[64px] resize-y",placeholder:"e.g. Why is the retry here and not in the caller?",value:L,onChange:T=>z(T.target.value)})]}),a.jsxs("section",{className:"rounded-lg border border-line p-3",children:[a.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-[14px] font-medium",children:[a.jsx("input",{type:"checkbox",className:"accent-[rgb(var(--accent))]",checked:A,onChange:T=>N(T.target.checked)}),a.jsx(A1,{className:"h-3.5 w-3.5 text-accent"}),t?"Predict first":"My take first"]}),A&&a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"input mt-2 min-h-[72px] resize-y",placeholder:t?"What behaviour changes, and what test or caller would break?":"In 2-3 lines: what does it do, and how? Where is the risk?",value:R,onChange:T=>I(T.target.value)}),a.jsx("p",{className:"mt-1 text-[12px] text-muted",children:"The lens opens with where your take differs. That gap is where the learning is."})]})]}),a.jsx(ne,{variant:"primary",className:"w-full",icon:a.jsx(Gf,{className:"h-4 w-4"}),disabled:it||je.busy||A&&!R.trim(),onClick:Wt,children:"Make the lens"})]}),v==="quiz"&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Questions"}),a.jsx(Bt,{value:K??0,onChange:T=>H(T===0?null:T),options:[{value:0,label:"Default"},{value:3,label:"3"},{value:5,label:"5"},{value:8,label:"8"}]}),a.jsx("p",{className:"mt-2 text-xs text-muted",children:"Free-text answers. Questions ask about behaviour and reasons, not names. Mark each answer sure or guess."})]}),a.jsxs(ne,{variant:"primary",className:"w-full",icon:a.jsx(sl,{className:"h-4 w-4"}),disabled:it||je.busy,onClick:()=>Qn(),children:["Quiz me on ",e.length||""," file",e.length===1?"":"s"]}),a.jsxs("div",{className:"rounded-lg border border-line p-3",children:[a.jsxs("div",{className:"flex items-center gap-2 text-[14px] font-medium",children:[a.jsx(yu,{className:"h-3.5 w-3.5 text-bad"})," Weak spots · ",pr]}),a.jsx("p",{className:"mt-1 text-xs text-muted",children:"New questions aimed at what you got wrong before, from any file. A right answer clears the weak spot."}),a.jsx(ne,{className:"mt-2 w-full",size:"sm",disabled:!pr||je.busy,onClick:()=>Qn(!0),children:"Quiz my weak spots"})]})]}),v==="teach"&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Explain it to a new teammate"}),a.jsx("textarea",{className:"input min-h-[180px] resize-y",placeholder:"What does this code do, how, and why this way? What would surprise someone? Write it before you look anything up.",value:Fe,onChange:T=>ve(T.target.value)}),a.jsx("p",{className:"mt-1 text-xs text-muted",children:"Graded 1-5 against the code: what you got right, what you missed, what is wrong. 4+ counts as understood."})]}),a.jsx(ne,{variant:"primary",className:"w-full",icon:a.jsx(ba,{className:"h-4 w-4"}),disabled:it||je.busy||Fe.trim().length<20,onClick:()=>sn("teachbacks",{files:e,text:Fe},"teach"),children:"Grade my explanation"})]}),v==="tutor"&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Your question"}),a.jsx("textarea",{className:"input min-h-[100px] resize-y",placeholder:"e.g. Why does this return early here?",value:Fe,onChange:T=>ve(T.target.value)}),a.jsx("p",{className:"mt-1 text-xs text-muted",children:"The tutor answers with a question or a hint first, and gives more each turn. Ask it to just tell you any time."})]}),a.jsx(ne,{variant:"primary",className:"w-full",icon:a.jsx(Na,{className:"h-4 w-4"}),disabled:it||je.busy||!Fe.trim(),onClick:()=>sn("threads",{files:e,text:Fe},"tutor"),children:"Ask the tutor"})]}),v==="walk"&&a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"text-xs text-muted",children:"The file in reading order, one block at a time. Answer a short check on each block before the next."}),a.jsx(ne,{variant:"primary",className:"w-full",icon:a.jsx(ka,{className:"h-4 w-4"}),disabled:!n||je.busy,onClick:()=>sn("walks",{file:n},"walk"),children:"Walk me through it"})]}),v==="practice"&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsxs("div",{className:"label",children:["Concept to practise ",a.jsx("span",{className:"normal-case tracking-normal",children:"(optional)"})]}),a.jsx("input",{className:"input",placeholder:"e.g. retry with backoff, how a run resumes",value:ce,onChange:T=>ye(T.target.value)}),a.jsx("p",{className:"mt-1.5 text-xs text-muted",children:"Leave it empty and the model picks the main idea of the files above. Holes can land in any of them."})]}),a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Difficulty"}),a.jsx(Bt,{value:ee,onChange:S,options:bg.map(T=>({...T}))}),a.jsxs("p",{className:"mt-2 text-xs text-muted",children:[(Yn=bg.find(T=>T.value===ee))==null?void 0:Yn.title,". The key lines are cut out of a copy; you write them back here, with hints if you need them. Your folder is not touched."]})]}),a.jsx(ne,{variant:"primary",className:"w-full",icon:a.jsx(ja,{className:"h-4 w-4"}),disabled:it||je.busy,onClick:()=>sn("practice",{files:e,level:ee,concept:ce.trim()||void 0},"practice"),children:"Make the practice"})]}),v==="hunt"&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsx("div",{className:"label",children:"Difficulty"}),a.jsx(Bt,{value:P,onChange:Ee,options:jg.map(T=>({...T}))}),a.jsxs("p",{className:"mt-2 text-xs text-muted",children:[(mr=jg.find(T=>T.value===P))==null?void 0:mr.title,". Bugs go into a copy of the file. Click the lines you think are wrong and say why."]})]}),a.jsx(ne,{variant:"primary",className:"w-full",icon:a.jsx(va,{className:"h-4 w-4"}),disabled:!n||je.busy,onClick:()=>sn("hunts",{file:n,level:P},"hunt"),children:"Start the hunt"})]}),v==="notes"&&n&&a.jsx(oS,{file:n,line:c}),je.busy&&je.job&&a.jsx(Vn,{kind:je.job.kind,elapsed:je.elapsed}),je.error&&a.jsx(tt,{error:je.error,onClose:je.clearError})]}),g&&a.jsx(lS,{current:e,onApply:h,onClose:()=>x(!1)})]})}function oS({file:e,line:t}){const{project:n,setOpenFile:r}=nt(),i=It(),[s,l]=b.useState(""),o=ge({queryKey:["notes",n.id,e],queryFn:()=>me(`/projects/${n.id}/notes?file=${encodeURIComponent(e)}`)}),u=async()=>{await bi(`/projects/${n.id}/notes`,{file:e,line:t??void 0,text:s}),l(""),i.invalidateQueries({queryKey:["notes",n.id]})},c=[...o.data??[]].sort((d,h)=>(d.line??0)-(h.line??0));return a.jsxs(a.Fragment,{children:[a.jsxs("section",{children:[a.jsxs("div",{className:"label",children:["New note ",t?`on line ${t}`:"on the file"]}),a.jsx("textarea",{className:"input min-h-[72px] resize-y",placeholder:"Click a line in the code to pin the note there.",value:s,onChange:d=>l(d.target.value)}),a.jsx(ne,{className:"mt-2 w-full",size:"sm",disabled:!s.trim(),onClick:u,children:"Add note"})]}),a.jsxs("section",{className:"space-y-2",children:[c.map(d=>a.jsxs("div",{className:"group rounded-lg border border-line p-2.5 text-[14px]",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[d.line?a.jsxs("button",{className:"font-mono text-[12px] text-accent hover:underline",onClick:()=>r(e,d.line),children:["line ",d.line]}):a.jsx("span",{className:"text-[12px] text-muted",children:"file"}),a.jsx("button",{className:"ml-auto text-muted opacity-0 transition hover:text-bad group-hover:opacity-100",onClick:async()=>{await pl(`/projects/${n.id}/notes/${d.id}`),i.invalidateQueries({queryKey:["notes",n.id]})},"aria-label":"Delete note",children:a.jsx(dr,{className:"h-3.5 w-3.5"})})]}),a.jsx("div",{className:"mt-1 whitespace-pre-wrap",children:d.text})]},d.id)),!c.length&&a.jsx("p",{className:"text-xs text-muted",children:"No notes on this file yet."})]})]})}function Ha({initial:e,onClose:t}){const{project:n,rel:r}=nt(),i=It(),[s,l]=b.useState(e.front??""),[o,u]=b.useState(e.back??""),[c,d]=b.useState(null),[h,p]=b.useState(!1),f=async()=>{p(!0);try{await bi(`/projects/${n.id}/cards`,{...e,front:s,back:o}),await i.invalidateQueries(),t()}catch(g){d(g.message),p(!1)}};return a.jsxs(Yu,{title:a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(cr,{className:"h-4 w-4 text-accent"})," New review card"]}),onClose:t,footer:a.jsxs(a.Fragment,{children:[a.jsx(ne,{variant:"ghost",onClick:t,children:"Cancel"}),a.jsx(ne,{variant:"primary",loading:h,disabled:!s.trim()||!o.trim(),onClick:f,children:"Save card"})]}),children:[e.file&&a.jsxs("div",{className:"mb-3 font-mono text-[12px] text-muted",children:[r(e.file),e.line?`:${e.line}`:""]}),a.jsx("label",{className:"label",children:"Question (front)"}),a.jsx("textarea",{className:"input min-h-[72px]",value:s,onChange:g=>l(g.target.value),placeholder:"What should you be able to recall?",autoFocus:!0}),a.jsx("label",{className:"label mt-3",children:"Answer (back)"}),a.jsx("textarea",{className:"input min-h-[96px]",value:o,onChange:g=>u(g.target.value),placeholder:"The answer, in your own words"}),a.jsx("p",{className:"mt-2 text-xs text-muted",children:"The card comes back on the Review page: soon at first, then less often as you remember it."}),c&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:c})})]})}const uS=4e3;let cS=null;const dS=()=>cS??(cS=Pu(()=>import("./index-DnmHf2in.js"),[])),hS={docker:"dockerfile",make:"makefile",text:"text"};function fS(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Bc(e,t){return`<pre><code>${e.split(`
|
|
449
|
+
`).map((n,r)=>`<span class="line ${t(r+1)}" data-line="${r+1}">${fS(n)}</span>`).join(`
|
|
450
|
+
`)}</code></pre>`}function Va({text:e,lang:t,focusLine:n,marks:r,className:i,onLineClick:s,firstLine:l=1}){const[o,u]=b.useState(""),c=b.useRef(null),d=b.useRef(null);return b.useEffect(()=>{let h=!0;const p=g=>{const x=g+l-1,w=(r??[]).filter(m=>x>=m.from&&x<=m.to).map(m=>m.cls);return ae(w,x===n&&"hl")};if(e.split(`
|
|
451
|
+
`).length>uS||t==="text"){u(Bc(e,p));return}return u(g=>g||Bc(e,p)),dS().then(async g=>{const x=hS[t]??t,w=await g.codeToHtml(e,{lang:x in g.bundledLanguages?x:"text",themes:{light:"solarized-light",dark:"dark-plus"},defaultColor:!1,transformers:[{line(m,y){m.properties["data-line"]=y;const v=p(y);v&&this.addClassToHast(m,v)}}]});h&&u(w)}).catch(()=>h&&u(Bc(e,p))),()=>{h=!1}},[e,t,n,r,l]),b.useEffect(()=>{if(!n||!c.current||d.current===n)return;const h=c.current.querySelector(`[data-line="${n-l+1}"]`);h==null||h.scrollIntoView({block:"center",behavior:"smooth"})},[o,n]),a.jsx("div",{ref:c,className:ae("code-view font-mono",s&&"clickable",i),style:l>1?{"--line-start":l-1}:void 0,onClick:h=>{var f,g;if((f=window.getSelection())!=null&&f.toString())return;const p=(g=h.target.closest("[data-line]"))==null?void 0:g.dataset.line;if(p&&s){const x=Number(p)+l-1;d.current=x,s(x)}},dangerouslySetInnerHTML:{__html:o}})}function Ng(e,t,n){try{const r=localStorage.getItem(e);return r===null?t:n(r)}catch{return t}}function Sg(e,t){try{localStorage.setItem(e,t)}catch{}}function Wn({id:e,left:t,right:n,initial:r=280,min:i=180,max:s=640,side:l="left",className:o,collapsible:u=!1,startCollapsed:c=!1,openSignal:d}){const h=`learnforge.split.${e}`,[p,f]=b.useState(()=>Ng(h,r,Number)||r),[g,x]=b.useState(()=>u&&Ng(`${h}.collapsed`,c,V=>V==="1")),w=b.useRef(!0);b.useEffect(()=>{if(w.current){w.current=!1;return}d!=null&&x(!1)},[d]);const[m,y]=b.useState(!1),v=b.useRef(null),j=b.useRef();b.useEffect(()=>Sg(h,String(p)),[h,p]),b.useEffect(()=>Sg(`${h}.collapsed`,g?"1":"0"),[h,g]),b.useEffect(()=>{const V=Y=>{if(!v.current)return;const K=Y.clientX-v.current.x;f(Math.min(s,Math.max(i,v.current.size+(l==="left"?K:-K))))},_=()=>{v.current=null,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("pointermove",V),window.addEventListener("pointerup",_),()=>{window.removeEventListener("pointermove",V),window.removeEventListener("pointerup",_)}},[i,s,l]);const C=()=>{clearTimeout(j.current),y(!0)},k=()=>{clearTimeout(j.current),j.current=setTimeout(()=>y(!1),250)};b.useEffect(()=>()=>clearTimeout(j.current),[]);const L=l==="left";b.useEffect(()=>{if(!u)return;const V=L?"[":"]",_=Y=>{const K=Y.target;Y.key!==V||Y.ctrlKey||Y.metaKey||Y.altKey||K.closest("input, textarea, select, [contenteditable=true], .cm-editor")||(x(H=>!H),y(!1))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[u,L]);const z=L?xu:wa,A=L?wa:xu,N=a.jsxs("div",{className:"group relative w-px shrink-0 cursor-col-resize bg-line",onPointerDown:V=>{V.target.closest("button")||(v.current={x:V.clientX,size:p},document.body.style.cursor="col-resize",document.body.style.userSelect="none")},onDoubleClick:()=>f(r),title:"Drag to resize, double-click to reset",children:[a.jsx("div",{className:"absolute inset-y-0 -left-1.5 -right-1.5 transition group-hover:bg-accent/30"}),u&&a.jsx("button",{onClick:()=>{x(!0),y(!1)},title:`Fold this pane away (key ${L?"[":"]"}); hover the edge to see it again`,className:"absolute top-1/2 z-20 -mt-5 grid h-10 w-5 -translate-x-1/2 place-items-center rounded-full border border-line bg-panel text-muted shadow-sm transition hover:border-accent/50 hover:text-accent",children:a.jsx(z,{className:"h-3 w-3"})})]}),R=a.jsx("div",{onMouseEnter:C,onMouseLeave:k,className:ae("group flex w-3 shrink-0 cursor-pointer flex-col items-center justify-center bg-panel transition hover:bg-accent/10",L?"border-r border-line":"border-l border-line"),onClick:()=>{x(!1),y(!1)},title:`Hover to peek, click to pin open (key ${L?"[":"]"})`,children:a.jsx(A,{className:"h-3 w-3 text-muted group-hover:text-accent"})}),I=a.jsx("div",{style:{width:p},onMouseEnter:g?C:void 0,onMouseLeave:g?k:void 0,className:ae("min-h-0 shrink-0 overflow-hidden",g&&!m&&"hidden",g&&m&&ae("absolute inset-y-0 z-30 shadow-2xl ring-1 ring-line",L?"left-3":"right-3")),children:L?t:n}),W=a.jsx("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden",children:L?n:t});return a.jsx("div",{className:ae("relative flex h-full min-h-0 min-w-0",o),children:L?a.jsxs(a.Fragment,{children:[g&&R,I,!g&&N,W]}):a.jsxs(a.Fragment,{children:[W,!g&&N,I,g&&R]})})}function pS(){var z;const{project:e,selected:t,setSelected:n,toggle:r,openFile:i,setOpenFile:s,focusLine:l,rel:o}=nt(),u=It(),[c,d]=b.useState(!1),[h,p]=b.useState(!1),f=ge({queryKey:["notes",e.id,i],queryFn:()=>me(`/projects/${e.id}/notes?file=${encodeURIComponent(i)}`),enabled:!!i}),g=b.useMemo(()=>(f.data??[]).filter(A=>A.line).map(A=>({from:A.line,to:A.line,cls:"note"})),[f.data]),x=ge({queryKey:["tree",e.id,e.contexts],queryFn:()=>me(`/projects/${e.id}/tree`)}),w=ge({queryKey:["progress",e.id],queryFn:()=>me(`/projects/${e.id}/progress`)}),m=ge({queryKey:["file",e.id,i],queryFn:()=>me(`/projects/${e.id}/file?path=${encodeURIComponent(i)}`),enabled:!!i}),y=pi({mutationFn:A=>qa(`/projects/${e.id}`,{contexts:A}),onSuccess:()=>u.invalidateQueries()}),v=b.useMemo(()=>new Map((w.data??[]).map(A=>[A.path,A.level])),[w.data]),j=t.length?t:i?[i]:[],C=i?t.includes(i):!1,k=a.jsxs("div",{className:"flex h-full flex-col bg-side",children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-3 py-2.5",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"truncate text-sm font-semibold",children:e.name}),a.jsx("div",{className:"truncate font-mono text-[12px] text-muted",title:e.root,children:Ea(e.root,30)})]}),a.jsx(ne,{size:"sm",variant:"ghost",icon:a.jsx(T1,{className:"h-4 w-4"}),title:"Add a context folder (docs, notes, a session folder)",onClick:()=>d(!0)})]}),e.contexts.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1 border-b border-line px-3 py-2",children:e.contexts.map(A=>a.jsxs(we,{tone:"accent",className:"max-w-full",children:[a.jsxs("span",{className:"truncate",title:A,children:["+ ",A.split("/").pop()]}),a.jsx("button",{onClick:()=>y.mutate(e.contexts.filter(N=>N!==A)),"aria-label":"Remove context folder",children:a.jsx(vi,{className:"h-3 w-3"})})]},A))}),t.length>0&&a.jsxs("div",{className:"flex items-center gap-2 border-b border-line bg-accent/5 px-3 py-1.5 text-xs",children:[a.jsxs("span",{className:"font-medium text-accent",children:[t.length," ticked"]}),a.jsx("button",{className:"ml-auto text-muted hover:text-ink",onClick:()=>n([]),children:"clear"})]}),a.jsxs("div",{className:"min-h-0 flex-1",children:[x.isLoading&&a.jsx("div",{className:"p-4",children:a.jsx(Nt,{})}),x.error&&a.jsx("div",{className:"p-3",children:a.jsx(tt,{error:x.error.message})}),x.data&&a.jsx(ip,{roots:x.data,selected:t,onToggle:(A,N)=>n(N?[...t,...A]:t.filter(R=>!A.includes(R))),openFile:i,onOpen:A=>s(A),levels:v})]})]}),L=a.jsx("div",{className:"flex h-full flex-col",children:i?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line bg-panel px-4 py-2",children:[a.jsx("div",{className:"min-w-0 flex-1 truncate font-mono text-[14px]",children:o(i)}),m.data&&a.jsx(we,{children:m.data.lang}),v.get(i)&&v.get(i)!=="new"&&a.jsx(we,{tone:v.get(i)==="understood"?"good":v.get(i)==="stale"?"warn":"muted",children:v.get(i)}),a.jsx(ne,{size:"sm",variant:"ghost",icon:a.jsx(cr,{className:"h-3.5 w-3.5"}),title:"Make a review card about this file (click a line first to pin it)",onClick:()=>p(!0),children:"Card"}),a.jsx(ne,{size:"sm",variant:C?"primary":"secondary",icon:C?a.jsx(Zj,{className:"h-3.5 w-3.5"}):a.jsx(e2,{className:"h-3.5 w-3.5"}),onClick:()=>r(i),children:C?"In context":"Add to context"})]}),a.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-panel",children:[m.isLoading&&a.jsx("div",{className:"p-6",children:a.jsx(Nt,{})}),m.error&&a.jsx("div",{className:"p-4",children:a.jsx(tt,{error:m.error.message})}),m.data&&a.jsx(Va,{text:m.data.text,lang:m.data.lang,focusLine:l,marks:g,onLineClick:A=>s(i,A)}),((z=m.data)==null?void 0:z.truncated)&&a.jsx("div",{className:"p-3 text-xs text-warn",children:"File cut at 400 KB."})]})]}):a.jsx(At,{icon:a.jsx(rl,{className:"h-6 w-6"}),title:"Pick a file to read",children:"Open a file on the left, or tick several to give the model more context. Then choose a lens, a quiz or a practice on the right."})});return a.jsxs(a.Fragment,{children:[a.jsx(Wn,{id:"explore-tree",collapsible:!0,className:"h-full",initial:290,left:k,right:a.jsx(Wn,{id:"explore-panel",collapsible:!0,side:"right",initial:360,min:300,max:560,left:L,right:a.jsx(a0,{files:j,practiceFile:i,onSetFiles:n})})}),h&&i&&a.jsx(Ha,{initial:{kind:"own",file:i,line:l??void 0},onClose:()=>p(!1)}),c&&a.jsx(rp,{title:"Add a context folder",cta:"Add as context",start:e.root.split("/").slice(0,-1).join("/"),onClose:()=>d(!1),onPick:A=>{d(!1),y.mutate([...e.contexts,A])}})]})}function Uc({value:e,options:t,onChange:n,placeholder:r="Pick one",className:i}){const[s,l]=b.useState(!1),[o,u]=b.useState(""),[c,d]=b.useState(0),h=b.useRef(null),p=b.useRef(null),f=t.find(w=>w.value===e),g=b.useMemo(()=>{const w=o.toLowerCase().split(/\s+/).filter(Boolean);return w.length?t.filter(m=>{const y=`${m.label} ${m.hint??""} ${m.group??""}`.toLowerCase();return w.every(v=>y.includes(v))}):t},[t,o]);b.useEffect(()=>{if(!s)return;const w=m=>{var y;return!((y=h.current)!=null&&y.contains(m.target))&&l(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[s]),b.useEffect(()=>d(0),[o,s]),b.useEffect(()=>{var w,m;(m=(w=p.current)==null?void 0:w.querySelector(`[data-i="${c}"]`))==null||m.scrollIntoView({block:"nearest"})},[c]);const x=w=>{n(w),l(!1),u("")};return a.jsxs("div",{ref:h,className:ae("relative",i),children:[a.jsxs("button",{type:"button",onClick:()=>l(w=>!w),className:ae("input flex h-8 items-center gap-2 py-0 text-left text-xs",s&&"border-accent ring-2 ring-accent/20"),title:f?`${f.label}${f.hint?` · ${f.hint}`:""}`:void 0,children:[a.jsx("span",{className:"min-w-0 flex-1 truncate",children:f?f.label:a.jsx("span",{className:"text-muted",children:r})}),(f==null?void 0:f.hint)&&a.jsx("span",{className:"max-w-[40%] shrink-0 truncate text-[12px] text-muted",children:f.hint}),a.jsx(Aj,{className:"h-3.5 w-3.5 shrink-0 text-muted"})]}),s&&a.jsxs("div",{className:"absolute left-0 right-0 top-full z-40 mt-1 overflow-hidden rounded-lg border border-line bg-panel shadow-xl",children:[a.jsxs("div",{className:"relative border-b border-line",children:[a.jsx(hl,{className:"pointer-events-none absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted"}),a.jsx("input",{autoFocus:!0,value:o,onChange:w=>u(w.target.value),placeholder:"Type to filter",className:"w-full bg-transparent py-2 pl-8 pr-3 text-xs text-ink outline-none placeholder:text-muted/70",onKeyDown:w=>{w.key==="ArrowDown"?(w.preventDefault(),d(m=>Math.min(g.length-1,m+1))):w.key==="ArrowUp"?(w.preventDefault(),d(m=>Math.max(0,m-1))):w.key==="Enter"&&g[c]?(w.preventDefault(),x(g[c].value)):w.key==="Escape"&&l(!1)}})]}),a.jsxs("div",{ref:p,className:"max-h-72 overflow-auto py-1",children:[g.map((w,m)=>{var y;return a.jsxs("div",{children:[w.group&&w.group!==((y=g[m-1])==null?void 0:y.group)&&a.jsx("div",{className:"px-3 pb-1 pt-2 text-[11.5px] font-medium uppercase tracking-wide text-muted",children:w.group}),a.jsxs("button",{type:"button","data-i":m,onMouseEnter:()=>d(m),onClick:()=>x(w.value),className:ae("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs",m===c?"bg-accent/10 text-ink":"text-ink/90"),children:[a.jsx(Vf,{className:ae("h-3.5 w-3.5 shrink-0 text-accent",w.value!==e&&"invisible")}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:w.label}),w.hint&&a.jsx("span",{className:"max-w-[45%] shrink-0 truncate text-[12px] text-muted",children:w.hint})]})]},w.value)}),!g.length&&a.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted",children:"No match"})]})]})]})}function mS(e){const t=[];let n=0,r=0,i=!1;for(const s of e.split(`
|
|
452
|
+
`)){const l=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/.exec(s);if(l){n=Number(l[1]),r=Number(l[2]),i=!0,t.push({kind:"hunk",text:s});continue}if(i)if(s.startsWith("+"))t.push({kind:"add",right:r++,text:s.slice(1)});else if(s.startsWith("-"))t.push({kind:"del",left:n++,text:s.slice(1)});else{if(s.startsWith("\\"))continue;(s.startsWith(" ")||s==="")&&t.push({kind:"ctx",left:n++,right:r++,text:s.slice(1)})}}return t.length&&t[t.length-1].kind==="ctx"&&t[t.length-1].text===""&&t.pop(),t}function gS(e){const t=[];for(let n=0;n<e.length;){const r=e[n];if(r.kind==="hunk")t.push({hunk:r.text}),n++;else if(r.kind==="ctx")t.push({left:r,right:r}),n++;else{const i=[],s=[];for(;n<e.length&&e[n].kind==="del";)i.push(e[n++]);for(;n<e.length&&e[n].kind==="add";)s.push(e[n++]);for(let l=0;l<Math.max(i.length,s.length);l++)t.push({left:i[l],right:s[l]})}}return t}const Nh="w-12 shrink-0 select-none pr-3 text-right text-muted/60",o0="min-w-0 flex-1 whitespace-pre-wrap break-all pr-4";function xS({patch:e,mode:t}){const n=b.useMemo(()=>mS(e),[e]),r=!n.some(i=>i.kind==="ctx")&&(!n.some(i=>i.kind==="add")||!n.some(i=>i.kind==="del"));return n.length?t==="unified"||r?a.jsx("div",{className:"min-h-full py-1 font-mono text-[13.5px] leading-6",children:n.map((i,s)=>i.kind==="hunk"?a.jsx("div",{className:"diff-hunk px-4",children:i.text},s):a.jsxs("div",{className:ae("flex",i.kind==="add"&&"diff-add",i.kind==="del"&&"diff-del"),children:[a.jsx("span",{className:Nh,children:i.left??""}),a.jsx("span",{className:Nh,children:i.right??""}),a.jsx("span",{className:"w-4 shrink-0 select-none text-muted",children:i.kind==="add"?"+":i.kind==="del"?"-":""}),a.jsx("span",{className:o0,children:i.text})]},s))}):a.jsx(yS,{rows:gS(n)}):a.jsx("div",{className:"p-6 text-sm text-muted",children:"No text changes (binary file or mode change)."})}function yS({rows:e}){const t=b.useRef(null),[n,r]=b.useState(()=>{try{return Number(localStorage.getItem("learnforge.diff.split"))||50}catch{return 50}});b.useEffect(()=>{try{localStorage.setItem("learnforge.diff.split",String(n))}catch{}},[n]);const i=l=>{var d;const o=(d=t.current)==null?void 0:d.getBoundingClientRect();if(!o)return;l.preventDefault();const u=h=>r(Math.min(85,Math.max(15,(h.clientX-o.left)/o.width*100))),c=()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",c),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",u),window.addEventListener("pointerup",c)},s=(l,o,u)=>a.jsxs("div",{className:ae("flex min-w-0",(l==null?void 0:l.kind)==="del"&&"diff-del",(l==null?void 0:l.kind)==="add"&&"diff-add",!l&&"bg-raised/60"),children:[a.jsx("span",{className:Nh,children:l?o===0?l.left:l.right:""}),a.jsx("span",{className:o0,children:(l==null?void 0:l.text)??""})]},u);return a.jsxs("div",{ref:t,className:"relative min-h-full font-mono text-[13.5px] leading-6",children:[a.jsx("div",{className:"grid py-1",style:{gridTemplateColumns:`${n}% ${100-n}%`},children:e.map((l,o)=>l.hunk?a.jsx("div",{className:"diff-hunk col-span-2 whitespace-pre-wrap break-all px-4",children:l.hunk},o):[s(l.left,0,`${o}l`),s(l.right,1,`${o}r`)])}),a.jsx("div",{className:"group absolute inset-y-0 z-10 w-px cursor-col-resize bg-line",style:{left:`${n}%`},onPointerDown:i,onDoubleClick:()=>r(50),title:"Drag to move, double-click to centre",children:a.jsx("div",{className:"absolute inset-y-0 -left-1.5 -right-1.5 transition group-hover:bg-accent/30"})})]})}function vS(e,t){const n={name:"",path:e,kind:"dir",children:[]};for(const i of t){if(!i.startsWith(e+"/"))continue;const s=i.slice(e.length+1).split("/");let l=n;s.forEach((o,u)=>{const c=u===s.length-1;l.children??(l.children=[]);let d=l.children.find(h=>h.name===o&&h.kind===(c?"file":"dir"));d||(d={name:o,path:`${l.path}/${o}`,kind:c?"file":"dir",...c?{}:{children:[]}},l.children.push(d)),l=d})}const r=i=>{var o;if(i.kind==="file")return i;let s=i;for(;((o=s.children)==null?void 0:o.length)===1&&s.children[0].kind==="dir";){const u=s.children[0];s={...u,name:`${s.name}/${u.name}`}}const l=(s.children??[]).map(r);return l.sort((u,c)=>u.kind===c.kind?u.name.localeCompare(c.name):u.kind==="dir"?-1:1),{...s,children:l}};return(r(n).children??[]).map(i=>i.name.startsWith("/")?{...i,name:i.name.slice(1)}:i)}const wS={added:"text-good",deleted:"text-bad",modified:"text-warn",renamed:"text-accent"};function kS(){var I,W,V;const{project:e,rel:t}=nt(),n=ge({queryKey:["repos",e.id,e.contexts],queryFn:()=>me(`/projects/${e.id}/repos`)}),r=`learnforge.repo.${e.id}`,[i,s]=b.useState(()=>{let _;try{_=sessionStorage.getItem(r)||void 0}catch{}return{repo:_,base:"HEAD",head:""}}),[l,o]=b.useState(null),[u,c]=b.useState(new Set),[d,h]=b.useState([]),[p,f]=b.useState("split"),g=n.data??[],x=g.find(_=>_.path===i.repo)??g[0];b.useEffect(()=>{x&&x.path!==i.repo&&s(_=>({..._,repo:x.path}))},[x,i.repo]);const w=_=>{try{sessionStorage.setItem(r,_)}catch{}s({repo:_,base:"HEAD",head:""})},m=!!x&&i.repo===x.path,y=_=>`/projects/${e.id}/${_}${_.includes("?")?"&":"?"}repo=${encodeURIComponent(i.repo??"")}`,v=ge({queryKey:["refs",e.id,i.repo],queryFn:()=>me(y("refs")),enabled:m}),j=ge({queryKey:["diff",e.id,i],queryFn:()=>me(y(`diff?base=${encodeURIComponent(i.base)}&head=${encodeURIComponent(i.head)}`)),enabled:m}),C=j.data??[];b.useEffect(()=>{c(new Set(C.map(_=>_.path))),o(_=>{var Y;return _&&C.some(K=>K.path===_)?_:((Y=C[0])==null?void 0:Y.path)??null})},[j.data]);const k=b.useMemo(()=>C.find(_=>_.path===l),[C,l]),L=b.useMemo(()=>new Map(C.map(_=>[_.path,_])),[C]),z=b.useMemo(()=>i.repo?vS(i.repo,C.map(_=>_.path)):[],[i.repo,C]);if(n.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!g.length)return a.jsx(At,{icon:a.jsx(M1,{className:"h-6 w-6"}),title:"No git repositories found",children:"Changes needs git history. No repo was found in this folder or its sub-folders (4 levels down). Explore, lenses and quizzes work without it."});const A=[{value:"HEAD",label:"HEAD",hint:(I=v.data)==null?void 0:I.current,group:"Current"},...(((W=v.data)==null?void 0:W.branches)??[]).map(_=>({value:_,label:_,group:"Branches"})),...(((V=v.data)==null?void 0:V.commits)??[]).map(_=>({value:_.sha,label:`${_.sha} ${_.subject}`,hint:_.when,group:"Recent commits"}))],N=a.jsxs("div",{className:"flex h-full flex-col bg-side",children:[a.jsxs("div",{className:"space-y-2 border-b border-line p-3",children:[g.length>1&&a.jsxs("div",{children:[a.jsxs("div",{className:"label",children:["Repository (",g.length,")"]}),a.jsx(Uc,{value:(x==null?void 0:x.path)??"",onChange:w,options:g.map(_=>({value:_.path,label:_.name,hint:_.branch}))})]}),a.jsxs("div",{children:[a.jsx("div",{className:"label",children:"From"}),a.jsx(Uc,{value:i.base,onChange:_=>s({...i,base:_}),options:A})]}),a.jsxs("div",{children:[a.jsx("div",{className:"label",children:"To"}),a.jsx(Uc,{value:i.head,onChange:_=>s({...i,head:_}),options:[{value:"",label:"Working tree (uncommitted)",group:"Current"},...A]})]})]}),a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-muted",children:[a.jsxs("span",{children:[C.length," files"]}),a.jsxs("span",{className:"text-good",children:["+",C.reduce((_,Y)=>_+Y.additions,0)]}),a.jsxs("span",{className:"text-bad",children:["-",C.reduce((_,Y)=>_+Y.deletions,0)]}),a.jsx("button",{className:"ml-auto hover:text-ink",onClick:()=>c(u.size===C.length?new Set:new Set(C.map(_=>_.path))),children:u.size===C.length?"none":"all"})]}),a.jsxs("div",{className:"min-h-0 flex-1",children:[j.isLoading&&a.jsx("div",{className:"p-3",children:a.jsx(Nt,{})}),j.error&&a.jsx("div",{className:"p-2",children:a.jsx(tt,{error:j.error.message})}),C.length>0&&a.jsx(ip,{roots:z,openAll:!0,selected:[...u],onToggle:(_,Y)=>{const K=new Set(u);for(const H of _)Y?K.add(H):K.delete(H);c(K)},openFile:l,onOpen:o,meta:_=>{const Y=L.get(_);return Y?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"font-mono text-[11.5px] text-good",children:["+",Y.additions]}),a.jsxs("span",{className:"font-mono text-[11.5px] text-bad",children:["-",Y.deletions]}),a.jsx("span",{className:ae("w-3 text-center font-mono text-[12px] font-bold uppercase",wS[Y.status]),title:Y.status,children:Y.status[0]})]}):null}},`${i.repo}|${i.base}|${i.head}`),!j.isLoading&&!C.length&&a.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted",children:"No changes between these two."})]})]}),R=a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line bg-panel px-4 py-2",children:[a.jsx("div",{className:"min-w-0 flex-1 truncate font-mono text-[14px]",children:k?t(k.path):""}),a.jsx(Bt,{value:p,onChange:f,options:[{value:"split",label:"Split"},{value:"unified",label:"Unified"}]})]}),a.jsx("div",{className:"min-h-0 flex-1 overflow-auto bg-panel",children:k?a.jsx(xS,{patch:k.patch,mode:p}):a.jsx(At,{title:"Pick a file"})})]});return a.jsx(Wn,{id:"changes-list",collapsible:!0,initial:300,className:"h-full",left:N,right:a.jsx(Wn,{id:"changes-panel",collapsible:!0,side:"right",initial:360,min:300,max:560,left:R,right:a.jsx(a0,{files:[...u,...d],diff:i,onRemove:_=>{c(new Set([...u].filter(Y=>Y!==_))),h(d.filter(Y=>Y!==_))},onSetFiles:_=>{const Y=new Set(C.map(K=>K.path));c(new Set(_.filter(K=>Y.has(K)))),h(_.filter(K=>!Y.has(K)))},practiceFile:(k==null?void 0:k.status)!=="deleted"?k==null?void 0:k.path:null})})})}const bS=["lenses","quizzes","practice","teachbacks","walks","hunts","threads","cards","glossary","notes"];function jS(){var V,_,Y,K,H,ee,S,ce,ye,P,Ee,Fe,ve,je,Dt,rn,Ct,$e,it,Pn,Tn,Wt,Qn,sn,Kn,pr,Gn,Yn,mr;const{project:e,rel:t,setOpenFile:n}=nt(),r=It(),[i,s]=np(),l=bS.includes(i.get("tab"))?i.get("tab"):"lenses",o=T=>s({tab:T},{replace:!0}),[u,c]=b.useState(""),[d,h]=b.useState(null),p=`/projects/${e.id}`,f=`/p/${e.id}`,g=T=>ge({queryKey:[T,e.id],queryFn:()=>me(`${p}/${T}`)}),x=g("lenses"),w=g("quizzes"),m=g("practice"),y=g("teachbacks"),v=g("walks"),j=g("hunts"),C=g("threads"),k=g("cards"),L=g("notes"),z=ge({queryKey:["glossary",e.id],queryFn:()=>me(`${p}/glossary`),enabled:l==="glossary"}),A=b.useMemo(()=>{const T=u.toLowerCase().split(/\s+/).filter(Boolean);return(...xe)=>{const ut=xe.join(" ").toLowerCase();return T.every(Ln=>ut.includes(Ln))}},[u]),N=T=>a.jsxs("div",{className:"mt-2 truncate font-mono text-[12px] text-muted",children:[T.slice(0,3).map(xe=>Ea(t(xe),28)).join(" · "),T.length>3&&` +${T.length-3}`]}),R="card block p-4 transition hover:-translate-y-0.5 hover:border-accent/40",I=T=>a.jsx("span",{className:"ml-auto text-[12px] text-muted",children:qt(T)}),W=(T,xe,ut)=>a.jsx(At,{icon:T,title:xe,children:ut});return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsx("div",{className:"border-b border-line bg-panel px-8 pt-6",children:a.jsxs("div",{className:"mx-auto max-w-[72rem]",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Library"}),a.jsxs("p",{className:"text-sm text-muted",children:["Everything made in ",e.name,"."]})]}),a.jsxs("div",{className:"relative w-64",children:[a.jsx(hl,{className:"pointer-events-none absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted"}),a.jsx("input",{className:"input h-8 pl-8 text-[14px]",placeholder:"Search this tab",value:u,onChange:T=>c(T.target.value)})]}),a.jsxs("a",{href:`/api${p}/export`,className:"inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-xs text-muted hover:bg-raised hover:text-ink",title:"Everything for this project as one JSON file",children:[a.jsx(Wf,{className:"h-3.5 w-3.5"})," Export all"]})]}),a.jsx(QN,{className:"-mx-2 mt-3 overflow-x-auto border-b-0",value:l,onChange:o,tabs:[{value:"lenses",label:"Lenses",icon:a.jsx(rl,{className:"h-4 w-4"}),count:(V=x.data)==null?void 0:V.length},{value:"quizzes",label:"Quizzes",icon:a.jsx(sl,{className:"h-4 w-4"}),count:(_=w.data)==null?void 0:_.length},{value:"teachbacks",label:"Teach-backs",icon:a.jsx(ba,{className:"h-4 w-4"}),count:(Y=y.data)==null?void 0:Y.length},{value:"walks",label:"Walks",icon:a.jsx(ka,{className:"h-4 w-4"}),count:(K=v.data)==null?void 0:K.length},{value:"practice",label:"Practice",icon:a.jsx(ja,{className:"h-4 w-4"}),count:(H=m.data)==null?void 0:H.length},{value:"hunts",label:"Bug hunts",icon:a.jsx(va,{className:"h-4 w-4"}),count:(ee=j.data)==null?void 0:ee.length},{value:"threads",label:"Tutor",icon:a.jsx(Na,{className:"h-4 w-4"}),count:(S=C.data)==null?void 0:S.length},{value:"cards",label:"Cards",icon:a.jsx(cr,{className:"h-4 w-4"}),count:(ce=k.data)==null?void 0:ce.length},{value:"glossary",label:"Glossary",icon:a.jsx(Ym,{className:"h-4 w-4"})},{value:"notes",label:"Notes",icon:a.jsx(mh,{className:"h-4 w-4"}),count:(ye=L.data)==null?void 0:ye.length}]})]})}),a.jsx("div",{className:"min-h-0 flex-1 overflow-auto p-8",children:a.jsxs("div",{className:"mx-auto max-w-[72rem]",children:[a.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[l==="lenses"&&((P=x.data)==null?void 0:P.filter(T=>A(T.title,T.summary,T.kind,...T.files)).map(T=>a.jsxs(Mt,{to:`${f}/lens/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{tone:"accent",children:T.kind}),T.diff&&a.jsx(we,{tone:"warn",children:"change"}),T.sketch&&a.jsx(we,{children:"your take first"}),I(T.createdAt)]}),a.jsx("div",{className:"mt-2 font-medium leading-snug",children:T.title}),a.jsx("p",{className:"mt-1 line-clamp-2 text-[14px] text-muted",children:T.summary}),N(T.files)]},T.id))),l==="quizzes"&&((Ee=w.data)==null?void 0:Ee.filter(T=>A(T.title,...T.files)).map(T=>{const xe=T.attempts.length?Math.max(...T.attempts.map(ut=>ut.score)):null;return a.jsxs(Mt,{to:`${f}/quiz/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(we,{children:[T.questions.length," questions"]}),xe===null?a.jsx(we,{tone:"warn",children:"not taken"}):a.jsxs("span",{className:"text-xs text-muted",children:["best ",a.jsx(Ca,{score:xe,size:"sm"})," · ",T.attempts.length," tries"]}),I(T.createdAt)]}),a.jsx("div",{className:"mt-2 font-medium leading-snug",children:T.title}),N(T.files)]},T.id)})),l==="teachbacks"&&((Fe=y.data)==null?void 0:Fe.filter(T=>A(T.text,...T.files)).map(T=>a.jsxs(Mt,{to:`${f}/teach/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[T.grade&&a.jsxs(we,{tone:T.grade.score>=4?"good":T.grade.score>=3?"warn":"bad",children:[T.grade.score,"/5"]}),I(T.createdAt)]}),a.jsx("p",{className:"mt-2 line-clamp-3 text-[14px]",children:T.text}),N(T.files)]},T.id))),l==="walks"&&((ve=v.data)==null?void 0:ve.filter(T=>A(T.file,...T.blocks.map(xe=>xe.title))).map(T=>{const xe=T.blocks.filter(ut=>ut.verdict).length;return a.jsxs(Mt,{to:`${f}/walk/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(we,{tone:xe===T.blocks.length?"good":"warn",children:[xe,"/",T.blocks.length," checked"]}),I(T.createdAt)]}),a.jsx("div",{className:"mt-2 truncate font-mono text-sm",children:t(T.file)})]},T.id)})),l==="practice"&&((je=m.data)==null?void 0:je.filter(T=>A(T.file)).map(T=>{var ut;const xe=(ut=T.review)==null?void 0:ut.holes.filter(Ln=>Ln.verdict==="right").length;return a.jsxs(Mt,{to:`${f}/practice/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(we,{tone:"accent",children:["level ",T.level]}),a.jsxs(we,{children:[T.holes.length," holes"]}),T.review?a.jsxs(we,{tone:xe===T.holes.length?"good":"warn",children:[xe,"/",T.holes.length," right"]}):a.jsx(we,{tone:"warn",children:"open"}),I(T.createdAt)]}),a.jsx("div",{className:"mt-2 truncate font-mono text-sm",children:t(T.file)})]},T.id)})),l==="hunts"&&((Dt=j.data)==null?void 0:Dt.filter(T=>A(T.file)).map(T=>a.jsxs(Mt,{to:`${f}/hunt/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{tone:"bad",children:["","easy","medium","hard"][T.level]}),T.grade?a.jsx("span",{className:"text-xs text-muted",children:a.jsx(Ca,{score:T.grade.score,size:"sm"})}):a.jsx(we,{tone:"warn",children:"open"}),I(T.createdAt)]}),a.jsx("div",{className:"mt-2 truncate font-mono text-sm",children:t(T.file)})]},T.id))),l==="threads"&&((rn=C.data)==null?void 0:rn.filter(T=>A(T.title,...T.messages.map(xe=>xe.text))).map(T=>a.jsxs(Mt,{to:`${f}/tutor/${T.id}`,className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(we,{children:[T.messages.length," messages"]}),I(T.createdAt)]}),a.jsx("div",{className:"mt-2 line-clamp-2 font-medium leading-snug",children:T.title}),N(T.files)]},T.id))),l==="cards"&&((Ct=k.data)==null?void 0:Ct.filter(T=>A(T.front,T.back,T.file)).map(T=>a.jsxs("div",{className:"card group p-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{tone:T.kind==="miss"?"bad":T.kind==="concept"?"accent":"muted",children:T.kind}),T.suspended?a.jsx(we,{children:"paused"}):a.jsxs("span",{className:"text-[12px] text-muted",children:["due in ",jh(T.fsrs.due)]}),a.jsxs("span",{className:"ml-auto flex gap-1 opacity-0 transition group-hover:opacity-100",children:[a.jsx("button",{className:"text-muted hover:text-ink",title:T.suspended?"Resume":"Pause",onClick:async()=>{await qa(`${p}/cards/${T.id}`,{suspended:!T.suspended}),r.invalidateQueries({queryKey:["cards",e.id]})},children:T.suspended?a.jsx(Ij,{className:"h-3.5 w-3.5"}):a.jsx(N1,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"text-muted hover:text-bad",title:"Archive",onClick:async()=>{await pl(`${p}/cards/${T.id}`),r.invalidateQueries({queryKey:["cards",e.id]})},children:a.jsx(dr,{className:"h-3.5 w-3.5"})})]})]}),a.jsx("div",{className:"mt-2 text-[14.5px] font-medium leading-snug",children:T.front}),a.jsx("p",{className:"mt-1 line-clamp-2 text-[14px] text-muted",children:T.back}),T.file&&a.jsxs("div",{className:"mt-2 truncate font-mono text-[12px] text-muted",children:[t(T.file),T.line?`:${T.line}`:""]})]},T.id))),l==="notes"&&(($e=L.data)==null?void 0:$e.filter(T=>A(T.text,T.file)).map(T=>a.jsxs(Mt,{to:`${f}/explore`,onClick:()=>T.file&&n(T.file,T.line),className:R,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[T.file&&a.jsxs("span",{className:"truncate font-mono text-[12px] text-accent",children:[t(T.file),T.line?`:${T.line}`:""]}),I(T.createdAt)]}),a.jsx("p",{className:"mt-2 whitespace-pre-wrap text-[14.5px]",children:T.text})]},T.id)))]}),l==="glossary"&&a.jsxs("div",{className:"divide-y divide-line",children:[(it=z.data)==null?void 0:it.filter(T=>A(T.term,...T.explains.map(xe=>xe.text))).map(T=>a.jsxs("div",{className:"group py-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"text-[16px] font-semibold",children:T.term}),a.jsx("span",{className:"text-[12px] text-muted",children:T.files.slice(0,3).map(xe=>Ea(t(xe),24)).join(" · ")}),a.jsx("button",{className:"ml-auto text-muted opacity-0 transition hover:text-accent group-hover:opacity-100",title:"Make a review card",onClick:()=>{var xe;return h({kind:"concept",front:`What is "${T.term}" here, and why does it matter?`,back:((xe=T.explains[0])==null?void 0:xe.text)??"",file:T.files[0]})},children:a.jsx(cr,{className:"h-3.5 w-3.5"})})]}),T.explains.map((xe,ut)=>a.jsxs("p",{className:"mt-1 text-[14.5px] text-ink/85",children:[xe.text," ",a.jsxs(Mt,{to:`${f}/lens/${xe.lensId}`,className:"text-[12px] text-muted hover:text-accent",children:["(",xe.lensTitle,")"]})]},ut))]},T.term)),((Pn=z.data)==null?void 0:Pn.length)===0&&W(a.jsx(Ym,{className:"h-6 w-6"}),"No terms yet","Every lens adds the concepts it explains here.")]}),l==="lenses"&&((Tn=x.data)==null?void 0:Tn.length)===0&&W(a.jsx(rl,{className:"h-6 w-6"}),"No lenses yet","Open Explore, pick files, choose a lens."),l==="quizzes"&&((Wt=w.data)==null?void 0:Wt.length)===0&&W(a.jsx(sl,{className:"h-6 w-6"}),"No quizzes yet","Quiz yourself from Explore, Changes, or the end of a lens."),l==="teachbacks"&&((Qn=y.data)==null?void 0:Qn.length)===0&&W(a.jsx(ba,{className:"h-6 w-6"}),"No teach-backs yet","In Explore, pick Teach and explain the code in your own words."),l==="walks"&&((sn=v.data)==null?void 0:sn.length)===0&&W(a.jsx(ka,{className:"h-6 w-6"}),"No walkthroughs yet","Open a file in Explore and pick Walk."),l==="practice"&&((Kn=m.data)==null?void 0:Kn.length)===0&&W(a.jsx(ja,{className:"h-6 w-6"}),"No practice yet","Open a file in Explore and pick Practice."),l==="hunts"&&((pr=j.data)==null?void 0:pr.length)===0&&W(a.jsx(va,{className:"h-6 w-6"}),"No bug hunts yet","Open a file in Explore and pick Bug hunt."),l==="threads"&&((Gn=C.data)==null?void 0:Gn.length)===0&&W(a.jsx(Na,{className:"h-6 w-6"}),"No tutor chats yet","Ask the tutor from Explore or from a missed quiz question."),l==="cards"&&((Yn=k.data)==null?void 0:Yn.length)===0&&W(a.jsx(cr,{className:"h-6 w-6"}),"No cards yet","Quiz misses become cards on their own. You can also make one from a lens concept or a code line."),l==="notes"&&((mr=L.data)==null?void 0:mr.length)===0&&W(a.jsx(mh,{className:"h-6 w-6"}),"No notes yet","In Explore, click a line and add a note from the Notes tab.")]})}),d&&a.jsx(Ha,{initial:d,onClose:()=>h(null)})]})}function ml({file:e,text:t,lang:n,line:r,marks:i,onLineClick:s,title:l,empty:o="Code shows here",onClose:u}){var f,g;const{project:c,rel:d}=nt(),h=ge({queryKey:["file",c.id,e],queryFn:()=>me(`/projects/${c.id}/file?path=${encodeURIComponent(e)}`),enabled:!!e&&t===void 0}),p=t??((f=h.data)==null?void 0:f.text);return a.jsx("div",{className:"flex h-full flex-col bg-panel",children:e?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-4 py-2 font-mono text-[13px] text-muted",children:[a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l??d(e),r?`:${r}`:""]}),u&&a.jsx("button",{className:"text-xs hover:text-ink",onClick:u,children:"close"})]}),a.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[h.isLoading&&a.jsx("div",{className:"p-4",children:a.jsx(Nt,{})}),h.error&&a.jsx("div",{className:"p-3",children:a.jsx(tt,{error:h.error.message})}),p!==void 0&&a.jsx(Va,{text:p,lang:n??((g=h.data)==null?void 0:g.lang)??"text",focusLine:r,marks:i,onLineClick:s})]})]}):a.jsx(At,{title:o})})}function NS(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const SS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ES={};function Cg(e,t){return(ES.jsx?CS:SS).test(e)}const PS=/[ \t\n\f\r]/g;function TS(e){return typeof e=="object"?e.type==="text"?Eg(e.value):!1:Eg(e)}function Eg(e){return e.replace(PS,"")===""}class Wa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Wa.prototype.normal={};Wa.prototype.property={};Wa.prototype.space=void 0;function u0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wa(n,r,t)}function Sh(e){return e.toLowerCase()}class nn{constructor(t,n){this.attribute=n,this.property=t}}nn.prototype.attribute="";nn.prototype.booleanish=!1;nn.prototype.boolean=!1;nn.prototype.commaOrSpaceSeparated=!1;nn.prototype.commaSeparated=!1;nn.prototype.defined=!1;nn.prototype.mustUseProperty=!1;nn.prototype.number=!1;nn.prototype.overloadedBoolean=!1;nn.prototype.property="";nn.prototype.spaceSeparated=!1;nn.prototype.space=void 0;let LS=0;const fe=ls(),lt=ls(),Ch=ls(),q=ls(),Oe=ls(),Qi=ls(),an=ls();function ls(){return 2**++LS}const Eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:fe,booleanish:lt,commaOrSpaceSeparated:an,commaSeparated:Qi,number:q,overloadedBoolean:Ch,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),qc=Object.keys(Eh);class sp extends nn{constructor(t,n,r,i){let s=-1;if(super(t,n),Pg(this,"space",i),typeof r=="number")for(;++s<qc.length;){const l=qc[s];Pg(this,qc[s],(r&Eh[l])===Eh[l])}}}sp.prototype.defined=!0;function Pg(e,t,n){n&&(e[t]=n)}function gl(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new sp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Sh(r)]=r,n[Sh(s.attribute)]=r}return new Wa(t,n,e.space)}const c0=gl({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Oe,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:q,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Oe,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:lt,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function d0(e,t){return t in e?e[t]:t}function h0(e,t){return d0(e,t.toLowerCase())}const MS=gl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qi,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:fe,allowPaymentRequest:fe,allowUserMedia:fe,alpha:fe,alt:null,as:null,async:fe,autoCapitalize:null,autoComplete:Oe,autoFocus:fe,autoPlay:fe,blocking:Oe,capture:null,charSet:null,checked:fe,cite:null,className:Oe,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:lt,controls:fe,controlsList:Oe,coords:q|Qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:fe,defer:fe,dir:null,dirName:null,disabled:fe,download:Ch,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:fe,formTarget:null,headers:Oe,height:q,hidden:Ch,high:q,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:fe,inputMode:null,integrity:null,is:null,isMap:fe,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:fe,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:fe,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:fe,muted:fe,name:null,nonce:null,noModule:fe,noValidate:fe,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:fe,optimum:q,pattern:null,ping:Oe,placeholder:null,playsInline:fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:fe,referrerPolicy:null,rel:Oe,required:fe,reversed:fe,rows:q,rowSpan:q,sandbox:Oe,scope:null,scoped:fe,seamless:fe,selected:fe,shadowRootClonable:fe,shadowRootCustomElementRegistry:fe,shadowRootDelegatesFocus:fe,shadowRootMode:null,shadowRootSerializable:fe,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:fe,useMap:null,value:lt,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:fe,declare:fe,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:fe,noHref:fe,noShade:fe,noWrap:fe,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:lt,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:fe,disablePictureInPicture:fe,disableRemotePlayback:fe,exportParts:Qi,part:Oe,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:h0}),RS=gl({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",maskType:"mask-type",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:an,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:Oe,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:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,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:Qi,g2:Qi,glyphName:Qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:an,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,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:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:an,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:an,rev:an,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:an,requiredFeatures:an,requiredFonts:an,requiredFormats:an,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:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:an,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:an,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:an,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:d0}),f0=gl({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()}}),p0=gl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:h0}),m0=gl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zS={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"},AS=/[A-Z]/g,Tg=/-[a-z]/g,IS=/^data[-\w.:]+$/i;function FS(e,t){const n=Sh(t);let r=t,i=nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&IS.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Tg,OS);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Tg.test(s)){let l=s.replace(AS,DS);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=sp}return new i(r,t)}function DS(e){return"-"+e.toLowerCase()}function OS(e){return e.charAt(1).toUpperCase()}const _S=u0([c0,MS,f0,p0,m0],"html"),lp=u0([c0,RS,f0,p0,m0],"svg");function $S(e){return e.join(" ").trim()}var Lg=/\/\*(?:[^*]|\*(?!\/))*\*\//g,BS=/\n/g,US=/^\s*/,qS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,HS=/^:\s*/,VS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,WS=/^[;\s]*/,QS=`
|
|
453
|
+
`,Mg="/",Rg="*",Rl="",KS="comment",GS="declaration";function YS(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var x=g.match(BS);x&&(n+=x.length);var w=g.lastIndexOf(QS);r=~w?g.length-w:r+g.length}function s(){var g={line:n,column:r};return function(x){return x.position=new l(g),c(),x}}function l(g){this.start=g,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function o(g){var x=new Error(t.source+":"+n+":"+r+": "+g);if(x.reason=g,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(g){var x=g.exec(e);if(x){var w=x[0];return i(w),e=e.slice(w.length),x}}function c(){u(US)}function d(g){for(var x;x=h();)g.push(x);return g}function h(){var g=s();if(!(Mg!=e.charAt(0)||Rg!=e.charAt(1))){for(var x=2;Rl!=e.charAt(x)&&(Rg!=e.charAt(x)||Mg!=e.charAt(x+1));)++x;if(x+=2,Rl===e.charAt(x-1))return o("End of comment missing");var w=e.slice(2,x-2);return r+=2,i(w),e=e.slice(x),r+=2,g({type:KS,comment:w})}}function p(){var g=s(),x=u(qS);if(x){if(h(),!u(HS))return o("property missing ':'");var w=u(VS),m=g({type:GS,property:x[0].replace(Lg,Rl).trim(),value:w?w[0].replace(Lg,Rl).trim():Rl});return u(WS),m}}function f(){var g=[];d(g);for(var x;x=p();)g.push(x),d(g);return g}return c(),f()}function XS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=YS(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:l,value:o}=s;i?t(l,o,s):o&&(n=n??{},n[l]=o)}),n}const g0=x0("end"),ap=x0("start");function x0(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function JS(e){const t=ap(e),n=g0(e);if(t&&n)return{start:t,end:n}}function Yl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zg(e.position):"start"in e||"end"in e?zg(e):"line"in e||"column"in e?Ph(e):""}function Ph(e){return Ag(e&&e.line)+":"+Ag(e&&e.column)}function zg(e){return Ph(e&&e.start)+"-"+Ph(e&&e.end)}function Ag(e){return e&&typeof e=="number"?e:1}class Ft extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(l=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Yl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const op={}.hasOwnProperty,ZS=new Map,eC=/[A-Z]/g,tC=/-([a-z])/g,nC=new Set(["table","tbody","thead","tfoot","tr"]),rC=new Set(["td","th"]),y0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function iC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=hC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=dC(n,t.jsx,t.jsxs)}const 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"?lp:_S,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=v0(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function v0(e,t,n){if(t.type==="element")return sC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return oC(e,t,n);if(t.type==="mdxjsEsm")return aC(e,t);if(t.type==="root")return uC(e,t,n);if(t.type==="text")return cC(e,t)}function sC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=lp,e.schema=i),e.ancestors.push(t);const s=k0(e,t.tagName,!1),l=fC(e,t);let o=cp(e,t);return nC.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!TS(u):!0})),w0(e,l,s,t),up(l,o),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function lC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Pa(e,t.position)}function aC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pa(e,t.position)}function oC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=lp,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:k0(e,t.name,!0),l=pC(e,t),o=cp(e,t);return w0(e,l,s,t),up(l,o),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function uC(e,t,n){const r={};return up(r,cp(e,t)),e.create(t,e.Fragment,r,n)}function cC(e,t){return t.value}function w0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function up(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function dC(e,t,n){return r;function r(i,s,l,o){const c=Array.isArray(l.children)?n:t;return o?c(s,l,o):c(s,l)}}function hC(e,t){return n;function n(r,i,s,l){const o=Array.isArray(s.children),u=ap(r);return t(i,s,l,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function fC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&op.call(t.properties,i)){const s=mC(e,i,t.properties[i]);if(s){const[l,o]=s;e.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&rC.has(t.tagName)?r=o:n[l]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function pC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const l=s.expression;l.type;const o=l.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Pa(e,t.position);else{const{name:i}=r;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Pa(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function cp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ZS;for(;++r<t.children.length;){const s=t.children[r];let l;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const c=i.get(u)||0;l=u+"-"+c,i.set(u,c+1)}}const o=v0(e,s,l);o!==void 0&&n.push(o)}return n}function mC(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=FS(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?NS(n):$S(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:xC(n):gC(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?zS[r.property]||r.property:r.attribute,n]}function gC(e,t){const n={};try{XS(t,function(r,i){if(r&&i){let s=r;s.slice(0,2)!=="--"&&(s=s.toLowerCase(),e.stylePropertyNameCase==="dom"&&(s.slice(0,4)==="-ms-"&&(s=s.slice(1)),s=s.replace(tC,wC))),n[s]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,s=new Ft("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=y0+"#cannot-parse-style-attribute",s}return n}function k0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,l;for(;++s<i.length;){const o=Cg(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};l=l?{type:"MemberExpression",object:l,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=l}else r=Cg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return op.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pa(e)}function Pa(e,t){const n=new Ft("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=y0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xC(e){const t={};let n;for(n in e)op.call(e,n)&&(t[yC(n)]=e[n]);return t}function yC(e){if(e.slice(0,2)==="--")return e;let t=e.replace(eC,vC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vC(e){return"-"+e.toLowerCase()}function wC(e,t){return t.toUpperCase()}const Hc={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"]},kC={};function Ju(e,t){const n=kC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return b0(e,r,i)}function b0(e,t,n){if(bC(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 Ig(e.children,t,n)}return Array.isArray(e)?Ig(e,t,n):""}function Ig(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=b0(e[i],t,n);return r.join("")}function bC(e){return!!(e&&typeof e=="object")}const Fg=document.createElement("i");function dp(e){const t="&"+e+";";Fg.innerHTML=t;const n=Fg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Bn(e,t,n,r){const i=e.length;let s=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<r.length;)l=r.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function jn(e,t){return e.length>0?(Bn(e,e.length,0,t),e):t}const Dg={}.hasOwnProperty;function j0(e){const t={};let n=-1;for(;++n<e.length;)jC(t,e[n]);return t}function jC(e,t){let n;for(n in t){const i=(Dg.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){Dg.call(i,l)||(i[l]=[]);const o=s[l];NC(i[l],Array.isArray(o)?o:o?[o]:[])}}}function NC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Bn(e,0,0,r)}function N0(e,t){const 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)}function Un(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wt=ji(/[A-Za-z]/),kt=ji(/[\dA-Za-z]/),SC=ji(/[#-'*+\--9=?A-Z^-~]/);function ju(e){return e!==null&&(e<32||e===127)}const Th=ji(/\d/),CC=ji(/[\dA-Fa-f]/),S0=ji(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function _e(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const Zu=ji(new RegExp("\\p{P}|\\p{S}","u")),ns=ji(/\s/);function ji(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function xl(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&kt(e.charCodeAt(n+1))&&kt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(l=String.fromCharCode(s,o),i=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Re(e,t,n,r){const i=r?r-1:1/0;let s=0;return l;function l(u){return be(u)?(e.enter(n),o(u)):t(u)}function o(u){return be(u)&&s++<i?(e.consume(u),o):(e.exit(n),t(u))}}function C0(e,t,n,r,i,s){let l=0;return o;function o(d){return be(d)?(e.enter(r),u(d)):c(d)}function u(d){return be(d)&&l<s?(e.consume(d),l++,u):(e.exit(r),c(d))}function c(d){return l>=i?t(d):n(d)}}const EC={tokenize:PC};function PC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Re(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(o)}function l(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ue(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),l)}}let Nu=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Og(this,t,n,r,!1)}addBefore(t,n,r){Og(this,t,n,r,!0)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}};function Og(e,t,n,r,i){if(n===0&&r.length===0)return;const s=e.index.get(t);if(s){s[1]+=n,i?(r.push(...s[2]),s[2]=r):s[2].push(...r);return}const l=[t,n,r];e.map.push(l),e.index.set(t,l)}const TC={tokenize:LC},_g={tokenize:MC};function LC(e){const t=this,n=[];let r=0,i,s,l;return o;function o(v){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,u,c)(v)}return c(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const j=t.events.length;let C=j,k;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){k=t.events[C][1].end;break}m(r);let L=j;for(;L<t.events.length;)t.events[L][1].end={...k},L++;const z=new Nu;return z.add(C+1,0,t.events.slice(j)),z.add(j,L-j,[]),z.consume(t.events),c(v)}return o(v)}function c(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_g,d,h)(v)}function d(v){return i&&y(),m(r),p(v)}function h(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function p(v){return t.containerState={},e.attempt(_g,f,g)(v)}function f(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function g(v){if(v===null){i&&y(),m(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),x(v)}function x(v){if(v===null){w(e.exit("chunkFlow"),!0),m(0),e.consume(v);return}return ue(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),x)}function w(v,j){const C=t.sliceStream(v);if(j&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const L=t.events.length;let z=L,A,N;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(A){N=t.events[z][1].end;break}A=!0}for(m(r),k=L;k<t.events.length;)t.events[k][1].end={...N},k++;const R=new Nu;R.add(z+1,0,t.events.slice(L)),R.add(L,k-L,[]),R.consume(t.events)}}function m(v){let j=n.length;for(;j-- >v;){const C=n[j];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function MC(e,t,n){return Re(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mi(e){if(e===null||_e(e)||ns(e))return 1;if(Zu(e))return 2}function ec(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Lh={name:"attention",resolveAll:RC,tokenize:zC};function RC(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const s=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,l={...e[i][1].end},o={...e[n][1].start};$g(l,-s),$g(o,s);const u={type:s>1?"strongSequence":"emphasisSequence",start:l,end:{...e[i][1].end}},c={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:o},d={type:s>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},h={type:s>1?"strong":"emphasis",start:{...u.start},end:{...c.end}};e[i][1].end={...u.start},e[n][1].start={...c.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=jn(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=jn(r,[["enter",h,t],["enter",u,t],["exit",u,t],["enter",d,t]]),r=jn(r,ec(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=jn(r,[["exit",d,t],["enter",c,t],["exit",c,t],["exit",h,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=jn(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),Bn(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mi(r);let s;return l;function l(u){return s=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===s)return e.consume(u),o;const c=e.exit("attentionSequence"),d=mi(u),h=!d||d===2&&i||n.includes(u)&&u!==42&&u!==95,p=!i||i===2&&d||n.includes(r)&&r!==42&&r!==95;return c._open=!!(s===42?h:h&&(i||!p)),c._close=!!(s===42?p:p&&(d||!h)),t(u)}}function $g(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AC={name:"autolink",tokenize:IC};function IC(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return wt(f)?(e.consume(f),l):f===64?n(f):c(f)}function l(f){return f===43||f===45||f===46||kt(f)?(r=1,o(f)):c(f)}function o(f){return f===58?(e.consume(f),r=0,u):(f===43||f===45||f===46||kt(f))&&r++<32?(e.consume(f),o):(r=0,c(f))}function u(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||ju(f)?n(f):(e.consume(f),u)}function c(f){return f===64?(e.consume(f),d):SC(f)?(e.consume(f),c):n(f)}function d(f){return kt(f)?h(f):n(f)}function h(f){return f===46?(e.consume(f),r=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||kt(f))&&r++<63){const g=f===45?p:h;return e.consume(f),g}return n(f)}}const Qa={partial:!0,tokenize:FC};function FC(e,t,n){return r;function r(s){return be(s)?Re(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||ue(s)?t(s):n(s)}}const E0={continuation:{tokenize:OC},exit:_C,name:"blockQuote",tokenize:DC};function DC(e,t,n){const r=this;return i;function i(l){if(l===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return be(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function OC(e,t,n){const r=this;return i;function i(l){return be(l)?Re(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(E0,t,n)(l)}}function _C(e){e.exit("blockQuote")}const P0={name:"characterEscape",tokenize:$C};function $C(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return S0(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const T0={name:"characterReference",tokenize:BC};function BC(e,t,n){const r=this;let i=0,s,l;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,l=kt,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=CC,d):(e.enter("characterReferenceValue"),s=7,l=Th,d(h))}function d(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return l===kt&&!dp(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(h)&&i++<s?(e.consume(h),d):n(h)}}const Mh={partial:!0,tokenize:UC};function UC(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Bg={concrete:!0,name:"codeFenced",tokenize:qC};function qC(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,l=0,o;return u;function u(k){return c(k)}function c(k){const L=r.events[r.events.length-1];return s=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,o=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===o?(l++,e.consume(k),d):l<3?n(k):(e.exit("codeFencedFenceSequence"),be(k)?Re(e,h,"whitespace")(k):h(k))}function h(k){return k===null||ue(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Mh,x,j)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(k)):be(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Re(e,f,"whitespace")(k)):k===96&&k===o?n(k):(e.consume(k),p)}function f(k){return k===null||ue(k)?h(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(k)):k===96&&k===o?n(k):(e.consume(k),g)}function x(k){return e.attempt(i,j,w)(k)}function w(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return s>0&&be(k)?Re(e,y,"linePrefix",s+1)(k):y(k)}function y(k){return k===null||ue(k)?e.check(Mh,x,j)(k):(e.enter("codeFlowValue"),v(k))}function v(k){return k===null||ue(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),v)}function j(k){return e.exit("codeFenced"),t(k)}function C(k,L,z){let A=0;return N;function N(_){return k.enter("lineEnding"),k.consume(_),k.exit("lineEnding"),R}function R(_){return k.enter("codeFencedFence"),be(_)?Re(k,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):I(_)}function I(_){return _===o?(k.enter("codeFencedFenceSequence"),W(_)):z(_)}function W(_){return _===o?(A++,k.consume(_),W):A>=l?(k.exit("codeFencedFenceSequence"),be(_)?Re(k,V,"whitespace")(_):V(_)):z(_)}function V(_){return _===null||ue(_)?(k.exit("codeFencedFence"),L(_)):z(_)}}}const Vc={name:"codeIndented",tokenize:VC},HC={partial:!0,tokenize:WC};function VC(e,t,n){return r;function r(o){return e.enter("codeIndented"),C0(e,i,n,"linePrefix",4,4)(o)}function i(o){return o===null?l(o):ue(o)?e.attempt(HC,i,l)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||ue(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),s)}function l(o){return e.exit("codeIndented"),t(o)}}function WC(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):C0(e,t,s,"linePrefix",4,4)(l)}function s(l){return ue(l)?i(l):n(l)}}const QC={name:"codeText",previous:GC,resolve:KC,tokenize:YC};function KC(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 GC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function YC(e,t,n){let r=0,i,s;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),r++,o):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(s=e.enter("codeTextSequence"),i=0,d(h)):ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||ue(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",c(h))}}class XC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&zl(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),zl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);zl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zl(this.left,n.reverse())}}}function zl(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 L0(e){const t={};let n=-1,r,i,s,l,o,u,c;const d=new XC(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,JC(d,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(l=d.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Bn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function JC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const o=l.events,u=[],c={};let d,h,p=-1,f=n,g=0,x=0;const w=[x];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),h&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(d),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(x=p+1,w.push(x),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),p=w.length;p--;){const m=o.slice(w[p],w[p+1]),y=s.pop();u.push([y,y+m.length-1]),e.splice(y,2,m)}for(u.reverse(),p=-1;++p<u.length;)c[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return c}const ZC={resolve:tE,tokenize:nE},eE={partial:!0,tokenize:rE};function tE(e){return L0(e),e}function nE(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):ue(o)?e.check(eE,l,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function l(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function rE(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Re(e,s,"linePrefix")}function s(l){if(l===null||ue(l))return n(l);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function M0(e,t,n,r,i,s,l,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return h;function h(m){return m===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(m),e.exit(s),p):m===null||m===32||m===41||ju(m)?n(m):(e.enter(r),e.enter(l),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(m))}function p(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===62?(e.exit("chunkString"),e.exit(o),p(m)):m===null||m===60||ue(m)?n(m):(e.consume(m),m===92?g:f)}function g(m){return m===60||m===62||m===92?(e.consume(m),f):f(m)}function x(m){return!d&&(m===null||m===41||_e(m))?(e.exit("chunkString"),e.exit(o),e.exit(l),e.exit(r),t(m)):d<c&&m===40?(e.consume(m),d++,x):m===41?(e.consume(m),d--,x):m===null||m===32||m===40||ju(m)?n(m):(e.consume(m),m===92?w:x)}function w(m){return m===40||m===41||m===92?(e.consume(m),x):x(m)}}function R0(e,t,n,r,i,s){const l=this;let o=0,u;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),d}function d(f){return o>999||f===null||f===91||f===93&&!u||f===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||ue(f)||o++>999?(e.exit("chunkString"),d(f)):(e.consume(f),u||(u=!be(f)),f===92?p:h)}function p(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function z0(e,t,n,r,i,s){let l;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),c(p))}function c(p){return p===l?(e.exit(s),u(l)):p===null?n(p):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Re(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===l||p===null||ue(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?h:d)}function h(p){return p===l||p===92?(e.consume(p),d):d(p)}}function Xl(e,t){let n;return r;function r(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Re(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const iE={name:"definition",tokenize:lE},sE={partial:!0,tokenize:aE};function lE(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),l(f)}function l(f){return R0.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=Un(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):n(f)}function u(f){return _e(f)?Xl(e,c)(f):c(f)}function c(f){return M0(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(sE,h,h)(f)}function h(f){return be(f)?Re(e,p,"whitespace")(f):p(f)}function p(f){return f===null||ue(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function aE(e,t,n){return r;function r(o){return _e(o)?Xl(e,i)(o):n(o)}function i(o){return z0(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return be(o)?Re(e,l,"whitespace")(o):l(o)}function l(o){return o===null||ue(o)?t(o):n(o)}}const oE={name:"hardBreakEscape",tokenize:uE};function uE(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return ue(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const cE={name:"headingAtx",resolve:dE,tokenize:hE};function dE(e,t){let n=e.length-2,r=3;if(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){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};Bn(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])}return e}function hE(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),l(d)}function l(d){return d===35&&r++<6?(e.consume(d),l):d===null||_e(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ue(d)?(e.exit("atxHeading"),t(d)):be(d)?Re(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||_e(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const A0=["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"],Rh=["pre","script","style","textarea"],fE={concrete:!0,name:"htmlFlow",resolveTo:mE,tokenize:gE},pE={partial:!0,tokenize:xE};function mE(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 gE(e,t,n){const r=this;let i,s,l,o,u;return c;function c(P){return d(P)}function d(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),h}function h(P){return P===33?(e.consume(P),p):P===47?(e.consume(P),s=!0,x):P===63?(e.consume(P),i=3,r.interrupt?t:S):wt(P)?(e.consume(P),l=String.fromCharCode(P),w):n(P)}function p(P){return P===45?(e.consume(P),i=2,f):P===91?(e.consume(P),i=5,o=0,g):wt(P)?(e.consume(P),i=4,r.interrupt?t:S):n(P)}function f(P){return P===45?(e.consume(P),r.interrupt?t:S):n(P)}function g(P){const Ee="CDATA[";return P===Ee.charCodeAt(o++)?(e.consume(P),o===Ee.length?r.interrupt?t:I:g):n(P)}function x(P){return wt(P)?(e.consume(P),l=String.fromCharCode(P),w):n(P)}function w(P){if(P===null||P===47||P===62||_e(P)){const Ee=P===47,Fe=l.toLowerCase();return!Ee&&!s&&Rh.includes(Fe)?(i=1,r.interrupt?t(P):I(P)):A0.includes(l.toLowerCase())?(i=6,Ee?(e.consume(P),m):r.interrupt?t(P):I(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):s?y(P):v(P))}return P===45||kt(P)?(e.consume(P),l+=String.fromCharCode(P),w):n(P)}function m(P){return P===62?(e.consume(P),r.interrupt?t:I):n(P)}function y(P){return be(P)?(e.consume(P),y):N(P)}function v(P){return P===47?(e.consume(P),N):P===58||P===95||wt(P)?(e.consume(P),j):be(P)?(e.consume(P),v):N(P)}function j(P){return P===45||P===46||P===58||P===95||kt(P)?(e.consume(P),j):C(P)}function C(P){return P===61?(e.consume(P),k):be(P)?(e.consume(P),C):v(P)}function k(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),u=P,L):be(P)?(e.consume(P),k):z(P)}function L(P){return P===u?(e.consume(P),u=null,A):P===null||ue(P)?n(P):(e.consume(P),L)}function z(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||_e(P)?C(P):(e.consume(P),z)}function A(P){return P===47||P===62||be(P)?v(P):n(P)}function N(P){return P===62?(e.consume(P),R):n(P)}function R(P){return P===null||ue(P)?I(P):be(P)?(e.consume(P),R):n(P)}function I(P){return P===45&&i===2?(e.consume(P),Y):P===60&&i===1?(e.consume(P),K):P===62&&i===4?(e.consume(P),ce):P===63&&i===3?(e.consume(P),S):P===93&&i===5?(e.consume(P),ee):ue(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(pE,ye,W)(P)):P===null||ue(P)?(e.exit("htmlFlowData"),W(P)):(e.consume(P),I)}function W(P){return e.check(Mh,V,ye)(P)}function V(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),_}function _(P){return P===null||ue(P)?W(P):(e.enter("htmlFlowData"),I(P))}function Y(P){return P===45?(e.consume(P),S):I(P)}function K(P){return P===47?(e.consume(P),l="",H):I(P)}function H(P){if(P===62){const Ee=l.toLowerCase();return Rh.includes(Ee)?(e.consume(P),ce):I(P)}return wt(P)&&l.length<8?(e.consume(P),l+=String.fromCharCode(P),H):I(P)}function ee(P){return P===93?(e.consume(P),S):I(P)}function S(P){return P===62?(e.consume(P),ce):P===45&&i===2?(e.consume(P),S):I(P)}function ce(P){return P===null||ue(P)?(e.exit("htmlFlowData"),ye(P)):(e.consume(P),ce)}function ye(P){return e.exit("htmlFlow"),t(P)}}function xE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qa,t,n)}}const yE={name:"htmlText",tokenize:vE};function vE(e,t,n){const r=this;let i,s,l;return o;function o(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),c):S===47?(e.consume(S),C):S===63?(e.consume(S),v):wt(S)?(e.consume(S),z):n(S)}function c(S){return S===45?(e.consume(S),d):S===91?(e.consume(S),s=0,g):wt(S)?(e.consume(S),y):n(S)}function d(S){return S===45?(e.consume(S),f):n(S)}function h(S){return S===null?n(S):S===45?(e.consume(S),p):ue(S)?(l=h,K(S)):(e.consume(S),h)}function p(S){return S===45?(e.consume(S),f):h(S)}function f(S){return S===62?Y(S):S===45?p(S):h(S)}function g(S){const ce="CDATA[";return S===ce.charCodeAt(s++)?(e.consume(S),s===ce.length?x:g):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),w):ue(S)?(l=x,K(S)):(e.consume(S),x)}function w(S){return S===93?(e.consume(S),m):x(S)}function m(S){return S===62?Y(S):S===93?(e.consume(S),m):x(S)}function y(S){return S===null||S===62?Y(S):ue(S)?(l=y,K(S)):(e.consume(S),y)}function v(S){return S===null?n(S):S===63?(e.consume(S),j):ue(S)?(l=v,K(S)):(e.consume(S),v)}function j(S){return S===62?Y(S):v(S)}function C(S){return wt(S)?(e.consume(S),k):n(S)}function k(S){return S===45||kt(S)?(e.consume(S),k):L(S)}function L(S){return ue(S)?(l=L,K(S)):be(S)?(e.consume(S),L):Y(S)}function z(S){return S===45||kt(S)?(e.consume(S),z):S===47||S===62||_e(S)?A(S):n(S)}function A(S){return S===47?(e.consume(S),Y):S===58||S===95||wt(S)?(e.consume(S),N):ue(S)?(l=A,K(S)):be(S)?(e.consume(S),A):Y(S)}function N(S){return S===45||S===46||S===58||S===95||kt(S)?(e.consume(S),N):R(S)}function R(S){return S===61?(e.consume(S),I):ue(S)?(l=R,K(S)):be(S)?(e.consume(S),R):A(S)}function I(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,W):ue(S)?(l=I,K(S)):be(S)?(e.consume(S),I):(e.consume(S),V)}function W(S){return S===i?(e.consume(S),i=void 0,_):S===null?n(S):ue(S)?(l=W,K(S)):(e.consume(S),W)}function V(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||_e(S)?A(S):(e.consume(S),V)}function _(S){return S===47||S===62||_e(S)?A(S):n(S)}function Y(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function K(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),H}function H(S){return be(S)?Re(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ee(S)}function ee(S){return e.enter("htmlTextData"),l(S)}}const hp={name:"labelEnd",resolveAll:jE,resolveTo:NE,tokenize:SE},wE={tokenize:CE},kE={tokenize:EE},bE={tokenize:PE};function jE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Bn(e,0,e.length,n),e}function NE(e,t){let n=e.length,r=0,i,s,l;for(;n--;){const d=e[n][1];if(i){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;e[n][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(i=n,d.type!=="labelLink")){r=2;break}}else d.type==="labelEnd"&&(s=n)}const o={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",o,t],["enter",u,t]],l=jn(l,e.slice(i+1,i+r+3)),l=jn(l,[["enter",c,t]]),l=jn(l,ec(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),l=jn(l,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),l=jn(l,e.slice(s+1)),l=jn(l,[["exit",o,t]]),Bn(e,i,e.length,l),e}function SE(e,t,n){const r=this,i=r._labelStarts;let s,l;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();s=i[i.length-1]}return o;function o(p){return s?s._inactive?h(p):(l=r.parser.defined.includes(Un(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(wE,d,l?d:h)(p):p===91?e.attempt(kE,d,l?c:h)(p):l?d(p):h(p)}function c(p){return e.attempt(bE,d,h)(p)}function d(p){return i.pop(),t(p)}function h(p){return s._balanced=!0,n(p)}}function CE(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return _e(h)?Xl(e,s)(h):s(h)}function s(h){return h===41?d(h):M0(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return _e(h)?Xl(e,u)(h):d(h)}function o(h){return n(h)}function u(h){return h===34||h===39||h===40?z0(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return _e(h)?Xl(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function EE(e,t,n){const r=this;return i;function i(o){return R0.call(r,e,s,l,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Un(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function l(o){return n(o)}}function PE(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const TE={name:"labelStartImage",resolveAll:hp.resolveAll,tokenize:LE};function LE(e,t,n){const r=this;let i;return s;function s(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(u))}}const ME={name:"labelStartLink",resolveAll:hp.resolveAll,tokenize:RE};function RE(e,t,n){const r=this;let i;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(o))}}const Wc={name:"lineEnding",tokenize:zE};function zE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Re(e,t,"linePrefix")}}const Bo={name:"thematicBreak",tokenize:AE};function AE(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),l(c)}function l(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||ue(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),be(c)?Re(e,o,"whitespace")(c):o(c))}}const Qt={continuation:{tokenize:OE},exit:$E,name:"list",tokenize:DE},IE={partial:!0,tokenize:BE},FE={partial:!0,tokenize:_E};function DE(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return o;function o(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Th(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Bo,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return n(f)}function u(f){return Th(f)&&++l<10?(e.consume(f),u):(!r.interrupt||l<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Qa,r.interrupt?n:d,e.attempt(IE,p,h))}function d(f){return r.containerState.initialBlankLine=!0,s++,p(f)}function h(f){return be(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function OE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qa,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Re(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!be(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(FE,t,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Re(e,e.attempt(Qt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function _E(e,t,n){const r=this;return Re(e,i,"listItemIndent",r.containerState.size+1);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(s):n(s)}}function $E(e){e.exit(this.containerState.type)}function BE(e,t,n){const r=this;return Re(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const l=r.events[r.events.length-1];return!be(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Ug={name:"setextUnderline",resolveTo:UE,tokenize:qE};function UE(e,t){const n=new Nu;let r=e.length,i,s,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!l&&e[r][1].type==="definition"&&(l=r);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(n.add(s,0,[["enter",o,t]]),n.add(l+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[l][1].end}):e[i][1]=o,n.add(e.length,0,[["exit",o,t]]),n.consume(e),e}function qE(e,t,n){const r=this;let i;return s;function s(c){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,l(c)):n(c)}function l(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),be(c)?Re(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||ue(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const HE={tokenize:VE};function VE(e){const t=this,n=e.attempt(Qa,r,e.attempt(this.parser.constructs.flowInitial,i,Re(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ZC,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WE={resolveAll:F0()},QE=I0("string"),KE=I0("text");function I0(e){return{resolveAll:F0(e==="text"?GE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,l,o);return l;function l(d){return c(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const h=i[d];let p=-1;if(h)for(;++p<h.length;){const f=h[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function F0(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function GE(e,t){const n=new Nu;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],s=t.sliceStream(i);let l=s.length,o=-1,u=0,c;for(;l--;){const d=s[l];if(typeof d=="string"){for(o=d.length;d.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(d===-2)c=!0,u++;else if(d!==-1){l++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(u=0),u){const d={type:r===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:i.start._bufferIndex+o,_index:i.start._index+l,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...d.start},i.start.offset===i.end.offset?Object.assign(i,d):n.add(r,0,[["enter",d,t],["exit",d,t]])}r++}return n.consume(e),e}const YE={42:Qt,43:Qt,45:Qt,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,62:E0},XE={91:iE},JE={[-2]:Vc,[-1]:Vc,32:Vc},ZE={35:cE,42:Bo,45:[Ug,Bo],60:fE,61:Ug,95:Bo,96:Bg,126:Bg},e3={38:T0,92:P0},t3={[-5]:Wc,[-4]:Wc,[-3]:Wc,33:TE,38:T0,42:Lh,60:[AC,yE],91:ME,92:[oE,P0],93:hp,95:Lh,96:QC},n3={null:[Lh,WE]},r3={null:[42,95]},i3={null:[]},s3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:r3,contentInitial:XE,disable:i3,document:YE,flow:ZE,flowInitial:JE,insideSpan:n3,string:e3,text:t3},Symbol.toStringTag,{value:"Module"}));function l3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let l=[],o=[];const u={attempt:L(C),check:L(k),consume:y,enter:v,exit:j,interrupt:L(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:h};let d=t.tokenize.call(c,u);return t.resolveAll&&s.push(t),c;function h(R){return l=jn(l,R),w(),l[l.length-1]!==null?[]:(z(t,0),c.events=ec(s,c.events,c),c.events)}function p(R,I){return o3(f(R),I)}function f(R){return a3(l,R)}function g(){const{_bufferIndex:R,_index:I,line:W,column:V,offset:_}=r;return{_bufferIndex:R,_index:I,line:W,column:V,offset:_}}function x(R){i[R.line]=R.column,N()}function w(){for(;r._index<l.length;){const R=l[r._index];if(typeof R=="string"){const I=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<R.length;)m(R.charCodeAt(r._bufferIndex))}else m(R)}}function m(R){d=d(R)}function y(R){ue(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,N()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function v(R,I){const W=I||{};return W.type=R,W.start=g(),c.events.push(["enter",W,c]),o.push(W),W}function j(R){const I=o.pop();return I.end=g(),c.events.push(["exit",I,c]),I}function C(R,I){z(R,I.from)}function k(R,I){I.restore()}function L(R,I){return W;function W(V,_,Y){let K,H,ee,S;return Array.isArray(V)?ye(V):"tokenize"in V?ye([V]):ce(V);function ce(ve){return je;function je(Dt){const rn=Dt!==null&&ve[Dt],Ct=Dt!==null&&ve.null,$e=[...Array.isArray(rn)?rn:rn?[rn]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return ye($e)(Dt)}}function ye(ve){return K=ve,H=0,ve.length===0?Y:P(ve[H])}function P(ve){return je;function je(Dt){return S=A(),ee=ve,ve.partial||(c.currentConstruct=ve),ve.name&&c.parser.constructs.disable.null.includes(ve.name)?Fe():ve.tokenize.call(I?Object.assign(Object.create(c),I):c,u,Ee,Fe)(Dt)}}function Ee(ve){return R(ee,S),_}function Fe(ve){return S.restore(),++H<K.length?P(K[H]):Y}}}function z(R,I){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&Bn(c.events,I,c.events.length-I,R.resolve(c.events.slice(I),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function A(){const R=g(),I=c.previous,W=c.currentConstruct,V=c.events.length,_=Array.from(o);return{from:V,restore:Y};function Y(){r=R,c.previous=I,c.currentConstruct=W,c.events.length=V,o=_,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function a3(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,s)];else{if(l=e.slice(n,i),r>-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}s>0&&l.push(e[i].slice(0,s))}return l}function o3(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
454
|
+
`;break}case-3:{l=`\r
|
|
455
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(s)}i=s===-2,r.push(l)}return r.join("")}function u3(e){const r={constructs:j0([s3,...(e||{}).extensions||[]]),content:i(EC),defined:[],document:i(TC),flow:i(HE),lazy:{},string:i(QE),text:i(KE)};return r;function i(s){return l;function l(o){return l3(r,s,o)}}}function c3(e){for(;!L0(e););return e}const qg=/[\0\t\n\r]/g;function d3(){let e=1,t="",n=!0,r;return i;function i(s,l,o){s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s));const u=[];let c=0;for(t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){qg.lastIndex=c;const d=qg.exec(s),h=d&&d.index!==void 0?d.index:s.length,p=s.charCodeAt(h);if(!d){t=s.slice(c);break}if(p===10&&c===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<h&&(u.push(s.slice(c,h)),e+=h-c),p){case 0:{u.push(65533),e++;break}case 9:{const f=Math.ceil(e/4)*4;for(u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const h3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function f3(e){return e.replace(h3,p3)}function p3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return N0(n.slice(s?2:1),s?16:10)}return dp(n)||e}const D0={}.hasOwnProperty;function m3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),g3(n)(c3(u3(n).document().write(d3()(e,t,!0))))}function g3(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Gn),autolinkProtocol:N,autolinkEmail:N,atxHeading:l(Qn),blockQuote:l($e),characterEscape:N,characterReference:N,codeFenced:l(it),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(it,o),codeText:l(Pn,o),codeTextData:N,data:N,codeFlowValue:N,definition:l(Tn),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Wt),hardBreakEscape:l(sn),hardBreakTrailing:l(sn),htmlFlow:l(Kn,o),htmlFlowData:N,htmlText:l(Kn,o),htmlTextData:N,image:l(pr),label:o,link:l(Gn),listItem:l(mr),listItemValue:f,listOrdered:l(Yn,p),listUnordered:l(Yn),paragraph:l(T),reference:Ee,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Qn),strong:l(xe),thematicBreak:l(Ln)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:Ct,autolinkProtocol:rn,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:je,characterReference:Dt,codeFenced:c(m),codeFencedFence:w,codeFencedFenceInfo:g,codeFencedFenceMeta:x,codeFlowValue:R,codeIndented:c(y),codeText:c(Y),codeTextData:R,data:R,definition:c(),definitionDestinationString:C,definitionLabelString:v,definitionTitleString:j,emphasis:c(),hardBreakEscape:c(W),hardBreakTrailing:c(W),htmlFlow:c(V),htmlFlowData:R,htmlText:c(_),htmlTextData:R,image:c(H),label:S,labelText:ee,lineEnding:I,link:c(K),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Fe,resourceDestinationString:ce,resourceTitleString:ye,resource:P,setextHeading:c(A),setextHeadingLineSequence:z,setextHeadingText:L,strong:c(),thematicBreak:c()}};O0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[],position:void 0};const de={stack:[B],tokenStack:[],config:t,enter:u,exit:d,buffer:o,resume:h,data:n},he=[],Et=[];let Pe=-1;for(;++Pe<O.length;)if(Et.push(O[Pe]),O[Pe][1].type==="listOrdered"||O[Pe][1].type==="listUnordered")if(O[Pe][0]==="enter")he.push(Et.length-1);else{const gt=he.pop();s(Et,gt)}for(O=Et,Pe=-1;++Pe<O.length;){const gt=t[O[Pe][0]];O[Pe][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...de,sliceSerialize:O[Pe][2].sliceSerialize},O[Pe][1]),D0.call(gt,O[Pe][1].type)&>[O[Pe][1].type].call({...de,sliceSerialize:O[Pe][2].sliceSerialize},O[Pe][1]),O[Pe][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...de,sliceSerialize:O[Pe][2].sliceSerialize},O[Pe][1])}if(de.tokenStack.length>0){const gt=de.tokenStack[de.tokenStack.length-1];(gt[1]||Hg).call(de,void 0,gt[0])}for(B.position={start:Or(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Or(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)B=t.transforms[Pe](B)||B;return B}function i(O,B,de){let he=-1;for(;++he<O.length;)O[he].call(B,de)}function s(O,B){const de=O.length-1;let he=B-1,Et=-1,Pe=!1,gt,ln,Ir,Ni;const Fr=[];for(;++he<=de;){const xt=O[he];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?Et++:Et--,Ni=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(gt&&!Ni&&!Et&&!Ir&&(Ir=he),Ni=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ni=void 0}if(!Et&&xt[0]==="enter"&&xt[1].type==="listItemPrefix"||Et===-1&&xt[0]==="exit"&&(xt[1].type==="listUnordered"||xt[1].type==="listOrdered")){if(gt){let Xn=he;for(ln=void 0;Xn--;){const Mn=O[Xn];if(Mn[1].type==="lineEnding"||Mn[1].type==="lineEndingBlank"){if(Mn[0]==="exit")continue;ln&&(O[ln][1].type="lineEndingBlank",Pe=!0),Mn[1].type="lineEnding",ln=Xn}else if(!(Mn[1].type==="linePrefix"||Mn[1].type==="blockQuotePrefix"||Mn[1].type==="blockQuotePrefixWhitespace"||Mn[1].type==="blockQuoteMarker"||Mn[1].type==="listItemIndent"))break}Ir&&(!ln||Ir<ln)&&(gt._spread=!0),gt.end=Object.assign({},ln?O[ln][1].start:xt[1].end),Fr.push({at:ln||he,event:["exit",gt,xt[2]]})}if(xt[1].type==="listItemPrefix"){const Xn={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};gt=Xn,Fr.push({at:he,event:["enter",Xn,xt[2]]}),Ir=void 0,Ni=!0}}}const Si=O.splice(B);let as=0;for(he=-1;++he<Si.length;){for(;as<Fr.length&&Fr[as].at===B+he;)O.push(Fr[as++].event);O.push(Si[he])}O[B][1]._spread=Pe}function l(O,B){return de;function de(he){u.call(this,O(he),he),B&&B.call(this,he)}}function o(){this.stack.push({type:"fragment",children:[]})}function u(O,B,de){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,de||void 0]),O.position={start:Or(B.start),end:void 0}}function c(O){return B;function B(de){O&&O.call(this,de),d.call(this,de)}}function d(O,B){const de=this.stack.pop(),he=this.tokenStack.pop();if(!he)throw new Error("Cannot close `"+O.type+"` ("+Yl({start:O.start,end:O.end})+"): it’s not open");he[0].type!==O.type&&(B?B.call(this,O,he[0]):(he[1]||Hg).call(this,O,he[0])),de.position.end=Or(O.end)}function h(){return Ju(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function f(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function g(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function x(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function v(O){const B=this.resume(),de=this.stack[this.stack.length-1];de.label=B,de.identifier=Un(this.sliceSerialize(O)).toLowerCase()}function j(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function C(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function k(O){const B=this.stack[this.stack.length-1];if(!B.depth){const de=this.sliceSerialize(O).length;B.depth=de}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function z(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function N(O){const de=this.stack[this.stack.length-1].children;let he=de[de.length-1];(!he||he.type!=="text")&&(he=ut(),he.position={start:Or(O.start),end:void 0},de.push(he)),this.stack.push(he)}function R(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=Or(O.end)}function I(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=B.children[B.children.length-1];de.position.end=Or(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(N.call(this,O),R.call(this,O))}function W(){this.data.atHardBreak=!0}function V(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function _(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function Y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function K(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function H(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ee(O){const B=this.sliceSerialize(O),de=this.stack[this.stack.length-2];de.label=f3(B),de.identifier=Un(B).toLowerCase()}function S(){const O=this.stack[this.stack.length-1],B=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const he=O.children;de.children=he}else de.alt=B}function ce(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function ye(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function P(){this.data.inReference=void 0}function Ee(){this.data.referenceType="collapsed"}function Fe(O){const B=this.resume(),de=this.stack[this.stack.length-1];de.label=B,de.identifier=Un(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ve(O){this.data.characterReferenceType=O.type}function je(O){const B=this.sliceSerialize(O),de=this.data.characterReferenceType;let he;de?(he=N0(B,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=dp(B);const Et=this.stack[this.stack.length-1];Et.value+=he}function Dt(O){const B=this.stack.pop();B.position.end=Or(O.end)}function rn(O){R.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function Ct(O){R.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function $e(){return{type:"blockquote",children:[],position:void 0}}function it(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Pn(){return{type:"inlineCode",value:"",position:void 0}}function Tn(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Wt(){return{type:"emphasis",children:[],position:void 0}}function Qn(){return{type:"heading",depth:0,children:[],position:void 0}}function sn(){return{type:"break",position:void 0}}function Kn(){return{type:"html",value:"",position:void 0}}function pr(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Gn(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Yn(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[],position:void 0}}function mr(O){return{type:"listItem",spread:O._spread,checked:null,children:[],position:void 0}}function T(){return{type:"paragraph",children:[],position:void 0}}function xe(){return{type:"strong",children:[],position:void 0}}function ut(){return{type:"text",value:"",position:void 0}}function Ln(){return{type:"thematicBreak",position:void 0}}}function Or(e){return{line:e.line,column:e.column,offset:e.offset}}function O0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?O0(e,r):x3(e,r)}}function x3(e,t){let n;for(n in t)if(D0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Hg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yl({start:t.start,end:t.end})+") is still open")}function y3(e){const t=this;t.parser=n;function n(r){return m3(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function v3(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function w3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
456
|
+
`}]}function k3(e,t){const n=t.value?t.value+`
|
|
457
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function b3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function j3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=xl(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let l,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=s+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function S3(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function _0(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function E3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _0(e,t);const i={src:xl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function P3(e,t){const n={src:xl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function T3(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function L3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _0(e,t);const i={href:xl(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function M3(e,t){const n={href:xl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function R3(e,t,n){const r=e.all(t),i=n?z3(n):$0(t),s={},l=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
458
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?l.push(...d.children):l.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
|
|
459
|
+
`});const c={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,c),e.applyData(t,c)}function z3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=$0(n[r])}return t}function $0(e){const t=e.spread;return t??e.children.length>1}function A3(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function I3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function F3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function D3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function O3(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=ap(t.children[1]),u=g0(t.children[t.children.length-1]);o&&u&&(l.position={start:o,end:u}),i.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function _3(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,o=l?l.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const h=t.children[u],p={},f=l?l[u]:void 0;f&&(p.align=f);let g={type:"element",tagName:s,properties:p,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),c.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function $3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vg=9,Wg=32;function B3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Qg(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Qg(t.slice(i),i>0,!1)),s.join("")}function Qg(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Vg||s===Wg;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Vg||s===Wg;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function U3(e,t){const n={type:"text",value:B3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function q3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const H3={blockquote:v3,break:w3,code:k3,delete:b3,emphasis:j3,footnoteReference:N3,heading:S3,html:C3,imageReference:E3,image:P3,inlineCode:T3,linkReference:L3,link:M3,listItem:R3,list:A3,paragraph:I3,root:F3,strong:D3,table:O3,tableCell:$3,tableRow:_3,text:U3,thematicBreak:q3,toml:ko,yaml:ko,definition:ko,footnoteDefinition:ko};function ko(){}const B0=-1,tc=0,Jl=1,Su=2,fp=3,pp=4,mp=5,gp=6,U0=7,q0=8,{defineProperty:V3}=Object,H0=typeof self=="object"?self:globalThis,Kg=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new H0[e](t)},W3=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,l]=t[i];switch(s){case tc:case B0:return n(l,i);case Jl:{const o=n([],i);for(const u of l)o.push(r(u));return o}case Su:{const o=n({},i);for(const[u,c]of l){const d=r(u),h=r(c);d==="__proto__"?V3(o,d,{value:h,configurable:!0,enumerable:!0,writable:!0}):o[d]=h}return o}case fp:return n(new Date(l),i);case pp:{const{source:o,flags:u}=l;return n(new RegExp(o,u),i)}case mp:{const o=n(new Map,i);for(const[u,c]of l)o.set(r(u),r(c));return o}case gp:{const o=n(new Set,i);for(const u of l)o.add(r(u));return o}case U0:{const{name:o,message:u}=l;return n(typeof H0[o]=="function"?Kg(o,u):new Error(u),i)}case q0:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:o}=new Uint8Array(l);return n(new DataView(o),l)}case"-0":return-0}return n(Kg(s,l),i)};return r},Gg=e=>W3(new Map,e)(0),Li="",{toString:Q3}={},{keys:K3,is:G3}=Object,Al=e=>{const t=typeof e;if(t!=="object"||!e)return[tc,t];const n=Q3.call(e).slice(8,-1);switch(n){case"Array":return[Jl,Li];case"Object":return[Su,Li];case"Date":return[fp,Li];case"RegExp":return[pp,Li];case"Map":return[mp,Li];case"Set":return[gp,Li];case"DataView":return[Jl,n]}return n.includes("Array")?[Jl,n]:e instanceof Error?[U0,e.name||"Error"]:[Su,n]},bo=([e,t])=>e===tc&&(t==="function"||t==="symbol"),Y3=(e,t,n,r)=>{const i=(l,o)=>{const u=r.push(l)-1;return n.set(o,u),u},s=l=>{if(n.has(l))return n.get(l);let[o,u]=Al(l);switch(o){case tc:{let d=l;switch(u){case"bigint":o=q0,d=l.toString();break;case"number":if(!l&&G3(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([B0],l)}return i([o,d],l)}case Jl:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),i([u,[...p]],l)}const d=[],h=i([o,d],l);for(const p of l)d.push(s(p));return h}case Su:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const d=[],h=i([o,d],l);for(const p of K3(l))(e||!bo(Al(l[p])))&&d.push([s(p),s(l[p])]);return h}case fp:return i([o,isNaN(l.getTime())?Li:l.toISOString()],l);case pp:{const{source:d,flags:h}=l;return i([o,{source:d,flags:h}],l)}case mp:{const d=[],h=i([o,d],l);for(const[p,f]of l)(e||!(bo(Al(p))||bo(Al(f))))&&d.push([s(p),s(f)]);return h}case gp:{const d=[],h=i([o,d],l);for(const p of l)(e||!bo(Al(p)))&&d.push(s(p));return h}}const{message:c}=l;return i([o,{name:u,message:c}],l)};return s},Yg=(e,{json:t,lossy:n}={})=>{const r=[];return Y3(!(t||n),!!t,new Map,r)(e),r},Cu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gg(Yg(e,t)):structuredClone(e):(e,t)=>Gg(Yg(e,t));function X3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function J3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Z3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||X3,r=e.options.footnoteBackLabel||J3,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),h=String(c.identifier).toUpperCase(),p=xl(h.toLowerCase());let f=0;const g=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++f<=x;){g.length>0&&g.push({type:"text",value:" "});let y=typeof n=="string"?n:n(u,f);typeof y=="string"&&(y={type:"text",value:y}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,f),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const y=w.children[w.children.length-1];y&&y.type==="text"?y.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...g)}else d.push(...g);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,m),o.push(m)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Cu(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
460
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
461
|
+
`}]}}const nc=function(e){if(e==null)return r4;if(typeof e=="function")return rc(e);if(typeof e=="object")return Array.isArray(e)?e4(e):t4(e);if(typeof e=="string")return n4(e);throw new Error("Expected function, string, or object as test")};function e4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nc(e[n]);return rc(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function t4(e){const t=e;return rc(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function n4(e){return rc(t);function t(n){return n&&n.type===e}}function rc(e){return t;function t(n,r,i){return!!(i4(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function r4(){return!0}function i4(e){return e!==null&&typeof e=="object"&&"type"in e}const V0=[],s4=!0,Zl=!1,zh="skip";function Ah(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,s,l,o,u;if(typeof n=="function"||n&&typeof n=="object"?(s=t,l=n,r&&(i=!1)):(l=t,n&&(i=!1)),typeof l=="function")o=l;else if(l&&typeof l=="object"){if(!(l.enter===null||l.enter===void 0))if(typeof l.enter=="function")o=l.enter;else throw new Error("Unexpected value `"+l.enter+"` for `visitors.enter`, expected optional visitor");if(typeof l.exit=="function")u=l.exit;else throw new Error("Unexpected value `"+l.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+l+"` for `enter` or `visitors`, expected visitor or object with visitors");const c=nc(s),d=i?1:-1;h(e,void 0,[])();function h(p,f,g){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const m=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(p.type+(m?"<"+m+">":""))+")"})}return w;function w(){const m=!s||c(p,f,g[g.length-1]||void 0);let y=V0;if(o&&m&&(y=Xg(o(p,g,f)),y[0]===Zl))return y;if("children"in p&&p.children){const v=p;if(v.children&&y[0]!==zh){let j=(i?-1:v.children.length)+d;const C=[...g,v];for(;j>-1&&j<v.children.length;){const k=v.children[j],L=h(k,j,C)();if(L[0]===Zl)return L;j=typeof L[1]=="number"?L[1]:j+d}}}if(u&&m){const v=Xg(u(p,g,f));if(v[0]===zh)throw new Error("Unexpected value `"+v[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(v[0]===Zl||typeof v[1]=="number")return v}return y}}}function Xg(e){return Array.isArray(e)?e:typeof e=="number"?[s4,e]:e==null?V0:[e]}function ic(e,t,n,r){let i,s,l;s=t,l=n,typeof s=="function"?Ah(e,i,Ih(s),l):Ah(e,i,l4(s),l)}function l4(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?Ih(e.enter):e.enter,exit:typeof e.exit=="function"?Ih(e.exit):e.exit}}function Ih(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const Fh={}.hasOwnProperty,a4={};function o4(e,t){const n=t||a4,r=new Map,i=new Map,s=new Map,l={...H3,...n.handlers},o={all:c,applyData:c4,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:l,one:u,options:n,patch:u4,wrap:h4};return ic(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),o;function u(d,h){const p=d.type,f=o.handlers[p];if(Fh.call(o.handlers,p)&&f)return f(o,d,h);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:x,...w}=d,m=Cu(w);return m.children=o.all(d),m}return Cu(d)}return(o.options.unknownHandler||d4)(o,d,h)}function c(d){const h=[];if("children"in d){const p=d.children;let f=-1;for(;++f<p.length;){const g=o.one(p[f],d);if(g){if(f&&p[f-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Jg(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=Jg(x.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function u4(e,t){e.position&&(t.position=JS(e))}function c4(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,Cu(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function d4(e,t){const n=t.data||{},r="value"in t&&!(Fh.call(n,"hProperties")||Fh.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 h4(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
462
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
463
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
464
|
+
`}),n}function Jg(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zg(e,t){const n=o4(e,t),r=n.one(e,void 0),i=Z3(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
465
|
+
`},i),s}function f4(e,t){return e&&"run"in e?async function(n,r){const i=Zg(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Zg(n,{file:r,...e||t})}}function ex(e){if(e)throw e}var Uo=Object.prototype.hasOwnProperty,W0=Object.prototype.toString,tx=Object.defineProperty,nx=Object.getOwnPropertyDescriptor,rx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):W0.call(t)==="[object Array]"},ix=function(t){if(!t||W0.call(t)!=="[object Object]")return!1;var n=Uo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Uo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Uo.call(t,i)},sx=function(t,n){tx&&n.name==="__proto__"?tx(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},lx=function(t,n){if(n==="__proto__")if(Uo.call(t,n)){if(nx)return nx(t,n).value}else return;return t[n]},p4=function e(){var t,n,r,i,s,l,o=arguments[0],u=1,c=arguments.length,d=!1;for(typeof o=="boolean"&&(d=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=lx(o,n),i=lx(t,n),o!==i&&(d&&i&&(ix(i)||(s=rx(i)))?(s?(s=!1,l=r&&rx(r)?r:[]):l=r&&ix(r)?r:{},sx(o,{name:n,newValue:e(d,l,i)})):typeof i<"u"&&sx(o,{name:n,newValue:i}));return o};const Qc=$h(p4);function Dh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function m4(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);o(null,...i);function o(u,...c){const d=e[++s];let h=-1;if(u){l(u);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,d?g4(d,o)(...c):l(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function g4(e,t){let n;return r;function r(...l){const o=e.length>l.length;let u;o&&l.push(i);try{u=e.apply(this,l)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(l,...o){n||(n=!0,t(l,...o))}function s(l){i(null,l)}}const tr={basename:x4,dirname:y4,extname:v4,join:w4,sep:"/"};function x4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ka(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else l<0&&(s=!0,l=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function y4(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||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function v4(e){Ka(e);let t=e.length,n=-1,r=0,i=-1,s=0,l;for(;t--;){const o=e.codePointAt(t);if(o===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function w4(...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?".":k4(n)}function k4(e){Ka(e);const t=e.codePointAt(0)===47;let n=b4(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function b4(e,t){let n="",r=0,i=-1,s=0,l=-1,o,u;for(;++l<=e.length;){if(l<e.length)o=e.codePointAt(l);else{if(o===47)break;o=47}if(o===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,s=0;continue}}else if(n.length>0){n="",r=0,i=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,s=0}else o===46&&s>-1?s++:s=-1}return n}function Ka(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const j4={cwd:N4};function N4(){return"/"}function Oh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function S4(e){if(typeof e=="string")e=new URL(e);else if(!Oh(e)){const t=new 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return C4(e)}function C4(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Kc=["history","path","basename","stem","extname","dirname"];class Q0{constructor(t){let n;t?Oh(t)?n={path:t}:typeof t=="string"||E4(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":j4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Kc.length;){const s=Kc[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Kc.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?tr.basename(this.path):void 0}set basename(t){Yc(t,"basename"),Gc(t,"basename"),this.path=tr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?tr.dirname(this.path):void 0}set dirname(t){ax(this.basename,"dirname"),this.path=tr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?tr.extname(this.path):void 0}set extname(t){if(Gc(t,"extname"),ax(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=tr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Oh(t)&&(t=S4(t)),Yc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?tr.basename(this.path,this.extname):void 0}set stem(t){Yc(t,"stem"),Gc(t,"stem"),this.path=tr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ft(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Gc(e,t){if(e&&e.includes(tr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+tr.sep+"`")}function Yc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ax(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function E4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const P4=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},T4={}.hasOwnProperty;class xp extends P4{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=m4()}copy(){const t=new xp;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Qc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zc("data",this.frozen),this.namespace[t]=n,this):T4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=jo(t),r=this.parser||this.Parser;return Xc("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Xc("process",this.parser||this.Parser),Jc("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,l){const o=jo(t),u=r.parse(o);r.run(u,o,function(d,h,p){if(d||!h||!p)return c(d);const f=h,g=r.stringify(f,p);R4(g)?p.value=g:p.result=g,c(d,p)});function c(d,h){d||!h?l(d):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Xc("processSync",this.parser||this.Parser),Jc("processSync",this.compiler||this.Compiler),this.process(t,i),ux("processSync","process",n),r;function i(s,l){n=!0,ex(s),r=l}}run(t,n,r){ox(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(l,o){const u=jo(n);i.run(t,u,c);function c(d,h,p){const f=h||t;d?o(d):l?l(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),ux("runSync","run",r),i;function s(l,o){ex(l),i=o,r=!0}}stringify(t,n){this.freeze();const r=jo(n),i=this.compiler||this.Compiler;return Jc("stringify",i),ox(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Zc("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;u(d,h)}else l(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function l(c){if(!("plugins"in c)&&!("settings"in c))throw new 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(c.plugins),c.settings&&(i.settings=Qc(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===c){p=h;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[f,...g]=d;const x=r[p][1];Dh(x)&&Dh(f)&&(f=Qc(!0,x,f)),r[p]=[c,f,...g]}}}}const L4=new xp().freeze();function Xc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ox(e){if(!Dh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ux(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jo(e){return M4(e)?e:new Q0(e)}function M4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function R4(e){return typeof e=="string"||z4(e)}function z4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const A4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cx=[],dx={allowDangerousHtml:!0},I4=/^(https?|ircs?|mailto|xmpp)$/i,F4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function K0(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,s=e.components,l=e.disallowedElements,o=e.rehypePlugins||cx,u=e.remarkPlugins||cx,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dx}:dx,d=e.skipHtml,h=e.unwrapDisallowed,p=e.urlTransform||D4,f=L4().use(y3).use(u).use(f4,c).use(o),g=new Q0;typeof r=="string"&&(g.value=r);for(const y of F4)Object.hasOwn(e,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+A4+y.id,void 0);const x=f.parse(g);let w=f.runSync(x,g);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),ic(w,m),iC(w,{Fragment:a.Fragment,components:s,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function m(y,v,j){if(y.type==="raw"&&j&&typeof v=="number")return d?j.children.splice(v,1):j.children[v]={type:"text",value:y.value},v;if(y.type==="element"){let C;for(C in Hc)if(Object.hasOwn(Hc,C)&&Object.hasOwn(y.properties,C)){const k=y.properties[C],L=Hc[C];(L===null||L.includes(y.tagName))&&(y.properties[C]=p(String(k||""),C,y))}}if(y.type==="element"){let C=t?!t.includes(y.tagName):l?l.includes(y.tagName):!1;if(!C&&n&&typeof v=="number"&&(C=!n(y,v,j)),C&&j&&typeof v=="number")return h&&y.children?j.children.splice(v,1,...y.children):j.children.splice(v,1),v}}}function D4(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||I4.test(e.slice(0,t))?e:""}function hx(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function O4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _4(e,t,n){const i=nc((n||{}).ignore||[]),s=$4(t);let l=-1;for(;++l<s.length;)Ah(e,o);function o(c,d,h){if(c.type==="text"&&typeof h=="number")return u(c,d,h);if(i(c,h,d[d.length-1]))return zh}function u(c,d,h){const p=d[d.length-1],f=s[l][0],g=s[l][1];let x=0,w=!1,m=[];f.lastIndex=0;let y=f.exec(c.value);for(;y;){const j=y.index,C={index:y.index,input:y.input,stack:[...d,c]};let k=g(...y,C);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1)f.lastIndex=j+1;else{if(x!==j&&v({type:"text",value:c.value.slice(x,j)}),Array.isArray(k))for(const L of k)v(L);else k&&v(k);x=j+y[0].length,w=!0}if(!f.global)break;y=f.exec(c.value)}return w?(x<c.value.length&&v({type:"text",value:c.value.slice(x)}),p.children.splice(h,1,...m)):m=[c],h+m.length;function v(j){const C=m[m.length-1];C&&C.type==="text"&&j.type==="text"?C.value+=j.value:m.push(j)}}}function $4(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([B4(i[0]),U4(i[1])])}return t}function B4(e){return typeof e=="string"?new RegExp(O4(e),"g"):e}function U4(e){return typeof e=="function"?e:function(){return e}}const ed="phrasing",td=["autolink","link","image","label"];function q4(){return{transforms:[Y4],enter:{literalAutolink:V4,literalAutolinkEmail:nd,literalAutolinkHttp:nd,literalAutolinkWww:nd},exit:{literalAutolink:G4,literalAutolinkEmail:K4,literalAutolinkHttp:W4,literalAutolinkWww:Q4}}}function H4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ed,notInConstruct:td},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ed,notInConstruct:td},{character:":",before:"[ps]",after:"\\/",inConstruct:ed,notInConstruct:td}]}}function V4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nd(e){this.config.enter.autolinkProtocol.call(this,e)}function W4(e){this.config.exit.autolinkProtocol.call(this,e)}function Q4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function K4(e){this.config.exit.autolinkEmail.call(this,e)}function G4(e){this.exit(e)}function Y4(e){_4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,X4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),J4]],{ignore:["link","linkReference"]})}function X4(e,t,n,r,i){let s="";if(!G0(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Z4(n)))return!1;const l=e5(n+r);if(!l[0])return!1;const o={type:"link",title:null,url:s+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[o,{type:"text",value:l[1]}]:o}function J4(e,t,n,r){return!G0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Z4(e){const 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 e5(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=hx(e,"(");let s=hx(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function G0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ns(n)||Zu(n))&&(!t||n!==47)}Y0.peek=u5;function t5(){this.buffer()}function n5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function r5(){this.buffer()}function i5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function s5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Un(this.sliceSerialize(e)).toLowerCase(),n.label=t}function l5(e){this.exit(e)}function a5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Un(this.sliceSerialize(e)).toLowerCase(),n.label=t}function o5(e){this.exit(e)}function u5(){return"["}function Y0(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const l=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),l(),s+=i.move("]"),s}function c5(){return{enter:{gfmFootnoteCallString:t5,gfmFootnoteCall:n5,gfmFootnoteDefinitionLabelString:r5,gfmFootnoteDefinition:i5},exit:{gfmFootnoteCallString:s5,gfmFootnoteCall:l5,gfmFootnoteDefinitionLabelString:a5,gfmFootnoteDefinition:o5}}}function d5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Y0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,l){const o=s.createTracker(l);let u=o.move("[^");const c=s.enter("footnoteDefinition"),d=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
466
|
+
`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?X0:h5))),c(),u}}function h5(e,t,n){return t===0?e:X0(e,t,n)}function X0(e,t,n){return(n?"":" ")+e}const f5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yp.attention=y5;yp.peek=v5;function p5(){return{canContainEols:["delete"],enter:{strikethrough:g5},exit:{strikethrough:x5}}}function m5(){return{handlers:{delete:yp},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:f5}]}}function g5(e){this.enter({type:"delete",children:[],position:void 0},e)}function x5(e){this.exit(e)}function yp(e,t,n,r){const i=n.createTracker(r),s=n.stack.includes("strikethrough")?"~":"~~",l=n.enter("strikethrough");let o=i.move(s);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move(s),l(),o}function y5(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function v5(){return"~"}function w5(e){return e.length}function k5(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||w5,s=[],l=[],o=[],u=[];let c=0,d=-1;for(;++d<e.length;){const x=[],w=[];let m=-1;for(e[d].length>c&&(c=e[d].length);++m<e[d].length;){const y=b5(e[d][m]);if(n.alignDelimiters!==!1){const v=i(y);w[m]=v,(u[m]===void 0||v>u[m])&&(u[m]=v)}x.push(y)}l[d]=x,o[d]=w}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<c;)s[h]=fx(r[h]);else{const x=fx(r);for(;++h<c;)s[h]=x}h=-1;const p=[],f=[];for(;++h<c;){const x=s[h];let w="",m="";x===99?(w=":",m=":"):x===108?w=":":x===114&&(m=":");let y=n.alignDelimiters===!1?1:Math.max(1,u[h]-w.length-m.length);const v=w+"-".repeat(y)+m;n.alignDelimiters!==!1&&(y=w.length+y+m.length,y>u[h]&&(u[h]=y),f[h]=y),p[h]=v}l.splice(1,0,p),o.splice(1,0,f),d=-1;const g=[];for(;++d<l.length;){const x=l[d],w=o[d],m=n.fillRows===!1?Math.max(1,l[d===1?0:d].length):c;h=-1;const y=[];for(;++h<m;){const v=x[h]||"";let j="",C="";if(n.alignDelimiters!==!1){const k=u[h]-(w[h]||0),L=s[h];if(L===114)j=" ".repeat(k);else if(L===99){const z=k/2;k%2?(j=" ".repeat(z+.5),C=" ".repeat(z-.5)):(j=" ".repeat(z),C=j)}else C=" ".repeat(k)}n.delimiterStart!==!1&&!h&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||h)&&y.push(" "),n.alignDelimiters!==!1&&y.push(j),y.push(v),n.alignDelimiters!==!1&&y.push(C),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||h!==m-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
|
|
467
|
+
`)}function b5(e){return e==null?"":String(e)}function fx(e){const 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}const j5=nc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function N5(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(e,s.current()),S5);return i(),l}function S5(e,t,n){return">"+(n?"":" ")+e}function C5(e,t){return px(e,t.inConstruct,!0)&&!px(e,t.notInConstruct,!1)}function px(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 mx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const s=n.unsafe[i];if(s.character===`
|
|
468
|
+
`&&!s.before&&!s.after&&C5(n.stack,s))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
469
|
+
`}function E5(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>l&&(l=s):s=1,i=r+t.length,r=n.indexOf(t,i);return l}function P5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function T5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function L5(e,t,n,r){const i=T5(n),s=e.value||"";if(P5(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(s,M5);return h(),p}const l=n.createTracker(r),o=i.repeat(Math.max(E5(s,i)+1,3)),u=n.enter("codeFenced"),c=i==="`"?"GraveAccent":"Tilde";let d=l.move(o);if(e.lang){const h=n.enter(`codeFencedLang${c}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${c}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
|
|
470
|
+
`,encode:["`"],...l.current()})),h()}return d+=l.move(`
|
|
471
|
+
`),s&&(d+=l.move(s+`
|
|
472
|
+
`)),d+=l.move(o),u(),d}function M5(e,t,n){return(n?"":" ")+e}function vp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function R5(e,t,n,r){const i=vp(n),s=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
473
|
+
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),l(),c}function z5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Eu(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function As(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function J0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function gx(e,t,n){const r=mi(e),i=mi(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}}function A5(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const o=e.charCodeAt(2);return o===45?2:o===91?5:wt(o)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,s=e.charCodeAt(i);if(!wt(s))return;for(;s===45||kt(s);)s=e.charCodeAt(++i);const l=e.slice(r,i).toLowerCase();return!n&&s!==47&&Rh.includes(l)?1:A0.includes(l)?6:7}const I5=new Map([["*",!1],["_",!0]]);function F5(e,t,n){const r=new Set;for(const s of e){const l=n.get(s);if(l&&s.attention&&t.some(o=>o.attention===s.attention))for(const o of l.tokens)r.add(o.attention)}const i=[];for(const s of e)s.attention&&r.delete(s.attention)&&i.push(s.attention);return i.reverse(),i}function Z0(e,t,n){const r=[],i=new Map,s=new Map;let l=0;for(;l<e.length;){if(!e[l].attention){l++;continue}const o=e[l].value.charAt(0),u=I5.get(o);let c=l+1;for(;c<e.length&&e[c].attention&&e[c].value.charAt(0)===o;)c++;const d=l?e[l-1].value:t,h=mi(d.charCodeAt(d.length-1)),p=mi((c<e.length?e[c].value:n).charCodeAt(0)),f=!p||p===2&&!!h,g=!h||h===2&&!!p,x={tokens:e.slice(l,c),markers:[],start:0,end:0,open:u?f&&(!!h||!g):f,close:u?g&&(!!p||!f):g,split:u!==void 0};for(const w of x.tokens){i.set(w,[...x.tokens]),s.set(w,x);let m=w.value.length;for(;m--;)x.markers.push(w)}x.end=x.markers.length,r.push(x),l=c}for(O5(r,i),l=-1;++l<e.length;){const o=i.get(e[l]);if(o)return{attention:F5(e,o,s),index:l}}}function No(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?Eu(n.value):As(n.value),i=J0(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let s=n.value.slice(0,n.value.length-r.length),l=0;for(;s.charCodeAt(s.length-1-l)===92;)l++;l%2&&(s+="\\"),n.value=s+i}}function D5(e,t,n,r,i){for(const s of n.attention){const l=t.get(s)||s.sequences[0];for(const o of s.sequences){if(o===l)continue;const u=new Map(t);u.set(s,o);const c=kp(e,u,r,i),d=Z0(c,r,i);if(!d||d.index>n.index)return{chosen:u,mistake:d,tokens:c}}}}function O5(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let s=n.get(i);s||(s=[],n.set(i,s));let l=r.close?s.length:0;for(;l--&&r.start<r.end;){const o=s[l],u=o.end-o.start,c=r.end-r.start;if(r.split?(o.close||r.open)&&c%3&&!((u+c)%3):u!==o.markers.length||u!==c)continue;const d=r.split?u>1&&c>1?2:1:c,h=o.markers.slice(o.end-d,o.end),p=r.markers.slice(r.start,r.start+d),f=h[0],g=p[0];if(f===h[d-1]&&f.value.length===d&&g===p[d-1]&&g.value.length===d&&f.attention===g.attention)t.delete(f),t.delete(g);else{const x=[...new Set([...h,...p])];for(const w of x){const m=t.get(w);m&&m.push(...x)}}o.end-=d,r.start+=d,o.start===o.end&&s.splice(l,1),l=s.length}r.open&&r.start<r.end&&s.push(r)}}function _5(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!S0(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const s of n)r.push(i.repeat(s))}return r}function $5(e,t,n){const r=t.indexStack,i=e.children||[],s=[];let l=-1,o=n.before;r.push(-1);let u=t.createTracker(n);for(;++l<i.length;){const c=i[l];let d;if(r[r.length-1]=l,l+1<i.length){let f=t.handle.handlers[i[l+1].type];f&&f.peek&&(f=f.peek),d=f?Eu(f(i[l+1],e,t,{before:"",after:"",...u.current()})):""}else d=n.after;const h=s[s.length-1];typeof h=="string"&&(o==="\r"||o===`
|
|
474
|
+
`)&&c.type==="html"&&A5(c.value)!==7&&(s[s.length-1]=h.replace(/(\r?\n|\r)$/," "),o=" ",u=t.createTracker(n),u.move(sc(s,n.before,n.after)));const p=t.handle.handlers[c.type];if(p&&p.attention){const f=wp(c,p.attention,t,u);s.push(f),o=As(f.sequences[0])}else{const f=t.handle(c,e,t,{...u.current(),after:d,before:o});if(!f)continue;u.move(f),s.push(f),o=As(f)}}return r.pop(),s}function wp(e,t,n,r){const{construct:i,markers:s,sizes:l}=t(e,n),o=_5(e.type,s,l),u=o[0],c=n.enter(i);r.move(u);const d=$5(e,n,{...r.current(),before:u,after:u});return r.move(sc(d,u,u)),r.move(u),c(),{children:d,sequences:o}}function kp(e,t,n,r){const i=[];let s,l=As(n),o=-1;for(;++o<e.length;){const u=e[o];if(typeof u=="string"){const v={value:u,attention:void 0};s&&s===Eu(u)&&No([v],!0),s=void 0,i.push(v),v.value&&(l=As(v.value));continue}const c=t.get(u)||u.sequences[0],d=c.charAt(0),h=e[o+1],p=l,f=Eu(h===void 0?r:typeof h=="string"?h:t.get(h)||h.sequences[0]),g=kp(u.children,t,c,c),x=g.length>0?g[0].value:"",w=gx(p.charCodeAt(p.length-1),x.charCodeAt(0),d);w.inside&&No(g,!0);const m=g.length>0?As(g[g.length-1].value):"",y=gx(f.charCodeAt(0),m.charCodeAt(m.length-1),d);y.inside&&No(g,!1),w.outside&&p!==`
|
|
475
|
+
`&&p!=="\r"&&No(i,!1),y.outside&&(s=f),i.push({value:c,attention:u},...g,{value:c,attention:u}),l=c.charAt(c.length-1)}return i}function sc(e,t,n){let r=new Map;const i=kp(e,r,t,n);let s=i,l=Z0(s,t,n);for(;l;){const u=D5(e,r,l,t,n);if(!u){s=i;break}r=u.chosen,s=u.tokens,l=u.mistake}let o="";for(const u of s)o+=u.value;return o}bp.attention=ew;bp.peek=B5;function bp(e,t,n,r){const i=n.enter("phrasing"),s=wp(e,ew,n,n.createTracker(r)),l=sc([s],r.before,r.after);return i(),l}function ew(e,t){return{construct:"emphasis",markers:z5(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function B5(e,t,n){return n.options.emphasis||"*"}function U5(e,t){let n=!1;return ic(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zl}),!!((!e.depth||e.depth<3)&&Ju(e)&&(t.options.setext||n))}function q5(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(U5(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
|
|
476
|
+
`,after:`
|
|
477
|
+
`});return p(),h(),f+`
|
|
478
|
+
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
479
|
+
`))+1))}const l="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");s.move(l+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
480
|
+
`,...s.current()});const d=c.charCodeAt(0);return(d===9||d===32)&&(c=J0(d)+c.slice(1)),c=c?l+" "+c:l,n.options.closeAtx&&(c+=" "+l),u(),o(),c}tw.peek=H5;function tw(e){return e.value||""}function H5(){return"<"}nw.peek=V5;function nw(e,t,n,r){const i=vp(n),s=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),l(),c}function V5(){return"!"}rw.peek=W5;function rw(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let l=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),l();const d=n.stack;n.stack=d.filter(function(p){return p!=="phrasing"}),l=n.enter("reference");const h=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return l(),n.stack=d,s(),i==="full"||!c||c!==h?u+=o.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function W5(){return"!"}iw.peek=Q5;function iw(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const l=n.unsafe[s],o=n.compilePattern(l);if(!l.atBreak)continue;let u;for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function Q5(){return"`"}function sw(e,t){const n=Ju(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))}lw.peek=K5;function lw(e,t,n,r){const i=vp(n),s=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);if(sw(e,n)){const g=n.stack;n.stack=g.filter(function(m){return m!=="phrasing"});const x=n.enter("autolink");let w=l.move("<");return w+=l.move(n.containerPhrasing(e,{before:w,after:">",...l.current()})),w+=l.move(">"),x(),n.stack=g,w}const o=n.enter("link");let u=n.enter("label"),c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"](",...l.current()});c+=l.move(d),u(),c+=l.move("](");const h=/[\0- \u007F]/.test(e.url),p=r.before.charAt(r.before.length-1);let f=e.title||void 0;if(!f&&!h&&(p===`
|
|
481
|
+
`||p==="\r")){let g=0;for(;g<d.length&&d.charCodeAt(g)!==93;)g+=d.charCodeAt(g)===92?2:1;d.charCodeAt(g+1)===58&&(f="")}return!e.url&&typeof f=="string"||h?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:typeof f=="string"?" ":")",...l.current()}))),u(),typeof f=="string"&&(u=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(f,{before:c,after:i,...l.current()})),c+=l.move(i),u()),c+=l.move(")"),o(),c}function K5(e,t,n){return sw(e,n)?"<":"["}aw.peek=G5;function aw(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let l=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),l();const d=n.stack;n.stack=d.filter(function(p){return p!=="phrasing"}),l=n.enter("reference");const h=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return l(),n.stack=d,s(),i==="full"||!c||c!==h?u+=o.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function G5(){return"["}function jp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Y5(e){const t=jp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function X5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ow(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function J5(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?X5(n):jp(n);const o=e.ordered?l==="."?")":".":Y5(n);let u=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&d&&(!d.children||!d.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&&(u=!0),ow(n)===l&&d){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=o),n.bulletCurrent=l;const c=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=s,i(),c}function Z5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function eP(e,t,n,r){const i=Z5(n);let s=n.bulletCurrent||jp(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(l-s.length)),o.shift(l);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),d);return u(),c;function d(h,p,f){return p?(f?"":" ".repeat(l))+h:(f?s:s+" ".repeat(l-s.length))+h}}function tP(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,r);return s(),i(),l}function nP(e,t,n,r){if(!e.children.some(function(o){return j5(o)}))return n.containerFlow(e,r);const s=n.enter("phrasing"),l=n.containerPhrasing(e,r);return s(),l}function rP(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Np.attention=uw;Np.peek=iP;function Np(e,t,n,r){const i=n.enter("phrasing"),s=wp(e,uw,n,n.createTracker(r)),l=sc([s],r.before,r.after);return i(),l}function uw(e,t){return{construct:"strong",markers:rP(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function iP(e,t,n){return n.options.strong||"*"}function sP(e,t,n,r){const i=t?t.children:[],s=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[s+1],beforeNode:i[s-1]})}function lP(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function aP(e,t,n){const r=(ow(n)+(n.options.ruleSpaces?" ":"")).repeat(lP(n));return n.options.ruleSpaces?r.slice(0,-1):r}const cw={blockquote:N5,break:mx,code:L5,definition:R5,emphasis:bp,hardBreak:mx,heading:q5,html:tw,image:nw,imageReference:rw,inlineCode:iw,link:lw,linkReference:aw,list:J5,listItem:eP,paragraph:tP,root:nP,strong:Np,text:sP,thematicBreak:aP};function oP(){return{enter:{table:uP,tableData:xx,tableHeader:xx,tableRow:dP},exit:{codeText:hP,table:cP,tableData:rd,tableHeader:rd,tableRow:rd}}}function uP(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[],position:void 0},e),this.data.inTable=!0}function cP(e){this.exit(e),this.data.inTable=void 0}function dP(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function rd(e){this.exit(e)}function xx(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function hP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,fP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function fP(e,t){return t==="|"?t:e}function pP(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,s=n?" ":"|";return{handlers:{inlineCode:p,table:l,tableCell:u,tableRow:o},join:[mP],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
482
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function l(f,g,x,w){const m=d(f,x,w),y=m[0];if(y){let v=f.align?f.align.length:0,j=-1;if(!v)for(;++j<m.length;)m[j].length>v&&(v=m[j].length);for(;y.length<v;)y.push("")}return c(m,f.align)}function o(f,g,x,w){const m=h(f,x,w),y=c([m]);return y.slice(0,y.indexOf(`
|
|
483
|
+
`))}function u(f,g,x,w){const m=x.enter("tableCell"),y=x.enter("phrasing"),v=x.containerPhrasing(f,{...w,before:s,after:s});return y(),m(),v}function c(f,g){return k5(f,{align:g,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function d(f,g,x){const{children:w}=f;let m=-1;const y=[],v=g.enter("table");for(;++m<w.length;)y[m]=h(w[m],g,x);return v(),y}function h(f,g,x){const{children:w}=f;let m=-1;const y=[],v=g.enter("tableRow");for(;++m<w.length;)y[m]=u(w[m],f,g,x);return v(),y}function p(f,g,x){const w=cw.inlineCode(f,g,x);if(!x.stack.includes("tableCell"))return w;const m=[];let y=0,v=w.indexOf("|");for(;v!==-1;){let j=v;for(;j>y&&w.charCodeAt(j-1)===92;)j--;m.push(w.slice(y,v)),(v-j)%2===0&&m.push("\\"),y=v,v=w.indexOf("|",v+1)}return m.push(w.slice(y)),m.join("")}}function mP(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&gP(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function gP(e,t){let n=!1;return ic(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,Zl}),!!((!e.depth||e.depth<3)&&Ju(e)&&(t.options.setext||n))}function xP(){return{exit:{taskListCheckValueChecked:yx,taskListCheckValueUnchecked:yx,paragraph:vP}}}function yP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wP}}}function yx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function vP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,l;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){l=o;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function wP(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(l);let u=cw.listItem(e,t,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+l}}function kP(){return[q4(),c5(),p5(),oP(),xP()]}function bP(e){return{extensions:[H4(),d5(e),m5(),pP(e),yP()]}}const jP={tokenize:TP,partial:!0},dw={tokenize:LP,partial:!0},hw={tokenize:MP,partial:!0},fw={tokenize:RP,partial:!0},NP={tokenize:zP,partial:!0},pw={name:"wwwAutolink",tokenize:EP,previous:gw},mw={name:"protocolAutolink",tokenize:PP,previous:xw},Ar={name:"emailAutolink",tokenize:CP,previous:yw},fr={};function SP(){return{text:fr}}let Ei=48;for(;Ei<123;)fr[Ei]=Ar,Ei++,Ei===58?Ei=65:Ei===91&&(Ei=97);fr[43]=Ar;fr[45]=Ar;fr[46]=Ar;fr[95]=Ar;fr[72]=[Ar,mw];fr[104]=[Ar,mw];fr[87]=[Ar,pw];fr[119]=[Ar,pw];function CP(e,t,n){const r=this;let i,s;return l;function l(h){return!_h(h)||!yw.call(r,r.previous)||Sp(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return _h(h)?(e.consume(h),o):h===64?(e.consume(h),u):n(h)}function u(h){return h===46?e.check(NP,d,c)(h):h===45||h===95||kt(h)?(s=!0,e.consume(h),u):d(h)}function c(h){return e.consume(h),i=!0,u}function d(h){return s&&i&&wt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function EP(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!gw.call(r,r.previous)||Sp(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jP,e.attempt(dw,e.attempt(hw,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function PP(e,t,n){const r=this;let i="",s=!1;return l;function l(h){return(h===72||h===104)&&xw.call(r,r.previous)&&!Sp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),o):n(h)}function o(h){if(wt(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),u}return n(h)}function u(h){return h===47?(e.consume(h),s?c:(s=!0,u)):n(h)}function c(h){return h===null||ju(h)||_e(h)||ns(h)||Zu(h)?n(h):e.attempt(dw,e.attempt(hw,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function TP(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),s):n(l)}function s(l){return l===null?n(l):t(l)}}function LP(e,t,n){let r,i,s;return l;function l(c){return c===46||c===95?e.check(fw,u,o)(c):c===null||_e(c)||ns(c)||c!==45&&Zu(c)?u(c):(s=!0,e.consume(c),l)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),l}function u(c){return i||r||!s?n(c):t(c)}}function MP(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(fw,t,s)(l):l===null||_e(l)||ns(l)?t(l):(e.consume(l),i)}function s(l){return l===41&&r++,e.consume(l),i}}function RP(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),s):o===93?(e.consume(o),i):o===60||o===null||_e(o)||ns(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||_e(o)||ns(o)?t(o):r(o)}function s(o){return wt(o)?l(o):n(o)}function l(o){return o===59?(e.consume(o),r):wt(o)?(e.consume(o),l):n(o)}}function zP(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kt(s)?n(s):t(s)}}function gw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_e(e)}function xw(e){return!wt(e)}function yw(e){return!(e===47||_h(e))}function _h(e){return e===43||e===45||e===46||e===95||kt(e)}function Sp(e){let t=e.length,n=!1;for(;t--;){const 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}const AP={tokenize:UP,partial:!0};function IP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_P,continuation:{tokenize:$P},exit:BP}},text:{91:{name:"gfmFootnoteCall",tokenize:OP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:FP,resolveTo:DP}}}}function FP(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!l||!l._balanced)return n(u);const c=Un(r.sliceSerialize({start:l.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function DP(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";const 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++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function OP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(s>999||h===93&&!l||h===null||h===91||_e(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Un(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return _e(h)||(l=!0),s++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}}function _P(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,o;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(l>999||g===93&&!o||g===null||g===91||_e(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=Un(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return _e(g)||(o=!0),l++,e.consume(g),g===92?h:d}function h(g){return g===91||g===92||g===93?(e.consume(g),l++,d):d(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),Re(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function $P(e,t,n){return e.check(Qa,t,e.attempt(AP,t,n))}function BP(e){e.exit("gfmFootnoteDefinition")}function UP(e,t,n){const r=this;return Re(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function qP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,o){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let c=u;for(;c--;)if(l[c][0]==="exit"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[c][1].end.offset-l[c][1].start.offset){l[u][1].type="strikethroughSequence",l[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},l[c][1].start),end:Object.assign({},l[u][1].end)},h={type:"strikethroughText",start:Object.assign({},l[c][1].end),end:Object.assign({},l[u][1].start)},p=[["enter",d,o],["enter",l[c][1],o],["exit",l[c][1],o],["enter",h,o]],f=o.parser.constructs.insideSpan.null;f&&Bn(p,p.length,0,ec(f,l.slice(c+1,u),o)),Bn(p,p.length,0,[["exit",h,o],["enter",l[u][1],o],["exit",l[u][1],o],["exit",d,o]]),Bn(l,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function s(l,o,u){const c=this.previous,d=this.events;let h=0;return p;function p(g){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(l.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const x=mi(c);if(g===126)return h>1?u(g):(l.consume(g),h++,f);if(h<2&&!n)return u(g);const w=l.exit("strikethroughSequenceTemporary"),m=mi(g);return w._open=!m||m===2&&!!x,w._close=!x||x===2&&!!m,o(g)}}}class HP{constructor(){this.map=[],this.index=new Map}add(t,n,r){VP(this,t,n,r)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}}function VP(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}function WP(e,t){let n=!1;const r=[];for(;t<e.length;){const 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"){const s=r.length-1;r[s]=r[s]==="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 QP(){return{flow:{null:{name:"table",tokenize:KP,resolveAll:GP}}}}function KP(e,t,n){const r=this;let i=0,s=0,l;return o;function o(N){let R=r.events.length-1;for(;R>-1;){const{type:V}=r.events[R][1];if(V==="lineEnding"||V==="linePrefix")R--;else break}const I=R>-1?r.events[R][1].type:null,W=I==="tableHead"||I==="tableRow"?k:u;return W===k&&r.parser.lazy[r.now().line]?n(N):W(N)}function u(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(l=!0,s+=1),d(N)}function d(N){return N===null?n(N):ue(N)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),f):n(N):be(N)?Re(e,d,"whitespace")(N):(s+=1,l&&(l=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),l=!0,d):(e.enter("data"),h(N)))}function h(N){return N===null||N===124||_e(N)?(e.exit("data"),d(N)):(e.consume(N),N===92?p:h)}function p(N){return N===92||N===124?(e.consume(N),h):h(N)}function f(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),l=!1,be(N)?Re(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):g(N))}function g(N){return N===45||N===58?w(N):N===124?(l=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),x):C(N)}function x(N){return be(N)?Re(e,w,"whitespace")(N):w(N)}function w(N){return N===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),m):N===45?(s+=1,m(N)):N===null||ue(N)?j(N):C(N)}function m(N){return N===45?(e.enter("tableDelimiterFiller"),y(N)):C(N)}function y(N){return N===45?(e.consume(N),y):N===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(N))}function v(N){return be(N)?Re(e,j,"whitespace")(N):j(N)}function j(N){return N===124?g(N):N===null||ue(N)?!l||i!==s?C(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):C(N)}function C(N){return n(N)}function k(N){return e.enter("tableRow"),L(N)}function L(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),L):N===null||ue(N)?(e.exit("tableRow"),t(N)):be(N)?Re(e,L,"whitespace")(N):(e.enter("data"),z(N))}function z(N){return N===null||N===124||_e(N)?(e.exit("data"),L(N)):(e.consume(N),N===92?A:z)}function A(N){return N===92||N===124?(e.consume(N),z):z(N)}}function GP(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],o=!1,u=0,c,d,h;const p=new HP;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(vx(p,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],l=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],h=So(p,t,s,i,void 0,h),s=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],h=So(p,t,s,i,void 0,h)),s=l,l=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,s[1]!==0?(l[0]=l[1],h=So(p,t,s,i,n,h)):l[1]!==0&&(h=So(p,t,l,i,n,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(u!==0&&vx(p,t,u,c,d),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=WP(t.events,n))}return e}function So(e,t,n,r,i,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},ps(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const u=ps(t.events,n[1]);if(s={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=ps(t.events,n[2]),d=ps(t.events,n[3]),h={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,x=n[3]-n[2]-1;e.add(g,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},ps(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function vx(e,t,n,r,i){const s=[],l=ps(t.events,n);i&&(i.end=Object.assign({},l),s.push(["exit",i,t])),r.end=Object.assign({},l),s.push(["exit",r,t]),e.add(n+1,0,s)}function ps(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const YP={name:"tasklistCheck",tokenize:JP};function XP(){return{text:{91:YP}}}function JP(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return _e(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):n(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return ue(u)?t(u):be(u)?e.check({tokenize:ZP},t,n)(u):n(u)}}function ZP(e,t,n){return Re(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function eT(e){return j0([SP(),IP(),qP(e),QP(),XP()])}const tT={};function vw(e){const t=this,n=e||tT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(eT(n)),s.push(kP()),l.push(bP(n))}const nT={background:"#fdf6e3",mainBkg:"#eee8d5",primaryColor:"#eee8d5",primaryTextColor:"#586e75",primaryBorderColor:"#268bd2",nodeBorder:"#268bd2",lineColor:"#839496",secondaryColor:"#eee8d5",tertiaryColor:"#eee8d5",textColor:"#586e75",edgeLabelBackground:"#fdf6e3",clusterBkg:"#eee8d5",clusterBorder:"#ddd6c1",fontSize:"14px"},rT={background:"#1f1f1f",mainBkg:"#2a2d2e",primaryColor:"#2a2d2e",primaryTextColor:"#cccccc",primaryBorderColor:"#3794ff",nodeBorder:"#3794ff",lineColor:"#9d9d9d",secondaryColor:"#2a2d2e",tertiaryColor:"#2a2d2e",textColor:"#cccccc",edgeLabelBackground:"#1f1f1f",clusterBkg:"#2a2d2e",clusterBorder:"#2b2b2b",fontSize:"14px"};let iT=null;const sT=()=>iT??(iT=Pu(()=>import("./mermaid.core-BGuQYGS_.js").then(e=>e.b6),[]).then(e=>e.default));function lT({code:e}){const t=b.useId().replace(/[^a-zA-Z0-9]/g,""),n=Xw(),[r,i]=b.useState(""),[s,l]=b.useState(!1);b.useEffect(()=>{let c=!0;return sT().then(async d=>{d.initialize({startOnLoad:!1,theme:"base",securityLevel:"strict",fontFamily:"system-ui, -apple-system, Segoe UI, Ubuntu, sans-serif",themeVariables:n?rT:nT,flowchart:{useMaxWidth:!0,curve:"basis",nodeSpacing:30,rankSpacing:40,padding:8,htmlLabels:!0}});try{const h=await d.render(`m${t}${n?"d":"l"}`,e);c&&(i(h.svg),l(!1))}catch{c&&l(!0)}}),()=>{c=!1}},[e,n,t]);const[o,u]=b.useState(!1);return b.useEffect(()=>{if(!o)return;const c=d=>{d.key==="Escape"&&u(!1)};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[o]),s?a.jsx("pre",{children:e}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"relative my-6",children:[a.jsx("div",{className:"md-figure flex cursor-zoom-in justify-center rounded-md border border-line bg-panel p-4",title:"Click to enlarge",onClick:()=>u(!0),dangerouslySetInnerHTML:{__html:r}}),a.jsx("span",{className:"pointer-events-none absolute right-3 top-2 text-[11px] text-muted",children:"click to enlarge"})]}),o&&a.jsx("div",{className:"fixed inset-0 z-50 grid cursor-zoom-out place-items-center bg-ink/40 p-6 backdrop-blur-sm",onClick:()=>u(!1),children:a.jsx("div",{className:"md-figure-big max-h-full max-w-full overflow-auto rounded-md border border-line bg-panel p-6",onClick:c=>c.stopPropagation(),dangerouslySetInnerHTML:{__html:r}})})]})}function ww(e){return e.split(/(```[\s\S]*?```|`[^`\n]*`)/g).map((t,n)=>n%2?t:t.replace(/ -> /g," → ")).join("")}function ol({children:e}){return e=ww(e),a.jsx("div",{className:"prose-g",children:a.jsx(K0,{remarkPlugins:[vw],components:{code({className:t,children:n,...r}){var s;return((s=/language-(\w+)/.exec(t??""))==null?void 0:s[1])==="mermaid"?a.jsx(lT,{code:String(n).trim()}):a.jsx("code",{className:t,...r,children:n})},pre({children:t}){var i;const n=Array.isArray(t)?t[0]:t;return(((i=n==null?void 0:n.props)==null?void 0:i.className)??"").includes("language-mermaid")?a.jsx(a.Fragment,{children:t}):a.jsx("pre",{children:t})},a({href:t,children:n}){return a.jsx("a",{href:t,target:"_blank",rel:"noreferrer",children:n})}},children:e})})}function ar({children:e,className:t}){return e=ww(e),a.jsx("span",{className:t?`md-inline ${t}`:"md-inline",children:a.jsx(K0,{remarkPlugins:[vw],components:{p:({children:n})=>a.jsxs(a.Fragment,{children:[n," "]}),a:({href:n,children:r})=>a.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:r})},children:e})})}function aT({trace:e,onStep:t}){const{rel:n}=nt(),[r,i]=b.useState(0),s=e.steps[r],l=r>0?e.steps[r-1].state:{};b.useEffect(()=>{t(s.file,s.line)},[r]);const o=[...new Set([...Object.keys(l),...Object.keys(s.state)])];return a.jsxs("div",{className:"card overflow-hidden",tabIndex:0,onKeyDown:u=>{u.key==="ArrowRight"&&i(c=>Math.min(e.steps.length-1,c+1)),u.key==="ArrowLeft"&&i(c=>Math.max(0,c-1))},children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-line bg-raised/60 px-4 py-2 text-xs",children:[a.jsx(Yj,{className:"h-3.5 w-3.5 text-accent"}),a.jsx("span",{className:"text-muted",children:"Input"}),a.jsx("code",{className:"font-mono",children:e.input})]}),a.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[a.jsx("button",{className:"rounded-md border border-line p-1 hover:bg-raised disabled:opacity-40",disabled:r===0,onClick:()=>i(r-1),"aria-label":"Previous step",children:a.jsx(xu,{className:"h-4 w-4"})}),a.jsx("input",{type:"range",min:0,max:e.steps.length-1,value:r,onChange:u=>i(Number(u.target.value)),className:"flex-1 accent-[rgb(var(--accent))]"}),a.jsx("button",{className:"rounded-md border border-line p-1 hover:bg-raised disabled:opacity-40",disabled:r===e.steps.length-1,onClick:()=>i(r+1),"aria-label":"Next step",children:a.jsx(wa,{className:"h-4 w-4"})}),a.jsxs("span",{className:"w-16 text-right font-mono text-xs text-muted",children:[r+1,"/",e.steps.length]})]}),a.jsxs("div",{className:"px-4 pb-1 text-[14.5px]",children:[s.file&&a.jsxs("span",{className:"mr-2 font-mono text-[12px] text-accent",children:[n(s.file),s.line?`:${s.line}`:""]}),s.note]}),a.jsx("table",{className:"m-4 mt-2 w-[calc(100%-2rem)] text-[13.5px]",children:a.jsx("tbody",{children:o.map(u=>{const c=l[u],d=s.state[u],h=c!==d;return a.jsxs("tr",{className:"border-b border-line/60 last:border-0",children:[a.jsx("td",{className:"py-1 pr-3 font-mono text-muted",children:u}),a.jsxs("td",{className:ae("py-1 font-mono",h&&r>0&&"text-accent"),children:[d??a.jsx("span",{className:"text-muted line-through",children:c}),h&&r>0&&c!==void 0&&d!==void 0&&a.jsxs("span",{className:"ml-2 text-[12px] text-muted",children:["was ",c]})]})]},u)})})}),a.jsx("div",{className:"border-t border-line px-4 py-1.5 text-[12px] text-muted",children:"Arrow keys step when this box has focus. Changed values are coloured."})]})}function oT(e){return e.startLine&&e.endLine?[e.startLine,e.endLine]:e.line?[Math.max(1,e.line-3),e.line+6]:null}function uT(){const{id:e=""}=zr(),{project:t,rel:n,setOpenFile:r,setSelected:i}=nt(),s=St(),l=Hn(),o=Hn(),[u,c]=b.useState(null),[d,h]=b.useState(null),[p,f]=b.useState("all"),[g,x]=b.useState(0),w=ge({queryKey:["lens",t.id,e],queryFn:()=>me(`/projects/${t.id}/lenses/${e}`)}),m=w.data,y=b.useMemo(()=>[...new Set(((m==null?void 0:m.deepDives)??[]).map(R=>R.file).filter(R=>!!R))],[m]),v=Pj({queries:y.map(R=>({queryKey:["file",t.id,R],queryFn:()=>me(`/projects/${t.id}/file?path=${encodeURIComponent(R)}`),staleTime:6e4}))}),j=b.useMemo(()=>new Map(y.map((R,I)=>{var W;return[R,(W=v[I])==null?void 0:W.data]})),[y,v]);if(w.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!m)return a.jsx(At,{title:"Lens not found"});const C=(R,I)=>{R&&c({file:R,line:I})},k=R=>{i([R]),r(R),s(`/p/${t.id}/explore`)},L=m.deepDives,z=p==="all"?L.map((R,I)=>[R,I]):L[g]?[[L[g],g]]:[],A=({icon:R,children:I,aside:W})=>a.jsxs("div",{className:"mb-5 mt-16 flex items-center gap-3",children:[a.jsxs("h2",{className:"flex items-center gap-2 text-[22px] font-semibold tracking-[-0.015em]",children:[R&&a.jsx("span",{className:"text-muted [&>svg]:h-[18px] [&>svg]:w-[18px]",children:R}),I]}),W&&a.jsx("div",{className:"ml-auto",children:W})]}),N=a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("article",{className:"lens py-10",children:[a.jsxs(Mt,{to:`/p/${t.id}/library`,className:"inline-flex items-center gap-1 text-[13px] text-muted hover:text-ink",children:[a.jsx(qf,{className:"h-3.5 w-3.5"})," Library"]}),a.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-2",children:[a.jsxs(we,{tone:"accent",children:[m.kind," lens"]}),m.depth&&m.depth!=="standard"&&a.jsx(we,{children:m.depth}),m.diff&&a.jsxs(we,{tone:"warn",children:["change ",m.diff.base,"..",m.diff.head||"working tree"]}),a.jsx("span",{className:"text-[13px] text-muted",children:qt(m.createdAt)}),a.jsxs("a",{href:`/api/projects/${t.id}/lenses/${m.id}/export`,className:"ml-auto inline-flex items-center gap-1 rounded-md px-2 py-1 text-[13px] text-muted hover:bg-raised hover:text-ink",title:"Download as markdown",children:[a.jsx(Wf,{className:"h-3.5 w-3.5"})," .md"]})]}),a.jsx("h1",{className:"mt-4 text-[36px] font-bold leading-[1.1] tracking-[-0.02em]",children:m.title}),a.jsx("p",{className:"mt-3 text-[16.5px] leading-relaxed text-muted",children:m.question}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[m.files.slice(0,6).map(R=>a.jsxs("button",{onClick:()=>C(R),title:n(R),className:"inline-flex max-w-full items-center gap-1 rounded-md bg-ink/5 px-2 py-1 font-mono text-[12px] text-muted hover:text-accent",children:[a.jsx(il,{className:"h-3 w-3 shrink-0"})," ",a.jsx("span",{className:"truncate",children:Ea(n(R),64)})]},R)),m.files.length>6&&a.jsxs("span",{className:"px-1 py-1 text-[12px] text-muted",children:["+",m.files.length-6," more"]})]}),m.changed.length>0&&a.jsxs("div",{className:"mt-6 flex items-center gap-3 rounded-md border border-warn/40 bg-warn/8 px-4 py-3 text-[14px]",children:[a.jsx(qj,{className:"h-4 w-4 shrink-0 text-warn"}),a.jsxs("div",{className:"min-w-0 flex-1",children:["The code changed since this lens was made (",m.changed.map(R=>n(R)).join(", "),"). It may be out of date."]}),a.jsx(ne,{size:"sm",icon:a.jsx(Xj,{className:"h-3.5 w-3.5"}),disabled:o.busy,onClick:()=>o.run(`/projects/${t.id}/lenses/${m.id}/refresh`,{},R=>s(`/p/${t.id}/lens/${R.resultId}`,{replace:!0})),children:"Refresh"})]}),o.busy&&o.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"lens",elapsed:o.elapsed})}),o.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:o.error,onClose:o.clearError})}),a.jsxs("div",{className:"mt-10 border-l-[3px] border-accent py-1 pl-5",children:[a.jsx("div",{className:"text-[11.5px] font-semibold uppercase tracking-[0.08em] text-accent",children:"The idea in one sentence"}),a.jsx("p",{className:"read-lead mt-2",children:a.jsx(ar,{children:m.tldr||m.summary})})]}),m.whyItMatters&&a.jsxs("p",{className:"read mt-6",children:[a.jsx("strong",{children:"Why it matters."})," ",a.jsx(ar,{children:m.whyItMatters})]}),m.tldr&&m.summary&&a.jsx("div",{className:"mt-5",children:a.jsx(ol,{children:m.summary})}),m.sketch&&a.jsxs("div",{className:"mt-8 rounded-md bg-raised/70 p-6",children:[a.jsxs("div",{className:"flex items-center gap-2 text-[15px] font-semibold",children:[a.jsx(A1,{className:"h-4 w-4 text-accent"})," ",m.diff?"Your prediction":"Your take",", and where it differs"]}),a.jsxs("p",{className:"read mt-3 italic text-muted",children:["“",m.sketch,"”"]}),m.differences&&m.differences.length>0&&a.jsx("ul",{className:"read mt-4 space-y-2",children:m.differences.map((R,I)=>a.jsxs("li",{className:"flex gap-2.5",children:[a.jsx("span",{className:"mt-0.5 text-accent",children:"→"}),a.jsx("span",{children:a.jsx(ar,{children:R})})]},I))})]}),m.concepts.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(A,{icon:a.jsx(Hf,{className:"h-5 w-5"}),children:"Words you need first"}),a.jsx("div",{className:"wide lens-concepts grid gap-5",children:m.concepts.map(R=>a.jsx(cT,{c:R,onShow:()=>C(R.file,R.line),onCard:()=>h({kind:"concept",front:`What is "${R.term}" in this code, and why does it matter?`,back:R.explain,file:R.file??m.files[0],source:{lensId:m.id}})},R.term))})]}),m.trace&&a.jsxs(a.Fragment,{children:[a.jsx(A,{children:"Trace a run"}),a.jsx("div",{className:"wide",children:a.jsx(aT,{trace:m.trace,onStep:(R,I)=>C(R??m.files[0],I)})})]}),m.intuition&&a.jsxs(a.Fragment,{children:[a.jsx(A,{icon:a.jsx(Qf,{className:"h-5 w-5"}),children:"The intuition"}),a.jsx(ol,{children:m.intuition})]}),L.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs(A,{aside:a.jsx(Bt,{value:p,onChange:R=>{f(R),x(0)},options:[{value:"all",label:"All steps"},{value:"step",label:"One at a time"}]}),children:["Walkthrough ",a.jsxs("span",{className:"text-[15px] font-normal text-muted",children:["· ",L.length," steps"]})]}),p==="step"&&a.jsx("div",{className:"mb-6 flex items-center gap-1.5",children:L.map((R,I)=>a.jsx("button",{title:R.title,onClick:()=>x(I),className:ae("h-1.5 flex-1 rounded-full transition",I<g?"bg-accent/50":I===g?"bg-accent":"bg-line")},I))}),a.jsx("ol",{className:"space-y-12 [&>li+li]:border-t [&>li+li]:border-line [&>li+li]:pt-10",children:z.map(([R,I])=>a.jsx(pT,{d:R,n:I+1,text:R.file?j.get(R.file):void 0,rel:n,onShow:C},I))}),p==="step"&&a.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[a.jsx(ne,{size:"sm",variant:"ghost",icon:a.jsx(xu,{className:"h-4 w-4"}),disabled:g===0,onClick:()=>x(g-1),children:"Back"}),a.jsxs("span",{className:"text-[13px] text-muted",children:["Step ",g+1," of ",L.length]}),a.jsxs(ne,{size:"sm",variant:g<L.length-1?"primary":"secondary",disabled:g===L.length-1,onClick:()=>x(g+1),children:["Next ",a.jsx(wa,{className:"h-4 w-4"})]})]})]}),m.gotchas&&m.gotchas.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(A,{icon:a.jsx(Yf,{className:"h-5 w-5"}),children:"Gotchas"}),a.jsx("ul",{className:"read space-y-3",children:m.gotchas.map((R,I)=>a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"mt-[0.55em] h-1.5 w-1.5 shrink-0 rounded-full bg-warn"}),a.jsx("span",{children:a.jsx(ar,{children:R})})]},I))})]}),m.nextSteps&&m.nextSteps.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(A,{icon:a.jsx(Vu,{className:"h-5 w-5"}),children:"Read next"}),a.jsx("div",{className:"space-y-2",children:m.nextSteps.map(R=>a.jsxs("button",{onClick:()=>k(R.file),className:"card flex w-full items-start gap-3 px-4 py-3 text-left transition hover:border-accent/40",children:[a.jsx(il,{className:"mt-1 h-4 w-4 shrink-0 text-accent"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block font-mono text-[13px]",children:n(R.file)}),a.jsx("span",{className:"read block text-muted",children:a.jsx(ar,{children:R.why})})]})]},R.file))})]}),a.jsxs("section",{className:"mt-16 rounded-md border border-line bg-raised/40 p-6",children:[a.jsx("div",{className:"text-[17px] font-semibold",children:"Did it land?"}),a.jsx("p",{className:"read mt-1 text-muted",children:"Reading feels like understanding. A quiz on the same files tells you if it is."}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx(ne,{variant:"primary",icon:a.jsx(sl,{className:"h-4 w-4"}),disabled:l.busy,onClick:()=>l.run(`/projects/${t.id}/quizzes`,{lensId:m.id,files:m.files,diff:m.diff},R=>s(`/p/${t.id}/quiz/${R.resultId}`)),children:"Quiz me on this"}),a.jsx(ne,{variant:"ghost",icon:a.jsx(dr,{className:"h-4 w-4"}),onClick:async()=>{await pl(`/projects/${t.id}/lenses/${m.id}`),s(`/p/${t.id}/library`)},children:"Archive"})]}),l.busy&&l.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"quiz",elapsed:l.elapsed})}),l.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:l.error,onClose:l.clearError})}),d&&a.jsx(Ha,{initial:d,onClose:()=>h(null)})]})]})});return a.jsx(Wn,{id:"lens-file",collapsible:!0,startCollapsed:!0,openSignal:u,side:"right",initial:520,min:320,max:900,className:"h-full",left:N,right:a.jsx(ml,{file:u==null?void 0:u.file,line:u==null?void 0:u.line,empty:"Click a file, a step or a line link to see the whole file here."})})}function cT({c:e,onShow:t,onCard:n}){var o;const[r,i]=b.useState(!1),s=e.explain.length+(((o=e.example)==null?void 0:o.length)??0)>340,l=u=>a.jsxs(a.Fragment,{children:[a.jsx("p",{className:ae("read-sm mt-2",u&&"line-clamp-5"),children:a.jsx(ar,{children:e.explain})}),e.example&&a.jsxs("div",{className:ae("read-sm mt-3 rounded-lg bg-raised/70 px-3.5 py-2.5 text-muted",u&&"max-h-[9.5rem] overflow-hidden"),children:[a.jsx("div",{className:"mb-1 text-[11.5px] font-semibold uppercase tracking-[0.08em] text-ink/70",children:"Example"}),a.jsx(dT,{text:e.example})]})]});return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"card group flex flex-col p-5 transition duration-150 hover:-translate-y-0.5 hover:border-accent/40 hover:shadow-soft",children:[a.jsxs("div",{className:"flex items-baseline gap-2",children:[a.jsx("div",{className:"flex-1 text-[16px] font-semibold tracking-tight",children:e.term}),e.file&&a.jsx("button",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[11.5px] text-muted hover:text-accent",onClick:t,title:"Show in the code",children:e.line?`line ${e.line}`:"code"}),a.jsx("button",{className:"self-center text-muted opacity-0 transition hover:text-accent group-hover:opacity-100",title:"Make a review card",onClick:n,children:a.jsx(cr,{className:"h-4 w-4"})}),a.jsx("button",{className:ae("self-center text-muted transition hover:text-accent",s?"opacity-100":"opacity-0 group-hover:opacity-100"),title:"Open to read","aria-label":"Open to read",onClick:()=>i(!0),children:a.jsx(Qj,{className:"h-4 w-4"})})]}),l(s),s&&a.jsx("button",{className:"mt-2 self-start text-[12.5px] text-accent hover:underline",onClick:()=>i(!0),children:"Read all"})]}),r&&a.jsx(Yu,{wide:!0,title:e.term,onClose:()=>i(!1),footer:a.jsxs(a.Fragment,{children:[e.file&&a.jsx(ne,{size:"sm",variant:"ghost",onClick:()=>{i(!1),t()},children:"Show in the code"}),a.jsx(ne,{size:"sm",onClick:()=>{i(!1),n()},children:"Make a review card"})]}),children:a.jsx("div",{className:"[&_.read-sm]:!text-[16px] [&_.read-sm]:!leading-[1.65]",children:l(!1)})})]})}function dT({text:e}){const t=e.split(/(`[^`]{36,}`)/g).filter(n=>n.replace(/[\s.,;:]+/g,""));return a.jsx(a.Fragment,{children:t.map((n,r)=>/^`[^`]{36,}`$/.test(n)?a.jsx("pre",{className:"my-2 whitespace-pre-wrap break-words rounded-md border border-line/70 bg-panel px-3 py-2 font-mono text-[12.5px] leading-[1.6] text-ink",children:n.slice(1,-1)},r):a.jsx("p",{children:a.jsx(ar,{children:n})},r))})}function hT(e){return e.split("/").slice(-2).join("/")}function fT(e,t,n){const r=s=>{var l;return((l=/^\s*/.exec(s))==null?void 0:l[0].length)??0},i=r(e[n-1]??"");for(let s=t;s>=Math.max(1,t-25);s--){const l=e[s-1]??"";if(!l.trim())continue;if(/^\s*(def |async def |class |@|function |export |const |func |fn |pub |public |private )/.test(l)&&r(l)<=i||r(l)===0)return s}return t}function pT({d:e,n:t,text:n,rel:r,onShow:i}){const[s,l]=b.useState(!1),o=oT(e),u=b.useMemo(()=>{if(!n||!o)return null;const d=n.text.split(`
|
|
484
|
+
`),h=Math.min(o[1],d.length),p=fT(d,Math.min(o[0],d.length),e.line??o[0]),f=d.slice(p-1,h),g=Math.min(...f.filter(w=>w.trim()).map(w=>{var m;return((m=/^\s*/.exec(w))==null?void 0:m[0].length)??0})),x=f.map(w=>w.slice(Number.isFinite(g)?g:0)).join(`
|
|
485
|
+
`);return{first:p,last:h,body:x}},[n,o==null?void 0:o[0],o==null?void 0:o[1],e.line]),c=b.useMemo(()=>e.line?[{from:e.line,to:e.line,cls:"hl"}]:[],[e.line]);return a.jsxs("li",{className:"lens-step",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex items-baseline gap-3",children:[a.jsx("span",{className:"font-mono text-[13px] font-semibold tabular-nums text-accent/80",children:String(t).padStart(2,"0")}),a.jsx("h3",{className:"text-[18px] font-semibold leading-[1.3] tracking-tight",children:e.title})]}),a.jsx("div",{className:"mt-3",children:a.jsx(ol,{children:e.body})})]}),u&&e.file&&a.jsxs("div",{className:"min-w-0 overflow-hidden rounded-md border border-line bg-panel",children:[a.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line bg-raised/60 px-3 py-1.5 font-mono text-[12px] text-muted",children:[a.jsxs("span",{className:"truncate",title:r(e.file),children:[hT(r(e.file)),":",u.first,"–",u.last]}),a.jsx("button",{className:"shrink-0 font-sans hover:text-accent",onClick:()=>i(e.file,e.line),children:"open file"})]}),a.jsx("div",{className:"lens-step-code",children:a.jsx(Va,{text:u.body,lang:n.lang,firstLine:u.first,marks:c,onLineClick:d=>i(e.file,d)})})]}),e.pitfall&&a.jsxs("p",{className:"read-sm flex gap-2.5 rounded-r-lg border-l-[3px] border-warn bg-warn/5 px-4 py-3",children:[a.jsx(Yf,{className:"mt-[0.25em] h-4 w-4 shrink-0 text-warn"}),a.jsxs("span",{children:[a.jsx("strong",{children:"Pitfall."})," ",a.jsx(ar,{children:e.pitfall})]})]}),e.check&&a.jsxs("div",{className:"read-sm rounded-r-lg border-l-[3px] border-accent bg-accent/5 px-4 py-3",children:[a.jsxs("p",{children:[a.jsx("strong",{className:"text-accent",children:"Check yourself."})," ",a.jsx(ar,{children:e.check.q})]}),s?a.jsx("p",{className:"mt-3 border-t border-line/70 pt-3 text-ink/85",children:a.jsx(ar,{children:e.check.a})}):a.jsxs("button",{className:"mt-2 inline-flex items-center gap-1.5 font-sans text-[13px] text-muted hover:text-ink",onClick:()=>l(!0),children:[a.jsx(S1,{className:"h-3.5 w-3.5"})," Think first, then show the answer"]})]})]})}function mT(){const{id:e=""}=zr(),{project:t,rel:n}=nt(),r=St(),i=Hn(),s=ge({queryKey:["quiz",t.id,e],queryFn:()=>me(`/projects/${t.id}/quizzes/${e}`)}),[l,o]=b.useState({}),[u,c]=b.useState(!1),[d,h]=b.useState(null),[p,f]=b.useState(null),[g,x]=b.useState(null),w=Hn(),m=ge({queryKey:["file",t.id,p==null?void 0:p.file],queryFn:()=>me(`/projects/${t.id}/file?path=${encodeURIComponent(p.file)}`),enabled:!!p}),y=s.data,v=(y==null?void 0:y.attempts)??[],j=v[v.length-1],C=u?void 0:d!==null?v[d]:j,k=`learnforge.quiz.${e}`;b.useEffect(()=>{try{const I=sessionStorage.getItem(k);I&&o(JSON.parse(I))}catch{}},[k]),b.useEffect(()=>{try{sessionStorage.setItem(k,JSON.stringify(l))}catch{}},[k,l]);const L=b.useMemo(()=>Object.values(l).filter(I=>I.answer.trim()).length,[l]);if(s.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!y)return a.jsx(At,{title:"Quiz not found"});const z=(I,W)=>o(V=>({...V,[I]:{...V[I]??{qid:I,answer:"",sure:!1},...W}})),A=()=>i.run(`/projects/${t.id}/quizzes/${y.id}/attempts`,{answers:Object.values(l)},()=>{c(!1),h(null),o({});try{sessionStorage.removeItem(k)}catch{}}),N=C?C.grades.filter(I=>{var W;return I.verdict==="wrong"&&((W=C.answers.find(V=>V.qid===I.qid))==null?void 0:W.sure)}).length:0,R=a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"page",children:[a.jsxs(Mt,{to:`/p/${t.id}/library`,className:"inline-flex items-center gap-1 text-xs text-muted hover:text-ink",children:[a.jsx(qf,{className:"h-3.5 w-3.5"})," Library"]}),a.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[a.jsx(we,{tone:"accent",children:"quiz"}),y.diff&&a.jsx(we,{tone:"warn",children:"change"}),y.questions.some(I=>I.misconceptionId)&&a.jsxs(we,{tone:"bad",children:[a.jsx(yu,{className:"h-3 w-3"})," weak spots"]}),a.jsxs("a",{href:`/api/projects/${t.id}/quizzes/${y.id}/export`,className:"ml-auto inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs text-muted hover:bg-raised hover:text-ink",title:"Download as markdown",children:[a.jsx(Wf,{className:"h-3.5 w-3.5"})," .md"]}),a.jsxs("span",{className:"text-xs text-muted",children:[y.questions.length," questions · ",qt(y.createdAt)]})]}),a.jsx("h1",{className:"mt-2 text-[20px] font-semibold leading-tight tracking-tight",children:y.title}),a.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:y.files.map(I=>a.jsxs("button",{onClick:()=>f({file:I}),className:"inline-flex items-center gap-1 rounded-md bg-raised px-2 py-1 font-mono text-[12px] hover:text-accent",children:[a.jsx(il,{className:"h-3 w-3"})," ",n(I)]},I))}),C&&a.jsxs("div",{className:"card mt-6 flex flex-wrap items-center gap-4 p-4",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wide text-muted",children:"Score"}),a.jsx("div",{className:"text-3xl",children:a.jsx(Ca,{score:C.score})})]}),a.jsxs("div",{className:"text-sm text-muted",children:[C.grades.filter(I=>I.verdict==="right").length," right · ",C.grades.filter(I=>I.verdict==="partial").length," partial ·"," ",C.grades.filter(I=>I.verdict==="wrong").length," wrong",N>0&&a.jsxs("div",{className:"text-bad",children:[N," wrong while sure: the best ones to look at."]})]}),v.length>1&&a.jsx("div",{className:"ml-auto",children:a.jsx(Bt,{value:d??v.length-1,onChange:I=>h(I),options:v.map((I,W)=>({value:W,label:`#${W+1}`,title:`${Math.round(I.score*100)}% · ${qt(I.at)}`}))})})]}),a.jsx("ol",{className:"mt-6 space-y-4",children:y.questions.map((I,W)=>{const V=C==null?void 0:C.grades.find(K=>K.qid===I.id),_=C==null?void 0:C.answers.find(K=>K.qid===I.id),Y=l[I.id];return a.jsxs("li",{className:ae("card p-5",V&&(V.verdict==="right"?"border-good/30":V.verdict==="partial"?"border-warn/30":"border-bad/30")),children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-full bg-accent/10 text-sm font-semibold text-accent",children:W+1}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-[16px] font-medium leading-snug",children:I.prompt}),I.file&&a.jsxs("button",{className:"mt-1 font-mono text-[12px] text-muted hover:text-accent",onClick:()=>f({file:I.file,line:I.line}),children:[n(I.file),I.line?`:${I.line}`:""]})]}),V&&a.jsx(t0,{v:V.verdict})]}),C?a.jsxs("div",{className:"mt-4 space-y-3 pl-10",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"label flex items-center gap-2",children:["Your answer ",_!=null&&_.sure?a.jsx(we,{tone:"accent",children:"sure"}):a.jsx(we,{children:"guess"})]}),a.jsx("div",{className:"whitespace-pre-wrap rounded-lg bg-raised px-3 py-2 text-sm",children:(_==null?void 0:_.answer)||a.jsx("span",{className:"text-muted",children:"(no answer)"})})]}),(V==null?void 0:V.feedback)&&a.jsx("p",{className:"reading",children:V.feedback}),(V==null?void 0:V.modelAnswer)&&a.jsxs("div",{className:"reading rounded-lg border border-line px-4 py-3",children:[a.jsx("span",{className:"font-sans text-sm font-medium text-muted",children:"A good answer: "}),V.modelAnswer]}),(V==null?void 0:V.misconception)&&a.jsxs("div",{className:"flex gap-2 rounded-lg border border-bad/25 bg-bad/5 px-3 py-2 text-[14px]",children:[a.jsx(yu,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-bad"}),a.jsxs("span",{children:[a.jsx("span",{className:"font-medium",children:"Saved as a weak spot: "}),V.misconception]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[I.focus&&a.jsxs("span",{className:"text-xs text-muted",children:["Tests: ",I.focus]}),V&&V.verdict!=="right"&&a.jsxs("span",{className:"ml-auto flex gap-1",children:[a.jsx(ne,{size:"sm",variant:"ghost",icon:a.jsx(Na,{className:"h-3.5 w-3.5"}),disabled:w.busy,onClick:()=>w.run(`/projects/${t.id}/threads`,{files:y.files,text:`I got this quiz question ${V.verdict}:
|
|
486
|
+
|
|
487
|
+
"${I.prompt}"
|
|
488
|
+
|
|
489
|
+
My answer was: ${(_==null?void 0:_.answer)||"(none)"}
|
|
490
|
+
|
|
491
|
+
Help me see what I missed, without just telling me.`},K=>r(`/p/${t.id}/tutor/${K.resultId}`)),children:"Ask the tutor"}),a.jsx(ne,{size:"sm",variant:"ghost",icon:a.jsx(cr,{className:"h-3.5 w-3.5"}),onClick:()=>x({kind:"miss",front:I.prompt,back:V.modelAnswer,file:I.file,line:I.line,source:{quizId:y.id,qid:I.id}}),children:"Card"})]})]})]}):a.jsxs("div",{className:"mt-4 pl-10",children:[a.jsx("textarea",{className:"input min-h-[88px] resize-y",placeholder:"Your answer, in your own words",value:(Y==null?void 0:Y.answer)??"",onChange:K=>z(I.id,{answer:K.target.value})}),a.jsx("div",{className:"mt-2 flex items-center gap-2",children:a.jsx(Bt,{value:Y!=null&&Y.sure?"sure":"guess",onChange:K=>z(I.id,{sure:K==="sure"}),options:[{value:"guess",label:a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(j1,{className:"h-3.5 w-3.5"}),"Guess"]})},{value:"sure",label:a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx($a,{className:"h-3.5 w-3.5"}),"Sure"]})}]})})]})]},I.id)})}),a.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-2",children:[C?a.jsx(ne,{variant:"primary",icon:a.jsx(F1,{className:"h-4 w-4"}),onClick:()=>c(!0),children:"Try again"}):a.jsxs(a.Fragment,{children:[a.jsxs(ne,{variant:"primary",icon:a.jsx(D1,{className:"h-4 w-4"}),loading:i.busy,disabled:L===0,onClick:A,children:["Grade my answers (",L,"/",y.questions.length,")"]}),u&&a.jsx(ne,{variant:"ghost",onClick:()=>c(!1),children:"Cancel"})]}),a.jsx(ne,{variant:"ghost",className:"ml-auto",icon:a.jsx(dr,{className:"h-4 w-4"}),onClick:async()=>{await pl(`/projects/${t.id}/quizzes/${y.id}`),r(`/p/${t.id}/library`)},children:"Archive"})]}),i.busy&&i.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"grade",elapsed:i.elapsed})}),w.busy&&w.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"tutor",elapsed:w.elapsed})}),w.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:w.error,onClose:w.clearError})}),g&&a.jsx(Ha,{initial:g,onClose:()=>x(null)}),i.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:i.error,onClose:i.clearError})})]})});return p?a.jsx(Wn,{id:"quiz-code",side:"right",initial:480,min:300,max:900,className:"h-full",left:R,right:a.jsxs("div",{className:"flex h-full flex-col bg-panel",children:[a.jsxs("div",{className:"flex items-center border-b border-line px-4 py-2 font-mono text-[13px] text-muted",children:[a.jsxs("span",{className:"flex-1 truncate",children:[n(p.file),p.line?`:${p.line}`:""]}),a.jsx("button",{className:"text-xs hover:text-ink",onClick:()=>f(null),children:"close"})]}),a.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:m.data&&a.jsx(Va,{text:m.data.text,lang:m.data.lang,focusLine:p.line})})]})}):R}const id=[{level:"understood",label:"Understood",tone:"good",text:"A check passed (quiz, teach-back 4+, walk, hunt, practice) on the code as it is now."},{level:"fading",label:"Fading",tone:"warn",text:"Understood, but nothing recalled for a while. A quick quiz or card keeps it."},{level:"stale",label:"Stale",tone:"warn",text:"You passed once, then the code changed. Check it again."},{level:"seen",label:"Seen",tone:"muted",text:"Touched by a lens or an activity, no pass yet."}],wx={new:"bg-line/70",seen:"bg-accent/35",understood:"bg-good",fading:"bg-warn/60",stale:"bg-warn"};function kw(e){return e.flatMap(t=>t.kind==="file"?[t.path]:kw(t.children??[]))}function gT({files:e,levels:t,onOpen:n,rel:r}){const i=b.useMemo(()=>{const s=new Map;for(const l of e){const o=r(l),u=o.includes("/")?o.slice(0,o.lastIndexOf("/")):".";s.set(u,[...s.get(u)??[],l])}return[...s].sort((l,o)=>l[0].localeCompare(o[0]))},[e,r]);return a.jsxs("div",{className:"card mt-6 p-4",children:[a.jsx("div",{className:"mb-3 flex flex-wrap gap-3 text-[12px] text-muted",children:["understood","fading","stale","seen","new"].map(s=>a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:ae("h-2.5 w-2.5 rounded-sm",wx[s])}),s]},s))}),a.jsx("div",{className:"space-y-2",children:i.map(([s,l])=>a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"w-56 shrink-0 truncate pt-0.5 text-right font-mono text-[12px] text-muted",title:s,children:s}),a.jsx("div",{className:"flex flex-wrap gap-1",children:l.map(o=>a.jsx("button",{title:`${r(o)} · ${t.get(o)??"new"}`,onClick:()=>n(o),className:ae("h-3.5 w-3.5 rounded-sm transition hover:scale-125 hover:ring-2 hover:ring-accent/50",wx[t.get(o)??"new"])},o))})]},s))})]})}function xT(){const{project:e,rel:t,setOpenFile:n,setSelected:r}=nt(),i=St(),[s,l]=b.useState("all"),[o,u]=b.useState("table"),c=ge({queryKey:["progress",e.id],queryFn:()=>me(`/projects/${e.id}/progress`)}),d=ge({queryKey:["tree",e.id,e.contexts],queryFn:()=>me(`/projects/${e.id}/tree`),enabled:o==="map"}),h=b.useMemo(()=>new Map((c.data??[]).map(w=>[w.path,w.level])),[c.data]),p=w=>{n(w),r([w]),i(`/p/${e.id}/explore`)},f=c.data??[],g=b.useMemo(()=>Object.fromEntries(id.map(w=>[w.level,f.filter(m=>m.level===w.level).length])),[f]),x=s==="all"?f:f.filter(w=>w.level===s);return a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"mx-auto max-w-5xl px-8 py-8",children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Progress"}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("p",{className:"flex-1 text-sm text-muted",children:"Reading feels like understanding. Only a passed check counts here."}),a.jsx(Bt,{value:o,onChange:u,options:[{value:"table",label:"Table"},{value:"map",label:"Whole repo"}]})]}),a.jsx("div",{className:"mt-6 grid gap-3 sm:grid-cols-4",children:id.map(w=>a.jsxs("button",{onClick:()=>l(s===w.level?"all":w.level),className:ae("card p-4 text-left transition hover:border-accent/40",s===w.level&&"ring-2 ring-accent/30"),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm font-medium",children:w.label}),a.jsx(we,{tone:w.tone,children:w.level})]}),a.jsx("div",{className:"mt-2 text-3xl font-semibold tabular-nums",children:g[w.level]??0}),a.jsx("div",{className:"mt-1 text-xs text-muted",children:w.text})]},w.level))}),o==="map"?d.data?a.jsx(gT,{files:kw(d.data.slice(0,1)),levels:h,onOpen:p,rel:t}):null:f.length===0&&!c.isLoading?a.jsx(At,{icon:a.jsx(w1,{className:"h-6 w-6"}),title:"Nothing yet",children:"Make a lens or take a quiz in Explore. Files show up here as you go."}):a.jsxs("div",{className:"card mt-6 overflow-hidden",children:[a.jsxs("div",{className:"flex items-center gap-3 border-b border-line px-4 py-2.5",children:[a.jsxs("span",{className:"text-sm font-medium",children:[x.length," files"]}),a.jsx("div",{className:"ml-auto",children:a.jsx(Bt,{value:s,onChange:l,options:[{value:"all",label:"All"},...id.map(w=>({value:w.level,label:w.label}))]})})]}),a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"text-left text-xs uppercase tracking-wide text-muted",children:a.jsxs("tr",{className:"border-b border-line",children:[a.jsx("th",{className:"px-4 py-2 font-medium",children:"File"}),a.jsx("th",{className:"px-4 py-2 font-medium",children:"Level"}),a.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Best quiz"}),a.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Lenses"}),a.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Quizzes"}),a.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Other"}),a.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Last recall"})]})}),a.jsx("tbody",{children:x.map(w=>a.jsxs("tr",{className:"cursor-pointer border-b border-line/60 last:border-0 hover:bg-raised",onClick:()=>p(w.path),children:[a.jsx("td",{className:"max-w-[360px] truncate px-4 py-2 font-mono text-[13.5px]",children:t(w.path)}),a.jsx("td",{className:"px-4 py-2",children:a.jsx(we,{tone:w.level==="understood"?"good":w.level==="stale"||w.level==="fading"?"warn":"muted",children:w.level})}),a.jsx("td",{className:"px-4 py-2 text-right",children:w.bestScore===null?a.jsx("span",{className:"text-muted",children:"-"}):a.jsx(Ca,{score:w.bestScore,size:"sm"})}),a.jsx("td",{className:"px-4 py-2 text-right tabular-nums text-muted",children:w.lenses}),a.jsx("td",{className:"px-4 py-2 text-right tabular-nums text-muted",children:w.quizzes}),a.jsx("td",{className:"px-4 py-2 text-right tabular-nums text-muted",title:"practice, teach-back, walk, hunt",children:w.practices+w.other}),a.jsx("td",{className:"px-4 py-2 text-right text-xs text-muted",children:w.lastRetrieval?qt(w.lastRetrieval):"-"})]},w.path))})]})]})]})})}const yT=[{id:"auto",label:"Auto",text:"Claude Code, then Codex, then Copilot, then API key."},{id:"claude",label:"Claude Code CLI",text:"claude -p with read-only tools. Default."},{id:"codex",label:"Codex CLI",text:"codex exec in the read-only sandbox."},{id:"copilot",label:"GitHub Copilot CLI",text:"copilot -p with only the read tool."},{id:"sdk",label:"Anthropic API key",text:"ANTHROPIC_API_KEY from the environment."},{id:"fake",label:"Demo",text:"Canned answers, no model."}],ea=e=>e<1024*1024?`${Math.max(1,Math.round(e/1024))} KB`:`${(e/1024/1024).toFixed(1)} MB`;function vT(){const e=It(),t=ge({queryKey:["storage"],queryFn:()=>me("/storage")}),n=pi({mutationFn:()=>bi("/storage/prune"),onSuccess:i=>e.setQueryData(["storage"],i.usage)});if(!t.data)return null;const r=Math.max(1,...t.data.parts.map(i=>i.bytes));return a.jsxs("div",{className:"card mt-6 p-5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Hj,{className:"h-4 w-4 text-accent"}),a.jsx("div",{className:"text-sm font-semibold",children:"Storage"}),a.jsx("span",{className:"text-sm text-muted",children:ea(t.data.totalBytes)}),a.jsx(ne,{size:"sm",className:"ml-auto shrink-0 whitespace-nowrap",loading:n.isPending,onClick:()=>n.mutate(),children:"Clean up now"})]}),a.jsx("div",{className:"mt-0.5 break-all font-mono text-[12px] text-muted",children:t.data.home}),a.jsx("p",{className:"mt-1 text-xs text-muted",children:"Plain JSON files, one per item. Archived items and forgotten projects are removed after the keep time below, the reply cache keeps to its size, and long lists (quiz attempts, card history, tutor chats, jobs) are capped. Cleanup runs at start and every 6 hours."}),a.jsx("div",{className:"mt-3 space-y-1.5",children:t.data.parts.map(i=>a.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[a.jsx("span",{className:"w-32 shrink-0 capitalize text-muted",children:i.name}),a.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-raised",children:a.jsx("div",{className:"h-full bg-accent/60",style:{width:`${i.bytes/r*100}%`}})}),a.jsxs("span",{className:"w-28 shrink-0 text-right tabular-nums text-muted",children:[ea(i.bytes)," · ",i.files," file",i.files===1?"":"s"]})]},i.name))}),a.jsx("div",{className:"mt-3 text-[12px] text-muted",children:n.data?`Removed ${n.data.removed} item${n.data.removed===1?"":"s"}, freed ${ea(n.data.freedBytes)}.`:t.data.lastPrune?`Last cleanup ${qt(t.data.lastPrune.at)}: removed ${t.data.lastPrune.removed}.`:""}),a.jsx(wT,{})]})}function wT(){const e=It(),t=ge({queryKey:["storage-items"],queryFn:()=>me("/storage/items")}),[n,r]=b.useState(!1),[i,s]=b.useState(new Set),[l,o]=b.useState("all"),[u,c]=b.useState(!1),d=pi({mutationFn:()=>bi("/storage/remove",{ids:[...i]}),onSuccess:y=>{e.setQueryData(["storage"],y.usage),e.invalidateQueries({queryKey:["storage-items"]}),e.invalidateQueries(),s(new Set),c(!1)}}),h=t.data??[],p=[...new Set(h.map(y=>y.group))].sort(),f=l==="all"?h:h.filter(y=>y.group===l),g=h.filter(y=>i.has(y.id)).reduce((y,v)=>y+v.bytes,0),x=f.length>0&&f.every(y=>i.has(y.id)),w=y=>s(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j}),m=()=>s(y=>{const v=new Set(y);for(const j of f)x?v.delete(j.id):v.add(j.id);return v});return a.jsxs("div",{className:"mt-4 border-t border-line pt-4",children:[a.jsx("button",{className:"text-sm font-medium text-accent hover:underline",onClick:()=>r(!n),children:n?"Hide the list":`Choose what to remove (${h.length} items)`}),n&&a.jsxs("div",{className:"mt-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("select",{className:"input h-8 w-auto py-0 text-xs",value:l,onChange:y=>o(y.target.value),children:[a.jsx("option",{value:"all",children:"All kinds"}),p.map(y=>a.jsx("option",{value:y,children:y},y))]}),a.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-muted",children:[a.jsx("input",{type:"checkbox",checked:x,onChange:m})," Select all shown"]}),a.jsxs("span",{className:"ml-auto text-xs text-muted",children:[i.size," selected · ",ea(g)]}),u?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-xs text-bad",children:"This cannot be undone."}),a.jsx(ne,{size:"sm",onClick:()=>c(!1),children:"Cancel"}),a.jsxs(ne,{size:"sm",variant:"danger",loading:d.isPending,onClick:()=>d.mutate(),children:["Remove ",i.size]})]}):a.jsx(ne,{size:"sm",variant:"danger",disabled:!i.size,onClick:()=>c(!0),children:"Remove selected"})]}),a.jsxs("ul",{className:"mt-3 max-h-[26rem] divide-y divide-line/60 overflow-auto rounded-lg border border-line",children:[f.map(y=>a.jsx("li",{children:a.jsxs("label",{className:"flex cursor-pointer items-start gap-3 px-3 py-2 text-sm hover:bg-raised",children:[a.jsx("input",{type:"checkbox",className:"mt-1",checked:i.has(y.id),onChange:()=>w(y.id)}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:"block truncate",children:y.label}),a.jsxs("span",{className:"block text-[12px] text-muted",children:[y.group,y.project?` · ${y.project}`:""," · ",qt(y.at)]})]}),a.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted",children:ea(y.bytes)})]})},y.id)),!f.length&&a.jsx("li",{className:"px-3 py-6 text-center text-sm text-muted",children:"Nothing here."})]}),d.error&&a.jsx(tt,{error:d.error.message})]})]})}function kT(){const t=(ge({queryKey:["jobs"],queryFn:()=>me("/jobs")}).data??[]).slice(0,12);if(!t.length)return null;const n=r=>r.endedAt?Math.round((Date.parse(r.endedAt)-Date.parse(r.startedAt))/1e3):null;return a.jsxs("div",{className:"card mt-6 p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[a.jsx(Vj,{className:"h-4 w-4 text-accent"})," Recent model calls"]}),a.jsx("table",{className:"mt-3 w-full text-xs",children:a.jsx("tbody",{children:t.map(r=>a.jsxs("tr",{className:"border-b border-line/60 last:border-0",children:[a.jsx("td",{className:"py-1.5 pr-3 font-medium",children:r.kind}),a.jsx("td",{className:ae("py-1.5 pr-3",r.status==="failed"?"text-bad":r.status==="running"?"text-accent":"text-good"),children:r.status}),a.jsx("td",{className:"py-1.5 pr-3 tabular-nums text-muted",children:n(r)!==null?`${n(r)} s`:""}),a.jsx("td",{className:"max-w-[320px] truncate py-1.5 pr-3 text-muted",title:r.error,children:r.error??""}),a.jsx("td",{className:"py-1.5 text-right text-muted",children:qt(r.startedAt)})]},r.id))})})]})}function ht({label:e,hint:t,children:n}){return a.jsxs("div",{className:"grid gap-1.5 py-4 sm:grid-cols-[220px_1fr] sm:gap-6",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium",children:e}),t&&a.jsx("div",{className:"mt-0.5 text-xs text-muted",children:t})]}),a.jsx("div",{children:n})]})}function bT(){var p;const e=It(),t=ge({queryKey:["settings"],queryFn:()=>me("/settings")}),[n,r]=b.useState(null),{pref:i,setPref:s}=Qx(),{font:l,setFont:o}=Jw();b.useEffect(()=>{t.data&&!n&&r(t.data.settings)},[t.data,n]);const u=pi({mutationFn:f=>bh("/settings",f),onSuccess:f=>{e.setQueryData(["settings"],f),e.invalidateQueries({queryKey:["health"]}),r(f.settings)}});if(!t.data||!n)return null;const c=(f,g)=>r({...n,[f]:g}),d=JSON.stringify(n)!==JSON.stringify(t.data.settings),h=((p=u.data)==null?void 0:p.agent)??t.data.agent;return a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"mx-auto max-w-5xl px-8 py-10",children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Settings"}),a.jsxs("p",{className:"mt-1 text-sm text-muted",children:["Saved in ",a.jsxs("span",{className:"font-mono",children:[t.data.home,"/settings.json"]})]}),a.jsxs("div",{className:ae("card mt-6 flex items-start gap-3 p-4",h.ready?"border-good/30":"border-bad/30"),children:[a.jsx("div",{className:ae("grid h-9 w-9 shrink-0 place-items-center rounded-lg",h.ready?"bg-good/12 text-good":"bg-bad/12 text-bad"),children:a.jsx(_j,{className:"h-[18px] w-[18px]"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-semibold",children:h.ready?`Model ready: ${h.name}`:"No model available"}),a.jsx("div",{className:"text-sm text-muted",children:h.detail})]})]}),a.jsxs("div",{className:"card mt-6 divide-y divide-line px-5",children:[a.jsx(ht,{label:"Theme",children:a.jsx(Bt,{value:i,onChange:s,options:[{value:"system",label:"System"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}]})}),a.jsx(ht,{label:"Reading font",hint:"For lessons, feedback and tutor replies. Buttons and labels stay in the system UI font.",children:a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(Bt,{value:l,onChange:o,options:[{value:"sans",label:"Sans"},{value:"serif",label:"Serif"}]}),a.jsx("span",{className:"reading text-muted",children:"Read the code, then explain it."})]})}),a.jsx(ht,{label:"Model access",hint:"CLIs use their own saved login, so learnforge never needs or stores a key. Auto picks the first one found.",children:a.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:yT.map(f=>{var w;const g=(w=h.available)==null?void 0:w[f.id],x=n["agent.mode"]===f.id;return a.jsxs("button",{onClick:()=>c("agent.mode",f.id),className:ae("rounded-lg border px-3 py-2 text-left transition",x?"border-accent/60 bg-accent/8 ring-1 ring-accent/30":"border-line hover:bg-raised"),children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[f.label,f.id!=="auto"&&f.id!=="fake"&&a.jsx("span",{className:ae("ml-auto shrink-0 whitespace-nowrap rounded-full px-1.5 text-[11.5px]",g?"bg-good/12 text-good":"bg-raised text-muted"),children:g?"found":"not found"})]}),a.jsx("div",{className:"text-xs text-muted",children:f.text})]},f.id)})})}),a.jsx(ht,{label:"Claude",hint:"Command and model for the Claude Code CLI (model also used by the API key mode).",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{className:"input w-36 font-mono",value:n["agent.claudeCommand"],onChange:f=>c("agent.claudeCommand",f.target.value)}),a.jsx("input",{className:"input font-mono",placeholder:"CLI default",value:n["agent.model"],onChange:f=>c("agent.model",f.target.value)})]})}),a.jsx(ht,{label:"Planning model",hint:"Plans every lens, quiz, walk, practice, bug hunt and path first (outline, steps, what each must cover). The model above then writes from that plan, in parts. Works with the Claude CLI and the API key; empty = the writer plans too.",children:a.jsx("input",{className:"input font-mono",placeholder:"same as the writer",value:n["agent.planModel"],onChange:f=>c("agent.planModel",f.target.value)})}),a.jsx(ht,{label:"Plan first",hint:"On: plan, then write in parts (slower, much better). Off: one model call per item.",children:a.jsx(Bt,{value:n["generate.plan"]?"on":"off",onChange:f=>c("generate.plan",f==="on"),options:[{value:"on",label:"On"},{value:"off",label:"Off"}]})}),a.jsx(ht,{label:"Codex",hint:"Command and model for the OpenAI Codex CLI. Empty model = its default.",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{className:"input w-36 font-mono",value:n["agent.codexCommand"],onChange:f=>c("agent.codexCommand",f.target.value)}),a.jsx("input",{className:"input font-mono",placeholder:"CLI default",value:n["agent.codexModel"],onChange:f=>c("agent.codexModel",f.target.value)})]})}),a.jsx(ht,{label:"Copilot",hint:"Command and model for the GitHub Copilot CLI. Empty model = its default.",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{className:"input w-36 font-mono",value:n["agent.copilotCommand"],onChange:f=>c("agent.copilotCommand",f.target.value)}),a.jsx("input",{className:"input font-mono",placeholder:"CLI default",value:n["agent.copilotModel"],onChange:f=>c("agent.copilotModel",f.target.value)})]})}),a.jsx(ht,{label:"Timeout",hint:"Seconds per model call.",children:a.jsx("input",{type:"number",min:30,className:"input w-32",value:n["agent.timeoutSec"],onChange:f=>c("agent.timeoutSec",Number(f.target.value))})}),a.jsx(ht,{label:"Questions per quiz",children:a.jsx("input",{type:"number",min:1,max:10,className:"input w-32",value:n["quiz.questions"],onChange:f=>c("quiz.questions",Number(f.target.value))})}),a.jsx(ht,{label:"Pass mark",hint:"Share of points to count a file as understood (partial = half).",children:a.jsx("input",{type:"number",min:.1,max:1,step:.01,className:"input w-32",value:n["quiz.passMark"],onChange:f=>c("quiz.passMark",Number(f.target.value))})}),a.jsx(ht,{label:"Context size",hint:"Most bytes of code sent in one prompt.",children:a.jsx("input",{type:"number",min:1e4,step:1e4,className:"input w-40",value:n["context.maxBytes"],onChange:f=>c("context.maxBytes",Number(f.target.value))})}),a.jsx(ht,{label:"Cards from misses",hint:"Each wrong or partial quiz answer becomes a review card.",children:a.jsx(Bt,{value:n["cards.fromMisses"]?"on":"off",onChange:f=>c("cards.fromMisses",f==="on"),options:[{value:"on",label:"On"},{value:"off",label:"Off"}]})}),a.jsx(ht,{label:"Fade after",hint:"Days without recall before an understood file shows as fading. 0 = never.",children:a.jsx("input",{type:"number",min:0,className:"input w-32",value:n["progress.fadeDays"],onChange:f=>c("progress.fadeDays",Number(f.target.value))})}),a.jsx(ht,{label:"Notes in prompts",hint:"Send your margin notes on a file with its code, so lenses and the tutor can use them.",children:a.jsx(Bt,{value:n["notes.inPrompts"]?"on":"off",onChange:f=>c("notes.inPrompts",f==="on"),options:[{value:"on",label:"On"},{value:"off",label:"Off"}]})}),a.jsx(ht,{label:"Keep archive",hint:"Days an archived item or forgotten project is kept before it is removed for good. 0 = forever.",children:a.jsx("input",{type:"number",min:0,className:"input w-32",value:n["storage.archiveDays"],onChange:f=>c("storage.archiveDays",Number(f.target.value))})}),a.jsx(ht,{label:"Reply cache",hint:"Most MB of saved model replies (the same lens twice is free). Oldest go first.",children:a.jsx("input",{type:"number",min:0,className:"input w-32",value:n["storage.cacheMB"],onChange:f=>c("storage.cacheMB",Number(f.target.value))})}),a.jsx(ht,{label:"Attempts per quiz",hint:"Older graded attempts are dropped; the best one is always kept.",children:a.jsx("input",{type:"number",min:1,className:"input w-32",value:n["storage.maxAttempts"],onChange:f=>c("storage.maxAttempts",Number(f.target.value))})})]}),u.error&&a.jsx("div",{className:"mt-4",children:a.jsx(tt,{error:u.error.message})}),a.jsxs("div",{className:"mt-5 flex items-center justify-end gap-2",children:[u.isSuccess&&!d&&a.jsxs("span",{className:"flex items-center gap-1 text-sm text-good",children:[a.jsx(Vf,{className:"h-4 w-4"})," Saved"]}),a.jsx(ne,{variant:"ghost",disabled:!d,onClick:()=>r(t.data.settings),children:"Reset"}),a.jsx(ne,{variant:"primary",disabled:!d,loading:u.isPending,onClick:()=>u.mutate(n),children:"Save"})]}),a.jsx(vT,{}),a.jsx(kT,{})]})})}function jT(){const{project:e,rel:t,setSelected:n,setOpenFile:r}=nt(),i=St(),s=Hn(),l=ge({queryKey:["today",e.id],queryFn:()=>me(`/projects/${e.id}/today`)}),o=`/p/${e.id}`;if(l.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!l.data)return l.error?a.jsx("div",{className:"p-8",children:a.jsx(tt,{error:l.error.message})}):null;const u=l.data,c=(d,h)=>{if(h==="review")return i(`${o}/review`);if(h==="weak")return s.run(`/projects/${e.id}/quizzes`,{files:[],weak:!0},f=>i(`${o}/quiz/${f.resultId}`));n(d),d[0]&&r(d[0]),i(`${o}/explore?do=${h==="teachback"?"teach":h}`)};return a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Today"}),a.jsx("span",{className:"text-sm text-muted",children:e.name}),u.streak>0&&a.jsxs(we,{tone:"warn",className:"ml-auto",children:[a.jsx(Bj,{className:"h-3.5 w-3.5"})," ",u.streak," day",u.streak===1?"":"s"," in a row"]})]}),u.suggestion&&a.jsxs("div",{className:"card mt-6 flex items-center gap-4 border-accent/30 bg-accent/5 p-5",children:[a.jsx("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-md bg-accent/15 text-accent",children:a.jsx(Gf,{className:"h-5 w-5"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-accent",children:"Suggested next, about 10 minutes"}),a.jsx("div",{className:"mt-0.5 text-[16px]",children:u.suggestion.text})]}),a.jsx(ne,{variant:"primary",icon:a.jsx(Vu,{className:"h-4 w-4"}),disabled:s.busy,onClick:()=>c(u.suggestion.files,u.suggestion.activity),children:"Start"})]}),s.busy&&s.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:s.job.kind,elapsed:s.elapsed})}),s.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:s.error,onClose:s.clearError})}),a.jsxs("div",{className:"mt-6 grid gap-4 md:grid-cols-2",children:[a.jsxs("section",{className:"card p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[a.jsx(cr,{className:"h-4 w-4 text-accent"})," Review cards"]}),a.jsxs("div",{className:"mt-3 flex items-end gap-3",children:[a.jsx("div",{className:"text-4xl font-semibold tabular-nums",children:u.due}),a.jsxs("div",{className:"pb-1 text-sm text-muted",children:["due now",u.newCards?` · ${u.newCards} never seen`:""]})]}),a.jsx(ne,{className:"mt-4",size:"sm",disabled:!u.due,onClick:()=>i(`${o}/review`),children:"Start review"})]}),a.jsxs("section",{className:"card p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[a.jsx(yu,{className:"h-4 w-4 text-bad"})," Weak spots"]}),u.weak.length?a.jsx("ul",{className:"mt-3 space-y-2",children:u.weak.map(d=>a.jsxs("li",{className:"text-[14px] leading-snug",children:[d.text,a.jsxs("span",{className:"ml-1 text-[12px] text-muted",children:[d.file&&`· ${t(d.file)}`,d.seen>1&&` · seen ${d.seen}×`]})]},d.id))}):a.jsx("p",{className:"mt-3 text-sm text-muted",children:"None open. Wrong answers in quizzes, teach-backs and walkthroughs show up here."}),a.jsx(ne,{className:"mt-4",size:"sm",disabled:!u.weak.length||s.busy,onClick:()=>c([],"weak"),children:"Quiz my weak spots"})]}),a.jsxs("section",{className:"card p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[a.jsx(r2,{className:"h-4 w-4 text-warn"})," Needs a refresh"]}),u.attention.length?a.jsx("ul",{className:"mt-3 space-y-1.5",children:u.attention.map(d=>a.jsxs("li",{className:"flex items-center gap-2 text-[14px]",children:[a.jsx("button",{className:"min-w-0 flex-1 truncate text-left font-mono text-[13px] hover:text-accent",onClick:()=>c([d.path],"quiz"),children:t(d.path)}),a.jsx(we,{tone:"warn",children:d.level}),d.lastRetrieval&&a.jsx("span",{className:"text-[12px] text-muted",children:qt(d.lastRetrieval)})]},d.path))}):a.jsx("p",{className:"mt-3 text-sm text-muted",children:"Nothing stale or fading. Files you passed come back here when the code changes or a few weeks go by."})]}),a.jsxs("section",{className:"card p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[a.jsx(Kf,{className:"h-4 w-4 text-good"})," Learning path"]}),u.nextStop?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mt-3 text-xs text-muted",children:[u.nextStop.title," · stop ",u.nextStop.index+1]}),a.jsx("div",{className:"mt-0.5 text-[16px] font-medium",children:u.nextStop.stop.title}),a.jsx("p",{className:"mt-1 text-[14px] text-muted",children:u.nextStop.stop.why}),a.jsxs("div",{className:"mt-4 flex gap-2",children:[a.jsx(ne,{size:"sm",variant:"primary",onClick:()=>c(u.nextStop.stop.files,u.nextStop.stop.activity),children:"Do this stop"}),a.jsx(Mt,{to:`${o}/paths/${u.nextStop.pathId}`,className:"inline-flex items-center text-xs text-muted hover:text-ink",children:"see the path"})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"mt-3 text-sm text-muted",children:"A path is an ordered tour of the repo: where to start, what next, and how to check each stop."}),a.jsxs("div",{className:"mt-4 flex gap-2",children:[a.jsx(ne,{size:"sm",onClick:()=>i(`${o}/paths`),children:"Make a path"}),a.jsx(ne,{size:"sm",variant:"ghost",icon:a.jsx(z1,{className:"h-3.5 w-3.5"}),onClick:()=>i(`${o}/map`),children:"See the map"})]})]})]})]})]})})}const kx=[{r:"again",label:"Again",key:"1",cls:"border-bad/40 text-bad hover:bg-bad/10"},{r:"hard",label:"Hard",key:"2",cls:"border-warn/40 text-warn hover:bg-warn/10"},{r:"good",label:"Good",key:"3",cls:"border-good/40 text-good hover:bg-good/10"},{r:"easy",label:"Easy",key:"4",cls:"border-accent/40 text-accent hover:bg-accent/10"}],NT={miss:"from a quiz miss",concept:"concept",own:"your card"};function ST(){var C,k,L,z,A;const{project:e,rel:t}=nt(),n=It(),r=ge({queryKey:["cards-due",e.id],queryFn:()=>me(`/projects/${e.id}/cards/due`)}),i=ge({queryKey:["cards",e.id],queryFn:()=>me(`/projects/${e.id}/cards`)}),[s,l]=b.useState(!1),[o,u]=b.useState(""),[c,d]=b.useState(0),[h,p]=b.useState(!1),[f,g]=b.useState(!1),x=(C=r.data)==null?void 0:C[0];b.useEffect(()=>{l(!1),u(""),g(!1)},[x==null?void 0:x.id]);const w=async N=>{x&&(await bi(`/projects/${e.id}/cards/${x.id}/review`,{rating:N}),d(R=>R+1),await n.invalidateQueries({queryKey:["cards-due",e.id]}),n.invalidateQueries({queryKey:["today",e.id]}),n.invalidateQueries({queryKey:["cards",e.id]}))};if(b.useEffect(()=>{const N=R=>{if(R.target.closest("textarea, input"))return;R.key===" "&&!s&&(R.preventDefault(),l(!0));const I=kx.find(W=>W.key===R.key);I&&s&&w(I.r)};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)}),r.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});const m=((k=i.data)==null?void 0:k.length)??0,y=((L=i.data)==null?void 0:L.filter(N=>N.suspended).length)??0,v=(z=i.data)==null?void 0:z.filter(N=>!N.suspended).map(N=>N.fsrs.due).sort()[0],j=a.jsxs("div",{className:"h-full overflow-auto",children:[a.jsxs("div",{className:"page",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Review"}),a.jsxs(we,{tone:"accent",children:[((A=r.data)==null?void 0:A.length)??0," due"]}),c>0&&a.jsxs(we,{tone:"good",children:[c," done"]}),a.jsx(ne,{size:"sm",variant:"ghost",className:"ml-auto",icon:a.jsx(I1,{className:"h-3.5 w-3.5"}),onClick:()=>p(!0),children:"New card"})]}),a.jsx("p",{className:"text-sm text-muted",children:"Recall before you reveal. Cards you know come back less often; cards you miss come back soon."}),x?a.jsxs("div",{className:"card mt-6 p-6",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted",children:[a.jsx(cr,{className:"h-3.5 w-3.5"})," ",NT[x.kind],x.file&&a.jsxs("button",{className:"ml-1 font-mono hover:text-accent",onClick:()=>g(N=>!N),children:[t(x.file),x.line?`:${x.line}`:""]}),a.jsx("span",{className:"ml-auto",children:x.fsrs.reps?`${x.fsrs.reps} reviews · ${x.fsrs.lapses} lapses`:"new"})]}),a.jsx("div",{className:"mt-3 text-[17px] font-medium leading-snug",children:x.front}),s?a.jsxs(a.Fragment,{children:[o.trim()&&a.jsxs("div",{className:"mt-4",children:[a.jsx("div",{className:"label",children:"You wrote"}),a.jsx("div",{className:"whitespace-pre-wrap rounded-lg bg-raised px-3 py-2 text-sm",children:o})]}),a.jsxs("div",{className:"mt-4",children:[a.jsx("div",{className:"label",children:"Answer"}),a.jsx("div",{className:"reading whitespace-pre-wrap rounded-lg border border-good/30 bg-good/5 px-4 py-3",children:x.back})]}),a.jsx("div",{className:"mt-5 grid grid-cols-4 gap-2",children:kx.map(N=>a.jsxs("button",{onClick:()=>w(N.r),className:ae("rounded-lg border px-2 py-2 text-center transition",N.cls),children:[a.jsxs("div",{className:"text-sm font-semibold",children:[N.label," ",a.jsx("span",{className:"kbd ml-0.5",children:N.key})]}),a.jsx("div",{className:"text-[12px] opacity-80",children:jh(x.next[N.r])})]},N.r))}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsxs("button",{className:"inline-flex items-center gap-1 text-xs text-muted hover:text-ink",title:"Stop showing this card",onClick:async()=>{await qa(`/projects/${e.id}/cards/${x.id}`,{suspended:!0}),n.invalidateQueries()},children:[a.jsx(N1,{className:"h-3.5 w-3.5"})," Pause this card"]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"input mt-4 min-h-[88px]",placeholder:"Type your answer (optional), then reveal",value:o,onChange:N=>u(N.target.value)}),a.jsxs(ne,{variant:"primary",className:"mt-3",icon:a.jsx(S1,{className:"h-4 w-4"}),onClick:()=>l(!0),children:["Reveal ",a.jsx("span",{className:"kbd ml-1",children:"space"})]})]})]}):a.jsx(At,{icon:a.jsx($a,{className:"h-6 w-6"}),title:c?"All done for now":"Nothing due",children:m?a.jsxs(a.Fragment,{children:["You have ",m," card",m===1?"":"s",y?` (${y} paused)`:"",".",v&&` The next one is due in ${jh(v)}.`]}):a.jsx(a.Fragment,{children:"Cards come from quiz misses (on their own), lens concepts and your own. Take a quiz or make a card to start."})}),a.jsxs("p",{className:"mt-6 text-center text-xs text-muted",children:["All cards are in the ",a.jsx(Mt,{className:"text-accent hover:underline",to:`/p/${e.id}/library?tab=cards`,children:"Library"}),"."]})]}),h&&a.jsx(Ha,{initial:{kind:"own"},onClose:()=>p(!1)})]});return!f||!(x!=null&&x.file)?j:a.jsx(Wn,{id:"review-code",side:"right",initial:480,min:300,max:900,className:"h-full",left:j,right:a.jsx(ml,{file:x.file,line:x.line,onClose:()=>g(!1)})})}function Ga({to:e="library",label:t="Library"}){const{project:n}=nt();return a.jsxs(Mt,{to:`/p/${n.id}/${e}`,className:"inline-flex items-center gap-1 text-xs text-muted hover:text-ink",children:[a.jsx(qf,{className:"h-3.5 w-3.5"})," ",t]})}function lc(e){const{project:t}=nt();return async n=>{await fetch(`/api/projects/${t.id}/${e}`,{method:"DELETE"}),n(`/p/${t.id}/library`)}}const CT=["","Mostly wrong or empty","Some right, big gaps","Right but shallow","Right, covers what matters","Right, with the why and the edges"];function ET(){const{id:e=""}=zr(),{project:t,rel:n}=nt(),r=St(),i=Hn(),s=lc(`teachbacks/${e}`),[l,o]=b.useState(null),[u,c]=b.useState(null),d=ge({queryKey:["teachback",t.id,e],queryFn:()=>me(`/projects/${t.id}/teachbacks/${e}`)});if(d.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!d.data)return a.jsx(At,{title:"Teach-back not found"});const h=d.data,p=h.grade,f=(x,w,m,y)=>w.length>0&&a.jsxs("section",{className:"mt-6",children:[a.jsxs("h2",{className:`mb-2 flex items-center gap-1.5 text-sm font-semibold ${y}`,children:[m," ",x]}),a.jsx("ul",{className:"space-y-1.5",children:w.map((v,j)=>a.jsx("li",{className:"card reading px-4 py-2.5",children:v},j))})]}),g=a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"page",children:[a.jsx(Xu,{back:a.jsx(Ga,{}),badges:a.jsxs(a.Fragment,{children:[a.jsx(we,{tone:"accent",children:"teach-back"}),a.jsx("span",{className:"text-xs text-muted",children:qt(h.createdAt)})]}),title:"Your explanation",actions:a.jsx(ne,{variant:"ghost",size:"sm",icon:a.jsx(dr,{className:"h-3.5 w-3.5"}),onClick:()=>s(r),children:"Archive"})}),a.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:h.files.map(x=>a.jsxs("button",{onClick:()=>o(x),className:"inline-flex items-center gap-1 rounded-md bg-raised px-2 py-1 font-mono text-[12px] hover:text-accent",children:[a.jsx(il,{className:"h-3 w-3"})," ",n(x)]},x))}),p&&a.jsxs("div",{className:"card mt-6 flex items-center gap-5 p-5",children:[a.jsx("div",{className:"text-center",children:a.jsxs("div",{className:`text-4xl font-semibold ${p.score>=4?"text-good":p.score>=3?"text-warn":"text-bad"}`,children:[p.score,a.jsx("span",{className:"text-lg text-muted",children:"/5"})]})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium",children:CT[p.score]}),a.jsx("div",{className:"text-sm text-muted",children:p.summary}),p.score>=4&&a.jsx("div",{className:"mt-1 text-xs text-good",children:"Counts as understood for these files."})]})]}),a.jsxs("section",{className:"mt-6",children:[a.jsx("div",{className:"label",children:"What you wrote"}),a.jsx("div",{className:"reading whitespace-pre-wrap rounded-lg bg-raised px-4 py-3",children:h.text})]}),p&&f("Wrong",p.wrong,a.jsx(k1,{className:"h-4 w-4"}),"text-bad"),p&&f("Missing",p.missing,a.jsx(b1,{className:"h-4 w-4"}),"text-warn"),p&&f("Right",p.right,a.jsx($a,{className:"h-4 w-4"}),"text-good"),a.jsxs("section",{className:"mt-10 rounded-md border border-line bg-raised/50 p-5",children:[a.jsx("div",{className:"text-sm font-semibold",children:"Explain it again"}),a.jsx("p",{className:"mt-0.5 text-sm text-muted",children:"Close this page in your head: write it fresh, without copying the feedback."}),u===null?a.jsx(ne,{className:"mt-3",icon:a.jsx(F1,{className:"h-4 w-4"}),onClick:()=>c(""),children:"Try again"}):a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"input mt-3 min-h-[160px]",value:u,onChange:x=>c(x.target.value),autoFocus:!0}),a.jsx(ne,{variant:"primary",className:"mt-2",icon:a.jsx(ba,{className:"h-4 w-4"}),disabled:i.busy||u.trim().length<20,onClick:()=>i.run(`/projects/${t.id}/teachbacks`,{files:h.files,text:u},x=>{c(null),r(`/p/${t.id}/teach/${x.resultId}`)}),children:"Grade this one"})]}),i.busy&&i.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"teachback",elapsed:i.elapsed})}),i.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:i.error,onClose:i.clearError})})]})]})});return l?a.jsx(Wn,{id:"teach-code",side:"right",initial:480,min:300,max:900,className:"h-full",left:g,right:a.jsx(ml,{file:l,onClose:()=>o(null)})}):g}const PT=["","nudge","hint","walk-through","answer"];function TT(){const{id:e=""}=zr(),{project:t,rel:n}=nt(),r=St(),i=Hn(),s=lc(`threads/${e}`),[l,o]=b.useState(""),[u,c]=b.useState(null),d=b.useRef(null),h=ge({queryKey:["thread",t.id,e],queryFn:()=>me(`/projects/${t.id}/threads/${e}`)}),p=h.data;if(b.useEffect(()=>{var x;(x=d.current)==null||x.scrollIntoView({behavior:"smooth"})},[p==null?void 0:p.messages.length,i.busy]),b.useEffect(()=>{p&&!u&&c({file:p.files[0]})},[p,u]),h.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!p)return a.jsx(At,{title:"Conversation not found"});const f=(x=!1)=>i.run(`/projects/${t.id}/threads/${p.id}/messages`,{text:l,tell:x},()=>o("")),g=a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("div",{className:"border-b border-line bg-panel px-6 py-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ga,{}),a.jsx(ne,{variant:"ghost",size:"sm",className:"ml-auto",icon:a.jsx(dr,{className:"h-3.5 w-3.5"}),onClick:()=>s(r),children:"Archive"})]}),a.jsx("div",{className:"mt-1 truncate text-base font-semibold",children:p.title}),a.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:p.files.map(x=>a.jsxs("button",{onClick:()=>c({file:x}),className:"inline-flex items-center gap-1 rounded-md bg-raised px-2 py-0.5 font-mono text-[12px] hover:text-accent",children:[a.jsx(il,{className:"h-3 w-3"})," ",n(x)]},x))})]}),a.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-auto px-6 py-5",children:[p.messages.map((x,w)=>a.jsx("div",{className:ae("flex",x.role==="user"?"justify-end":"justify-start"),children:a.jsxs("div",{className:ae("max-w-[85%] rounded-md px-4 py-3",x.role==="user"?"bg-accent text-accent-ink":"card"),children:[x.role==="tutor"&&x.hintLevel&&a.jsxs(we,{tone:x.hintLevel>=4?"warn":"accent",className:"mb-1.5",children:[a.jsx(Qf,{className:"h-3 w-3"})," ",PT[x.hintLevel]]}),x.role==="user"?a.jsx("div",{className:"whitespace-pre-wrap text-[15px]",children:x.text}):a.jsx(ol,{children:x.text})]})},w)),i.busy&&i.job&&a.jsx(Vn,{kind:"tutor",elapsed:i.elapsed}),i.error&&a.jsx(tt,{error:i.error,onClose:i.clearError}),a.jsx("div",{ref:d})]}),a.jsxs("div",{className:"border-t border-line bg-panel p-3",children:[a.jsx("textarea",{className:"input min-h-[64px] resize-y",placeholder:"Your answer or next question. Ctrl+Enter to send.",value:l,onChange:x=>o(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&l.trim()&&!i.busy&&f()}}),a.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[a.jsx("span",{className:"text-[12px] text-muted",children:"Try first. Each reply gives a bit more."}),a.jsx(ne,{variant:"ghost",size:"sm",className:"ml-auto",disabled:i.busy,onClick:()=>f(!0),children:"Just tell me"}),a.jsx(ne,{variant:"primary",size:"sm",icon:a.jsx(D1,{className:"h-3.5 w-3.5"}),disabled:i.busy||!l.trim(),onClick:()=>f(),children:"Send"})]})]})]});return a.jsx(Wn,{id:"tutor-code",collapsible:!0,side:"right",initial:520,min:300,max:900,className:"h-full",left:g,right:a.jsx(ml,{file:u==null?void 0:u.file,line:u==null?void 0:u.line})})}function LT(){const{id:e=""}=zr(),{project:t,rel:n}=nt(),r=St(),i=Hn(),s=lc(`walks/${e}`),l=ge({queryKey:["walk",t.id,e],queryFn:()=>me(`/projects/${t.id}/walks/${e}`)}),o=l.data,u=ge({queryKey:["file",t.id,o==null?void 0:o.file],enabled:!!o,queryFn:()=>me(`/projects/${t.id}/file?path=${encodeURIComponent(o.file)}`)}),c=o?Math.max(0,o.blocks.findIndex(C=>!C.verdict)):0,[d,h]=b.useState(null),p=d??c,[f,g]=b.useState("");b.useEffect(()=>{g("")},[p]);const x=b.useMemo(()=>{const C=o==null?void 0:o.blocks[p];if(!C||!u.data)return null;const k=u.data.text.split(`
|
|
492
|
+
`),L=k.slice(C.startLine-1,Math.min(C.endLine,k.length)),z=Math.min(...L.filter(A=>A.trim()).map(A=>{var N;return((N=/^\s*/.exec(A))==null?void 0:N[0].length)??0}));return L.map(A=>A.slice(Number.isFinite(z)?z:0)).join(`
|
|
493
|
+
`)},[o,p,u.data]),w=b.useMemo(()=>o?[{from:o.blocks[p].startLine,to:o.blocks[p].endLine,cls:"block"}]:[],[o,p]);if(l.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!o)return a.jsx(At,{title:"Walkthrough not found"});const m=o.blocks[p],y=o.blocks.filter(C=>C.verdict).length,v=o.blocks.reduce((C,k)=>C+(k.verdict==="right"?1:k.verdict==="partial"?.5:0),0),j=a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"page",children:[a.jsx(Xu,{back:a.jsx(Ga,{}),badges:a.jsxs(a.Fragment,{children:[a.jsx(we,{tone:"accent",children:"walkthrough"}),a.jsxs("span",{className:"text-xs text-muted",children:[y,"/",o.blocks.length," checked · ",qt(o.createdAt)]})]}),title:a.jsx("span",{className:"font-mono text-[20px]",children:n(o.file)}),actions:a.jsx(ne,{variant:"ghost",size:"sm",icon:a.jsx(dr,{className:"h-3.5 w-3.5"}),onClick:()=>s(r),children:"Archive"})}),a.jsx("div",{className:"mt-5 flex gap-1",children:o.blocks.map((C,k)=>a.jsx("button",{title:C.title,onClick:()=>h(k),className:ae("h-2 flex-1 rounded-full transition",C.verdict==="right"?"bg-good":C.verdict==="partial"?"bg-warn":C.verdict==="wrong"?"bg-bad":"bg-line",k===p&&"ring-2 ring-accent/40 ring-offset-2 ring-offset-bg")},k))}),a.jsxs("div",{className:"card mt-6 p-6",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted",children:["Block ",p+1," of ",o.blocks.length," · lines ",m.startLine,"-",m.endLine,m.verdict&&a.jsx("span",{className:"ml-auto",children:a.jsx(t0,{v:m.verdict})})]}),a.jsx("h2",{className:"mt-1 text-lg font-semibold",children:m.title||`Block ${p+1}`}),a.jsx("p",{className:"reading mt-1 text-muted",children:m.why}),x!==null&&a.jsxs("div",{className:"mt-5 min-w-0 overflow-hidden rounded-md border border-line bg-panel",children:[a.jsxs("div",{className:"border-b border-line bg-raised/60 px-3 py-1.5 font-mono text-[12px] text-muted",children:[n(o.file).split("/").slice(-2).join("/"),":",m.startLine,"–",m.endLine]}),a.jsx("div",{className:"lens-step-code",children:a.jsx(Va,{text:x,lang:u.data.lang,firstLine:m.startLine})})]}),m.explain&&a.jsx("div",{className:"mt-5",children:a.jsx(ol,{children:m.explain})}),m.example&&a.jsxs("div",{className:"mt-5 rounded-r-lg border-l-[3px] border-good bg-good/5 px-4 py-3",children:[a.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-good",children:[a.jsx(Qf,{className:"h-3.5 w-3.5"})," Try it with real values"]}),a.jsx(ol,{children:m.example})]}),a.jsx("div",{className:"mt-5 rounded-lg border border-accent/25 bg-accent/5 p-3 text-[15.5px] font-medium",children:m.question}),m.verdict?a.jsxs("div",{className:"mt-4 space-y-2",children:[a.jsx("div",{className:"whitespace-pre-wrap rounded-lg bg-raised px-3 py-2 text-sm",children:m.answer||a.jsx("span",{className:"text-muted",children:"(no answer)"})}),m.feedback&&a.jsx("p",{className:"reading",children:m.feedback})]}):a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"input mt-4 min-h-[88px]",placeholder:"Your answer, from the block on the right",value:f,onChange:C=>g(C.target.value)}),a.jsx(ne,{variant:"primary",className:"mt-3",icon:a.jsx(Vf,{className:"h-4 w-4"}),disabled:i.busy||!f.trim(),onClick:()=>{h(p),i.run(`/projects/${t.id}/walks/${o.id}/blocks/${p}`,{answer:f})},children:"Check"})]}),i.busy&&i.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"walkcheck",elapsed:i.elapsed})}),i.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:i.error,onClose:i.clearError})}),a.jsx("div",{className:"mt-5 flex justify-end",children:p<o.blocks.length-1&&a.jsx(ne,{size:"sm",icon:a.jsx(Vu,{className:"h-3.5 w-3.5"}),onClick:()=>h(p+1),children:"Next block"})})]}),y===o.blocks.length&&a.jsxs("div",{className:"card mt-6 flex items-center gap-3 border-good/30 p-4",children:[a.jsx(ka,{className:"h-5 w-5 text-good"}),a.jsxs("div",{className:"text-sm",children:["Walk done: ",Math.round(v/o.blocks.length*100),"% of the checks right. Next, try explaining the file in your own words (Teach) or hunt a bug in it."]})]})]})});return a.jsx(Wn,{id:"walk-code",collapsible:!0,side:"right",initial:560,min:320,max:960,className:"h-full",left:j,right:a.jsx(ml,{file:o.file,line:m.startLine,marks:w})})}const MT=["","easy","medium","hard"];function RT(){const{id:e=""}=zr(),{project:t,rel:n}=nt(),r=St(),i=It(),s=Hn(),l=lc(`hunts/${e}`),o=ge({queryKey:["hunt",t.id,e],queryFn:()=>me(`/projects/${t.id}/hunts/${e}`)}),u=o.data,[c,d]=b.useState(null),[h,p]=b.useState(null),f=b.useRef();b.useEffect(()=>{u&&c===null&&d(u.marks)},[u,c]);const g=c??[],x=!!(u!=null&&u.grade),w=k=>{d(k),clearTimeout(f.current),f.current=setTimeout(()=>bh(`/projects/${t.id}/hunts/${e}/marks`,{marks:k}).catch(()=>{}),400)},m=k=>{if(x)return p(k);p(k),g.some(L=>L.line===k)||w([...g,{line:k,why:""}].sort((L,z)=>L.line-z.line))},y=b.useMemo(()=>{if(!u)return[];const k=g.map(L=>({from:L.line,to:L.line,cls:"marked"}));if(u.grade)for(const L of u.planted)L&&k.push({from:L.line,to:L.line,cls:"bug"});return k},[u,g]);if(o.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!u)return a.jsx(At,{title:"Bug hunt not found"});const v=u.grade,j=u.planted.length,C=a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"page",children:[a.jsx(Xu,{back:a.jsx(Ga,{}),badges:a.jsxs(a.Fragment,{children:[a.jsxs(we,{tone:"bad",children:[a.jsx(va,{className:"h-3 w-3"})," bug hunt · ",MT[u.level]]}),a.jsxs("span",{className:"text-xs text-muted",children:[j," bug",j===1?"":"s"," planted · ",qt(u.createdAt)]})]}),title:a.jsx("span",{className:"font-mono text-[20px]",children:n(u.file)}),actions:a.jsx(ne,{variant:"ghost",size:"sm",icon:a.jsx(dr,{className:"h-3.5 w-3.5"}),onClick:()=>l(r),children:"Archive"})}),!v&&a.jsxs("p",{className:"mt-3 text-sm text-muted",children:["The code on the right is a copy with ",j," planted bug",j===1?"":"s",". Click a line you think is wrong, then say what it breaks. Your folder is not touched."]}),v&&a.jsxs("div",{className:"card mt-6 flex flex-wrap items-center gap-4 p-4",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wide text-muted",children:"Score"}),a.jsx("div",{className:"text-3xl",children:a.jsx(Ca,{score:v.score})})]}),a.jsxs("div",{className:"text-sm text-muted",children:[v.found.length," found · ",v.missed.length," missed · ",v.falseAlarms.length," false alarm",v.falseAlarms.length===1?"":"s"]})]}),!v&&a.jsxs("section",{className:"mt-6 space-y-2",children:[a.jsxs("div",{className:"label",children:["Your marks · ",g.length]}),g.map((k,L)=>a.jsxs("div",{className:"card p-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{className:"font-mono text-xs text-accent hover:underline",onClick:()=>p(k.line),children:["line ",k.line]}),a.jsx("button",{className:"ml-auto text-muted hover:text-bad","aria-label":"Remove mark",onClick:()=>w(g.filter(z=>z.line!==k.line)),children:a.jsx(vi,{className:"h-3.5 w-3.5"})})]}),a.jsx("input",{className:"input mt-2",placeholder:"What is wrong, and what does it break?",value:k.why,onChange:z=>w(g.map((A,N)=>N===L?{...A,why:z.target.value}:A))})]},k.line)),!g.length&&a.jsx("p",{className:"rounded-lg border border-dashed border-line p-3 text-[14px] text-muted",children:"No marks yet. Click a line in the code."}),a.jsx(ne,{variant:"primary",className:"mt-2",icon:a.jsx(hl,{className:"h-4 w-4"}),disabled:s.busy||!g.length,onClick:async()=>{clearTimeout(f.current),await bh(`/projects/${t.id}/hunts/${e}/marks`,{marks:g}),s.run(`/projects/${t.id}/hunts/${e}/grade`,{},()=>i.invalidateQueries({queryKey:["hunt",t.id,e]}))},children:"Check my hunt"})]}),v&&a.jsxs(a.Fragment,{children:[v.found.length>0&&a.jsxs("section",{className:"mt-6",children:[a.jsxs("h2",{className:"mb-2 flex items-center gap-1.5 text-sm font-semibold text-good",children:[a.jsx($a,{className:"h-4 w-4"})," Found"]}),v.found.map(k=>a.jsx(bx,{h:u,line:k.line,what:k.what,feedback:k.feedback,onShow:p},k.line))]}),v.missed.length>0&&a.jsxs("section",{className:"mt-6",children:[a.jsxs("h2",{className:"mb-2 flex items-center gap-1.5 text-sm font-semibold text-bad",children:[a.jsx(b1,{className:"h-4 w-4"})," Missed"]}),v.missed.map(k=>a.jsx(bx,{h:u,line:k.line,what:k.what,onShow:p},k.line))]}),v.falseAlarms.length>0&&a.jsxs("section",{className:"mt-6",children:[a.jsxs("h2",{className:"mb-2 flex items-center gap-1.5 text-sm font-semibold text-warn",children:[a.jsx(k1,{className:"h-4 w-4"})," False alarms"]}),v.falseAlarms.map(k=>a.jsxs("div",{className:"card mb-2 p-3 text-[14.5px]",children:[a.jsxs("button",{className:"font-mono text-xs text-accent hover:underline",onClick:()=>p(k.line),children:["line ",k.line]}),a.jsx("div",{className:"mt-1",children:k.feedback||"This line is fine."})]},k.line))]})]}),s.busy&&s.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"huntgrade",elapsed:s.elapsed})}),s.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:s.error,onClose:s.clearError})})]})});return a.jsx(Wn,{id:"hunt-code",collapsible:!0,side:"right",initial:600,min:320,max:1e3,className:"h-full",left:C,right:a.jsx(ml,{file:u.file,text:u.text,title:`${n(u.file)} (copy with bugs)`,line:h,marks:y,onLineClick:m})})}function bx({h:e,line:t,what:n,feedback:r,onShow:i}){const s=e.planted.find(l=>(l==null?void 0:l.line)===t);return a.jsxs("div",{className:"card mb-2 p-3 text-[14.5px]",children:[a.jsxs("button",{className:"font-mono text-xs text-accent hover:underline",onClick:()=>i(t),children:["line ",t]}),s&&a.jsxs("div",{className:"mt-2 overflow-x-auto rounded-md bg-raised font-mono text-[13px]",children:[a.jsxs("div",{className:"whitespace-pre px-2 py-1 text-bad",children:["bug ",s.buggy.trim()]}),a.jsxs("div",{className:"whitespace-pre px-2 py-1 text-good",children:["real ",s.original.trim()]})]}),a.jsx("div",{className:"mt-2",children:n}),r&&a.jsx("div",{className:"mt-1 text-muted",children:r})]})}const zT={lens:"Read a lens",walk:"Walk through",quiz:"Quiz",teachback:"Teach back"};function AT(){var l;const{project:e}=nt(),t=St(),n=Hn(),[r,i]=b.useState(""),s=ge({queryKey:["paths",e.id],queryFn:()=>me(`/projects/${e.id}/paths`)});return a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"page",children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Learning paths"}),a.jsx("p",{className:"text-sm text-muted",children:"An ordered tour of the repo: where to start, what next, and how to check each stop. Stops tick off as you do them."}),a.jsxs("div",{className:"card mt-6 p-5",children:[a.jsx("div",{className:"label",children:"What do you want to be able to do? (optional)"}),a.jsx("input",{className:"input",placeholder:"e.g. change how retries work, or review PRs to the scheduler",value:r,onChange:o=>i(o.target.value)}),a.jsx(ne,{variant:"primary",className:"mt-3",icon:a.jsx(Gf,{className:"h-4 w-4"}),disabled:n.busy,onClick:()=>n.run(`/projects/${e.id}/paths`,{goal:r},o=>t(`/p/${e.id}/paths/${o.resultId}`)),children:"Make a path"}),n.busy&&n.job&&a.jsx("div",{className:"mt-3",children:a.jsx(Vn,{kind:"path",elapsed:n.elapsed})}),n.error&&a.jsx("div",{className:"mt-3",children:a.jsx(tt,{error:n.error,onClose:n.clearError})})]}),a.jsx("div",{className:"mt-6 space-y-2",children:(l=s.data)==null?void 0:l.map(o=>{const u=o.done.filter(Boolean).length;return a.jsxs(Mt,{to:`/p/${e.id}/paths/${o.id}`,className:"card flex items-center gap-3 p-4 transition hover:border-accent/40",children:[a.jsx(Kf,{className:"h-5 w-5 text-good"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"font-medium",children:o.title}),a.jsxs("div",{className:"text-xs text-muted",children:[o.stops.length," stops · ",qt(o.createdAt)]})]}),a.jsx("div",{className:"h-1.5 w-28 overflow-hidden rounded-full bg-line",children:a.jsx("div",{className:"h-full bg-good",style:{width:`${u/o.stops.length*100}%`}})}),a.jsxs("span",{className:"w-10 text-right text-xs tabular-nums text-muted",children:[u,"/",o.stops.length]})]},o.id)})})]})})}function IT(){const{id:e=""}=zr(),{project:t,rel:n,setSelected:r,setOpenFile:i}=nt(),s=St(),l=It(),o=ge({queryKey:["path",t.id,e],queryFn:()=>me(`/projects/${t.id}/paths/${e}`)}),u=pi({mutationFn:f=>qa(`/projects/${t.id}/paths/${e}`,{stops:f}),onSuccess:f=>l.setQueryData(["path",t.id,e],f)});if(o.isLoading)return a.jsx("div",{className:"p-8",children:a.jsx(Nt,{})});if(!o.data)return a.jsx(At,{title:"Path not found"});const c=o.data,d=c.done.findIndex(f=>!f),h=(f,g)=>{const x=[...c.stops],[w]=x.splice(f,1);x.splice(f+g,0,w),u.mutate(x)},p=f=>{r(f.files),i(f.files[0]),s(`/p/${t.id}/explore?do=${f.activity==="teachback"?"teach":f.activity}`)};return a.jsx("div",{className:"h-full overflow-auto",children:a.jsxs("div",{className:"page",children:[a.jsx(Xu,{back:a.jsx(Ga,{to:"paths",label:"Paths"}),badges:a.jsxs(a.Fragment,{children:[a.jsx(we,{tone:"good",children:"path"}),a.jsxs("span",{className:"text-xs text-muted",children:[c.done.filter(Boolean).length,"/",c.stops.length," done · ",qt(c.createdAt)]})]}),title:c.title,actions:a.jsx(ne,{variant:"ghost",size:"sm",icon:a.jsx(dr,{className:"h-3.5 w-3.5"}),onClick:async()=>{await pl(`/projects/${t.id}/paths/${c.id}`),s(`/p/${t.id}/paths`)},children:"Archive"})}),a.jsx("ol",{className:"relative mt-8 space-y-3 border-l-2 border-line pl-6",children:c.stops.map((f,g)=>a.jsxs("li",{className:"relative",children:[a.jsx("span",{className:ae("absolute -left-[35px] top-4 grid h-5 w-5 place-items-center rounded-full bg-bg",c.done[g]?"text-good":g===d?"text-accent":"text-muted"),children:c.done[g]?a.jsx($a,{className:"h-5 w-5"}):a.jsx(Fj,{className:"h-5 w-5"})}),a.jsxs("div",{className:ae("card group p-4",g===d&&"ring-1 ring-accent/40"),children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"text-xs text-muted",children:["Stop ",g+1," · ",zT[f.activity]??f.activity]}),a.jsx("div",{className:"font-medium",children:f.title})]}),a.jsxs("div",{className:"flex gap-0.5 opacity-0 transition group-hover:opacity-100",children:[a.jsx("button",{className:"rounded p-1 text-muted hover:bg-raised hover:text-ink disabled:opacity-30",disabled:g===0,onClick:()=>h(g,-1),"aria-label":"Move up",children:a.jsx(v1,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"rounded p-1 text-muted hover:bg-raised hover:text-ink disabled:opacity-30",disabled:g===c.stops.length-1,onClick:()=>h(g,1),"aria-label":"Move down",children:a.jsx(zj,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"rounded p-1 text-muted hover:bg-raised hover:text-bad",onClick:()=>u.mutate(c.stops.filter((x,w)=>w!==g)),"aria-label":"Remove stop",children:a.jsx(vi,{className:"h-3.5 w-3.5"})})]})]}),a.jsx("p",{className:"mt-1 text-[14.5px] text-muted",children:f.why}),a.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[f.files.map(x=>a.jsx("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[12px]",children:n(x)},x)),a.jsx(ne,{size:"sm",variant:g===d?"primary":"secondary",className:"ml-auto",onClick:()=>p(f),children:c.done[g]?"Again":"Do this stop"})]})]})]},`${g}-${f.title}`))})]})})}const FT=b.lazy(()=>Pu(()=>import("./Map-CWWYq8VB.js"),[]).then(e=>({default:e.MapPage}))),DT=b.lazy(()=>Pu(()=>import("./Practice-BrxN0TfX.js").then(e=>e.K),[]).then(e=>({default:e.PracticePage})));Gx();const OT=new vj({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function _T(){return a.jsx(At,{title:"Project not found",action:a.jsx(ne,{onClick:()=>location.href="/",children:"Back to projects"}),children:"It may have been removed from the list. Open its folder again."})}function $T(){const{pid:e=""}=zr();return a.jsx(eS,{pid:e,fallback:a.jsx(_T,{}),children:a.jsx(J1,{})},e)}const BT=EN([{element:a.jsx(ZN,{}),children:[{path:"/",element:a.jsx(nS,{})},{path:"/settings",element:a.jsx(bT,{})},{path:"/help",element:a.jsx(HN,{})},{path:"/p/:pid",element:a.jsx($T,{}),children:[{index:!0,element:a.jsx(yN,{to:"today",replace:!0})},{path:"today",element:a.jsx(jT,{})},{path:"explore",element:a.jsx(pS,{})},{path:"review",element:a.jsx(ST,{})},{path:"map",element:a.jsx(b.Suspense,{fallback:null,children:a.jsx(FT,{})})},{path:"paths",element:a.jsx(AT,{})},{path:"paths/:id",element:a.jsx(IT,{})},{path:"teach/:id",element:a.jsx(ET,{})},{path:"tutor/:id",element:a.jsx(TT,{})},{path:"walk/:id",element:a.jsx(LT,{})},{path:"hunt/:id",element:a.jsx(RT,{})},{path:"changes",element:a.jsx(kS,{})},{path:"library",element:a.jsx(jS,{})},{path:"progress",element:a.jsx(xT,{})},{path:"lens/:id",element:a.jsx(uT,{})},{path:"quiz/:id",element:a.jsx(mT,{})},{path:"practice/:id",element:a.jsx(b.Suspense,{fallback:null,children:a.jsx(DT,{})})}]},{path:"*",element:a.jsx(At,{title:"Page not found"})}]}]);Xv(document.getElementById("root")).render(a.jsx(b.StrictMode,{children:a.jsx(Sj,{client:OT,children:a.jsx(IN,{router:BT})})}));export{qf as A,we as B,Vf as C,il as D,At as E,ip as F,bh as G,TS as H,lp as I,Vn as J,_S as K,Mt as L,z1 as M,FS as N,NS as O,$S as P,hx as Q,F1 as R,Nt as S,dr as T,t0 as V,Pu as _,St as a,ge as b,qT as c,Wn as d,me as e,G as f,$h as g,zr as h,It as i,a as j,Xw as k,Hn as l,Va as m,qt as n,Qf as o,ae as p,tt as q,b as r,Ea as s,vS as t,nt as u,ne as v,D1 as w,S1 as x,pl as y,L1 as z};
|