mastra 0.2.0-alpha.159 → 0.2.0-alpha.161
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/dist/analytics/index.d.ts +32 -0
- package/dist/analytics/index.js +1 -0
- package/dist/chunk-K5HPNH5H.js +170 -0
- package/dist/chunk-UU6XEV7T.js +672 -0
- package/dist/commands/create/create.d.ts +10 -0
- package/dist/commands/create/create.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +381 -0
- package/dist/starter-files/config.ts +28 -0
- package/dist/starter-files/mastra-pg.docker-compose.yaml +15 -0
- package/dist/starter-files/tools.ts +95 -0
- package/dist/starter-files/workflow.ts +182 -0
- package/dist/templates/dev.entry.js +42 -0
- package/package.json +3 -3
- package/src/playground/dist/assets/abap-DsBKuouk.js +1 -0
- package/src/playground/dist/assets/actionscript-3-D_z4Izcz.js +1 -0
- package/src/playground/dist/assets/ada-727ZlQH0.js +1 -0
- package/src/playground/dist/assets/andromeeda-C3khCPGq.js +1 -0
- package/src/playground/dist/assets/angular-html-LfdN0zeE.js +1 -0
- package/src/playground/dist/assets/angular-ts-CKsD7JZE.js +1 -0
- package/src/playground/dist/assets/apache-Dn00JSTd.js +1 -0
- package/src/playground/dist/assets/apex-COJ4H7py.js +1 -0
- package/src/playground/dist/assets/apl-BBq3IX1j.js +1 -0
- package/src/playground/dist/assets/applescript-Bu5BbsvL.js +1 -0
- package/src/playground/dist/assets/ara-7O62HKoU.js +1 -0
- package/src/playground/dist/assets/asciidoc-BPT9niGB.js +1 -0
- package/src/playground/dist/assets/asm-Dhn9LcZ4.js +1 -0
- package/src/playground/dist/assets/astro-CqkE3fuf.js +1 -0
- package/src/playground/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/src/playground/dist/assets/awk-eg146-Ew.js +1 -0
- package/src/playground/dist/assets/ayu-dark-Cv9koXgw.js +1 -0
- package/src/playground/dist/assets/ballerina-Du268qiB.js +1 -0
- package/src/playground/dist/assets/bat-fje9CFhw.js +1 -0
- package/src/playground/dist/assets/beancount-BwXTMy5W.js +1 -0
- package/src/playground/dist/assets/berry-3xVqZejG.js +1 -0
- package/src/playground/dist/assets/bibtex-xW4inM5L.js +1 -0
- package/src/playground/dist/assets/bicep-DHo0CJ0O.js +1 -0
- package/src/playground/dist/assets/blade-a8OxSdnT.js +1 -0
- package/src/playground/dist/assets/bsl-Dgyn0ogV.js +1 -0
- package/src/playground/dist/assets/c-C3t2pwGQ.js +1 -0
- package/src/playground/dist/assets/cadence-DNquZEk8.js +1 -0
- package/src/playground/dist/assets/cairo--RitsXJZ.js +1 -0
- package/src/playground/dist/assets/catppuccin-frappe-CD_QflpE.js +1 -0
- package/src/playground/dist/assets/catppuccin-latte-DRW-0cLl.js +1 -0
- package/src/playground/dist/assets/catppuccin-macchiato-C-_shW-Y.js +1 -0
- package/src/playground/dist/assets/catppuccin-mocha-LGGdnPYs.js +1 -0
- package/src/playground/dist/assets/clarity-BHOwM8T6.js +1 -0
- package/src/playground/dist/assets/clojure-DxSadP1t.js +1 -0
- package/src/playground/dist/assets/cmake-DbXoA79R.js +1 -0
- package/src/playground/dist/assets/cobol-PTqiYgYu.js +1 -0
- package/src/playground/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/src/playground/dist/assets/codeql-sacFqUAJ.js +1 -0
- package/src/playground/dist/assets/coffee-dyiR41kL.js +1 -0
- package/src/playground/dist/assets/common-lisp-C7gG9l05.js +1 -0
- package/src/playground/dist/assets/coq-Dsg_Bt_b.js +1 -0
- package/src/playground/dist/assets/cpp-BksuvNSY.js +1 -0
- package/src/playground/dist/assets/crystal-DtDmRg-F.js +1 -0
- package/src/playground/dist/assets/csharp-D9R-vmeu.js +1 -0
- package/src/playground/dist/assets/css-BPhBrDlE.js +1 -0
- package/src/playground/dist/assets/csv-B0qRVHPH.js +1 -0
- package/src/playground/dist/assets/cue-DtFQj3wx.js +1 -0
- package/src/playground/dist/assets/cypher-m2LEI-9-.js +1 -0
- package/src/playground/dist/assets/d-BoXegm-a.js +1 -0
- package/src/playground/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/src/playground/dist/assets/dart-B9wLZaAG.js +1 -0
- package/src/playground/dist/assets/dax-ClGRhx96.js +1 -0
- package/src/playground/dist/assets/desktop-DEIpsLCJ.js +1 -0
- package/src/playground/dist/assets/diff-BgYniUM_.js +1 -0
- package/src/playground/dist/assets/docker-COcR7UxN.js +1 -0
- package/src/playground/dist/assets/dotenv-BjQB5zDj.js +1 -0
- package/src/playground/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/src/playground/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/src/playground/dist/assets/dream-maker-C-nORZOA.js +1 -0
- package/src/playground/dist/assets/edge-D5gP-w-T.js +1 -0
- package/src/playground/dist/assets/elixir-CLiX3zqd.js +1 -0
- package/src/playground/dist/assets/elm-CmHSxxaM.js +1 -0
- package/src/playground/dist/assets/emacs-lisp-BX77sIaO.js +1 -0
- package/src/playground/dist/assets/erb-BYTLMnw6.js +1 -0
- package/src/playground/dist/assets/erlang-B-DoSBHF.js +1 -0
- package/src/playground/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/src/playground/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/src/playground/dist/assets/fennel-bCA53EVm.js +1 -0
- package/src/playground/dist/assets/fish-w-ucz2PV.js +1 -0
- package/src/playground/dist/assets/fluent-Dayu4EKP.js +1 -0
- package/src/playground/dist/assets/fortran-fixed-form-TqA4NnZg.js +1 -0
- package/src/playground/dist/assets/fortran-free-form-DKXYxT9g.js +1 -0
- package/src/playground/dist/assets/fsharp-XplgxFYe.js +1 -0
- package/src/playground/dist/assets/gdresource-BHYsBjWJ.js +1 -0
- package/src/playground/dist/assets/gdscript-DfxzS6Rs.js +1 -0
- package/src/playground/dist/assets/gdshader-SKMF96pI.js +1 -0
- package/src/playground/dist/assets/genie-ajMbGru0.js +1 -0
- package/src/playground/dist/assets/gherkin--30QC5Em.js +1 -0
- package/src/playground/dist/assets/git-commit-i4q6IMui.js +1 -0
- package/src/playground/dist/assets/git-rebase-B-v9cOL2.js +1 -0
- package/src/playground/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/src/playground/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/src/playground/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/src/playground/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/src/playground/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/src/playground/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/src/playground/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/src/playground/dist/assets/gleam-B430Bg39.js +1 -0
- package/src/playground/dist/assets/glimmer-js-D-cwc0-E.js +1 -0
- package/src/playground/dist/assets/glimmer-ts-pgjy16dm.js +1 -0
- package/src/playground/dist/assets/glsl-DBO2IWDn.js +1 -0
- package/src/playground/dist/assets/gnuplot-CM8KxXT1.js +1 -0
- package/src/playground/dist/assets/go-B1SYOhNW.js +1 -0
- package/src/playground/dist/assets/graphql-cDcHW_If.js +1 -0
- package/src/playground/dist/assets/groovy-DkBy-JyN.js +1 -0
- package/src/playground/dist/assets/hack-D1yCygmZ.js +1 -0
- package/src/playground/dist/assets/haml-B2EZWmdv.js +1 -0
- package/src/playground/dist/assets/handlebars-BQGss363.js +1 -0
- package/src/playground/dist/assets/haskell-BILxekzW.js +1 -0
- package/src/playground/dist/assets/haxe-C5wWYbrZ.js +1 -0
- package/src/playground/dist/assets/hcl-HzYwdGDm.js +1 -0
- package/src/playground/dist/assets/hjson-T-Tgc4AT.js +1 -0
- package/src/playground/dist/assets/hlsl-ifBTmRxC.js +1 -0
- package/src/playground/dist/assets/houston-DnULxvSX.js +1 -0
- package/src/playground/dist/assets/html-C2L_23MC.js +1 -0
- package/src/playground/dist/assets/html-derivative-CSfWNPLT.js +1 -0
- package/src/playground/dist/assets/http-FRrOvY1W.js +1 -0
- package/src/playground/dist/assets/hxml-TIA70rKU.js +1 -0
- package/src/playground/dist/assets/hy-BMj5Y0dO.js +1 -0
- package/src/playground/dist/assets/imba-bv_oIlVt.js +1 -0
- package/src/playground/dist/assets/index-CpguR2jr.js +400 -0
- package/src/playground/dist/assets/index-M9glaXJD.js +13 -0
- package/src/playground/dist/assets/ini-BjABl1g7.js +1 -0
- package/src/playground/dist/assets/java-xI-RfyKK.js +1 -0
- package/src/playground/dist/assets/javascript-ySlJ1b_l.js +1 -0
- package/src/playground/dist/assets/jinja-DGy0s7-h.js +1 -0
- package/src/playground/dist/assets/jison-BqZprYcd.js +1 -0
- package/src/playground/dist/assets/json-BQoSv7ci.js +1 -0
- package/src/playground/dist/assets/json5-w8dY5SsB.js +1 -0
- package/src/playground/dist/assets/jsonc-TU54ms6u.js +1 -0
- package/src/playground/dist/assets/jsonl-DREVFZK8.js +1 -0
- package/src/playground/dist/assets/jsonnet-BfivnA6A.js +1 -0
- package/src/playground/dist/assets/jssm-P4WzXJd0.js +1 -0
- package/src/playground/dist/assets/jsx-BAng5TT0.js +1 -0
- package/src/playground/dist/assets/julia-BBuGR-5E.js +1 -0
- package/src/playground/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/src/playground/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/src/playground/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/src/playground/dist/assets/kotlin-B5lbUyaz.js +1 -0
- package/src/playground/dist/assets/kusto-mebxcVVE.js +1 -0
- package/src/playground/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/src/playground/dist/assets/latex-C-cWTeAZ.js +1 -0
- package/src/playground/dist/assets/lean-XBlWyCtg.js +1 -0
- package/src/playground/dist/assets/less-BfCpw3nA.js +1 -0
- package/src/playground/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/src/playground/dist/assets/liquid-D3W5UaiH.js +1 -0
- package/src/playground/dist/assets/log-Cc5clBb7.js +1 -0
- package/src/playground/dist/assets/logo-IuBKFhSY.js +1 -0
- package/src/playground/dist/assets/lua-CvWAzNxB.js +1 -0
- package/src/playground/dist/assets/luau-Du5NY7AG.js +1 -0
- package/src/playground/dist/assets/make-Bvotw-X0.js +1 -0
- package/src/playground/dist/assets/markdown-UIAJJxZW.js +1 -0
- package/src/playground/dist/assets/marko-z0MBrx5-.js +1 -0
- package/src/playground/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/src/playground/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/src/playground/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/src/playground/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/src/playground/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/src/playground/dist/assets/matlab-D9-PGadD.js +1 -0
- package/src/playground/dist/assets/mdc-DB_EDNY_.js +1 -0
- package/src/playground/dist/assets/mdx-sdHcTMYB.js +1 -0
- package/src/playground/dist/assets/mermaid-Ci6OQyBP.js +1 -0
- package/src/playground/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/src/playground/dist/assets/min-light-CTRr51gU.js +1 -0
- package/src/playground/dist/assets/mipsasm-BC5c_5Pe.js +1 -0
- package/src/playground/dist/assets/mojo-Tz6hzZYG.js +1 -0
- package/src/playground/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/src/playground/dist/assets/move-DB_GagMm.js +1 -0
- package/src/playground/dist/assets/narrat-DLbgOhZU.js +1 -0
- package/src/playground/dist/assets/nextflow-B0XVJmRM.js +1 -0
- package/src/playground/dist/assets/nginx-D_VnBJ67.js +1 -0
- package/src/playground/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/src/playground/dist/assets/nim-ZlGxZxc3.js +1 -0
- package/src/playground/dist/assets/nix-shcSOmrb.js +1 -0
- package/src/playground/dist/assets/nord-Ddv68eIx.js +1 -0
- package/src/playground/dist/assets/nushell-D4Tzg5kh.js +1 -0
- package/src/playground/dist/assets/objective-c-Deuh7S70.js +1 -0
- package/src/playground/dist/assets/objective-cpp-BUEGK8hf.js +1 -0
- package/src/playground/dist/assets/ocaml-BNioltXt.js +1 -0
- package/src/playground/dist/assets/one-dark-pro-GBQ2dnAY.js +1 -0
- package/src/playground/dist/assets/one-light-PoHY5YXO.js +1 -0
- package/src/playground/dist/assets/pascal-JqZropPD.js +1 -0
- package/src/playground/dist/assets/perl-CHQXSrWU.js +1 -0
- package/src/playground/dist/assets/php-B5ebYQev.js +1 -0
- package/src/playground/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/src/playground/dist/assets/plsql-LKU2TuZ1.js +1 -0
- package/src/playground/dist/assets/po-BFLt1xDp.js +1 -0
- package/src/playground/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/src/playground/dist/assets/polar-DKykz6zU.js +1 -0
- package/src/playground/dist/assets/postcss-B3ZDOciz.js +1 -0
- package/src/playground/dist/assets/powerquery-CSHBycmS.js +1 -0
- package/src/playground/dist/assets/powershell-BIEUsx6d.js +1 -0
- package/src/playground/dist/assets/prisma-B48N-Iqd.js +1 -0
- package/src/playground/dist/assets/prolog-BY-TUvya.js +1 -0
- package/src/playground/dist/assets/proto-zocC4JxJ.js +1 -0
- package/src/playground/dist/assets/pug-CM9l7STV.js +1 -0
- package/src/playground/dist/assets/puppet-Cza_XSSt.js +1 -0
- package/src/playground/dist/assets/purescript-Bg-kzb6g.js +1 -0
- package/src/playground/dist/assets/python-DhUJRlN_.js +1 -0
- package/src/playground/dist/assets/qml-D8XfuvdV.js +1 -0
- package/src/playground/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/src/playground/dist/assets/qss-DhMKtDLN.js +1 -0
- package/src/playground/dist/assets/r-CwjWoCRV.js +1 -0
- package/src/playground/dist/assets/racket-CzouJOBO.js +1 -0
- package/src/playground/dist/assets/raku-B1bQXN8T.js +1 -0
- package/src/playground/dist/assets/razor-CNLDkMZG.js +1 -0
- package/src/playground/dist/assets/red-bN70gL4F.js +1 -0
- package/src/playground/dist/assets/reg-5LuOXUq_.js +1 -0
- package/src/playground/dist/assets/regexp-DWJ3fJO_.js +1 -0
- package/src/playground/dist/assets/rel-DJlmqQ1C.js +1 -0
- package/src/playground/dist/assets/riscv-QhoSD0DR.js +1 -0
- package/src/playground/dist/assets/rose-pine-CmCqftbK.js +1 -0
- package/src/playground/dist/assets/rose-pine-dawn-Ds-gbosJ.js +1 -0
- package/src/playground/dist/assets/rose-pine-moon-CjDtw9vr.js +1 -0
- package/src/playground/dist/assets/rst-4NLicBqY.js +1 -0
- package/src/playground/dist/assets/ruby-DeZ3UC14.js +1 -0
- package/src/playground/dist/assets/rust-Be6lgOlo.js +1 -0
- package/src/playground/dist/assets/sas-BmTFh92c.js +1 -0
- package/src/playground/dist/assets/sass-BJ4Li9vH.js +1 -0
- package/src/playground/dist/assets/scala-DQVVAn-B.js +1 -0
- package/src/playground/dist/assets/scheme-BJGe-b2p.js +1 -0
- package/src/playground/dist/assets/scss-C31hgJw-.js +1 -0
- package/src/playground/dist/assets/sdbl-BLhTXw86.js +1 -0
- package/src/playground/dist/assets/shaderlab-B7qAK45m.js +1 -0
- package/src/playground/dist/assets/shellscript-atvbtKCR.js +1 -0
- package/src/playground/dist/assets/shellsession-C_rIy8kc.js +1 -0
- package/src/playground/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/src/playground/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/src/playground/dist/assets/smalltalk-DkLiglaE.js +1 -0
- package/src/playground/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/src/playground/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/src/playground/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/src/playground/dist/assets/solidity-C1w2a3ep.js +1 -0
- package/src/playground/dist/assets/soy-C-lX7w71.js +1 -0
- package/src/playground/dist/assets/sparql-bYkjHRlG.js +1 -0
- package/src/playground/dist/assets/splunk-Cf8iN4DR.js +1 -0
- package/src/playground/dist/assets/sql-COK4E0Yg.js +1 -0
- package/src/playground/dist/assets/ssh-config-BknIz3MU.js +1 -0
- package/src/playground/dist/assets/stata-DorPZHa4.js +1 -0
- package/src/playground/dist/assets/style-_--6WeqI.css +1 -0
- package/src/playground/dist/assets/stylus-BeQkCIfX.js +1 -0
- package/src/playground/dist/assets/svelte-MSaWC3Je.js +1 -0
- package/src/playground/dist/assets/swift-BSxZ-RaX.js +1 -0
- package/src/playground/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/src/playground/dist/assets/system-verilog-C7L56vO4.js +1 -0
- package/src/playground/dist/assets/systemd-CUnW07Te.js +1 -0
- package/src/playground/dist/assets/talonscript-C1XDQQGZ.js +1 -0
- package/src/playground/dist/assets/tasl-CQjiPCtT.js +1 -0
- package/src/playground/dist/assets/tcl-DQ1-QYvQ.js +1 -0
- package/src/playground/dist/assets/templ-dwX3ZSMB.js +1 -0
- package/src/playground/dist/assets/terraform-BbSNqyBO.js +1 -0
- package/src/playground/dist/assets/tex-rYs2v40G.js +1 -0
- package/src/playground/dist/assets/tokyo-night-DBQeEorK.js +1 -0
- package/src/playground/dist/assets/toml-CB2ApiWb.js +1 -0
- package/src/playground/dist/assets/ts-tags-CipyTH0X.js +1 -0
- package/src/playground/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/src/playground/dist/assets/tsx-B6W0miNI.js +1 -0
- package/src/playground/dist/assets/turtle-BMR_PYu6.js +1 -0
- package/src/playground/dist/assets/twig-NC5TFiHP.js +1 -0
- package/src/playground/dist/assets/typescript-Dj6nwHGl.js +1 -0
- package/src/playground/dist/assets/typespec-BpWG_bgh.js +1 -0
- package/src/playground/dist/assets/typst-BVUVsWT6.js +1 -0
- package/src/playground/dist/assets/v-CAQ2eGtk.js +1 -0
- package/src/playground/dist/assets/vala-BFOHcciG.js +1 -0
- package/src/playground/dist/assets/vb-CdO5JTpU.js +1 -0
- package/src/playground/dist/assets/verilog-CJaU5se_.js +1 -0
- package/src/playground/dist/assets/vesper-BEBZ7ncR.js +1 -0
- package/src/playground/dist/assets/vhdl-DYoNaHQp.js +1 -0
- package/src/playground/dist/assets/viml-m4uW47V2.js +1 -0
- package/src/playground/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/src/playground/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/src/playground/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/src/playground/dist/assets/vue-BuYVFjOK.js +1 -0
- package/src/playground/dist/assets/vue-html-xdeiXROB.js +1 -0
- package/src/playground/dist/assets/vyper-nyqBNV6O.js +1 -0
- package/src/playground/dist/assets/wasm-C6j12Q_x.js +1 -0
- package/src/playground/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/src/playground/dist/assets/wenyan-7A4Fjokl.js +1 -0
- package/src/playground/dist/assets/wgsl-CB0Krxn9.js +1 -0
- package/src/playground/dist/assets/wikitext-DCE3LsBG.js +1 -0
- package/src/playground/dist/assets/wolfram-C3FkfJm5.js +1 -0
- package/src/playground/dist/assets/xml-e3z08dGr.js +1 -0
- package/src/playground/dist/assets/xsl-Dd0NUgwM.js +1 -0
- package/src/playground/dist/assets/yaml-CVw76BM1.js +1 -0
- package/src/playground/dist/assets/zenscript-HnGAYVZD.js +1 -0
- package/src/playground/dist/assets/zig-BVz_zdnA.js +1 -0
- package/src/playground/dist/index.html +36 -0
- package/src/playground/dist/vite.svg +1 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
var uz=Object.defineProperty;var cz=(e,t,n)=>t in e?uz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var cn=(e,t,n)=>cz(e,typeof t!="symbol"?t+"":t,n);function dz(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 o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function tu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rx={exports:{}},ec={},ix={exports:{}},ft={};/**
|
|
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 lC;function fz(){if(lC)return ft;lC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function p(H){return H===null||typeof H!="object"?null:(H=h&&H[h]||H["@@iterator"],typeof H=="function"?H:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function k(H,V,D){this.props=H,this.context=V,this.refs=v,this.updater=D||m}k.prototype.isReactComponent={},k.prototype.setState=function(H,V){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,V,"setState")},k.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function b(){}b.prototype=k.prototype;function E(H,V,D){this.props=H,this.context=V,this.refs=v,this.updater=D||m}var C=E.prototype=new b;C.constructor=E,x(C,k.prototype),C.isPureReactComponent=!0;var N=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function R(H,V,D){var G,K={},J=null,ee=null;if(V!=null)for(G in V.ref!==void 0&&(ee=V.ref),V.key!==void 0&&(J=""+V.key),V)P.call(V,G)&&!j.hasOwnProperty(G)&&(K[G]=V[G]);var ie=arguments.length-2;if(ie===1)K.children=D;else if(1<ie){for(var ce=Array(ie),he=0;he<ie;he++)ce[he]=arguments[he+2];K.children=ce}if(H&&H.defaultProps)for(G in ie=H.defaultProps,ie)K[G]===void 0&&(K[G]=ie[G]);return{$$typeof:e,type:H,key:J,ref:ee,props:K,_owner:T.current}}function I(H,V){return{$$typeof:e,type:H.type,key:V,ref:H.ref,props:H.props,_owner:H._owner}}function M(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function z(H){var V={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(D){return V[D]})}var F=/\/+/g;function Y(H,V){return typeof H=="object"&&H!==null&&H.key!=null?z(""+H.key):V.toString(36)}function O(H,V,D,G,K){var J=typeof H;(J==="undefined"||J==="boolean")&&(H=null);var ee=!1;if(H===null)ee=!0;else switch(J){case"string":case"number":ee=!0;break;case"object":switch(H.$$typeof){case e:case t:ee=!0}}if(ee)return ee=H,K=K(ee),H=G===""?"."+Y(ee,0):G,N(K)?(D="",H!=null&&(D=H.replace(F,"$&/")+"/"),O(K,V,D,"",function(he){return he})):K!=null&&(M(K)&&(K=I(K,D+(!K.key||ee&&ee.key===K.key?"":(""+K.key).replace(F,"$&/")+"/")+H)),V.push(K)),1;if(ee=0,G=G===""?".":G+":",N(H))for(var ie=0;ie<H.length;ie++){J=H[ie];var ce=G+Y(J,ie);ee+=O(J,V,D,ce,K)}else if(ce=p(H),typeof ce=="function")for(H=ce.call(H),ie=0;!(J=H.next()).done;)J=J.value,ce=G+Y(J,ie++),ee+=O(J,V,D,ce,K);else if(J==="object")throw V=String(H),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return ee}function q(H,V,D){if(H==null)return H;var G=[],K=0;return O(H,G,"","",function(J){return V.call(D,J,K++)}),G}function W(H){if(H._status===-1){var V=H._result;V=V(),V.then(function(D){(H._status===0||H._status===-1)&&(H._status=1,H._result=D)},function(D){(H._status===0||H._status===-1)&&(H._status=2,H._result=D)}),H._status===-1&&(H._status=0,H._result=V)}if(H._status===1)return H._result.default;throw H._result}var Z={current:null},U={transition:null},B={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:U,ReactCurrentOwner:T};function L(){throw Error("act(...) is not supported in production builds of React.")}return ft.Children={map:q,forEach:function(H,V,D){q(H,function(){V.apply(this,arguments)},D)},count:function(H){var V=0;return q(H,function(){V++}),V},toArray:function(H){return q(H,function(V){return V})||[]},only:function(H){if(!M(H))throw Error("React.Children.only expected to receive a single React element child.");return H}},ft.Component=k,ft.Fragment=n,ft.Profiler=i,ft.PureComponent=E,ft.StrictMode=r,ft.Suspense=u,ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,ft.act=L,ft.cloneElement=function(H,V,D){if(H==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+H+".");var G=x({},H.props),K=H.key,J=H.ref,ee=H._owner;if(V!=null){if(V.ref!==void 0&&(J=V.ref,ee=T.current),V.key!==void 0&&(K=""+V.key),H.type&&H.type.defaultProps)var ie=H.type.defaultProps;for(ce in V)P.call(V,ce)&&!j.hasOwnProperty(ce)&&(G[ce]=V[ce]===void 0&&ie!==void 0?ie[ce]:V[ce])}var ce=arguments.length-2;if(ce===1)G.children=D;else if(1<ce){ie=Array(ce);for(var he=0;he<ce;he++)ie[he]=arguments[he+2];G.children=ie}return{$$typeof:e,type:H.type,key:K,ref:J,props:G,_owner:ee}},ft.createContext=function(H){return H={$$typeof:s,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},H.Provider={$$typeof:o,_context:H},H.Consumer=H},ft.createElement=R,ft.createFactory=function(H){var V=R.bind(null,H);return V.type=H,V},ft.createRef=function(){return{current:null}},ft.forwardRef=function(H){return{$$typeof:a,render:H}},ft.isValidElement=M,ft.lazy=function(H){return{$$typeof:f,_payload:{_status:-1,_result:H},_init:W}},ft.memo=function(H,V){return{$$typeof:c,type:H,compare:V===void 0?null:V}},ft.startTransition=function(H){var V=U.transition;U.transition={};try{H()}finally{U.transition=V}},ft.unstable_act=L,ft.useCallback=function(H,V){return Z.current.useCallback(H,V)},ft.useContext=function(H){return Z.current.useContext(H)},ft.useDebugValue=function(){},ft.useDeferredValue=function(H){return Z.current.useDeferredValue(H)},ft.useEffect=function(H,V){return Z.current.useEffect(H,V)},ft.useId=function(){return Z.current.useId()},ft.useImperativeHandle=function(H,V,D){return Z.current.useImperativeHandle(H,V,D)},ft.useInsertionEffect=function(H,V){return Z.current.useInsertionEffect(H,V)},ft.useLayoutEffect=function(H,V){return Z.current.useLayoutEffect(H,V)},ft.useMemo=function(H,V){return Z.current.useMemo(H,V)},ft.useReducer=function(H,V,D){return Z.current.useReducer(H,V,D)},ft.useRef=function(H){return Z.current.useRef(H)},ft.useState=function(H){return Z.current.useState(H)},ft.useSyncExternalStore=function(H,V,D){return Z.current.useSyncExternalStore(H,V,D)},ft.useTransition=function(){return Z.current.useTransition()},ft.version="18.3.1",ft}var uC;function nu(){return uC||(uC=1,ix.exports=fz()),ix.exports}/**
|
|
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 cC;function hz(){if(cC)return ec;cC=1;var e=nu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,u,c){var f,h={},p=null,m=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(m=u.ref);for(f in u)r.call(u,f)&&!o.hasOwnProperty(f)&&(h[f]=u[f]);if(a&&a.defaultProps)for(f in u=a.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:t,type:a,key:p,ref:m,props:h,_owner:i.current}}return ec.Fragment=n,ec.jsx=s,ec.jsxs=s,ec}var dC;function pz(){return dC||(dC=1,rx.exports=hz()),rx.exports}var y=pz(),S=nu();const ne=tu(S),mz=dz({__proto__:null,default:ne},[S]);var kh={},ox={exports:{}},mr={},sx={exports:{}},ax={};/**
|
|
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
|
+
*/var fC;function gz(){return fC||(fC=1,function(e){function t(U,B){var L=U.length;U.push(B);e:for(;0<L;){var H=L-1>>>1,V=U[H];if(0<i(V,B))U[H]=B,U[L]=V,L=H;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var B=U[0],L=U.pop();if(L!==B){U[0]=L;e:for(var H=0,V=U.length,D=V>>>1;H<D;){var G=2*(H+1)-1,K=U[G],J=G+1,ee=U[J];if(0>i(K,L))J<V&&0>i(ee,K)?(U[H]=ee,U[J]=L,H=J):(U[H]=K,U[G]=L,H=G);else if(J<V&&0>i(ee,L))U[H]=ee,U[J]=L,H=J;else break e}}return B}function i(U,B){var L=U.sortIndex-B.sortIndex;return L!==0?L:U.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],f=1,h=null,p=3,m=!1,x=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(U){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=U)r(c),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(c)}}function N(U){if(v=!1,C(U),!x)if(n(u)!==null)x=!0,W(P);else{var B=n(c);B!==null&&Z(N,B.startTime-U)}}function P(U,B){x=!1,v&&(v=!1,b(R),R=-1),m=!0;var L=p;try{for(C(B),h=n(u);h!==null&&(!(h.expirationTime>B)||U&&!z());){var H=h.callback;if(typeof H=="function"){h.callback=null,p=h.priorityLevel;var V=H(h.expirationTime<=B);B=e.unstable_now(),typeof V=="function"?h.callback=V:h===n(u)&&r(u),C(B)}else r(u);h=n(u)}if(h!==null)var D=!0;else{var G=n(c);G!==null&&Z(N,G.startTime-B),D=!1}return D}finally{h=null,p=L,m=!1}}var T=!1,j=null,R=-1,I=5,M=-1;function z(){return!(e.unstable_now()-M<I)}function F(){if(j!==null){var U=e.unstable_now();M=U;var B=!0;try{B=j(!0,U)}finally{B?Y():(T=!1,j=null)}}else T=!1}var Y;if(typeof E=="function")Y=function(){E(F)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,q=O.port2;O.port1.onmessage=F,Y=function(){q.postMessage(null)}}else Y=function(){k(F,0)};function W(U){j=U,T||(T=!0,Y())}function Z(U,B){R=k(function(){U(e.unstable_now())},B)}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(U){U.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,W(P))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(U){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var L=p;p=B;try{return U()}finally{p=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,B){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var L=p;p=U;try{return B()}finally{p=L}},e.unstable_scheduleCallback=function(U,B,L){var H=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?H+L:H):L=H,U){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=L+V,U={id:f++,callback:B,priorityLevel:U,startTime:L,expirationTime:V,sortIndex:-1},L>H?(U.sortIndex=L,t(c,U),n(u)===null&&U===n(c)&&(v?(b(R),R=-1):v=!0,Z(N,L-H))):(U.sortIndex=V,t(u,U),x||m||(x=!0,W(P))),U},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(U){var B=p;return function(){var L=p;p=B;try{return U.apply(this,arguments)}finally{p=L}}}}(ax)),ax}var hC;function yz(){return hC||(hC=1,sx.exports=gz()),sx.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 pC;function xz(){if(pC)return mr;pC=1;var e=nu(),t=yz();function n(l){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(l,d){s(l,d),s(l+"Capture",d)}function s(l,d){for(i[l]=d,l=0;l<d.length;l++)r.add(d[l])}var a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,f={},h={};function p(l){return u.call(h,l)?!0:u.call(f,l)?!1:c.test(l)?h[l]=!0:(f[l]=!0,!1)}function m(l,d,g,w){if(g!==null&&g.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return w?!1:g!==null?!g.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function x(l,d,g,w){if(d===null||typeof d>"u"||m(l,d,g,w))return!0;if(w)return!1;if(g!==null)switch(g.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function v(l,d,g,w,_,A,$){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=w,this.attributeNamespace=_,this.mustUseProperty=g,this.propertyName=l,this.type=d,this.sanitizeURL=A,this.removeEmptyString=$}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){k[l]=new v(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var d=l[0];k[d]=new v(d,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){k[l]=new v(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){k[l]=new v(l,2,!1,l,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(l){k[l]=new v(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){k[l]=new v(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){k[l]=new v(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){k[l]=new v(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){k[l]=new v(l,5,!1,l.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function E(l){return l[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(l){var d=l.replace(b,E);k[d]=new v(d,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var d=l.replace(b,E);k[d]=new v(d,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var d=l.replace(b,E);k[d]=new v(d,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){k[l]=new v(l,1,!1,l.toLowerCase(),null,!1,!1)}),k.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){k[l]=new v(l,1,!1,l.toLowerCase(),null,!0,!0)});function C(l,d,g,w){var _=k.hasOwnProperty(d)?k[d]:null;(_!==null?_.type!==0:w||!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(x(d,g,_,w)&&(g=null),w||_===null?p(d)&&(g===null?l.removeAttribute(d):l.setAttribute(d,""+g)):_.mustUseProperty?l[_.propertyName]=g===null?_.type===3?!1:"":g:(d=_.attributeName,w=_.attributeNamespace,g===null?l.removeAttribute(d):(_=_.type,g=_===3||_===4&&g===!0?"":""+g,w?l.setAttributeNS(w,d,g):l.setAttribute(d,g))))}var N=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),T=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),z=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),U=Symbol.iterator;function B(l){return l===null||typeof l!="object"?null:(l=U&&l[U]||l["@@iterator"],typeof l=="function"?l:null)}var L=Object.assign,H;function V(l){if(H===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);H=d&&d[1]||""}return`
|
|
34
|
+
`+H+l}var D=!1;function G(l,d){if(!l||D)return"";D=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(de){var w=de}Reflect.construct(l,[],d)}else{try{d.call()}catch(de){w=de}l.call(d.prototype)}else{try{throw Error()}catch(de){w=de}l()}}catch(de){if(de&&w&&typeof de.stack=="string"){for(var _=de.stack.split(`
|
|
35
|
+
`),A=w.stack.split(`
|
|
36
|
+
`),$=_.length-1,X=A.length-1;1<=$&&0<=X&&_[$]!==A[X];)X--;for(;1<=$&&0<=X;$--,X--)if(_[$]!==A[X]){if($!==1||X!==1)do if($--,X--,0>X||_[$]!==A[X]){var te=`
|
|
37
|
+
`+_[$].replace(" at new "," at ");return l.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",l.displayName)),te}while(1<=$&&0<=X);break}}}finally{D=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?V(l):""}function K(l){switch(l.tag){case 5:return V(l.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return l=G(l.type,!1),l;case 11:return l=G(l.type.render,!1),l;case 1:return l=G(l.type,!0),l;default:return""}}function J(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case j:return"Fragment";case T:return"Portal";case I:return"Profiler";case R:return"StrictMode";case Y:return"Suspense";case O:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case z:return(l.displayName||"Context")+".Consumer";case M:return(l._context.displayName||"Context")+".Provider";case F:var d=l.render;return l=l.displayName,l||(l=d.displayName||d.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case q:return d=l.displayName||null,d!==null?d:J(l.type)||"Memo";case W:d=l._payload,l=l._init;try{return J(l(d))}catch{}}return null}function ee(l){var d=l.type;switch(l.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=d.render,l=l.displayName||l.name||"",d.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(d);case 8:return d===R?"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 d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function ie(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function ce(l){var d=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function he(l){var d=ce(l)?"checked":"value",g=Object.getOwnPropertyDescriptor(l.constructor.prototype,d),w=""+l[d];if(!l.hasOwnProperty(d)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var _=g.get,A=g.set;return Object.defineProperty(l,d,{configurable:!0,get:function(){return _.call(this)},set:function($){w=""+$,A.call(this,$)}}),Object.defineProperty(l,d,{enumerable:g.enumerable}),{getValue:function(){return w},setValue:function($){w=""+$},stopTracking:function(){l._valueTracker=null,delete l[d]}}}}function Ee(l){l._valueTracker||(l._valueTracker=he(l))}function fe(l){if(!l)return!1;var d=l._valueTracker;if(!d)return!0;var g=d.getValue(),w="";return l&&(w=ce(l)?l.checked?"true":"false":l.value),l=w,l!==g?(d.setValue(l),!0):!1}function xe(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Me(l,d){var g=d.checked;return L({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:g??l._wrapperState.initialChecked})}function Ve(l,d){var g=d.defaultValue==null?"":d.defaultValue,w=d.checked!=null?d.checked:d.defaultChecked;g=ie(d.value!=null?d.value:g),l._wrapperState={initialChecked:w,initialValue:g,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function ot(l,d){d=d.checked,d!=null&&C(l,"checked",d,!1)}function _t(l,d){ot(l,d);var g=ie(d.value),w=d.type;if(g!=null)w==="number"?(g===0&&l.value===""||l.value!=g)&&(l.value=""+g):l.value!==""+g&&(l.value=""+g);else if(w==="submit"||w==="reset"){l.removeAttribute("value");return}d.hasOwnProperty("value")?oe(l,d.type,g):d.hasOwnProperty("defaultValue")&&oe(l,d.type,ie(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(l.defaultChecked=!!d.defaultChecked)}function Q(l,d,g){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var w=d.type;if(!(w!=="submit"&&w!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+l._wrapperState.initialValue,g||d===l.value||(l.value=d),l.defaultValue=d}g=l.name,g!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,g!==""&&(l.name=g)}function oe(l,d,g){(d!=="number"||xe(l.ownerDocument)!==l)&&(g==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+g&&(l.defaultValue=""+g))}var ue=Array.isArray;function Se(l,d,g,w){if(l=l.options,d){d={};for(var _=0;_<g.length;_++)d["$"+g[_]]=!0;for(g=0;g<l.length;g++)_=d.hasOwnProperty("$"+l[g].value),l[g].selected!==_&&(l[g].selected=_),_&&w&&(l[g].defaultSelected=!0)}else{for(g=""+ie(g),d=null,_=0;_<l.length;_++){if(l[_].value===g){l[_].selected=!0,w&&(l[_].defaultSelected=!0);return}d!==null||l[_].disabled||(d=l[_])}d!==null&&(d.selected=!0)}}function we(l,d){if(d.dangerouslySetInnerHTML!=null)throw Error(n(91));return L({},d,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function ge(l,d){var g=d.value;if(g==null){if(g=d.children,d=d.defaultValue,g!=null){if(d!=null)throw Error(n(92));if(ue(g)){if(1<g.length)throw Error(n(93));g=g[0]}d=g}d==null&&(d=""),g=d}l._wrapperState={initialValue:ie(g)}}function Ae(l,d){var g=ie(d.value),w=ie(d.defaultValue);g!=null&&(g=""+g,g!==l.value&&(l.value=g),d.defaultValue==null&&l.defaultValue!==g&&(l.defaultValue=g)),w!=null&&(l.defaultValue=""+w)}function Fe(l){var d=l.textContent;d===l._wrapperState.initialValue&&d!==""&&d!==null&&(l.value=d)}function se(l){switch(l){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 pe(l,d){return l==null||l==="http://www.w3.org/1999/xhtml"?se(d):l==="http://www.w3.org/2000/svg"&&d==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var Oe,et=function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(d,g,w,_){MSApp.execUnsafeLocalFunction(function(){return l(d,g,w,_)})}:l}(function(l,d){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=d;else{for(Oe=Oe||document.createElement("div"),Oe.innerHTML="<svg>"+d.valueOf().toString()+"</svg>",d=Oe.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;d.firstChild;)l.appendChild(d.firstChild)}});function rt(l,d){if(d){var g=l.firstChild;if(g&&g===l.lastChild&&g.nodeType===3){g.nodeValue=d;return}}l.textContent=d}var Rt={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},Ke=["Webkit","ms","Moz","O"];Object.keys(Rt).forEach(function(l){Ke.forEach(function(d){d=d+l.charAt(0).toUpperCase()+l.substring(1),Rt[d]=Rt[l]})});function st(l,d,g){return d==null||typeof d=="boolean"||d===""?"":g||typeof d!="number"||d===0||Rt.hasOwnProperty(l)&&Rt[l]?(""+d).trim():d+"px"}function it(l,d){l=l.style;for(var g in d)if(d.hasOwnProperty(g)){var w=g.indexOf("--")===0,_=st(g,d[g],w);g==="float"&&(g="cssFloat"),w?l.setProperty(g,_):l[g]=_}}var Ut=L({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 pt(l,d){if(d){if(Ut[l]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(n(137,l));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(n(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(n(61))}if(d.style!=null&&typeof d.style!="object")throw Error(n(62))}}function gn(l,d){if(l.indexOf("-")===-1)return typeof d.is=="string";switch(l){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 yt=null;function yn(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var dt=null,Fr=null,ur=null;function Xn(l){if(l=$u(l)){if(typeof dt!="function")throw Error(n(280));var d=l.stateNode;d&&(d=Lf(d),dt(l.stateNode,l.type,d))}}function oi(l){Fr?ur?ur.push(l):ur=[l]:Fr=l}function Ye(){if(Fr){var l=Fr,d=ur;if(ur=Fr=null,Xn(l),d)for(l=0;l<d.length;l++)Xn(d[l])}}function wt(l,d){return l(d)}function Nt(){}var jn=!1;function Fn(l,d,g){if(jn)return l(d,g);jn=!0;try{return wt(l,d,g)}finally{jn=!1,(Fr!==null||ur!==null)&&(Nt(),Ye())}}function $n(l,d){var g=l.stateNode;if(g===null)return null;var w=Lf(g);if(w===null)return null;g=w[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(w=!w.disabled)||(l=l.type,w=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!w;break e;default:l=!1}if(l)return null;if(g&&typeof g!="function")throw Error(n(231,d,typeof g));return g}var wr=!1;if(a)try{var xn={};Object.defineProperty(xn,"passive",{get:function(){wr=!0}}),window.addEventListener("test",xn,xn),window.removeEventListener("test",xn,xn)}catch{wr=!1}function $r(l,d,g,w,_,A,$,X,te){var de=Array.prototype.slice.call(arguments,3);try{d.apply(g,de)}catch(ve){this.onError(ve)}}var zs=!1,Aa=null,Pa=!1,vu=null,pg={onError:function(l){zs=!0,Aa=l}};function mg(l,d,g,w,_,A,$,X,te){zs=!1,Aa=null,$r.apply(pg,arguments)}function hf(l,d,g,w,_,A,$,X,te){if(mg.apply(this,arguments),zs){if(zs){var de=Aa;zs=!1,Aa=null}else throw Error(n(198));Pa||(Pa=!0,vu=de)}}function Ai(l){var d=l,g=l;if(l.alternate)for(;d.return;)d=d.return;else{l=d;do d=l,d.flags&4098&&(g=d.return),l=d.return;while(l)}return d.tag===3?g:null}function pf(l){if(l.tag===13){var d=l.memoizedState;if(d===null&&(l=l.alternate,l!==null&&(d=l.memoizedState)),d!==null)return d.dehydrated}return null}function mf(l){if(Ai(l)!==l)throw Error(n(188))}function gg(l){var d=l.alternate;if(!d){if(d=Ai(l),d===null)throw Error(n(188));return d!==l?null:l}for(var g=l,w=d;;){var _=g.return;if(_===null)break;var A=_.alternate;if(A===null){if(w=_.return,w!==null){g=w;continue}break}if(_.child===A.child){for(A=_.child;A;){if(A===g)return mf(_),l;if(A===w)return mf(_),d;A=A.sibling}throw Error(n(188))}if(g.return!==w.return)g=_,w=A;else{for(var $=!1,X=_.child;X;){if(X===g){$=!0,g=_,w=A;break}if(X===w){$=!0,w=_,g=A;break}X=X.sibling}if(!$){for(X=A.child;X;){if(X===g){$=!0,g=A,w=_;break}if(X===w){$=!0,w=A,g=_;break}X=X.sibling}if(!$)throw Error(n(189))}}if(g.alternate!==w)throw Error(n(190))}if(g.tag!==3)throw Error(n(188));return g.stateNode.current===g?l:d}function gf(l){return l=gg(l),l!==null?yf(l):null}function yf(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var d=yf(l);if(d!==null)return d;l=l.sibling}return null}var xf=t.unstable_scheduleCallback,vf=t.unstable_cancelCallback,wf=t.unstable_shouldYield,yg=t.unstable_requestPaint,Zt=t.unstable_now,xg=t.unstable_getCurrentPriorityLevel,wu=t.unstable_ImmediatePriority,bf=t.unstable_UserBlockingPriority,Ra=t.unstable_NormalPriority,vg=t.unstable_LowPriority,bu=t.unstable_IdlePriority,Ma=null,zr=null;function wg(l){if(zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(Ma,l,void 0,(l.current.flags&128)===128)}catch{}}var br=Math.clz32?Math.clz32:Sg,bg=Math.log,kg=Math.LN2;function Sg(l){return l>>>=0,l===0?32:31-(bg(l)/kg|0)|0}var ja=64,Da=4194304;function no(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Oa(l,d){var g=l.pendingLanes;if(g===0)return 0;var w=0,_=l.suspendedLanes,A=l.pingedLanes,$=g&268435455;if($!==0){var X=$&~_;X!==0?w=no(X):(A&=$,A!==0&&(w=no(A)))}else $=g&~_,$!==0?w=no($):A!==0&&(w=no(A));if(w===0)return 0;if(d!==0&&d!==w&&!(d&_)&&(_=w&-w,A=d&-d,_>=A||_===16&&(A&4194240)!==0))return d;if(w&4&&(w|=g&16),d=l.entangledLanes,d!==0)for(l=l.entanglements,d&=w;0<d;)g=31-br(d),_=1<<g,w|=l[g],d&=~_;return w}function A3(l,d){switch(l){case 1:case 2:case 4:return d+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 d+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 P3(l,d){for(var g=l.suspendedLanes,w=l.pingedLanes,_=l.expirationTimes,A=l.pendingLanes;0<A;){var $=31-br(A),X=1<<$,te=_[$];te===-1?(!(X&g)||X&w)&&(_[$]=A3(X,d)):te<=d&&(l.expiredLanes|=X),A&=~X}}function Eg(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function $k(){var l=ja;return ja<<=1,!(ja&4194240)&&(ja=64),l}function Cg(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function ku(l,d,g){l.pendingLanes|=d,d!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,d=31-br(d),l[d]=g}function R3(l,d){var g=l.pendingLanes&~d;l.pendingLanes=d,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=d,l.mutableReadLanes&=d,l.entangledLanes&=d,d=l.entanglements;var w=l.eventTimes;for(l=l.expirationTimes;0<g;){var _=31-br(g),A=1<<_;d[_]=0,w[_]=-1,l[_]=-1,g&=~A}}function _g(l,d){var g=l.entangledLanes|=d;for(l=l.entanglements;g;){var w=31-br(g),_=1<<w;_&d|l[w]&d&&(l[w]|=d),g&=~_}}var Tt=0;function zk(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var Bk,Ng,Vk,Wk,Uk,Tg=!1,kf=[],Wo=null,Uo=null,Ho=null,Su=new Map,Eu=new Map,Yo=[],M3="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 Hk(l,d){switch(l){case"focusin":case"focusout":Wo=null;break;case"dragenter":case"dragleave":Uo=null;break;case"mouseover":case"mouseout":Ho=null;break;case"pointerover":case"pointerout":Su.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":Eu.delete(d.pointerId)}}function Cu(l,d,g,w,_,A){return l===null||l.nativeEvent!==A?(l={blockedOn:d,domEventName:g,eventSystemFlags:w,nativeEvent:A,targetContainers:[_]},d!==null&&(d=$u(d),d!==null&&Ng(d)),l):(l.eventSystemFlags|=w,d=l.targetContainers,_!==null&&d.indexOf(_)===-1&&d.push(_),l)}function j3(l,d,g,w,_){switch(d){case"focusin":return Wo=Cu(Wo,l,d,g,w,_),!0;case"dragenter":return Uo=Cu(Uo,l,d,g,w,_),!0;case"mouseover":return Ho=Cu(Ho,l,d,g,w,_),!0;case"pointerover":var A=_.pointerId;return Su.set(A,Cu(Su.get(A)||null,l,d,g,w,_)),!0;case"gotpointercapture":return A=_.pointerId,Eu.set(A,Cu(Eu.get(A)||null,l,d,g,w,_)),!0}return!1}function Yk(l){var d=Bs(l.target);if(d!==null){var g=Ai(d);if(g!==null){if(d=g.tag,d===13){if(d=pf(g),d!==null){l.blockedOn=d,Uk(l.priority,function(){Vk(g)});return}}else if(d===3&&g.stateNode.current.memoizedState.isDehydrated){l.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}l.blockedOn=null}function Sf(l){if(l.blockedOn!==null)return!1;for(var d=l.targetContainers;0<d.length;){var g=Pg(l.domEventName,l.eventSystemFlags,d[0],l.nativeEvent);if(g===null){g=l.nativeEvent;var w=new g.constructor(g.type,g);yt=w,g.target.dispatchEvent(w),yt=null}else return d=$u(g),d!==null&&Ng(d),l.blockedOn=g,!1;d.shift()}return!0}function qk(l,d,g){Sf(l)&&g.delete(d)}function D3(){Tg=!1,Wo!==null&&Sf(Wo)&&(Wo=null),Uo!==null&&Sf(Uo)&&(Uo=null),Ho!==null&&Sf(Ho)&&(Ho=null),Su.forEach(qk),Eu.forEach(qk)}function _u(l,d){l.blockedOn===d&&(l.blockedOn=null,Tg||(Tg=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,D3)))}function Nu(l){function d(_){return _u(_,l)}if(0<kf.length){_u(kf[0],l);for(var g=1;g<kf.length;g++){var w=kf[g];w.blockedOn===l&&(w.blockedOn=null)}}for(Wo!==null&&_u(Wo,l),Uo!==null&&_u(Uo,l),Ho!==null&&_u(Ho,l),Su.forEach(d),Eu.forEach(d),g=0;g<Yo.length;g++)w=Yo[g],w.blockedOn===l&&(w.blockedOn=null);for(;0<Yo.length&&(g=Yo[0],g.blockedOn===null);)Yk(g),g.blockedOn===null&&Yo.shift()}var Ia=N.ReactCurrentBatchConfig,Ef=!0;function O3(l,d,g,w){var _=Tt,A=Ia.transition;Ia.transition=null;try{Tt=1,Ag(l,d,g,w)}finally{Tt=_,Ia.transition=A}}function I3(l,d,g,w){var _=Tt,A=Ia.transition;Ia.transition=null;try{Tt=4,Ag(l,d,g,w)}finally{Tt=_,Ia.transition=A}}function Ag(l,d,g,w){if(Ef){var _=Pg(l,d,g,w);if(_===null)qg(l,d,w,Cf,g),Hk(l,w);else if(j3(_,l,d,g,w))w.stopPropagation();else if(Hk(l,w),d&4&&-1<M3.indexOf(l)){for(;_!==null;){var A=$u(_);if(A!==null&&Bk(A),A=Pg(l,d,g,w),A===null&&qg(l,d,w,Cf,g),A===_)break;_=A}_!==null&&w.stopPropagation()}else qg(l,d,w,null,g)}}var Cf=null;function Pg(l,d,g,w){if(Cf=null,l=yn(w),l=Bs(l),l!==null)if(d=Ai(l),d===null)l=null;else if(g=d.tag,g===13){if(l=pf(d),l!==null)return l;l=null}else if(g===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;l=null}else d!==l&&(l=null);return Cf=l,null}function Gk(l){switch(l){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(xg()){case wu:return 1;case bf:return 4;case Ra:case vg:return 16;case bu:return 536870912;default:return 16}default:return 16}}var qo=null,Rg=null,_f=null;function Zk(){if(_f)return _f;var l,d=Rg,g=d.length,w,_="value"in qo?qo.value:qo.textContent,A=_.length;for(l=0;l<g&&d[l]===_[l];l++);var $=g-l;for(w=1;w<=$&&d[g-w]===_[A-w];w++);return _f=_.slice(l,1<w?1-w:void 0)}function Nf(l){var d=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&d===13&&(l=13)):l=d,l===10&&(l=13),32<=l||l===13?l:0}function Tf(){return!0}function Kk(){return!1}function kr(l){function d(g,w,_,A,$){this._reactName=g,this._targetInst=_,this.type=w,this.nativeEvent=A,this.target=$,this.currentTarget=null;for(var X in l)l.hasOwnProperty(X)&&(g=l[X],this[X]=g?g(A):A[X]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?Tf:Kk,this.isPropagationStopped=Kk,this}return L(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=Tf)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=Tf)},persist:function(){},isPersistent:Tf}),d}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mg=kr(La),Tu=L({},La,{view:0,detail:0}),L3=kr(Tu),jg,Dg,Au,Af=L({},Tu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ig,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Au&&(Au&&l.type==="mousemove"?(jg=l.screenX-Au.screenX,Dg=l.screenY-Au.screenY):Dg=jg=0,Au=l),jg)},movementY:function(l){return"movementY"in l?l.movementY:Dg}}),Xk=kr(Af),F3=L({},Af,{dataTransfer:0}),$3=kr(F3),z3=L({},Tu,{relatedTarget:0}),Og=kr(z3),B3=L({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),V3=kr(B3),W3=L({},La,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),U3=kr(W3),H3=L({},La,{data:0}),Qk=kr(H3),Y3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q3={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"},G3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z3(l){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(l):(l=G3[l])?!!d[l]:!1}function Ig(){return Z3}var K3=L({},Tu,{key:function(l){if(l.key){var d=Y3[l.key]||l.key;if(d!=="Unidentified")return d}return l.type==="keypress"?(l=Nf(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?q3[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ig,charCode:function(l){return l.type==="keypress"?Nf(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Nf(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),X3=kr(K3),Q3=L({},Af,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jk=kr(Q3),J3=L({},Tu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ig}),e$=kr(J3),t$=L({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),n$=kr(t$),r$=L({},Af,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),i$=kr(r$),o$=[9,13,27,32],Lg=a&&"CompositionEvent"in window,Pu=null;a&&"documentMode"in document&&(Pu=document.documentMode);var s$=a&&"TextEvent"in window&&!Pu,eS=a&&(!Lg||Pu&&8<Pu&&11>=Pu),tS=" ",nS=!1;function rS(l,d){switch(l){case"keyup":return o$.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iS(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Fa=!1;function a$(l,d){switch(l){case"compositionend":return iS(d);case"keypress":return d.which!==32?null:(nS=!0,tS);case"textInput":return l=d.data,l===tS&&nS?null:l;default:return null}}function l$(l,d){if(Fa)return l==="compositionend"||!Lg&&rS(l,d)?(l=Zk(),_f=Rg=qo=null,Fa=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return eS&&d.locale!=="ko"?null:d.data;default:return null}}var u$={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 oS(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d==="input"?!!u$[l.type]:d==="textarea"}function sS(l,d,g,w){oi(w),d=Df(d,"onChange"),0<d.length&&(g=new Mg("onChange","change",null,g,w),l.push({event:g,listeners:d}))}var Ru=null,Mu=null;function c$(l){ES(l,0)}function Pf(l){var d=Wa(l);if(fe(d))return l}function d$(l,d){if(l==="change")return d}var aS=!1;if(a){var Fg;if(a){var $g="oninput"in document;if(!$g){var lS=document.createElement("div");lS.setAttribute("oninput","return;"),$g=typeof lS.oninput=="function"}Fg=$g}else Fg=!1;aS=Fg&&(!document.documentMode||9<document.documentMode)}function uS(){Ru&&(Ru.detachEvent("onpropertychange",cS),Mu=Ru=null)}function cS(l){if(l.propertyName==="value"&&Pf(Mu)){var d=[];sS(d,Mu,l,yn(l)),Fn(c$,d)}}function f$(l,d,g){l==="focusin"?(uS(),Ru=d,Mu=g,Ru.attachEvent("onpropertychange",cS)):l==="focusout"&&uS()}function h$(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return Pf(Mu)}function p$(l,d){if(l==="click")return Pf(d)}function m$(l,d){if(l==="input"||l==="change")return Pf(d)}function g$(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var si=typeof Object.is=="function"?Object.is:g$;function ju(l,d){if(si(l,d))return!0;if(typeof l!="object"||l===null||typeof d!="object"||d===null)return!1;var g=Object.keys(l),w=Object.keys(d);if(g.length!==w.length)return!1;for(w=0;w<g.length;w++){var _=g[w];if(!u.call(d,_)||!si(l[_],d[_]))return!1}return!0}function dS(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function fS(l,d){var g=dS(l);l=0;for(var w;g;){if(g.nodeType===3){if(w=l+g.textContent.length,l<=d&&w>=d)return{node:g,offset:d-l};l=w}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=dS(g)}}function hS(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?hS(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function pS(){for(var l=window,d=xe();d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=xe(l.document)}return d}function zg(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}function y$(l){var d=pS(),g=l.focusedElem,w=l.selectionRange;if(d!==g&&g&&g.ownerDocument&&hS(g.ownerDocument.documentElement,g)){if(w!==null&&zg(g)){if(d=w.start,l=w.end,l===void 0&&(l=d),"selectionStart"in g)g.selectionStart=d,g.selectionEnd=Math.min(l,g.value.length);else if(l=(d=g.ownerDocument||document)&&d.defaultView||window,l.getSelection){l=l.getSelection();var _=g.textContent.length,A=Math.min(w.start,_);w=w.end===void 0?A:Math.min(w.end,_),!l.extend&&A>w&&(_=w,w=A,A=_),_=fS(g,A);var $=fS(g,w);_&&$&&(l.rangeCount!==1||l.anchorNode!==_.node||l.anchorOffset!==_.offset||l.focusNode!==$.node||l.focusOffset!==$.offset)&&(d=d.createRange(),d.setStart(_.node,_.offset),l.removeAllRanges(),A>w?(l.addRange(d),l.extend($.node,$.offset)):(d.setEnd($.node,$.offset),l.addRange(d)))}}for(d=[],l=g;l=l.parentNode;)l.nodeType===1&&d.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<d.length;g++)l=d[g],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var x$=a&&"documentMode"in document&&11>=document.documentMode,$a=null,Bg=null,Du=null,Vg=!1;function mS(l,d,g){var w=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Vg||$a==null||$a!==xe(w)||(w=$a,"selectionStart"in w&&zg(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),Du&&ju(Du,w)||(Du=w,w=Df(Bg,"onSelect"),0<w.length&&(d=new Mg("onSelect","select",null,d,g),l.push({event:d,listeners:w}),d.target=$a)))}function Rf(l,d){var g={};return g[l.toLowerCase()]=d.toLowerCase(),g["Webkit"+l]="webkit"+d,g["Moz"+l]="moz"+d,g}var za={animationend:Rf("Animation","AnimationEnd"),animationiteration:Rf("Animation","AnimationIteration"),animationstart:Rf("Animation","AnimationStart"),transitionend:Rf("Transition","TransitionEnd")},Wg={},gS={};a&&(gS=document.createElement("div").style,"AnimationEvent"in window||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),"TransitionEvent"in window||delete za.transitionend.transition);function Mf(l){if(Wg[l])return Wg[l];if(!za[l])return l;var d=za[l],g;for(g in d)if(d.hasOwnProperty(g)&&g in gS)return Wg[l]=d[g];return l}var yS=Mf("animationend"),xS=Mf("animationiteration"),vS=Mf("animationstart"),wS=Mf("transitionend"),bS=new Map,kS="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 Go(l,d){bS.set(l,d),o(d,[l])}for(var Ug=0;Ug<kS.length;Ug++){var Hg=kS[Ug],v$=Hg.toLowerCase(),w$=Hg[0].toUpperCase()+Hg.slice(1);Go(v$,"on"+w$)}Go(yS,"onAnimationEnd"),Go(xS,"onAnimationIteration"),Go(vS,"onAnimationStart"),Go("dblclick","onDoubleClick"),Go("focusin","onFocus"),Go("focusout","onBlur"),Go(wS,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ou="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(" "),b$=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ou));function SS(l,d,g){var w=l.type||"unknown-event";l.currentTarget=g,hf(w,d,void 0,l),l.currentTarget=null}function ES(l,d){d=(d&4)!==0;for(var g=0;g<l.length;g++){var w=l[g],_=w.event;w=w.listeners;e:{var A=void 0;if(d)for(var $=w.length-1;0<=$;$--){var X=w[$],te=X.instance,de=X.currentTarget;if(X=X.listener,te!==A&&_.isPropagationStopped())break e;SS(_,X,de),A=te}else for($=0;$<w.length;$++){if(X=w[$],te=X.instance,de=X.currentTarget,X=X.listener,te!==A&&_.isPropagationStopped())break e;SS(_,X,de),A=te}}}if(Pa)throw l=vu,Pa=!1,vu=null,l}function Ft(l,d){var g=d[Jg];g===void 0&&(g=d[Jg]=new Set);var w=l+"__bubble";g.has(w)||(CS(d,l,2,!1),g.add(w))}function Yg(l,d,g){var w=0;d&&(w|=4),CS(g,l,w,d)}var jf="_reactListening"+Math.random().toString(36).slice(2);function Iu(l){if(!l[jf]){l[jf]=!0,r.forEach(function(g){g!=="selectionchange"&&(b$.has(g)||Yg(g,!1,l),Yg(g,!0,l))});var d=l.nodeType===9?l:l.ownerDocument;d===null||d[jf]||(d[jf]=!0,Yg("selectionchange",!1,d))}}function CS(l,d,g,w){switch(Gk(d)){case 1:var _=O3;break;case 4:_=I3;break;default:_=Ag}g=_.bind(null,d,g,l),_=void 0,!wr||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(_=!0),w?_!==void 0?l.addEventListener(d,g,{capture:!0,passive:_}):l.addEventListener(d,g,!0):_!==void 0?l.addEventListener(d,g,{passive:_}):l.addEventListener(d,g,!1)}function qg(l,d,g,w,_){var A=w;if(!(d&1)&&!(d&2)&&w!==null)e:for(;;){if(w===null)return;var $=w.tag;if($===3||$===4){var X=w.stateNode.containerInfo;if(X===_||X.nodeType===8&&X.parentNode===_)break;if($===4)for($=w.return;$!==null;){var te=$.tag;if((te===3||te===4)&&(te=$.stateNode.containerInfo,te===_||te.nodeType===8&&te.parentNode===_))return;$=$.return}for(;X!==null;){if($=Bs(X),$===null)return;if(te=$.tag,te===5||te===6){w=A=$;continue e}X=X.parentNode}}w=w.return}Fn(function(){var de=A,ve=yn(g),be=[];e:{var ye=bS.get(l);if(ye!==void 0){var je=Mg,Le=l;switch(l){case"keypress":if(Nf(g)===0)break e;case"keydown":case"keyup":je=X3;break;case"focusin":Le="focus",je=Og;break;case"focusout":Le="blur",je=Og;break;case"beforeblur":case"afterblur":je=Og;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=Xk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=$3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=e$;break;case yS:case xS:case vS:je=V3;break;case wS:je=n$;break;case"scroll":je=L3;break;case"wheel":je=i$;break;case"copy":case"cut":case"paste":je=U3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Jk}var $e=(d&4)!==0,on=!$e&&l==="scroll",ae=$e?ye!==null?ye+"Capture":null:ye;$e=[];for(var re=de,le;re!==null;){le=re;var _e=le.stateNode;if(le.tag===5&&_e!==null&&(le=_e,ae!==null&&(_e=$n(re,ae),_e!=null&&$e.push(Lu(re,_e,le)))),on)break;re=re.return}0<$e.length&&(ye=new je(ye,Le,null,g,ve),be.push({event:ye,listeners:$e}))}}if(!(d&7)){e:{if(ye=l==="mouseover"||l==="pointerover",je=l==="mouseout"||l==="pointerout",ye&&g!==yt&&(Le=g.relatedTarget||g.fromElement)&&(Bs(Le)||Le[ro]))break e;if((je||ye)&&(ye=ve.window===ve?ve:(ye=ve.ownerDocument)?ye.defaultView||ye.parentWindow:window,je?(Le=g.relatedTarget||g.toElement,je=de,Le=Le?Bs(Le):null,Le!==null&&(on=Ai(Le),Le!==on||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(je=null,Le=de),je!==Le)){if($e=Xk,_e="onMouseLeave",ae="onMouseEnter",re="mouse",(l==="pointerout"||l==="pointerover")&&($e=Jk,_e="onPointerLeave",ae="onPointerEnter",re="pointer"),on=je==null?ye:Wa(je),le=Le==null?ye:Wa(Le),ye=new $e(_e,re+"leave",je,g,ve),ye.target=on,ye.relatedTarget=le,_e=null,Bs(ve)===de&&($e=new $e(ae,re+"enter",Le,g,ve),$e.target=le,$e.relatedTarget=on,_e=$e),on=_e,je&&Le)t:{for($e=je,ae=Le,re=0,le=$e;le;le=Ba(le))re++;for(le=0,_e=ae;_e;_e=Ba(_e))le++;for(;0<re-le;)$e=Ba($e),re--;for(;0<le-re;)ae=Ba(ae),le--;for(;re--;){if($e===ae||ae!==null&&$e===ae.alternate)break t;$e=Ba($e),ae=Ba(ae)}$e=null}else $e=null;je!==null&&_S(be,ye,je,$e,!1),Le!==null&&on!==null&&_S(be,on,Le,$e,!0)}}e:{if(ye=de?Wa(de):window,je=ye.nodeName&&ye.nodeName.toLowerCase(),je==="select"||je==="input"&&ye.type==="file")var ze=d$;else if(oS(ye))if(aS)ze=m$;else{ze=h$;var qe=f$}else(je=ye.nodeName)&&je.toLowerCase()==="input"&&(ye.type==="checkbox"||ye.type==="radio")&&(ze=p$);if(ze&&(ze=ze(l,de))){sS(be,ze,g,ve);break e}qe&&qe(l,ye,de),l==="focusout"&&(qe=ye._wrapperState)&&qe.controlled&&ye.type==="number"&&oe(ye,"number",ye.value)}switch(qe=de?Wa(de):window,l){case"focusin":(oS(qe)||qe.contentEditable==="true")&&($a=qe,Bg=de,Du=null);break;case"focusout":Du=Bg=$a=null;break;case"mousedown":Vg=!0;break;case"contextmenu":case"mouseup":case"dragend":Vg=!1,mS(be,g,ve);break;case"selectionchange":if(x$)break;case"keydown":case"keyup":mS(be,g,ve)}var Ge;if(Lg)e:{switch(l){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else Fa?rS(l,g)&&(nt="onCompositionEnd"):l==="keydown"&&g.keyCode===229&&(nt="onCompositionStart");nt&&(eS&&g.locale!=="ko"&&(Fa||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&Fa&&(Ge=Zk()):(qo=ve,Rg="value"in qo?qo.value:qo.textContent,Fa=!0)),qe=Df(de,nt),0<qe.length&&(nt=new Qk(nt,l,null,g,ve),be.push({event:nt,listeners:qe}),Ge?nt.data=Ge:(Ge=iS(g),Ge!==null&&(nt.data=Ge)))),(Ge=s$?a$(l,g):l$(l,g))&&(de=Df(de,"onBeforeInput"),0<de.length&&(ve=new Qk("onBeforeInput","beforeinput",null,g,ve),be.push({event:ve,listeners:de}),ve.data=Ge))}ES(be,d)})}function Lu(l,d,g){return{instance:l,listener:d,currentTarget:g}}function Df(l,d){for(var g=d+"Capture",w=[];l!==null;){var _=l,A=_.stateNode;_.tag===5&&A!==null&&(_=A,A=$n(l,g),A!=null&&w.unshift(Lu(l,A,_)),A=$n(l,d),A!=null&&w.push(Lu(l,A,_))),l=l.return}return w}function Ba(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function _S(l,d,g,w,_){for(var A=d._reactName,$=[];g!==null&&g!==w;){var X=g,te=X.alternate,de=X.stateNode;if(te!==null&&te===w)break;X.tag===5&&de!==null&&(X=de,_?(te=$n(g,A),te!=null&&$.unshift(Lu(g,te,X))):_||(te=$n(g,A),te!=null&&$.push(Lu(g,te,X)))),g=g.return}$.length!==0&&l.push({event:d,listeners:$})}var k$=/\r\n?/g,S$=/\u0000|\uFFFD/g;function NS(l){return(typeof l=="string"?l:""+l).replace(k$,`
|
|
38
|
+
`).replace(S$,"")}function Of(l,d,g){if(d=NS(d),NS(l)!==d&&g)throw Error(n(425))}function If(){}var Gg=null,Zg=null;function Kg(l,d){return l==="textarea"||l==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var Xg=typeof setTimeout=="function"?setTimeout:void 0,E$=typeof clearTimeout=="function"?clearTimeout:void 0,TS=typeof Promise=="function"?Promise:void 0,C$=typeof queueMicrotask=="function"?queueMicrotask:typeof TS<"u"?function(l){return TS.resolve(null).then(l).catch(_$)}:Xg;function _$(l){setTimeout(function(){throw l})}function Qg(l,d){var g=d,w=0;do{var _=g.nextSibling;if(l.removeChild(g),_&&_.nodeType===8)if(g=_.data,g==="/$"){if(w===0){l.removeChild(_),Nu(d);return}w--}else g!=="$"&&g!=="$?"&&g!=="$!"||w++;g=_}while(g);Nu(d)}function Zo(l){for(;l!=null;l=l.nextSibling){var d=l.nodeType;if(d===1||d===3)break;if(d===8){if(d=l.data,d==="$"||d==="$!"||d==="$?")break;if(d==="/$")return null}}return l}function AS(l){l=l.previousSibling;for(var d=0;l;){if(l.nodeType===8){var g=l.data;if(g==="$"||g==="$!"||g==="$?"){if(d===0)return l;d--}else g==="/$"&&d++}l=l.previousSibling}return null}var Va=Math.random().toString(36).slice(2),Pi="__reactFiber$"+Va,Fu="__reactProps$"+Va,ro="__reactContainer$"+Va,Jg="__reactEvents$"+Va,N$="__reactListeners$"+Va,T$="__reactHandles$"+Va;function Bs(l){var d=l[Pi];if(d)return d;for(var g=l.parentNode;g;){if(d=g[ro]||g[Pi]){if(g=d.alternate,d.child!==null||g!==null&&g.child!==null)for(l=AS(l);l!==null;){if(g=l[Pi])return g;l=AS(l)}return d}l=g,g=l.parentNode}return null}function $u(l){return l=l[Pi]||l[ro],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function Wa(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(n(33))}function Lf(l){return l[Fu]||null}var ey=[],Ua=-1;function Ko(l){return{current:l}}function $t(l){0>Ua||(l.current=ey[Ua],ey[Ua]=null,Ua--)}function Ot(l,d){Ua++,ey[Ua]=l.current,l.current=d}var Xo={},zn=Ko(Xo),cr=Ko(!1),Vs=Xo;function Ha(l,d){var g=l.type.contextTypes;if(!g)return Xo;var w=l.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===d)return w.__reactInternalMemoizedMaskedChildContext;var _={},A;for(A in g)_[A]=d[A];return w&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=d,l.__reactInternalMemoizedMaskedChildContext=_),_}function dr(l){return l=l.childContextTypes,l!=null}function Ff(){$t(cr),$t(zn)}function PS(l,d,g){if(zn.current!==Xo)throw Error(n(168));Ot(zn,d),Ot(cr,g)}function RS(l,d,g){var w=l.stateNode;if(d=d.childContextTypes,typeof w.getChildContext!="function")return g;w=w.getChildContext();for(var _ in w)if(!(_ in d))throw Error(n(108,ee(l)||"Unknown",_));return L({},g,w)}function $f(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Xo,Vs=zn.current,Ot(zn,l),Ot(cr,cr.current),!0}function MS(l,d,g){var w=l.stateNode;if(!w)throw Error(n(169));g?(l=RS(l,d,Vs),w.__reactInternalMemoizedMergedChildContext=l,$t(cr),$t(zn),Ot(zn,l)):$t(cr),Ot(cr,g)}var io=null,zf=!1,ty=!1;function jS(l){io===null?io=[l]:io.push(l)}function A$(l){zf=!0,jS(l)}function Qo(){if(!ty&&io!==null){ty=!0;var l=0,d=Tt;try{var g=io;for(Tt=1;l<g.length;l++){var w=g[l];do w=w(!0);while(w!==null)}io=null,zf=!1}catch(_){throw io!==null&&(io=io.slice(l+1)),xf(wu,Qo),_}finally{Tt=d,ty=!1}}return null}var Ya=[],qa=0,Bf=null,Vf=0,Br=[],Vr=0,Ws=null,oo=1,so="";function Us(l,d){Ya[qa++]=Vf,Ya[qa++]=Bf,Bf=l,Vf=d}function DS(l,d,g){Br[Vr++]=oo,Br[Vr++]=so,Br[Vr++]=Ws,Ws=l;var w=oo;l=so;var _=32-br(w)-1;w&=~(1<<_),g+=1;var A=32-br(d)+_;if(30<A){var $=_-_%5;A=(w&(1<<$)-1).toString(32),w>>=$,_-=$,oo=1<<32-br(d)+_|g<<_|w,so=A+l}else oo=1<<A|g<<_|w,so=l}function ny(l){l.return!==null&&(Us(l,1),DS(l,1,0))}function ry(l){for(;l===Bf;)Bf=Ya[--qa],Ya[qa]=null,Vf=Ya[--qa],Ya[qa]=null;for(;l===Ws;)Ws=Br[--Vr],Br[Vr]=null,so=Br[--Vr],Br[Vr]=null,oo=Br[--Vr],Br[Vr]=null}var Sr=null,Er=null,Ht=!1,ai=null;function OS(l,d){var g=Yr(5,null,null,0);g.elementType="DELETED",g.stateNode=d,g.return=l,d=l.deletions,d===null?(l.deletions=[g],l.flags|=16):d.push(g)}function IS(l,d){switch(l.tag){case 5:var g=l.type;return d=d.nodeType!==1||g.toLowerCase()!==d.nodeName.toLowerCase()?null:d,d!==null?(l.stateNode=d,Sr=l,Er=Zo(d.firstChild),!0):!1;case 6:return d=l.pendingProps===""||d.nodeType!==3?null:d,d!==null?(l.stateNode=d,Sr=l,Er=null,!0):!1;case 13:return d=d.nodeType!==8?null:d,d!==null?(g=Ws!==null?{id:oo,overflow:so}:null,l.memoizedState={dehydrated:d,treeContext:g,retryLane:1073741824},g=Yr(18,null,null,0),g.stateNode=d,g.return=l,l.child=g,Sr=l,Er=null,!0):!1;default:return!1}}function iy(l){return(l.mode&1)!==0&&(l.flags&128)===0}function oy(l){if(Ht){var d=Er;if(d){var g=d;if(!IS(l,d)){if(iy(l))throw Error(n(418));d=Zo(g.nextSibling);var w=Sr;d&&IS(l,d)?OS(w,g):(l.flags=l.flags&-4097|2,Ht=!1,Sr=l)}}else{if(iy(l))throw Error(n(418));l.flags=l.flags&-4097|2,Ht=!1,Sr=l}}}function LS(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;Sr=l}function Wf(l){if(l!==Sr)return!1;if(!Ht)return LS(l),Ht=!0,!1;var d;if((d=l.tag!==3)&&!(d=l.tag!==5)&&(d=l.type,d=d!=="head"&&d!=="body"&&!Kg(l.type,l.memoizedProps)),d&&(d=Er)){if(iy(l))throw FS(),Error(n(418));for(;d;)OS(l,d),d=Zo(d.nextSibling)}if(LS(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(317));e:{for(l=l.nextSibling,d=0;l;){if(l.nodeType===8){var g=l.data;if(g==="/$"){if(d===0){Er=Zo(l.nextSibling);break e}d--}else g!=="$"&&g!=="$!"&&g!=="$?"||d++}l=l.nextSibling}Er=null}}else Er=Sr?Zo(l.stateNode.nextSibling):null;return!0}function FS(){for(var l=Er;l;)l=Zo(l.nextSibling)}function Ga(){Er=Sr=null,Ht=!1}function sy(l){ai===null?ai=[l]:ai.push(l)}var P$=N.ReactCurrentBatchConfig;function zu(l,d,g){if(l=g.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(g._owner){if(g=g._owner,g){if(g.tag!==1)throw Error(n(309));var w=g.stateNode}if(!w)throw Error(n(147,l));var _=w,A=""+l;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===A?d.ref:(d=function($){var X=_.refs;$===null?delete X[A]:X[A]=$},d._stringRef=A,d)}if(typeof l!="string")throw Error(n(284));if(!g._owner)throw Error(n(290,l))}return l}function Uf(l,d){throw l=Object.prototype.toString.call(d),Error(n(31,l==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":l))}function $S(l){var d=l._init;return d(l._payload)}function zS(l){function d(ae,re){if(l){var le=ae.deletions;le===null?(ae.deletions=[re],ae.flags|=16):le.push(re)}}function g(ae,re){if(!l)return null;for(;re!==null;)d(ae,re),re=re.sibling;return null}function w(ae,re){for(ae=new Map;re!==null;)re.key!==null?ae.set(re.key,re):ae.set(re.index,re),re=re.sibling;return ae}function _(ae,re){return ae=ss(ae,re),ae.index=0,ae.sibling=null,ae}function A(ae,re,le){return ae.index=le,l?(le=ae.alternate,le!==null?(le=le.index,le<re?(ae.flags|=2,re):le):(ae.flags|=2,re)):(ae.flags|=1048576,re)}function $(ae){return l&&ae.alternate===null&&(ae.flags|=2),ae}function X(ae,re,le,_e){return re===null||re.tag!==6?(re=Xy(le,ae.mode,_e),re.return=ae,re):(re=_(re,le),re.return=ae,re)}function te(ae,re,le,_e){var ze=le.type;return ze===j?ve(ae,re,le.props.children,_e,le.key):re!==null&&(re.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===W&&$S(ze)===re.type)?(_e=_(re,le.props),_e.ref=zu(ae,re,le),_e.return=ae,_e):(_e=ph(le.type,le.key,le.props,null,ae.mode,_e),_e.ref=zu(ae,re,le),_e.return=ae,_e)}function de(ae,re,le,_e){return re===null||re.tag!==4||re.stateNode.containerInfo!==le.containerInfo||re.stateNode.implementation!==le.implementation?(re=Qy(le,ae.mode,_e),re.return=ae,re):(re=_(re,le.children||[]),re.return=ae,re)}function ve(ae,re,le,_e,ze){return re===null||re.tag!==7?(re=Qs(le,ae.mode,_e,ze),re.return=ae,re):(re=_(re,le),re.return=ae,re)}function be(ae,re,le){if(typeof re=="string"&&re!==""||typeof re=="number")return re=Xy(""+re,ae.mode,le),re.return=ae,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case P:return le=ph(re.type,re.key,re.props,null,ae.mode,le),le.ref=zu(ae,null,re),le.return=ae,le;case T:return re=Qy(re,ae.mode,le),re.return=ae,re;case W:var _e=re._init;return be(ae,_e(re._payload),le)}if(ue(re)||B(re))return re=Qs(re,ae.mode,le,null),re.return=ae,re;Uf(ae,re)}return null}function ye(ae,re,le,_e){var ze=re!==null?re.key:null;if(typeof le=="string"&&le!==""||typeof le=="number")return ze!==null?null:X(ae,re,""+le,_e);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case P:return le.key===ze?te(ae,re,le,_e):null;case T:return le.key===ze?de(ae,re,le,_e):null;case W:return ze=le._init,ye(ae,re,ze(le._payload),_e)}if(ue(le)||B(le))return ze!==null?null:ve(ae,re,le,_e,null);Uf(ae,le)}return null}function je(ae,re,le,_e,ze){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return ae=ae.get(le)||null,X(re,ae,""+_e,ze);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case P:return ae=ae.get(_e.key===null?le:_e.key)||null,te(re,ae,_e,ze);case T:return ae=ae.get(_e.key===null?le:_e.key)||null,de(re,ae,_e,ze);case W:var qe=_e._init;return je(ae,re,le,qe(_e._payload),ze)}if(ue(_e)||B(_e))return ae=ae.get(le)||null,ve(re,ae,_e,ze,null);Uf(re,_e)}return null}function Le(ae,re,le,_e){for(var ze=null,qe=null,Ge=re,nt=re=0,Tn=null;Ge!==null&&nt<le.length;nt++){Ge.index>nt?(Tn=Ge,Ge=null):Tn=Ge.sibling;var St=ye(ae,Ge,le[nt],_e);if(St===null){Ge===null&&(Ge=Tn);break}l&&Ge&&St.alternate===null&&d(ae,Ge),re=A(St,re,nt),qe===null?ze=St:qe.sibling=St,qe=St,Ge=Tn}if(nt===le.length)return g(ae,Ge),Ht&&Us(ae,nt),ze;if(Ge===null){for(;nt<le.length;nt++)Ge=be(ae,le[nt],_e),Ge!==null&&(re=A(Ge,re,nt),qe===null?ze=Ge:qe.sibling=Ge,qe=Ge);return Ht&&Us(ae,nt),ze}for(Ge=w(ae,Ge);nt<le.length;nt++)Tn=je(Ge,ae,nt,le[nt],_e),Tn!==null&&(l&&Tn.alternate!==null&&Ge.delete(Tn.key===null?nt:Tn.key),re=A(Tn,re,nt),qe===null?ze=Tn:qe.sibling=Tn,qe=Tn);return l&&Ge.forEach(function(as){return d(ae,as)}),Ht&&Us(ae,nt),ze}function $e(ae,re,le,_e){var ze=B(le);if(typeof ze!="function")throw Error(n(150));if(le=ze.call(le),le==null)throw Error(n(151));for(var qe=ze=null,Ge=re,nt=re=0,Tn=null,St=le.next();Ge!==null&&!St.done;nt++,St=le.next()){Ge.index>nt?(Tn=Ge,Ge=null):Tn=Ge.sibling;var as=ye(ae,Ge,St.value,_e);if(as===null){Ge===null&&(Ge=Tn);break}l&&Ge&&as.alternate===null&&d(ae,Ge),re=A(as,re,nt),qe===null?ze=as:qe.sibling=as,qe=as,Ge=Tn}if(St.done)return g(ae,Ge),Ht&&Us(ae,nt),ze;if(Ge===null){for(;!St.done;nt++,St=le.next())St=be(ae,St.value,_e),St!==null&&(re=A(St,re,nt),qe===null?ze=St:qe.sibling=St,qe=St);return Ht&&Us(ae,nt),ze}for(Ge=w(ae,Ge);!St.done;nt++,St=le.next())St=je(Ge,ae,nt,St.value,_e),St!==null&&(l&&St.alternate!==null&&Ge.delete(St.key===null?nt:St.key),re=A(St,re,nt),qe===null?ze=St:qe.sibling=St,qe=St);return l&&Ge.forEach(function(lz){return d(ae,lz)}),Ht&&Us(ae,nt),ze}function on(ae,re,le,_e){if(typeof le=="object"&&le!==null&&le.type===j&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case P:e:{for(var ze=le.key,qe=re;qe!==null;){if(qe.key===ze){if(ze=le.type,ze===j){if(qe.tag===7){g(ae,qe.sibling),re=_(qe,le.props.children),re.return=ae,ae=re;break e}}else if(qe.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===W&&$S(ze)===qe.type){g(ae,qe.sibling),re=_(qe,le.props),re.ref=zu(ae,qe,le),re.return=ae,ae=re;break e}g(ae,qe);break}else d(ae,qe);qe=qe.sibling}le.type===j?(re=Qs(le.props.children,ae.mode,_e,le.key),re.return=ae,ae=re):(_e=ph(le.type,le.key,le.props,null,ae.mode,_e),_e.ref=zu(ae,re,le),_e.return=ae,ae=_e)}return $(ae);case T:e:{for(qe=le.key;re!==null;){if(re.key===qe)if(re.tag===4&&re.stateNode.containerInfo===le.containerInfo&&re.stateNode.implementation===le.implementation){g(ae,re.sibling),re=_(re,le.children||[]),re.return=ae,ae=re;break e}else{g(ae,re);break}else d(ae,re);re=re.sibling}re=Qy(le,ae.mode,_e),re.return=ae,ae=re}return $(ae);case W:return qe=le._init,on(ae,re,qe(le._payload),_e)}if(ue(le))return Le(ae,re,le,_e);if(B(le))return $e(ae,re,le,_e);Uf(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,re!==null&&re.tag===6?(g(ae,re.sibling),re=_(re,le),re.return=ae,ae=re):(g(ae,re),re=Xy(le,ae.mode,_e),re.return=ae,ae=re),$(ae)):g(ae,re)}return on}var Za=zS(!0),BS=zS(!1),Hf=Ko(null),Yf=null,Ka=null,ay=null;function ly(){ay=Ka=Yf=null}function uy(l){var d=Hf.current;$t(Hf),l._currentValue=d}function cy(l,d,g){for(;l!==null;){var w=l.alternate;if((l.childLanes&d)!==d?(l.childLanes|=d,w!==null&&(w.childLanes|=d)):w!==null&&(w.childLanes&d)!==d&&(w.childLanes|=d),l===g)break;l=l.return}}function Xa(l,d){Yf=l,ay=Ka=null,l=l.dependencies,l!==null&&l.firstContext!==null&&(l.lanes&d&&(fr=!0),l.firstContext=null)}function Wr(l){var d=l._currentValue;if(ay!==l)if(l={context:l,memoizedValue:d,next:null},Ka===null){if(Yf===null)throw Error(n(308));Ka=l,Yf.dependencies={lanes:0,firstContext:l}}else Ka=Ka.next=l;return d}var Hs=null;function dy(l){Hs===null?Hs=[l]:Hs.push(l)}function VS(l,d,g,w){var _=d.interleaved;return _===null?(g.next=g,dy(d)):(g.next=_.next,_.next=g),d.interleaved=g,ao(l,w)}function ao(l,d){l.lanes|=d;var g=l.alternate;for(g!==null&&(g.lanes|=d),g=l,l=l.return;l!==null;)l.childLanes|=d,g=l.alternate,g!==null&&(g.childLanes|=d),g=l,l=l.return;return g.tag===3?g.stateNode:null}var Jo=!1;function fy(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function WS(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function lo(l,d){return{eventTime:l,lane:d,tag:0,payload:null,callback:null,next:null}}function es(l,d,g){var w=l.updateQueue;if(w===null)return null;if(w=w.shared,bt&2){var _=w.pending;return _===null?d.next=d:(d.next=_.next,_.next=d),w.pending=d,ao(l,g)}return _=w.interleaved,_===null?(d.next=d,dy(w)):(d.next=_.next,_.next=d),w.interleaved=d,ao(l,g)}function qf(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194240)!==0)){var w=d.lanes;w&=l.pendingLanes,g|=w,d.lanes=g,_g(l,g)}}function US(l,d){var g=l.updateQueue,w=l.alternate;if(w!==null&&(w=w.updateQueue,g===w)){var _=null,A=null;if(g=g.firstBaseUpdate,g!==null){do{var $={eventTime:g.eventTime,lane:g.lane,tag:g.tag,payload:g.payload,callback:g.callback,next:null};A===null?_=A=$:A=A.next=$,g=g.next}while(g!==null);A===null?_=A=d:A=A.next=d}else _=A=d;g={baseState:w.baseState,firstBaseUpdate:_,lastBaseUpdate:A,shared:w.shared,effects:w.effects},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=d:l.next=d,g.lastBaseUpdate=d}function Gf(l,d,g,w){var _=l.updateQueue;Jo=!1;var A=_.firstBaseUpdate,$=_.lastBaseUpdate,X=_.shared.pending;if(X!==null){_.shared.pending=null;var te=X,de=te.next;te.next=null,$===null?A=de:$.next=de,$=te;var ve=l.alternate;ve!==null&&(ve=ve.updateQueue,X=ve.lastBaseUpdate,X!==$&&(X===null?ve.firstBaseUpdate=de:X.next=de,ve.lastBaseUpdate=te))}if(A!==null){var be=_.baseState;$=0,ve=de=te=null,X=A;do{var ye=X.lane,je=X.eventTime;if((w&ye)===ye){ve!==null&&(ve=ve.next={eventTime:je,lane:0,tag:X.tag,payload:X.payload,callback:X.callback,next:null});e:{var Le=l,$e=X;switch(ye=d,je=g,$e.tag){case 1:if(Le=$e.payload,typeof Le=="function"){be=Le.call(je,be,ye);break e}be=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=$e.payload,ye=typeof Le=="function"?Le.call(je,be,ye):Le,ye==null)break e;be=L({},be,ye);break e;case 2:Jo=!0}}X.callback!==null&&X.lane!==0&&(l.flags|=64,ye=_.effects,ye===null?_.effects=[X]:ye.push(X))}else je={eventTime:je,lane:ye,tag:X.tag,payload:X.payload,callback:X.callback,next:null},ve===null?(de=ve=je,te=be):ve=ve.next=je,$|=ye;if(X=X.next,X===null){if(X=_.shared.pending,X===null)break;ye=X,X=ye.next,ye.next=null,_.lastBaseUpdate=ye,_.shared.pending=null}}while(!0);if(ve===null&&(te=be),_.baseState=te,_.firstBaseUpdate=de,_.lastBaseUpdate=ve,d=_.shared.interleaved,d!==null){_=d;do $|=_.lane,_=_.next;while(_!==d)}else A===null&&(_.shared.lanes=0);Gs|=$,l.lanes=$,l.memoizedState=be}}function HS(l,d,g){if(l=d.effects,d.effects=null,l!==null)for(d=0;d<l.length;d++){var w=l[d],_=w.callback;if(_!==null){if(w.callback=null,w=g,typeof _!="function")throw Error(n(191,_));_.call(w)}}}var Bu={},Ri=Ko(Bu),Vu=Ko(Bu),Wu=Ko(Bu);function Ys(l){if(l===Bu)throw Error(n(174));return l}function hy(l,d){switch(Ot(Wu,d),Ot(Vu,l),Ot(Ri,Bu),l=d.nodeType,l){case 9:case 11:d=(d=d.documentElement)?d.namespaceURI:pe(null,"");break;default:l=l===8?d.parentNode:d,d=l.namespaceURI||null,l=l.tagName,d=pe(d,l)}$t(Ri),Ot(Ri,d)}function Qa(){$t(Ri),$t(Vu),$t(Wu)}function YS(l){Ys(Wu.current);var d=Ys(Ri.current),g=pe(d,l.type);d!==g&&(Ot(Vu,l),Ot(Ri,g))}function py(l){Vu.current===l&&($t(Ri),$t(Vu))}var Kt=Ko(0);function Zf(l){for(var d=l;d!==null;){if(d.tag===13){var g=d.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||g.data==="$!"))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if(d.flags&128)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var my=[];function gy(){for(var l=0;l<my.length;l++)my[l]._workInProgressVersionPrimary=null;my.length=0}var Kf=N.ReactCurrentDispatcher,yy=N.ReactCurrentBatchConfig,qs=0,Xt=null,vn=null,_n=null,Xf=!1,Uu=!1,Hu=0,R$=0;function Bn(){throw Error(n(321))}function xy(l,d){if(d===null)return!1;for(var g=0;g<d.length&&g<l.length;g++)if(!si(l[g],d[g]))return!1;return!0}function vy(l,d,g,w,_,A){if(qs=A,Xt=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,Kf.current=l===null||l.memoizedState===null?O$:I$,l=g(w,_),Uu){A=0;do{if(Uu=!1,Hu=0,25<=A)throw Error(n(301));A+=1,_n=vn=null,d.updateQueue=null,Kf.current=L$,l=g(w,_)}while(Uu)}if(Kf.current=eh,d=vn!==null&&vn.next!==null,qs=0,_n=vn=Xt=null,Xf=!1,d)throw Error(n(300));return l}function wy(){var l=Hu!==0;return Hu=0,l}function Mi(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _n===null?Xt.memoizedState=_n=l:_n=_n.next=l,_n}function Ur(){if(vn===null){var l=Xt.alternate;l=l!==null?l.memoizedState:null}else l=vn.next;var d=_n===null?Xt.memoizedState:_n.next;if(d!==null)_n=d,vn=l;else{if(l===null)throw Error(n(310));vn=l,l={memoizedState:vn.memoizedState,baseState:vn.baseState,baseQueue:vn.baseQueue,queue:vn.queue,next:null},_n===null?Xt.memoizedState=_n=l:_n=_n.next=l}return _n}function Yu(l,d){return typeof d=="function"?d(l):d}function by(l){var d=Ur(),g=d.queue;if(g===null)throw Error(n(311));g.lastRenderedReducer=l;var w=vn,_=w.baseQueue,A=g.pending;if(A!==null){if(_!==null){var $=_.next;_.next=A.next,A.next=$}w.baseQueue=_=A,g.pending=null}if(_!==null){A=_.next,w=w.baseState;var X=$=null,te=null,de=A;do{var ve=de.lane;if((qs&ve)===ve)te!==null&&(te=te.next={lane:0,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),w=de.hasEagerState?de.eagerState:l(w,de.action);else{var be={lane:ve,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null};te===null?(X=te=be,$=w):te=te.next=be,Xt.lanes|=ve,Gs|=ve}de=de.next}while(de!==null&&de!==A);te===null?$=w:te.next=X,si(w,d.memoizedState)||(fr=!0),d.memoizedState=w,d.baseState=$,d.baseQueue=te,g.lastRenderedState=w}if(l=g.interleaved,l!==null){_=l;do A=_.lane,Xt.lanes|=A,Gs|=A,_=_.next;while(_!==l)}else _===null&&(g.lanes=0);return[d.memoizedState,g.dispatch]}function ky(l){var d=Ur(),g=d.queue;if(g===null)throw Error(n(311));g.lastRenderedReducer=l;var w=g.dispatch,_=g.pending,A=d.memoizedState;if(_!==null){g.pending=null;var $=_=_.next;do A=l(A,$.action),$=$.next;while($!==_);si(A,d.memoizedState)||(fr=!0),d.memoizedState=A,d.baseQueue===null&&(d.baseState=A),g.lastRenderedState=A}return[A,w]}function qS(){}function GS(l,d){var g=Xt,w=Ur(),_=d(),A=!si(w.memoizedState,_);if(A&&(w.memoizedState=_,fr=!0),w=w.queue,Sy(XS.bind(null,g,w,l),[l]),w.getSnapshot!==d||A||_n!==null&&_n.memoizedState.tag&1){if(g.flags|=2048,qu(9,KS.bind(null,g,w,_,d),void 0,null),Nn===null)throw Error(n(349));qs&30||ZS(g,d,_)}return _}function ZS(l,d,g){l.flags|=16384,l={getSnapshot:d,value:g},d=Xt.updateQueue,d===null?(d={lastEffect:null,stores:null},Xt.updateQueue=d,d.stores=[l]):(g=d.stores,g===null?d.stores=[l]:g.push(l))}function KS(l,d,g,w){d.value=g,d.getSnapshot=w,QS(d)&&JS(l)}function XS(l,d,g){return g(function(){QS(d)&&JS(l)})}function QS(l){var d=l.getSnapshot;l=l.value;try{var g=d();return!si(l,g)}catch{return!0}}function JS(l){var d=ao(l,1);d!==null&&di(d,l,1,-1)}function eE(l){var d=Mi();return typeof l=="function"&&(l=l()),d.memoizedState=d.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yu,lastRenderedState:l},d.queue=l,l=l.dispatch=D$.bind(null,Xt,l),[d.memoizedState,l]}function qu(l,d,g,w){return l={tag:l,create:d,destroy:g,deps:w,next:null},d=Xt.updateQueue,d===null?(d={lastEffect:null,stores:null},Xt.updateQueue=d,d.lastEffect=l.next=l):(g=d.lastEffect,g===null?d.lastEffect=l.next=l:(w=g.next,g.next=l,l.next=w,d.lastEffect=l)),l}function tE(){return Ur().memoizedState}function Qf(l,d,g,w){var _=Mi();Xt.flags|=l,_.memoizedState=qu(1|d,g,void 0,w===void 0?null:w)}function Jf(l,d,g,w){var _=Ur();w=w===void 0?null:w;var A=void 0;if(vn!==null){var $=vn.memoizedState;if(A=$.destroy,w!==null&&xy(w,$.deps)){_.memoizedState=qu(d,g,A,w);return}}Xt.flags|=l,_.memoizedState=qu(1|d,g,A,w)}function nE(l,d){return Qf(8390656,8,l,d)}function Sy(l,d){return Jf(2048,8,l,d)}function rE(l,d){return Jf(4,2,l,d)}function iE(l,d){return Jf(4,4,l,d)}function oE(l,d){if(typeof d=="function")return l=l(),d(l),function(){d(null)};if(d!=null)return l=l(),d.current=l,function(){d.current=null}}function sE(l,d,g){return g=g!=null?g.concat([l]):null,Jf(4,4,oE.bind(null,d,l),g)}function Ey(){}function aE(l,d){var g=Ur();d=d===void 0?null:d;var w=g.memoizedState;return w!==null&&d!==null&&xy(d,w[1])?w[0]:(g.memoizedState=[l,d],l)}function lE(l,d){var g=Ur();d=d===void 0?null:d;var w=g.memoizedState;return w!==null&&d!==null&&xy(d,w[1])?w[0]:(l=l(),g.memoizedState=[l,d],l)}function uE(l,d,g){return qs&21?(si(g,d)||(g=$k(),Xt.lanes|=g,Gs|=g,l.baseState=!0),d):(l.baseState&&(l.baseState=!1,fr=!0),l.memoizedState=g)}function M$(l,d){var g=Tt;Tt=g!==0&&4>g?g:4,l(!0);var w=yy.transition;yy.transition={};try{l(!1),d()}finally{Tt=g,yy.transition=w}}function cE(){return Ur().memoizedState}function j$(l,d,g){var w=is(l);if(g={lane:w,action:g,hasEagerState:!1,eagerState:null,next:null},dE(l))fE(d,g);else if(g=VS(l,d,g,w),g!==null){var _=Jn();di(g,l,w,_),hE(g,d,w)}}function D$(l,d,g){var w=is(l),_={lane:w,action:g,hasEagerState:!1,eagerState:null,next:null};if(dE(l))fE(d,_);else{var A=l.alternate;if(l.lanes===0&&(A===null||A.lanes===0)&&(A=d.lastRenderedReducer,A!==null))try{var $=d.lastRenderedState,X=A($,g);if(_.hasEagerState=!0,_.eagerState=X,si(X,$)){var te=d.interleaved;te===null?(_.next=_,dy(d)):(_.next=te.next,te.next=_),d.interleaved=_;return}}catch{}finally{}g=VS(l,d,_,w),g!==null&&(_=Jn(),di(g,l,w,_),hE(g,d,w))}}function dE(l){var d=l.alternate;return l===Xt||d!==null&&d===Xt}function fE(l,d){Uu=Xf=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function hE(l,d,g){if(g&4194240){var w=d.lanes;w&=l.pendingLanes,g|=w,d.lanes=g,_g(l,g)}}var eh={readContext:Wr,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useInsertionEffect:Bn,useLayoutEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useMutableSource:Bn,useSyncExternalStore:Bn,useId:Bn,unstable_isNewReconciler:!1},O$={readContext:Wr,useCallback:function(l,d){return Mi().memoizedState=[l,d===void 0?null:d],l},useContext:Wr,useEffect:nE,useImperativeHandle:function(l,d,g){return g=g!=null?g.concat([l]):null,Qf(4194308,4,oE.bind(null,d,l),g)},useLayoutEffect:function(l,d){return Qf(4194308,4,l,d)},useInsertionEffect:function(l,d){return Qf(4,2,l,d)},useMemo:function(l,d){var g=Mi();return d=d===void 0?null:d,l=l(),g.memoizedState=[l,d],l},useReducer:function(l,d,g){var w=Mi();return d=g!==void 0?g(d):d,w.memoizedState=w.baseState=d,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:d},w.queue=l,l=l.dispatch=j$.bind(null,Xt,l),[w.memoizedState,l]},useRef:function(l){var d=Mi();return l={current:l},d.memoizedState=l},useState:eE,useDebugValue:Ey,useDeferredValue:function(l){return Mi().memoizedState=l},useTransition:function(){var l=eE(!1),d=l[0];return l=M$.bind(null,l[1]),Mi().memoizedState=l,[d,l]},useMutableSource:function(){},useSyncExternalStore:function(l,d,g){var w=Xt,_=Mi();if(Ht){if(g===void 0)throw Error(n(407));g=g()}else{if(g=d(),Nn===null)throw Error(n(349));qs&30||ZS(w,d,g)}_.memoizedState=g;var A={value:g,getSnapshot:d};return _.queue=A,nE(XS.bind(null,w,A,l),[l]),w.flags|=2048,qu(9,KS.bind(null,w,A,g,d),void 0,null),g},useId:function(){var l=Mi(),d=Nn.identifierPrefix;if(Ht){var g=so,w=oo;g=(w&~(1<<32-br(w)-1)).toString(32)+g,d=":"+d+"R"+g,g=Hu++,0<g&&(d+="H"+g.toString(32)),d+=":"}else g=R$++,d=":"+d+"r"+g.toString(32)+":";return l.memoizedState=d},unstable_isNewReconciler:!1},I$={readContext:Wr,useCallback:aE,useContext:Wr,useEffect:Sy,useImperativeHandle:sE,useInsertionEffect:rE,useLayoutEffect:iE,useMemo:lE,useReducer:by,useRef:tE,useState:function(){return by(Yu)},useDebugValue:Ey,useDeferredValue:function(l){var d=Ur();return uE(d,vn.memoizedState,l)},useTransition:function(){var l=by(Yu)[0],d=Ur().memoizedState;return[l,d]},useMutableSource:qS,useSyncExternalStore:GS,useId:cE,unstable_isNewReconciler:!1},L$={readContext:Wr,useCallback:aE,useContext:Wr,useEffect:Sy,useImperativeHandle:sE,useInsertionEffect:rE,useLayoutEffect:iE,useMemo:lE,useReducer:ky,useRef:tE,useState:function(){return ky(Yu)},useDebugValue:Ey,useDeferredValue:function(l){var d=Ur();return vn===null?d.memoizedState=l:uE(d,vn.memoizedState,l)},useTransition:function(){var l=ky(Yu)[0],d=Ur().memoizedState;return[l,d]},useMutableSource:qS,useSyncExternalStore:GS,useId:cE,unstable_isNewReconciler:!1};function li(l,d){if(l&&l.defaultProps){d=L({},d),l=l.defaultProps;for(var g in l)d[g]===void 0&&(d[g]=l[g]);return d}return d}function Cy(l,d,g,w){d=l.memoizedState,g=g(w,d),g=g==null?d:L({},d,g),l.memoizedState=g,l.lanes===0&&(l.updateQueue.baseState=g)}var th={isMounted:function(l){return(l=l._reactInternals)?Ai(l)===l:!1},enqueueSetState:function(l,d,g){l=l._reactInternals;var w=Jn(),_=is(l),A=lo(w,_);A.payload=d,g!=null&&(A.callback=g),d=es(l,A,_),d!==null&&(di(d,l,_,w),qf(d,l,_))},enqueueReplaceState:function(l,d,g){l=l._reactInternals;var w=Jn(),_=is(l),A=lo(w,_);A.tag=1,A.payload=d,g!=null&&(A.callback=g),d=es(l,A,_),d!==null&&(di(d,l,_,w),qf(d,l,_))},enqueueForceUpdate:function(l,d){l=l._reactInternals;var g=Jn(),w=is(l),_=lo(g,w);_.tag=2,d!=null&&(_.callback=d),d=es(l,_,w),d!==null&&(di(d,l,w,g),qf(d,l,w))}};function pE(l,d,g,w,_,A,$){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(w,A,$):d.prototype&&d.prototype.isPureReactComponent?!ju(g,w)||!ju(_,A):!0}function mE(l,d,g){var w=!1,_=Xo,A=d.contextType;return typeof A=="object"&&A!==null?A=Wr(A):(_=dr(d)?Vs:zn.current,w=d.contextTypes,A=(w=w!=null)?Ha(l,_):Xo),d=new d(g,A),l.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=th,l.stateNode=d,d._reactInternals=l,w&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=_,l.__reactInternalMemoizedMaskedChildContext=A),d}function gE(l,d,g,w){l=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(g,w),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(g,w),d.state!==l&&th.enqueueReplaceState(d,d.state,null)}function _y(l,d,g,w){var _=l.stateNode;_.props=g,_.state=l.memoizedState,_.refs={},fy(l);var A=d.contextType;typeof A=="object"&&A!==null?_.context=Wr(A):(A=dr(d)?Vs:zn.current,_.context=Ha(l,A)),_.state=l.memoizedState,A=d.getDerivedStateFromProps,typeof A=="function"&&(Cy(l,d,A,g),_.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(d=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),d!==_.state&&th.enqueueReplaceState(_,_.state,null),Gf(l,g,_,w),_.state=l.memoizedState),typeof _.componentDidMount=="function"&&(l.flags|=4194308)}function Ja(l,d){try{var g="",w=d;do g+=K(w),w=w.return;while(w);var _=g}catch(A){_=`
|
|
39
|
+
Error generating stack: `+A.message+`
|
|
40
|
+
`+A.stack}return{value:l,source:d,stack:_,digest:null}}function Ny(l,d,g){return{value:l,source:null,stack:g??null,digest:d??null}}function Ty(l,d){try{console.error(d.value)}catch(g){setTimeout(function(){throw g})}}var F$=typeof WeakMap=="function"?WeakMap:Map;function yE(l,d,g){g=lo(-1,g),g.tag=3,g.payload={element:null};var w=d.value;return g.callback=function(){lh||(lh=!0,Wy=w),Ty(l,d)},g}function xE(l,d,g){g=lo(-1,g),g.tag=3;var w=l.type.getDerivedStateFromError;if(typeof w=="function"){var _=d.value;g.payload=function(){return w(_)},g.callback=function(){Ty(l,d)}}var A=l.stateNode;return A!==null&&typeof A.componentDidCatch=="function"&&(g.callback=function(){Ty(l,d),typeof w!="function"&&(ns===null?ns=new Set([this]):ns.add(this));var $=d.stack;this.componentDidCatch(d.value,{componentStack:$!==null?$:""})}),g}function vE(l,d,g){var w=l.pingCache;if(w===null){w=l.pingCache=new F$;var _=new Set;w.set(d,_)}else _=w.get(d),_===void 0&&(_=new Set,w.set(d,_));_.has(g)||(_.add(g),l=Q$.bind(null,l,d,g),d.then(l,l))}function wE(l){do{var d;if((d=l.tag===13)&&(d=l.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return l;l=l.return}while(l!==null);return null}function bE(l,d,g,w,_){return l.mode&1?(l.flags|=65536,l.lanes=_,l):(l===d?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(d=lo(-1,1),d.tag=2,es(g,d,1))),g.lanes|=1),l)}var $$=N.ReactCurrentOwner,fr=!1;function Qn(l,d,g,w){d.child=l===null?BS(d,null,g,w):Za(d,l.child,g,w)}function kE(l,d,g,w,_){g=g.render;var A=d.ref;return Xa(d,_),w=vy(l,d,g,w,A,_),g=wy(),l!==null&&!fr?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~_,uo(l,d,_)):(Ht&&g&&ny(d),d.flags|=1,Qn(l,d,w,_),d.child)}function SE(l,d,g,w,_){if(l===null){var A=g.type;return typeof A=="function"&&!Ky(A)&&A.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(d.tag=15,d.type=A,EE(l,d,A,w,_)):(l=ph(g.type,null,w,d,d.mode,_),l.ref=d.ref,l.return=d,d.child=l)}if(A=l.child,!(l.lanes&_)){var $=A.memoizedProps;if(g=g.compare,g=g!==null?g:ju,g($,w)&&l.ref===d.ref)return uo(l,d,_)}return d.flags|=1,l=ss(A,w),l.ref=d.ref,l.return=d,d.child=l}function EE(l,d,g,w,_){if(l!==null){var A=l.memoizedProps;if(ju(A,w)&&l.ref===d.ref)if(fr=!1,d.pendingProps=w=A,(l.lanes&_)!==0)l.flags&131072&&(fr=!0);else return d.lanes=l.lanes,uo(l,d,_)}return Ay(l,d,g,w,_)}function CE(l,d,g){var w=d.pendingProps,_=w.children,A=l!==null?l.memoizedState:null;if(w.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ot(tl,Cr),Cr|=g;else{if(!(g&1073741824))return l=A!==null?A.baseLanes|g:g,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:l,cachePool:null,transitions:null},d.updateQueue=null,Ot(tl,Cr),Cr|=l,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=A!==null?A.baseLanes:g,Ot(tl,Cr),Cr|=w}else A!==null?(w=A.baseLanes|g,d.memoizedState=null):w=g,Ot(tl,Cr),Cr|=w;return Qn(l,d,_,g),d.child}function _E(l,d){var g=d.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(d.flags|=512,d.flags|=2097152)}function Ay(l,d,g,w,_){var A=dr(g)?Vs:zn.current;return A=Ha(d,A),Xa(d,_),g=vy(l,d,g,w,A,_),w=wy(),l!==null&&!fr?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~_,uo(l,d,_)):(Ht&&w&&ny(d),d.flags|=1,Qn(l,d,g,_),d.child)}function NE(l,d,g,w,_){if(dr(g)){var A=!0;$f(d)}else A=!1;if(Xa(d,_),d.stateNode===null)rh(l,d),mE(d,g,w),_y(d,g,w,_),w=!0;else if(l===null){var $=d.stateNode,X=d.memoizedProps;$.props=X;var te=$.context,de=g.contextType;typeof de=="object"&&de!==null?de=Wr(de):(de=dr(g)?Vs:zn.current,de=Ha(d,de));var ve=g.getDerivedStateFromProps,be=typeof ve=="function"||typeof $.getSnapshotBeforeUpdate=="function";be||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(X!==w||te!==de)&&gE(d,$,w,de),Jo=!1;var ye=d.memoizedState;$.state=ye,Gf(d,w,$,_),te=d.memoizedState,X!==w||ye!==te||cr.current||Jo?(typeof ve=="function"&&(Cy(d,g,ve,w),te=d.memoizedState),(X=Jo||pE(d,g,X,w,ye,te,de))?(be||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount()),typeof $.componentDidMount=="function"&&(d.flags|=4194308)):(typeof $.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=w,d.memoizedState=te),$.props=w,$.state=te,$.context=de,w=X):(typeof $.componentDidMount=="function"&&(d.flags|=4194308),w=!1)}else{$=d.stateNode,WS(l,d),X=d.memoizedProps,de=d.type===d.elementType?X:li(d.type,X),$.props=de,be=d.pendingProps,ye=$.context,te=g.contextType,typeof te=="object"&&te!==null?te=Wr(te):(te=dr(g)?Vs:zn.current,te=Ha(d,te));var je=g.getDerivedStateFromProps;(ve=typeof je=="function"||typeof $.getSnapshotBeforeUpdate=="function")||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(X!==be||ye!==te)&&gE(d,$,w,te),Jo=!1,ye=d.memoizedState,$.state=ye,Gf(d,w,$,_);var Le=d.memoizedState;X!==be||ye!==Le||cr.current||Jo?(typeof je=="function"&&(Cy(d,g,je,w),Le=d.memoizedState),(de=Jo||pE(d,g,de,w,ye,Le,te)||!1)?(ve||typeof $.UNSAFE_componentWillUpdate!="function"&&typeof $.componentWillUpdate!="function"||(typeof $.componentWillUpdate=="function"&&$.componentWillUpdate(w,Le,te),typeof $.UNSAFE_componentWillUpdate=="function"&&$.UNSAFE_componentWillUpdate(w,Le,te)),typeof $.componentDidUpdate=="function"&&(d.flags|=4),typeof $.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof $.componentDidUpdate!="function"||X===l.memoizedProps&&ye===l.memoizedState||(d.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&ye===l.memoizedState||(d.flags|=1024),d.memoizedProps=w,d.memoizedState=Le),$.props=w,$.state=Le,$.context=te,w=de):(typeof $.componentDidUpdate!="function"||X===l.memoizedProps&&ye===l.memoizedState||(d.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&ye===l.memoizedState||(d.flags|=1024),w=!1)}return Py(l,d,g,w,A,_)}function Py(l,d,g,w,_,A){_E(l,d);var $=(d.flags&128)!==0;if(!w&&!$)return _&&MS(d,g,!1),uo(l,d,A);w=d.stateNode,$$.current=d;var X=$&&typeof g.getDerivedStateFromError!="function"?null:w.render();return d.flags|=1,l!==null&&$?(d.child=Za(d,l.child,null,A),d.child=Za(d,null,X,A)):Qn(l,d,X,A),d.memoizedState=w.state,_&&MS(d,g,!0),d.child}function TE(l){var d=l.stateNode;d.pendingContext?PS(l,d.pendingContext,d.pendingContext!==d.context):d.context&&PS(l,d.context,!1),hy(l,d.containerInfo)}function AE(l,d,g,w,_){return Ga(),sy(_),d.flags|=256,Qn(l,d,g,w),d.child}var Ry={dehydrated:null,treeContext:null,retryLane:0};function My(l){return{baseLanes:l,cachePool:null,transitions:null}}function PE(l,d,g){var w=d.pendingProps,_=Kt.current,A=!1,$=(d.flags&128)!==0,X;if((X=$)||(X=l!==null&&l.memoizedState===null?!1:(_&2)!==0),X?(A=!0,d.flags&=-129):(l===null||l.memoizedState!==null)&&(_|=1),Ot(Kt,_&1),l===null)return oy(d),l=d.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(d.mode&1?l.data==="$!"?d.lanes=8:d.lanes=1073741824:d.lanes=1,null):($=w.children,l=w.fallback,A?(w=d.mode,A=d.child,$={mode:"hidden",children:$},!(w&1)&&A!==null?(A.childLanes=0,A.pendingProps=$):A=mh($,w,0,null),l=Qs(l,w,g,null),A.return=d,l.return=d,A.sibling=l,d.child=A,d.child.memoizedState=My(g),d.memoizedState=Ry,l):jy(d,$));if(_=l.memoizedState,_!==null&&(X=_.dehydrated,X!==null))return z$(l,d,$,w,X,_,g);if(A){A=w.fallback,$=d.mode,_=l.child,X=_.sibling;var te={mode:"hidden",children:w.children};return!($&1)&&d.child!==_?(w=d.child,w.childLanes=0,w.pendingProps=te,d.deletions=null):(w=ss(_,te),w.subtreeFlags=_.subtreeFlags&14680064),X!==null?A=ss(X,A):(A=Qs(A,$,g,null),A.flags|=2),A.return=d,w.return=d,w.sibling=A,d.child=w,w=A,A=d.child,$=l.child.memoizedState,$=$===null?My(g):{baseLanes:$.baseLanes|g,cachePool:null,transitions:$.transitions},A.memoizedState=$,A.childLanes=l.childLanes&~g,d.memoizedState=Ry,w}return A=l.child,l=A.sibling,w=ss(A,{mode:"visible",children:w.children}),!(d.mode&1)&&(w.lanes=g),w.return=d,w.sibling=null,l!==null&&(g=d.deletions,g===null?(d.deletions=[l],d.flags|=16):g.push(l)),d.child=w,d.memoizedState=null,w}function jy(l,d){return d=mh({mode:"visible",children:d},l.mode,0,null),d.return=l,l.child=d}function nh(l,d,g,w){return w!==null&&sy(w),Za(d,l.child,null,g),l=jy(d,d.pendingProps.children),l.flags|=2,d.memoizedState=null,l}function z$(l,d,g,w,_,A,$){if(g)return d.flags&256?(d.flags&=-257,w=Ny(Error(n(422))),nh(l,d,$,w)):d.memoizedState!==null?(d.child=l.child,d.flags|=128,null):(A=w.fallback,_=d.mode,w=mh({mode:"visible",children:w.children},_,0,null),A=Qs(A,_,$,null),A.flags|=2,w.return=d,A.return=d,w.sibling=A,d.child=w,d.mode&1&&Za(d,l.child,null,$),d.child.memoizedState=My($),d.memoizedState=Ry,A);if(!(d.mode&1))return nh(l,d,$,null);if(_.data==="$!"){if(w=_.nextSibling&&_.nextSibling.dataset,w)var X=w.dgst;return w=X,A=Error(n(419)),w=Ny(A,w,void 0),nh(l,d,$,w)}if(X=($&l.childLanes)!==0,fr||X){if(w=Nn,w!==null){switch($&-$){case 4:_=2;break;case 16:_=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:_=32;break;case 536870912:_=268435456;break;default:_=0}_=_&(w.suspendedLanes|$)?0:_,_!==0&&_!==A.retryLane&&(A.retryLane=_,ao(l,_),di(w,l,_,-1))}return Zy(),w=Ny(Error(n(421))),nh(l,d,$,w)}return _.data==="$?"?(d.flags|=128,d.child=l.child,d=J$.bind(null,l),_._reactRetry=d,null):(l=A.treeContext,Er=Zo(_.nextSibling),Sr=d,Ht=!0,ai=null,l!==null&&(Br[Vr++]=oo,Br[Vr++]=so,Br[Vr++]=Ws,oo=l.id,so=l.overflow,Ws=d),d=jy(d,w.children),d.flags|=4096,d)}function RE(l,d,g){l.lanes|=d;var w=l.alternate;w!==null&&(w.lanes|=d),cy(l.return,d,g)}function Dy(l,d,g,w,_){var A=l.memoizedState;A===null?l.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:w,tail:g,tailMode:_}:(A.isBackwards=d,A.rendering=null,A.renderingStartTime=0,A.last=w,A.tail=g,A.tailMode=_)}function ME(l,d,g){var w=d.pendingProps,_=w.revealOrder,A=w.tail;if(Qn(l,d,w.children,g),w=Kt.current,w&2)w=w&1|2,d.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=d.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&RE(l,g,d);else if(l.tag===19)RE(l,g,d);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===d)break e;for(;l.sibling===null;){if(l.return===null||l.return===d)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}w&=1}if(Ot(Kt,w),!(d.mode&1))d.memoizedState=null;else switch(_){case"forwards":for(g=d.child,_=null;g!==null;)l=g.alternate,l!==null&&Zf(l)===null&&(_=g),g=g.sibling;g=_,g===null?(_=d.child,d.child=null):(_=g.sibling,g.sibling=null),Dy(d,!1,_,g,A);break;case"backwards":for(g=null,_=d.child,d.child=null;_!==null;){if(l=_.alternate,l!==null&&Zf(l)===null){d.child=_;break}l=_.sibling,_.sibling=g,g=_,_=l}Dy(d,!0,g,null,A);break;case"together":Dy(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function rh(l,d){!(d.mode&1)&&l!==null&&(l.alternate=null,d.alternate=null,d.flags|=2)}function uo(l,d,g){if(l!==null&&(d.dependencies=l.dependencies),Gs|=d.lanes,!(g&d.childLanes))return null;if(l!==null&&d.child!==l.child)throw Error(n(153));if(d.child!==null){for(l=d.child,g=ss(l,l.pendingProps),d.child=g,g.return=d;l.sibling!==null;)l=l.sibling,g=g.sibling=ss(l,l.pendingProps),g.return=d;g.sibling=null}return d.child}function B$(l,d,g){switch(d.tag){case 3:TE(d),Ga();break;case 5:YS(d);break;case 1:dr(d.type)&&$f(d);break;case 4:hy(d,d.stateNode.containerInfo);break;case 10:var w=d.type._context,_=d.memoizedProps.value;Ot(Hf,w._currentValue),w._currentValue=_;break;case 13:if(w=d.memoizedState,w!==null)return w.dehydrated!==null?(Ot(Kt,Kt.current&1),d.flags|=128,null):g&d.child.childLanes?PE(l,d,g):(Ot(Kt,Kt.current&1),l=uo(l,d,g),l!==null?l.sibling:null);Ot(Kt,Kt.current&1);break;case 19:if(w=(g&d.childLanes)!==0,l.flags&128){if(w)return ME(l,d,g);d.flags|=128}if(_=d.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),Ot(Kt,Kt.current),w)break;return null;case 22:case 23:return d.lanes=0,CE(l,d,g)}return uo(l,d,g)}var jE,Oy,DE,OE;jE=function(l,d){for(var g=d.child;g!==null;){if(g.tag===5||g.tag===6)l.appendChild(g.stateNode);else if(g.tag!==4&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===d)break;for(;g.sibling===null;){if(g.return===null||g.return===d)return;g=g.return}g.sibling.return=g.return,g=g.sibling}},Oy=function(){},DE=function(l,d,g,w){var _=l.memoizedProps;if(_!==w){l=d.stateNode,Ys(Ri.current);var A=null;switch(g){case"input":_=Me(l,_),w=Me(l,w),A=[];break;case"select":_=L({},_,{value:void 0}),w=L({},w,{value:void 0}),A=[];break;case"textarea":_=we(l,_),w=we(l,w),A=[];break;default:typeof _.onClick!="function"&&typeof w.onClick=="function"&&(l.onclick=If)}pt(g,w);var $;g=null;for(de in _)if(!w.hasOwnProperty(de)&&_.hasOwnProperty(de)&&_[de]!=null)if(de==="style"){var X=_[de];for($ in X)X.hasOwnProperty($)&&(g||(g={}),g[$]="")}else de!=="dangerouslySetInnerHTML"&&de!=="children"&&de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&de!=="autoFocus"&&(i.hasOwnProperty(de)?A||(A=[]):(A=A||[]).push(de,null));for(de in w){var te=w[de];if(X=_!=null?_[de]:void 0,w.hasOwnProperty(de)&&te!==X&&(te!=null||X!=null))if(de==="style")if(X){for($ in X)!X.hasOwnProperty($)||te&&te.hasOwnProperty($)||(g||(g={}),g[$]="");for($ in te)te.hasOwnProperty($)&&X[$]!==te[$]&&(g||(g={}),g[$]=te[$])}else g||(A||(A=[]),A.push(de,g)),g=te;else de==="dangerouslySetInnerHTML"?(te=te?te.__html:void 0,X=X?X.__html:void 0,te!=null&&X!==te&&(A=A||[]).push(de,te)):de==="children"?typeof te!="string"&&typeof te!="number"||(A=A||[]).push(de,""+te):de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&(i.hasOwnProperty(de)?(te!=null&&de==="onScroll"&&Ft("scroll",l),A||X===te||(A=[])):(A=A||[]).push(de,te))}g&&(A=A||[]).push("style",g);var de=A;(d.updateQueue=de)&&(d.flags|=4)}},OE=function(l,d,g,w){g!==w&&(d.flags|=4)};function Gu(l,d){if(!Ht)switch(l.tailMode){case"hidden":d=l.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l.tail=null:g.sibling=null;break;case"collapsed":g=l.tail;for(var w=null;g!==null;)g.alternate!==null&&(w=g),g=g.sibling;w===null?d||l.tail===null?l.tail=null:l.tail.sibling=null:w.sibling=null}}function Vn(l){var d=l.alternate!==null&&l.alternate.child===l.child,g=0,w=0;if(d)for(var _=l.child;_!==null;)g|=_.lanes|_.childLanes,w|=_.subtreeFlags&14680064,w|=_.flags&14680064,_.return=l,_=_.sibling;else for(_=l.child;_!==null;)g|=_.lanes|_.childLanes,w|=_.subtreeFlags,w|=_.flags,_.return=l,_=_.sibling;return l.subtreeFlags|=w,l.childLanes=g,d}function V$(l,d,g){var w=d.pendingProps;switch(ry(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vn(d),null;case 1:return dr(d.type)&&Ff(),Vn(d),null;case 3:return w=d.stateNode,Qa(),$t(cr),$t(zn),gy(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),(l===null||l.child===null)&&(Wf(d)?d.flags|=4:l===null||l.memoizedState.isDehydrated&&!(d.flags&256)||(d.flags|=1024,ai!==null&&(Yy(ai),ai=null))),Oy(l,d),Vn(d),null;case 5:py(d);var _=Ys(Wu.current);if(g=d.type,l!==null&&d.stateNode!=null)DE(l,d,g,w,_),l.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!w){if(d.stateNode===null)throw Error(n(166));return Vn(d),null}if(l=Ys(Ri.current),Wf(d)){w=d.stateNode,g=d.type;var A=d.memoizedProps;switch(w[Pi]=d,w[Fu]=A,l=(d.mode&1)!==0,g){case"dialog":Ft("cancel",w),Ft("close",w);break;case"iframe":case"object":case"embed":Ft("load",w);break;case"video":case"audio":for(_=0;_<Ou.length;_++)Ft(Ou[_],w);break;case"source":Ft("error",w);break;case"img":case"image":case"link":Ft("error",w),Ft("load",w);break;case"details":Ft("toggle",w);break;case"input":Ve(w,A),Ft("invalid",w);break;case"select":w._wrapperState={wasMultiple:!!A.multiple},Ft("invalid",w);break;case"textarea":ge(w,A),Ft("invalid",w)}pt(g,A),_=null;for(var $ in A)if(A.hasOwnProperty($)){var X=A[$];$==="children"?typeof X=="string"?w.textContent!==X&&(A.suppressHydrationWarning!==!0&&Of(w.textContent,X,l),_=["children",X]):typeof X=="number"&&w.textContent!==""+X&&(A.suppressHydrationWarning!==!0&&Of(w.textContent,X,l),_=["children",""+X]):i.hasOwnProperty($)&&X!=null&&$==="onScroll"&&Ft("scroll",w)}switch(g){case"input":Ee(w),Q(w,A,!0);break;case"textarea":Ee(w),Fe(w);break;case"select":case"option":break;default:typeof A.onClick=="function"&&(w.onclick=If)}w=_,d.updateQueue=w,w!==null&&(d.flags|=4)}else{$=_.nodeType===9?_:_.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=se(g)),l==="http://www.w3.org/1999/xhtml"?g==="script"?(l=$.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild)):typeof w.is=="string"?l=$.createElement(g,{is:w.is}):(l=$.createElement(g),g==="select"&&($=l,w.multiple?$.multiple=!0:w.size&&($.size=w.size))):l=$.createElementNS(l,g),l[Pi]=d,l[Fu]=w,jE(l,d,!1,!1),d.stateNode=l;e:{switch($=gn(g,w),g){case"dialog":Ft("cancel",l),Ft("close",l),_=w;break;case"iframe":case"object":case"embed":Ft("load",l),_=w;break;case"video":case"audio":for(_=0;_<Ou.length;_++)Ft(Ou[_],l);_=w;break;case"source":Ft("error",l),_=w;break;case"img":case"image":case"link":Ft("error",l),Ft("load",l),_=w;break;case"details":Ft("toggle",l),_=w;break;case"input":Ve(l,w),_=Me(l,w),Ft("invalid",l);break;case"option":_=w;break;case"select":l._wrapperState={wasMultiple:!!w.multiple},_=L({},w,{value:void 0}),Ft("invalid",l);break;case"textarea":ge(l,w),_=we(l,w),Ft("invalid",l);break;default:_=w}pt(g,_),X=_;for(A in X)if(X.hasOwnProperty(A)){var te=X[A];A==="style"?it(l,te):A==="dangerouslySetInnerHTML"?(te=te?te.__html:void 0,te!=null&&et(l,te)):A==="children"?typeof te=="string"?(g!=="textarea"||te!=="")&&rt(l,te):typeof te=="number"&&rt(l,""+te):A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&A!=="autoFocus"&&(i.hasOwnProperty(A)?te!=null&&A==="onScroll"&&Ft("scroll",l):te!=null&&C(l,A,te,$))}switch(g){case"input":Ee(l),Q(l,w,!1);break;case"textarea":Ee(l),Fe(l);break;case"option":w.value!=null&&l.setAttribute("value",""+ie(w.value));break;case"select":l.multiple=!!w.multiple,A=w.value,A!=null?Se(l,!!w.multiple,A,!1):w.defaultValue!=null&&Se(l,!!w.multiple,w.defaultValue,!0);break;default:typeof _.onClick=="function"&&(l.onclick=If)}switch(g){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}}w&&(d.flags|=4)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return Vn(d),null;case 6:if(l&&d.stateNode!=null)OE(l,d,l.memoizedProps,w);else{if(typeof w!="string"&&d.stateNode===null)throw Error(n(166));if(g=Ys(Wu.current),Ys(Ri.current),Wf(d)){if(w=d.stateNode,g=d.memoizedProps,w[Pi]=d,(A=w.nodeValue!==g)&&(l=Sr,l!==null))switch(l.tag){case 3:Of(w.nodeValue,g,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&Of(w.nodeValue,g,(l.mode&1)!==0)}A&&(d.flags|=4)}else w=(g.nodeType===9?g:g.ownerDocument).createTextNode(w),w[Pi]=d,d.stateNode=w}return Vn(d),null;case 13:if($t(Kt),w=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(Ht&&Er!==null&&d.mode&1&&!(d.flags&128))FS(),Ga(),d.flags|=98560,A=!1;else if(A=Wf(d),w!==null&&w.dehydrated!==null){if(l===null){if(!A)throw Error(n(318));if(A=d.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));A[Pi]=d}else Ga(),!(d.flags&128)&&(d.memoizedState=null),d.flags|=4;Vn(d),A=!1}else ai!==null&&(Yy(ai),ai=null),A=!0;if(!A)return d.flags&65536?d:null}return d.flags&128?(d.lanes=g,d):(w=w!==null,w!==(l!==null&&l.memoizedState!==null)&&w&&(d.child.flags|=8192,d.mode&1&&(l===null||Kt.current&1?wn===0&&(wn=3):Zy())),d.updateQueue!==null&&(d.flags|=4),Vn(d),null);case 4:return Qa(),Oy(l,d),l===null&&Iu(d.stateNode.containerInfo),Vn(d),null;case 10:return uy(d.type._context),Vn(d),null;case 17:return dr(d.type)&&Ff(),Vn(d),null;case 19:if($t(Kt),A=d.memoizedState,A===null)return Vn(d),null;if(w=(d.flags&128)!==0,$=A.rendering,$===null)if(w)Gu(A,!1);else{if(wn!==0||l!==null&&l.flags&128)for(l=d.child;l!==null;){if($=Zf(l),$!==null){for(d.flags|=128,Gu(A,!1),w=$.updateQueue,w!==null&&(d.updateQueue=w,d.flags|=4),d.subtreeFlags=0,w=g,g=d.child;g!==null;)A=g,l=w,A.flags&=14680066,$=A.alternate,$===null?(A.childLanes=0,A.lanes=l,A.child=null,A.subtreeFlags=0,A.memoizedProps=null,A.memoizedState=null,A.updateQueue=null,A.dependencies=null,A.stateNode=null):(A.childLanes=$.childLanes,A.lanes=$.lanes,A.child=$.child,A.subtreeFlags=0,A.deletions=null,A.memoizedProps=$.memoizedProps,A.memoizedState=$.memoizedState,A.updateQueue=$.updateQueue,A.type=$.type,l=$.dependencies,A.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),g=g.sibling;return Ot(Kt,Kt.current&1|2),d.child}l=l.sibling}A.tail!==null&&Zt()>nl&&(d.flags|=128,w=!0,Gu(A,!1),d.lanes=4194304)}else{if(!w)if(l=Zf($),l!==null){if(d.flags|=128,w=!0,g=l.updateQueue,g!==null&&(d.updateQueue=g,d.flags|=4),Gu(A,!0),A.tail===null&&A.tailMode==="hidden"&&!$.alternate&&!Ht)return Vn(d),null}else 2*Zt()-A.renderingStartTime>nl&&g!==1073741824&&(d.flags|=128,w=!0,Gu(A,!1),d.lanes=4194304);A.isBackwards?($.sibling=d.child,d.child=$):(g=A.last,g!==null?g.sibling=$:d.child=$,A.last=$)}return A.tail!==null?(d=A.tail,A.rendering=d,A.tail=d.sibling,A.renderingStartTime=Zt(),d.sibling=null,g=Kt.current,Ot(Kt,w?g&1|2:g&1),d):(Vn(d),null);case 22:case 23:return Gy(),w=d.memoizedState!==null,l!==null&&l.memoizedState!==null!==w&&(d.flags|=8192),w&&d.mode&1?Cr&1073741824&&(Vn(d),d.subtreeFlags&6&&(d.flags|=8192)):Vn(d),null;case 24:return null;case 25:return null}throw Error(n(156,d.tag))}function W$(l,d){switch(ry(d),d.tag){case 1:return dr(d.type)&&Ff(),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Qa(),$t(cr),$t(zn),gy(),l=d.flags,l&65536&&!(l&128)?(d.flags=l&-65537|128,d):null;case 5:return py(d),null;case 13:if($t(Kt),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(n(340));Ga()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return $t(Kt),null;case 4:return Qa(),null;case 10:return uy(d.type._context),null;case 22:case 23:return Gy(),null;case 24:return null;default:return null}}var ih=!1,Wn=!1,U$=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function el(l,d){var g=l.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(w){en(l,d,w)}else g.current=null}function Iy(l,d,g){try{g()}catch(w){en(l,d,w)}}var IE=!1;function H$(l,d){if(Gg=Ef,l=pS(),zg(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var w=g.getSelection&&g.getSelection();if(w&&w.rangeCount!==0){g=w.anchorNode;var _=w.anchorOffset,A=w.focusNode;w=w.focusOffset;try{g.nodeType,A.nodeType}catch{g=null;break e}var $=0,X=-1,te=-1,de=0,ve=0,be=l,ye=null;t:for(;;){for(var je;be!==g||_!==0&&be.nodeType!==3||(X=$+_),be!==A||w!==0&&be.nodeType!==3||(te=$+w),be.nodeType===3&&($+=be.nodeValue.length),(je=be.firstChild)!==null;)ye=be,be=je;for(;;){if(be===l)break t;if(ye===g&&++de===_&&(X=$),ye===A&&++ve===w&&(te=$),(je=be.nextSibling)!==null)break;be=ye,ye=be.parentNode}be=je}g=X===-1||te===-1?null:{start:X,end:te}}else g=null}g=g||{start:0,end:0}}else g=null;for(Zg={focusedElem:l,selectionRange:g},Ef=!1,Ie=d;Ie!==null;)if(d=Ie,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,Ie=l;else for(;Ie!==null;){d=Ie;try{var Le=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var $e=Le.memoizedProps,on=Le.memoizedState,ae=d.stateNode,re=ae.getSnapshotBeforeUpdate(d.elementType===d.type?$e:li(d.type,$e),on);ae.__reactInternalSnapshotBeforeUpdate=re}break;case 3:var le=d.stateNode.containerInfo;le.nodeType===1?le.textContent="":le.nodeType===9&&le.documentElement&&le.removeChild(le.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(_e){en(d,d.return,_e)}if(l=d.sibling,l!==null){l.return=d.return,Ie=l;break}Ie=d.return}return Le=IE,IE=!1,Le}function Zu(l,d,g){var w=d.updateQueue;if(w=w!==null?w.lastEffect:null,w!==null){var _=w=w.next;do{if((_.tag&l)===l){var A=_.destroy;_.destroy=void 0,A!==void 0&&Iy(d,g,A)}_=_.next}while(_!==w)}}function oh(l,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&l)===l){var w=g.create;g.destroy=w()}g=g.next}while(g!==d)}}function Ly(l){var d=l.ref;if(d!==null){var g=l.stateNode;switch(l.tag){case 5:l=g;break;default:l=g}typeof d=="function"?d(l):d.current=l}}function LE(l){var d=l.alternate;d!==null&&(l.alternate=null,LE(d)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(d=l.stateNode,d!==null&&(delete d[Pi],delete d[Fu],delete d[Jg],delete d[N$],delete d[T$])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function FE(l){return l.tag===5||l.tag===3||l.tag===4}function $E(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||FE(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Fy(l,d,g){var w=l.tag;if(w===5||w===6)l=l.stateNode,d?g.nodeType===8?g.parentNode.insertBefore(l,d):g.insertBefore(l,d):(g.nodeType===8?(d=g.parentNode,d.insertBefore(l,g)):(d=g,d.appendChild(l)),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=If));else if(w!==4&&(l=l.child,l!==null))for(Fy(l,d,g),l=l.sibling;l!==null;)Fy(l,d,g),l=l.sibling}function $y(l,d,g){var w=l.tag;if(w===5||w===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(w!==4&&(l=l.child,l!==null))for($y(l,d,g),l=l.sibling;l!==null;)$y(l,d,g),l=l.sibling}var Dn=null,ui=!1;function ts(l,d,g){for(g=g.child;g!==null;)zE(l,d,g),g=g.sibling}function zE(l,d,g){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(Ma,g)}catch{}switch(g.tag){case 5:Wn||el(g,d);case 6:var w=Dn,_=ui;Dn=null,ts(l,d,g),Dn=w,ui=_,Dn!==null&&(ui?(l=Dn,g=g.stateNode,l.nodeType===8?l.parentNode.removeChild(g):l.removeChild(g)):Dn.removeChild(g.stateNode));break;case 18:Dn!==null&&(ui?(l=Dn,g=g.stateNode,l.nodeType===8?Qg(l.parentNode,g):l.nodeType===1&&Qg(l,g),Nu(l)):Qg(Dn,g.stateNode));break;case 4:w=Dn,_=ui,Dn=g.stateNode.containerInfo,ui=!0,ts(l,d,g),Dn=w,ui=_;break;case 0:case 11:case 14:case 15:if(!Wn&&(w=g.updateQueue,w!==null&&(w=w.lastEffect,w!==null))){_=w=w.next;do{var A=_,$=A.destroy;A=A.tag,$!==void 0&&(A&2||A&4)&&Iy(g,d,$),_=_.next}while(_!==w)}ts(l,d,g);break;case 1:if(!Wn&&(el(g,d),w=g.stateNode,typeof w.componentWillUnmount=="function"))try{w.props=g.memoizedProps,w.state=g.memoizedState,w.componentWillUnmount()}catch(X){en(g,d,X)}ts(l,d,g);break;case 21:ts(l,d,g);break;case 22:g.mode&1?(Wn=(w=Wn)||g.memoizedState!==null,ts(l,d,g),Wn=w):ts(l,d,g);break;default:ts(l,d,g)}}function BE(l){var d=l.updateQueue;if(d!==null){l.updateQueue=null;var g=l.stateNode;g===null&&(g=l.stateNode=new U$),d.forEach(function(w){var _=ez.bind(null,l,w);g.has(w)||(g.add(w),w.then(_,_))})}}function ci(l,d){var g=d.deletions;if(g!==null)for(var w=0;w<g.length;w++){var _=g[w];try{var A=l,$=d,X=$;e:for(;X!==null;){switch(X.tag){case 5:Dn=X.stateNode,ui=!1;break e;case 3:Dn=X.stateNode.containerInfo,ui=!0;break e;case 4:Dn=X.stateNode.containerInfo,ui=!0;break e}X=X.return}if(Dn===null)throw Error(n(160));zE(A,$,_),Dn=null,ui=!1;var te=_.alternate;te!==null&&(te.return=null),_.return=null}catch(de){en(_,d,de)}}if(d.subtreeFlags&12854)for(d=d.child;d!==null;)VE(d,l),d=d.sibling}function VE(l,d){var g=l.alternate,w=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(ci(d,l),ji(l),w&4){try{Zu(3,l,l.return),oh(3,l)}catch($e){en(l,l.return,$e)}try{Zu(5,l,l.return)}catch($e){en(l,l.return,$e)}}break;case 1:ci(d,l),ji(l),w&512&&g!==null&&el(g,g.return);break;case 5:if(ci(d,l),ji(l),w&512&&g!==null&&el(g,g.return),l.flags&32){var _=l.stateNode;try{rt(_,"")}catch($e){en(l,l.return,$e)}}if(w&4&&(_=l.stateNode,_!=null)){var A=l.memoizedProps,$=g!==null?g.memoizedProps:A,X=l.type,te=l.updateQueue;if(l.updateQueue=null,te!==null)try{X==="input"&&A.type==="radio"&&A.name!=null&&ot(_,A),gn(X,$);var de=gn(X,A);for($=0;$<te.length;$+=2){var ve=te[$],be=te[$+1];ve==="style"?it(_,be):ve==="dangerouslySetInnerHTML"?et(_,be):ve==="children"?rt(_,be):C(_,ve,be,de)}switch(X){case"input":_t(_,A);break;case"textarea":Ae(_,A);break;case"select":var ye=_._wrapperState.wasMultiple;_._wrapperState.wasMultiple=!!A.multiple;var je=A.value;je!=null?Se(_,!!A.multiple,je,!1):ye!==!!A.multiple&&(A.defaultValue!=null?Se(_,!!A.multiple,A.defaultValue,!0):Se(_,!!A.multiple,A.multiple?[]:"",!1))}_[Fu]=A}catch($e){en(l,l.return,$e)}}break;case 6:if(ci(d,l),ji(l),w&4){if(l.stateNode===null)throw Error(n(162));_=l.stateNode,A=l.memoizedProps;try{_.nodeValue=A}catch($e){en(l,l.return,$e)}}break;case 3:if(ci(d,l),ji(l),w&4&&g!==null&&g.memoizedState.isDehydrated)try{Nu(d.containerInfo)}catch($e){en(l,l.return,$e)}break;case 4:ci(d,l),ji(l);break;case 13:ci(d,l),ji(l),_=l.child,_.flags&8192&&(A=_.memoizedState!==null,_.stateNode.isHidden=A,!A||_.alternate!==null&&_.alternate.memoizedState!==null||(Vy=Zt())),w&4&&BE(l);break;case 22:if(ve=g!==null&&g.memoizedState!==null,l.mode&1?(Wn=(de=Wn)||ve,ci(d,l),Wn=de):ci(d,l),ji(l),w&8192){if(de=l.memoizedState!==null,(l.stateNode.isHidden=de)&&!ve&&l.mode&1)for(Ie=l,ve=l.child;ve!==null;){for(be=Ie=ve;Ie!==null;){switch(ye=Ie,je=ye.child,ye.tag){case 0:case 11:case 14:case 15:Zu(4,ye,ye.return);break;case 1:el(ye,ye.return);var Le=ye.stateNode;if(typeof Le.componentWillUnmount=="function"){w=ye,g=ye.return;try{d=w,Le.props=d.memoizedProps,Le.state=d.memoizedState,Le.componentWillUnmount()}catch($e){en(w,g,$e)}}break;case 5:el(ye,ye.return);break;case 22:if(ye.memoizedState!==null){HE(be);continue}}je!==null?(je.return=ye,Ie=je):HE(be)}ve=ve.sibling}e:for(ve=null,be=l;;){if(be.tag===5){if(ve===null){ve=be;try{_=be.stateNode,de?(A=_.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none"):(X=be.stateNode,te=be.memoizedProps.style,$=te!=null&&te.hasOwnProperty("display")?te.display:null,X.style.display=st("display",$))}catch($e){en(l,l.return,$e)}}}else if(be.tag===6){if(ve===null)try{be.stateNode.nodeValue=de?"":be.memoizedProps}catch($e){en(l,l.return,$e)}}else if((be.tag!==22&&be.tag!==23||be.memoizedState===null||be===l)&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===l)break e;for(;be.sibling===null;){if(be.return===null||be.return===l)break e;ve===be&&(ve=null),be=be.return}ve===be&&(ve=null),be.sibling.return=be.return,be=be.sibling}}break;case 19:ci(d,l),ji(l),w&4&&BE(l);break;case 21:break;default:ci(d,l),ji(l)}}function ji(l){var d=l.flags;if(d&2){try{e:{for(var g=l.return;g!==null;){if(FE(g)){var w=g;break e}g=g.return}throw Error(n(160))}switch(w.tag){case 5:var _=w.stateNode;w.flags&32&&(rt(_,""),w.flags&=-33);var A=$E(l);$y(l,A,_);break;case 3:case 4:var $=w.stateNode.containerInfo,X=$E(l);Fy(l,X,$);break;default:throw Error(n(161))}}catch(te){en(l,l.return,te)}l.flags&=-3}d&4096&&(l.flags&=-4097)}function Y$(l,d,g){Ie=l,WE(l)}function WE(l,d,g){for(var w=(l.mode&1)!==0;Ie!==null;){var _=Ie,A=_.child;if(_.tag===22&&w){var $=_.memoizedState!==null||ih;if(!$){var X=_.alternate,te=X!==null&&X.memoizedState!==null||Wn;X=ih;var de=Wn;if(ih=$,(Wn=te)&&!de)for(Ie=_;Ie!==null;)$=Ie,te=$.child,$.tag===22&&$.memoizedState!==null?YE(_):te!==null?(te.return=$,Ie=te):YE(_);for(;A!==null;)Ie=A,WE(A),A=A.sibling;Ie=_,ih=X,Wn=de}UE(l)}else _.subtreeFlags&8772&&A!==null?(A.return=_,Ie=A):UE(l)}}function UE(l){for(;Ie!==null;){var d=Ie;if(d.flags&8772){var g=d.alternate;try{if(d.flags&8772)switch(d.tag){case 0:case 11:case 15:Wn||oh(5,d);break;case 1:var w=d.stateNode;if(d.flags&4&&!Wn)if(g===null)w.componentDidMount();else{var _=d.elementType===d.type?g.memoizedProps:li(d.type,g.memoizedProps);w.componentDidUpdate(_,g.memoizedState,w.__reactInternalSnapshotBeforeUpdate)}var A=d.updateQueue;A!==null&&HS(d,A,w);break;case 3:var $=d.updateQueue;if($!==null){if(g=null,d.child!==null)switch(d.child.tag){case 5:g=d.child.stateNode;break;case 1:g=d.child.stateNode}HS(d,$,g)}break;case 5:var X=d.stateNode;if(g===null&&d.flags&4){g=X;var te=d.memoizedProps;switch(d.type){case"button":case"input":case"select":case"textarea":te.autoFocus&&g.focus();break;case"img":te.src&&(g.src=te.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(d.memoizedState===null){var de=d.alternate;if(de!==null){var ve=de.memoizedState;if(ve!==null){var be=ve.dehydrated;be!==null&&Nu(be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Wn||d.flags&512&&Ly(d)}catch(ye){en(d,d.return,ye)}}if(d===l){Ie=null;break}if(g=d.sibling,g!==null){g.return=d.return,Ie=g;break}Ie=d.return}}function HE(l){for(;Ie!==null;){var d=Ie;if(d===l){Ie=null;break}var g=d.sibling;if(g!==null){g.return=d.return,Ie=g;break}Ie=d.return}}function YE(l){for(;Ie!==null;){var d=Ie;try{switch(d.tag){case 0:case 11:case 15:var g=d.return;try{oh(4,d)}catch(te){en(d,g,te)}break;case 1:var w=d.stateNode;if(typeof w.componentDidMount=="function"){var _=d.return;try{w.componentDidMount()}catch(te){en(d,_,te)}}var A=d.return;try{Ly(d)}catch(te){en(d,A,te)}break;case 5:var $=d.return;try{Ly(d)}catch(te){en(d,$,te)}}}catch(te){en(d,d.return,te)}if(d===l){Ie=null;break}var X=d.sibling;if(X!==null){X.return=d.return,Ie=X;break}Ie=d.return}}var q$=Math.ceil,sh=N.ReactCurrentDispatcher,zy=N.ReactCurrentOwner,Hr=N.ReactCurrentBatchConfig,bt=0,Nn=null,un=null,On=0,Cr=0,tl=Ko(0),wn=0,Ku=null,Gs=0,ah=0,By=0,Xu=null,hr=null,Vy=0,nl=1/0,co=null,lh=!1,Wy=null,ns=null,uh=!1,rs=null,ch=0,Qu=0,Uy=null,dh=-1,fh=0;function Jn(){return bt&6?Zt():dh!==-1?dh:dh=Zt()}function is(l){return l.mode&1?bt&2&&On!==0?On&-On:P$.transition!==null?(fh===0&&(fh=$k()),fh):(l=Tt,l!==0||(l=window.event,l=l===void 0?16:Gk(l.type)),l):1}function di(l,d,g,w){if(50<Qu)throw Qu=0,Uy=null,Error(n(185));ku(l,g,w),(!(bt&2)||l!==Nn)&&(l===Nn&&(!(bt&2)&&(ah|=g),wn===4&&os(l,On)),pr(l,w),g===1&&bt===0&&!(d.mode&1)&&(nl=Zt()+500,zf&&Qo()))}function pr(l,d){var g=l.callbackNode;P3(l,d);var w=Oa(l,l===Nn?On:0);if(w===0)g!==null&&vf(g),l.callbackNode=null,l.callbackPriority=0;else if(d=w&-w,l.callbackPriority!==d){if(g!=null&&vf(g),d===1)l.tag===0?A$(GE.bind(null,l)):jS(GE.bind(null,l)),C$(function(){!(bt&6)&&Qo()}),g=null;else{switch(zk(w)){case 1:g=wu;break;case 4:g=bf;break;case 16:g=Ra;break;case 536870912:g=bu;break;default:g=Ra}g=nC(g,qE.bind(null,l))}l.callbackPriority=d,l.callbackNode=g}}function qE(l,d){if(dh=-1,fh=0,bt&6)throw Error(n(327));var g=l.callbackNode;if(rl()&&l.callbackNode!==g)return null;var w=Oa(l,l===Nn?On:0);if(w===0)return null;if(w&30||w&l.expiredLanes||d)d=hh(l,w);else{d=w;var _=bt;bt|=2;var A=KE();(Nn!==l||On!==d)&&(co=null,nl=Zt()+500,Ks(l,d));do try{K$();break}catch(X){ZE(l,X)}while(!0);ly(),sh.current=A,bt=_,un!==null?d=0:(Nn=null,On=0,d=wn)}if(d!==0){if(d===2&&(_=Eg(l),_!==0&&(w=_,d=Hy(l,_))),d===1)throw g=Ku,Ks(l,0),os(l,w),pr(l,Zt()),g;if(d===6)os(l,w);else{if(_=l.current.alternate,!(w&30)&&!G$(_)&&(d=hh(l,w),d===2&&(A=Eg(l),A!==0&&(w=A,d=Hy(l,A))),d===1))throw g=Ku,Ks(l,0),os(l,w),pr(l,Zt()),g;switch(l.finishedWork=_,l.finishedLanes=w,d){case 0:case 1:throw Error(n(345));case 2:Xs(l,hr,co);break;case 3:if(os(l,w),(w&130023424)===w&&(d=Vy+500-Zt(),10<d)){if(Oa(l,0)!==0)break;if(_=l.suspendedLanes,(_&w)!==w){Jn(),l.pingedLanes|=l.suspendedLanes&_;break}l.timeoutHandle=Xg(Xs.bind(null,l,hr,co),d);break}Xs(l,hr,co);break;case 4:if(os(l,w),(w&4194240)===w)break;for(d=l.eventTimes,_=-1;0<w;){var $=31-br(w);A=1<<$,$=d[$],$>_&&(_=$),w&=~A}if(w=_,w=Zt()-w,w=(120>w?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*q$(w/1960))-w,10<w){l.timeoutHandle=Xg(Xs.bind(null,l,hr,co),w);break}Xs(l,hr,co);break;case 5:Xs(l,hr,co);break;default:throw Error(n(329))}}}return pr(l,Zt()),l.callbackNode===g?qE.bind(null,l):null}function Hy(l,d){var g=Xu;return l.current.memoizedState.isDehydrated&&(Ks(l,d).flags|=256),l=hh(l,d),l!==2&&(d=hr,hr=g,d!==null&&Yy(d)),l}function Yy(l){hr===null?hr=l:hr.push.apply(hr,l)}function G$(l){for(var d=l;;){if(d.flags&16384){var g=d.updateQueue;if(g!==null&&(g=g.stores,g!==null))for(var w=0;w<g.length;w++){var _=g[w],A=_.getSnapshot;_=_.value;try{if(!si(A(),_))return!1}catch{return!1}}}if(g=d.child,d.subtreeFlags&16384&&g!==null)g.return=d,d=g;else{if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function os(l,d){for(d&=~By,d&=~ah,l.suspendedLanes|=d,l.pingedLanes&=~d,l=l.expirationTimes;0<d;){var g=31-br(d),w=1<<g;l[g]=-1,d&=~w}}function GE(l){if(bt&6)throw Error(n(327));rl();var d=Oa(l,0);if(!(d&1))return pr(l,Zt()),null;var g=hh(l,d);if(l.tag!==0&&g===2){var w=Eg(l);w!==0&&(d=w,g=Hy(l,w))}if(g===1)throw g=Ku,Ks(l,0),os(l,d),pr(l,Zt()),g;if(g===6)throw Error(n(345));return l.finishedWork=l.current.alternate,l.finishedLanes=d,Xs(l,hr,co),pr(l,Zt()),null}function qy(l,d){var g=bt;bt|=1;try{return l(d)}finally{bt=g,bt===0&&(nl=Zt()+500,zf&&Qo())}}function Zs(l){rs!==null&&rs.tag===0&&!(bt&6)&&rl();var d=bt;bt|=1;var g=Hr.transition,w=Tt;try{if(Hr.transition=null,Tt=1,l)return l()}finally{Tt=w,Hr.transition=g,bt=d,!(bt&6)&&Qo()}}function Gy(){Cr=tl.current,$t(tl)}function Ks(l,d){l.finishedWork=null,l.finishedLanes=0;var g=l.timeoutHandle;if(g!==-1&&(l.timeoutHandle=-1,E$(g)),un!==null)for(g=un.return;g!==null;){var w=g;switch(ry(w),w.tag){case 1:w=w.type.childContextTypes,w!=null&&Ff();break;case 3:Qa(),$t(cr),$t(zn),gy();break;case 5:py(w);break;case 4:Qa();break;case 13:$t(Kt);break;case 19:$t(Kt);break;case 10:uy(w.type._context);break;case 22:case 23:Gy()}g=g.return}if(Nn=l,un=l=ss(l.current,null),On=Cr=d,wn=0,Ku=null,By=ah=Gs=0,hr=Xu=null,Hs!==null){for(d=0;d<Hs.length;d++)if(g=Hs[d],w=g.interleaved,w!==null){g.interleaved=null;var _=w.next,A=g.pending;if(A!==null){var $=A.next;A.next=_,w.next=$}g.pending=w}Hs=null}return l}function ZE(l,d){do{var g=un;try{if(ly(),Kf.current=eh,Xf){for(var w=Xt.memoizedState;w!==null;){var _=w.queue;_!==null&&(_.pending=null),w=w.next}Xf=!1}if(qs=0,_n=vn=Xt=null,Uu=!1,Hu=0,zy.current=null,g===null||g.return===null){wn=1,Ku=d,un=null;break}e:{var A=l,$=g.return,X=g,te=d;if(d=On,X.flags|=32768,te!==null&&typeof te=="object"&&typeof te.then=="function"){var de=te,ve=X,be=ve.tag;if(!(ve.mode&1)&&(be===0||be===11||be===15)){var ye=ve.alternate;ye?(ve.updateQueue=ye.updateQueue,ve.memoizedState=ye.memoizedState,ve.lanes=ye.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var je=wE($);if(je!==null){je.flags&=-257,bE(je,$,X,A,d),je.mode&1&&vE(A,de,d),d=je,te=de;var Le=d.updateQueue;if(Le===null){var $e=new Set;$e.add(te),d.updateQueue=$e}else Le.add(te);break e}else{if(!(d&1)){vE(A,de,d),Zy();break e}te=Error(n(426))}}else if(Ht&&X.mode&1){var on=wE($);if(on!==null){!(on.flags&65536)&&(on.flags|=256),bE(on,$,X,A,d),sy(Ja(te,X));break e}}A=te=Ja(te,X),wn!==4&&(wn=2),Xu===null?Xu=[A]:Xu.push(A),A=$;do{switch(A.tag){case 3:A.flags|=65536,d&=-d,A.lanes|=d;var ae=yE(A,te,d);US(A,ae);break e;case 1:X=te;var re=A.type,le=A.stateNode;if(!(A.flags&128)&&(typeof re.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(ns===null||!ns.has(le)))){A.flags|=65536,d&=-d,A.lanes|=d;var _e=xE(A,X,d);US(A,_e);break e}}A=A.return}while(A!==null)}QE(g)}catch(ze){d=ze,un===g&&g!==null&&(un=g=g.return);continue}break}while(!0)}function KE(){var l=sh.current;return sh.current=eh,l===null?eh:l}function Zy(){(wn===0||wn===3||wn===2)&&(wn=4),Nn===null||!(Gs&268435455)&&!(ah&268435455)||os(Nn,On)}function hh(l,d){var g=bt;bt|=2;var w=KE();(Nn!==l||On!==d)&&(co=null,Ks(l,d));do try{Z$();break}catch(_){ZE(l,_)}while(!0);if(ly(),bt=g,sh.current=w,un!==null)throw Error(n(261));return Nn=null,On=0,wn}function Z$(){for(;un!==null;)XE(un)}function K$(){for(;un!==null&&!wf();)XE(un)}function XE(l){var d=tC(l.alternate,l,Cr);l.memoizedProps=l.pendingProps,d===null?QE(l):un=d,zy.current=null}function QE(l){var d=l;do{var g=d.alternate;if(l=d.return,d.flags&32768){if(g=W$(g,d),g!==null){g.flags&=32767,un=g;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{wn=6,un=null;return}}else if(g=V$(g,d,Cr),g!==null){un=g;return}if(d=d.sibling,d!==null){un=d;return}un=d=l}while(d!==null);wn===0&&(wn=5)}function Xs(l,d,g){var w=Tt,_=Hr.transition;try{Hr.transition=null,Tt=1,X$(l,d,g,w)}finally{Hr.transition=_,Tt=w}return null}function X$(l,d,g,w){do rl();while(rs!==null);if(bt&6)throw Error(n(327));g=l.finishedWork;var _=l.finishedLanes;if(g===null)return null;if(l.finishedWork=null,l.finishedLanes=0,g===l.current)throw Error(n(177));l.callbackNode=null,l.callbackPriority=0;var A=g.lanes|g.childLanes;if(R3(l,A),l===Nn&&(un=Nn=null,On=0),!(g.subtreeFlags&2064)&&!(g.flags&2064)||uh||(uh=!0,nC(Ra,function(){return rl(),null})),A=(g.flags&15990)!==0,g.subtreeFlags&15990||A){A=Hr.transition,Hr.transition=null;var $=Tt;Tt=1;var X=bt;bt|=4,zy.current=null,H$(l,g),VE(g,l),y$(Zg),Ef=!!Gg,Zg=Gg=null,l.current=g,Y$(g),yg(),bt=X,Tt=$,Hr.transition=A}else l.current=g;if(uh&&(uh=!1,rs=l,ch=_),A=l.pendingLanes,A===0&&(ns=null),wg(g.stateNode),pr(l,Zt()),d!==null)for(w=l.onRecoverableError,g=0;g<d.length;g++)_=d[g],w(_.value,{componentStack:_.stack,digest:_.digest});if(lh)throw lh=!1,l=Wy,Wy=null,l;return ch&1&&l.tag!==0&&rl(),A=l.pendingLanes,A&1?l===Uy?Qu++:(Qu=0,Uy=l):Qu=0,Qo(),null}function rl(){if(rs!==null){var l=zk(ch),d=Hr.transition,g=Tt;try{if(Hr.transition=null,Tt=16>l?16:l,rs===null)var w=!1;else{if(l=rs,rs=null,ch=0,bt&6)throw Error(n(331));var _=bt;for(bt|=4,Ie=l.current;Ie!==null;){var A=Ie,$=A.child;if(Ie.flags&16){var X=A.deletions;if(X!==null){for(var te=0;te<X.length;te++){var de=X[te];for(Ie=de;Ie!==null;){var ve=Ie;switch(ve.tag){case 0:case 11:case 15:Zu(8,ve,A)}var be=ve.child;if(be!==null)be.return=ve,Ie=be;else for(;Ie!==null;){ve=Ie;var ye=ve.sibling,je=ve.return;if(LE(ve),ve===de){Ie=null;break}if(ye!==null){ye.return=je,Ie=ye;break}Ie=je}}}var Le=A.alternate;if(Le!==null){var $e=Le.child;if($e!==null){Le.child=null;do{var on=$e.sibling;$e.sibling=null,$e=on}while($e!==null)}}Ie=A}}if(A.subtreeFlags&2064&&$!==null)$.return=A,Ie=$;else e:for(;Ie!==null;){if(A=Ie,A.flags&2048)switch(A.tag){case 0:case 11:case 15:Zu(9,A,A.return)}var ae=A.sibling;if(ae!==null){ae.return=A.return,Ie=ae;break e}Ie=A.return}}var re=l.current;for(Ie=re;Ie!==null;){$=Ie;var le=$.child;if($.subtreeFlags&2064&&le!==null)le.return=$,Ie=le;else e:for($=re;Ie!==null;){if(X=Ie,X.flags&2048)try{switch(X.tag){case 0:case 11:case 15:oh(9,X)}}catch(ze){en(X,X.return,ze)}if(X===$){Ie=null;break e}var _e=X.sibling;if(_e!==null){_e.return=X.return,Ie=_e;break e}Ie=X.return}}if(bt=_,Qo(),zr&&typeof zr.onPostCommitFiberRoot=="function")try{zr.onPostCommitFiberRoot(Ma,l)}catch{}w=!0}return w}finally{Tt=g,Hr.transition=d}}return!1}function JE(l,d,g){d=Ja(g,d),d=yE(l,d,1),l=es(l,d,1),d=Jn(),l!==null&&(ku(l,1,d),pr(l,d))}function en(l,d,g){if(l.tag===3)JE(l,l,g);else for(;d!==null;){if(d.tag===3){JE(d,l,g);break}else if(d.tag===1){var w=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(ns===null||!ns.has(w))){l=Ja(g,l),l=xE(d,l,1),d=es(d,l,1),l=Jn(),d!==null&&(ku(d,1,l),pr(d,l));break}}d=d.return}}function Q$(l,d,g){var w=l.pingCache;w!==null&&w.delete(d),d=Jn(),l.pingedLanes|=l.suspendedLanes&g,Nn===l&&(On&g)===g&&(wn===4||wn===3&&(On&130023424)===On&&500>Zt()-Vy?Ks(l,0):By|=g),pr(l,d)}function eC(l,d){d===0&&(l.mode&1?(d=Da,Da<<=1,!(Da&130023424)&&(Da=4194304)):d=1);var g=Jn();l=ao(l,d),l!==null&&(ku(l,d,g),pr(l,g))}function J$(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),eC(l,g)}function ez(l,d){var g=0;switch(l.tag){case 13:var w=l.stateNode,_=l.memoizedState;_!==null&&(g=_.retryLane);break;case 19:w=l.stateNode;break;default:throw Error(n(314))}w!==null&&w.delete(d),eC(l,g)}var tC;tC=function(l,d,g){if(l!==null)if(l.memoizedProps!==d.pendingProps||cr.current)fr=!0;else{if(!(l.lanes&g)&&!(d.flags&128))return fr=!1,B$(l,d,g);fr=!!(l.flags&131072)}else fr=!1,Ht&&d.flags&1048576&&DS(d,Vf,d.index);switch(d.lanes=0,d.tag){case 2:var w=d.type;rh(l,d),l=d.pendingProps;var _=Ha(d,zn.current);Xa(d,g),_=vy(null,d,w,l,_,g);var A=wy();return d.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,dr(w)?(A=!0,$f(d)):A=!1,d.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,fy(d),_.updater=th,d.stateNode=_,_._reactInternals=d,_y(d,w,l,g),d=Py(null,d,w,!0,A,g)):(d.tag=0,Ht&&A&&ny(d),Qn(null,d,_,g),d=d.child),d;case 16:w=d.elementType;e:{switch(rh(l,d),l=d.pendingProps,_=w._init,w=_(w._payload),d.type=w,_=d.tag=nz(w),l=li(w,l),_){case 0:d=Ay(null,d,w,l,g);break e;case 1:d=NE(null,d,w,l,g);break e;case 11:d=kE(null,d,w,l,g);break e;case 14:d=SE(null,d,w,li(w.type,l),g);break e}throw Error(n(306,w,""))}return d;case 0:return w=d.type,_=d.pendingProps,_=d.elementType===w?_:li(w,_),Ay(l,d,w,_,g);case 1:return w=d.type,_=d.pendingProps,_=d.elementType===w?_:li(w,_),NE(l,d,w,_,g);case 3:e:{if(TE(d),l===null)throw Error(n(387));w=d.pendingProps,A=d.memoizedState,_=A.element,WS(l,d),Gf(d,w,null,g);var $=d.memoizedState;if(w=$.element,A.isDehydrated)if(A={element:w,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},d.updateQueue.baseState=A,d.memoizedState=A,d.flags&256){_=Ja(Error(n(423)),d),d=AE(l,d,w,g,_);break e}else if(w!==_){_=Ja(Error(n(424)),d),d=AE(l,d,w,g,_);break e}else for(Er=Zo(d.stateNode.containerInfo.firstChild),Sr=d,Ht=!0,ai=null,g=BS(d,null,w,g),d.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Ga(),w===_){d=uo(l,d,g);break e}Qn(l,d,w,g)}d=d.child}return d;case 5:return YS(d),l===null&&oy(d),w=d.type,_=d.pendingProps,A=l!==null?l.memoizedProps:null,$=_.children,Kg(w,_)?$=null:A!==null&&Kg(w,A)&&(d.flags|=32),_E(l,d),Qn(l,d,$,g),d.child;case 6:return l===null&&oy(d),null;case 13:return PE(l,d,g);case 4:return hy(d,d.stateNode.containerInfo),w=d.pendingProps,l===null?d.child=Za(d,null,w,g):Qn(l,d,w,g),d.child;case 11:return w=d.type,_=d.pendingProps,_=d.elementType===w?_:li(w,_),kE(l,d,w,_,g);case 7:return Qn(l,d,d.pendingProps,g),d.child;case 8:return Qn(l,d,d.pendingProps.children,g),d.child;case 12:return Qn(l,d,d.pendingProps.children,g),d.child;case 10:e:{if(w=d.type._context,_=d.pendingProps,A=d.memoizedProps,$=_.value,Ot(Hf,w._currentValue),w._currentValue=$,A!==null)if(si(A.value,$)){if(A.children===_.children&&!cr.current){d=uo(l,d,g);break e}}else for(A=d.child,A!==null&&(A.return=d);A!==null;){var X=A.dependencies;if(X!==null){$=A.child;for(var te=X.firstContext;te!==null;){if(te.context===w){if(A.tag===1){te=lo(-1,g&-g),te.tag=2;var de=A.updateQueue;if(de!==null){de=de.shared;var ve=de.pending;ve===null?te.next=te:(te.next=ve.next,ve.next=te),de.pending=te}}A.lanes|=g,te=A.alternate,te!==null&&(te.lanes|=g),cy(A.return,g,d),X.lanes|=g;break}te=te.next}}else if(A.tag===10)$=A.type===d.type?null:A.child;else if(A.tag===18){if($=A.return,$===null)throw Error(n(341));$.lanes|=g,X=$.alternate,X!==null&&(X.lanes|=g),cy($,g,d),$=A.sibling}else $=A.child;if($!==null)$.return=A;else for($=A;$!==null;){if($===d){$=null;break}if(A=$.sibling,A!==null){A.return=$.return,$=A;break}$=$.return}A=$}Qn(l,d,_.children,g),d=d.child}return d;case 9:return _=d.type,w=d.pendingProps.children,Xa(d,g),_=Wr(_),w=w(_),d.flags|=1,Qn(l,d,w,g),d.child;case 14:return w=d.type,_=li(w,d.pendingProps),_=li(w.type,_),SE(l,d,w,_,g);case 15:return EE(l,d,d.type,d.pendingProps,g);case 17:return w=d.type,_=d.pendingProps,_=d.elementType===w?_:li(w,_),rh(l,d),d.tag=1,dr(w)?(l=!0,$f(d)):l=!1,Xa(d,g),mE(d,w,_),_y(d,w,_,g),Py(null,d,w,!0,l,g);case 19:return ME(l,d,g);case 22:return CE(l,d,g)}throw Error(n(156,d.tag))};function nC(l,d){return xf(l,d)}function tz(l,d,g,w){this.tag=l,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(l,d,g,w){return new tz(l,d,g,w)}function Ky(l){return l=l.prototype,!(!l||!l.isReactComponent)}function nz(l){if(typeof l=="function")return Ky(l)?1:0;if(l!=null){if(l=l.$$typeof,l===F)return 11;if(l===q)return 14}return 2}function ss(l,d){var g=l.alternate;return g===null?(g=Yr(l.tag,d,l.key,l.mode),g.elementType=l.elementType,g.type=l.type,g.stateNode=l.stateNode,g.alternate=l,l.alternate=g):(g.pendingProps=d,g.type=l.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=l.flags&14680064,g.childLanes=l.childLanes,g.lanes=l.lanes,g.child=l.child,g.memoizedProps=l.memoizedProps,g.memoizedState=l.memoizedState,g.updateQueue=l.updateQueue,d=l.dependencies,g.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},g.sibling=l.sibling,g.index=l.index,g.ref=l.ref,g}function ph(l,d,g,w,_,A){var $=2;if(w=l,typeof l=="function")Ky(l)&&($=1);else if(typeof l=="string")$=5;else e:switch(l){case j:return Qs(g.children,_,A,d);case R:$=8,_|=8;break;case I:return l=Yr(12,g,d,_|2),l.elementType=I,l.lanes=A,l;case Y:return l=Yr(13,g,d,_),l.elementType=Y,l.lanes=A,l;case O:return l=Yr(19,g,d,_),l.elementType=O,l.lanes=A,l;case Z:return mh(g,_,A,d);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case M:$=10;break e;case z:$=9;break e;case F:$=11;break e;case q:$=14;break e;case W:$=16,w=null;break e}throw Error(n(130,l==null?l:typeof l,""))}return d=Yr($,g,d,_),d.elementType=l,d.type=w,d.lanes=A,d}function Qs(l,d,g,w){return l=Yr(7,l,w,d),l.lanes=g,l}function mh(l,d,g,w){return l=Yr(22,l,w,d),l.elementType=Z,l.lanes=g,l.stateNode={isHidden:!1},l}function Xy(l,d,g){return l=Yr(6,l,null,d),l.lanes=g,l}function Qy(l,d,g){return d=Yr(4,l.children!==null?l.children:[],l.key,d),d.lanes=g,d.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},d}function rz(l,d,g,w,_){this.tag=d,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cg(0),this.expirationTimes=Cg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cg(0),this.identifierPrefix=w,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function Jy(l,d,g,w,_,A,$,X,te){return l=new rz(l,d,g,X,te),d===1?(d=1,A===!0&&(d|=8)):d=0,A=Yr(3,null,null,d),l.current=A,A.stateNode=l,A.memoizedState={element:w,isDehydrated:g,cache:null,transitions:null,pendingSuspenseBoundaries:null},fy(A),l}function iz(l,d,g){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:w==null?null:""+w,children:l,containerInfo:d,implementation:g}}function rC(l){if(!l)return Xo;l=l._reactInternals;e:{if(Ai(l)!==l||l.tag!==1)throw Error(n(170));var d=l;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(dr(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(n(171))}if(l.tag===1){var g=l.type;if(dr(g))return RS(l,g,d)}return d}function iC(l,d,g,w,_,A,$,X,te){return l=Jy(g,w,!0,l,_,A,$,X,te),l.context=rC(null),g=l.current,w=Jn(),_=is(g),A=lo(w,_),A.callback=d??null,es(g,A,_),l.current.lanes=_,ku(l,_,w),pr(l,w),l}function gh(l,d,g,w){var _=d.current,A=Jn(),$=is(_);return g=rC(g),d.context===null?d.context=g:d.pendingContext=g,d=lo(A,$),d.payload={element:l},w=w===void 0?null:w,w!==null&&(d.callback=w),l=es(_,d,$),l!==null&&(di(l,_,$,A),qf(l,_,$)),$}function yh(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function oC(l,d){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var g=l.retryLane;l.retryLane=g!==0&&g<d?g:d}}function ex(l,d){oC(l,d),(l=l.alternate)&&oC(l,d)}var sC=typeof reportError=="function"?reportError:function(l){console.error(l)};function tx(l){this._internalRoot=l}xh.prototype.render=tx.prototype.render=function(l){var d=this._internalRoot;if(d===null)throw Error(n(409));gh(l,d,null,null)},xh.prototype.unmount=tx.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var d=l.containerInfo;Zs(function(){gh(null,l,null,null)}),d[ro]=null}};function xh(l){this._internalRoot=l}xh.prototype.unstable_scheduleHydration=function(l){if(l){var d=Wk();l={blockedOn:null,target:l,priority:d};for(var g=0;g<Yo.length&&d!==0&&d<Yo[g].priority;g++);Yo.splice(g,0,l),g===0&&Yk(l)}};function nx(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function vh(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function aC(){}function oz(l,d,g,w,_){if(_){if(typeof w=="function"){var A=w;w=function(){var de=yh($);A.call(de)}}var $=iC(d,w,l,0,null,!1,!1,"",aC);return l._reactRootContainer=$,l[ro]=$.current,Iu(l.nodeType===8?l.parentNode:l),Zs(),$}for(;_=l.lastChild;)l.removeChild(_);if(typeof w=="function"){var X=w;w=function(){var de=yh(te);X.call(de)}}var te=Jy(l,0,!1,null,null,!1,!1,"",aC);return l._reactRootContainer=te,l[ro]=te.current,Iu(l.nodeType===8?l.parentNode:l),Zs(function(){gh(d,te,g,w)}),te}function wh(l,d,g,w,_){var A=g._reactRootContainer;if(A){var $=A;if(typeof _=="function"){var X=_;_=function(){var te=yh($);X.call(te)}}gh(d,$,l,_)}else $=oz(g,d,l,_,w);return yh($)}Bk=function(l){switch(l.tag){case 3:var d=l.stateNode;if(d.current.memoizedState.isDehydrated){var g=no(d.pendingLanes);g!==0&&(_g(d,g|1),pr(d,Zt()),!(bt&6)&&(nl=Zt()+500,Qo()))}break;case 13:Zs(function(){var w=ao(l,1);if(w!==null){var _=Jn();di(w,l,1,_)}}),ex(l,1)}},Ng=function(l){if(l.tag===13){var d=ao(l,134217728);if(d!==null){var g=Jn();di(d,l,134217728,g)}ex(l,134217728)}},Vk=function(l){if(l.tag===13){var d=is(l),g=ao(l,d);if(g!==null){var w=Jn();di(g,l,d,w)}ex(l,d)}},Wk=function(){return Tt},Uk=function(l,d){var g=Tt;try{return Tt=l,d()}finally{Tt=g}},dt=function(l,d,g){switch(d){case"input":if(_t(l,g),d=g.name,g.type==="radio"&&d!=null){for(g=l;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll("input[name="+JSON.stringify(""+d)+'][type="radio"]'),d=0;d<g.length;d++){var w=g[d];if(w!==l&&w.form===l.form){var _=Lf(w);if(!_)throw Error(n(90));fe(w),_t(w,_)}}}break;case"textarea":Ae(l,g);break;case"select":d=g.value,d!=null&&Se(l,!!g.multiple,d,!1)}},wt=qy,Nt=Zs;var sz={usingClientEntryPoint:!1,Events:[$u,Wa,Lf,oi,Ye,qy]},Ju={findFiberByHostInstance:Bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},az={bundleType:Ju.bundleType,version:Ju.version,rendererPackageName:Ju.rendererPackageName,rendererConfig:Ju.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:N.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=gf(l),l===null?null:l.stateNode},findFiberByHostInstance:Ju.findFiberByHostInstance,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 bh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bh.isDisabled&&bh.supportsFiber)try{Ma=bh.inject(az),zr=bh}catch{}}return mr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sz,mr.createPortal=function(l,d){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nx(d))throw Error(n(200));return iz(l,d,null,g)},mr.createRoot=function(l,d){if(!nx(l))throw Error(n(299));var g=!1,w="",_=sC;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(_=d.onRecoverableError)),d=Jy(l,1,!1,null,null,g,!1,w,_),l[ro]=d.current,Iu(l.nodeType===8?l.parentNode:l),new tx(d)},mr.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var d=l._reactInternals;if(d===void 0)throw typeof l.render=="function"?Error(n(188)):(l=Object.keys(l).join(","),Error(n(268,l)));return l=gf(d),l=l===null?null:l.stateNode,l},mr.flushSync=function(l){return Zs(l)},mr.hydrate=function(l,d,g){if(!vh(d))throw Error(n(200));return wh(null,l,d,!0,g)},mr.hydrateRoot=function(l,d,g){if(!nx(l))throw Error(n(405));var w=g!=null&&g.hydratedSources||null,_=!1,A="",$=sC;if(g!=null&&(g.unstable_strictMode===!0&&(_=!0),g.identifierPrefix!==void 0&&(A=g.identifierPrefix),g.onRecoverableError!==void 0&&($=g.onRecoverableError)),d=iC(d,null,l,1,g??null,_,!1,A,$),l[ro]=d.current,Iu(l),w)for(l=0;l<w.length;l++)g=w[l],_=g._getVersion,_=_(g._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[g,_]:d.mutableSourceEagerHydrationData.push(g,_);return new xh(d)},mr.render=function(l,d,g){if(!vh(d))throw Error(n(200));return wh(null,l,d,!1,g)},mr.unmountComponentAtNode=function(l){if(!vh(l))throw Error(n(40));return l._reactRootContainer?(Zs(function(){wh(null,null,l,!1,function(){l._reactRootContainer=null,l[ro]=null})}),!0):!1},mr.unstable_batchedUpdates=qy,mr.unstable_renderSubtreeIntoContainer=function(l,d,g,w){if(!vh(g))throw Error(n(200));if(l==null||l._reactInternals===void 0)throw Error(n(38));return wh(l,d,g,!1,w)},mr.version="18.3.1-next-f1338f8080-20240426",mr}var mC;function eR(){if(mC)return ox.exports;mC=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ox.exports=xz(),ox.exports}var gC;function vz(){if(gC)return kh;gC=1;var e=eR();return kh.createRoot=e.createRoot,kh.hydrateRoot=e.hydrateRoot,kh}var wz=vz(),tc={},yC;function bz(){if(yC)return tc;yC=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.parse=s,tc.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const p=function(){};return p.prototype=Object.create(null),p})();function s(p,m){const x=new o,v=p.length;if(v<2)return x;const k=(m==null?void 0:m.decode)||f;let b=0;do{const E=p.indexOf("=",b);if(E===-1)break;const C=p.indexOf(";",b),N=C===-1?v:C;if(E>N){b=p.lastIndexOf(";",E-1)+1;continue}const P=a(p,b,E),T=u(p,E,P),j=p.slice(P,T);if(x[j]===void 0){let R=a(p,E+1,N),I=u(p,N,R);const M=k(p.slice(R,I));x[j]=M}b=N+1}while(b<v);return x}function a(p,m,x){do{const v=p.charCodeAt(m);if(v!==32&&v!==9)return m}while(++m<x);return x}function u(p,m,x){for(;m>x;){const v=p.charCodeAt(--m);if(v!==32&&v!==9)return m+1}return x}function c(p,m,x){const v=(x==null?void 0:x.encode)||encodeURIComponent;if(!e.test(p))throw new TypeError(`argument name is invalid: ${p}`);const k=v(m);if(!t.test(k))throw new TypeError(`argument val is invalid: ${m}`);let b=p+"="+k;if(!x)return b;if(x.maxAge!==void 0){if(!Number.isInteger(x.maxAge))throw new TypeError(`option maxAge is invalid: ${x.maxAge}`);b+="; Max-Age="+x.maxAge}if(x.domain){if(!n.test(x.domain))throw new TypeError(`option domain is invalid: ${x.domain}`);b+="; Domain="+x.domain}if(x.path){if(!r.test(x.path))throw new TypeError(`option path is invalid: ${x.path}`);b+="; Path="+x.path}if(x.expires){if(!h(x.expires)||!Number.isFinite(x.expires.valueOf()))throw new TypeError(`option expires is invalid: ${x.expires}`);b+="; Expires="+x.expires.toUTCString()}if(x.httpOnly&&(b+="; HttpOnly"),x.secure&&(b+="; Secure"),x.partitioned&&(b+="; Partitioned"),x.priority)switch(typeof x.priority=="string"?x.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${x.priority}`)}if(x.sameSite)switch(typeof x.sameSite=="string"?x.sameSite.toLowerCase():x.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${x.sameSite}`)}return b}function f(p){if(p.indexOf("%")===-1)return p;try{return decodeURIComponent(p)}catch{return p}}function h(p){return i.call(p)==="[object Date]"}return tc}bz();/**
|
|
41
|
+
* react-router v7.1.3
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var xC="popstate";function kz(e={}){function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return Rw("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vc(i)}return Ez(t,n,null,e)}function qt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Sz(){return Math.random().toString(36).substring(2,10)}function vC(e,t){return{usr:e.state,key:e.key,idx:t}}function Rw(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ru(t):t,state:n,key:t&&t.key||r||Sz()}}function Vc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ru(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Ez(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a="POP",u=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function h(){a="POP";let k=f(),b=k==null?null:k-c;c=k,u&&u({action:a,location:v.location,delta:b})}function p(k,b){a="PUSH";let E=Rw(v.location,k,b);c=f()+1;let C=vC(E,c),N=v.createHref(E);try{s.pushState(C,"",N)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(N)}o&&u&&u({action:a,location:v.location,delta:1})}function m(k,b){a="REPLACE";let E=Rw(v.location,k,b);c=f();let C=vC(E,c),N=v.createHref(E);s.replaceState(C,"",N),o&&u&&u({action:a,location:v.location,delta:0})}function x(k){let b=i.location.origin!=="null"?i.location.origin:i.location.href,E=typeof k=="string"?k:Vc(k);return E=E.replace(/ $/,"%20"),qt(b,`No window.location.(origin|href) available to create URL for href: ${E}`),new URL(E,b)}let v={get action(){return a},get location(){return e(i,s)},listen(k){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(xC,h),u=k,()=>{i.removeEventListener(xC,h),u=null}},createHref(k){return t(i,k)},createURL:x,encodeLocation(k){let b=x(k);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:m,go(k){return s.go(k)}};return v}function tR(e,t,n="/"){return Cz(e,t,n,!1)}function Cz(e,t,n,r){let i=typeof t=="string"?ru(t):t,o=bs(i.pathname||"/",n);if(o==null)return null;let s=nR(e);_z(s);let a=null;for(let u=0;a==null&&u<s.length;++u){let c=Lz(o);a=Oz(s[u],c,r)}return a}function nR(e,t=[],n=[],r=""){let i=(o,s,a)=>{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(qt(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=ko([r,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(qt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),nR(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:jz(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let u of rR(o.path))i(o,s,u)}),t}function rR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=rR(r.join("/")),a=[];return a.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function _z(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Dz(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Nz=/^:[\w-]+$/,Tz=3,Az=2,Pz=1,Rz=10,Mz=-2,wC=e=>e==="*";function jz(e,t){let n=e.split("/"),r=n.length;return n.some(wC)&&(r+=Mz),t&&(r+=Az),n.filter(i=>!wC(i)).reduce((i,o)=>i+(Nz.test(o)?Tz:o===""?Pz:Rz),r)}function Dz(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 Oz(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let u=r[a],c=a===r.length-1,f=o==="/"?t:t.slice(o.length)||"/",h=hp({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),p=u.route;if(!h&&c&&n&&!r[r.length-1].route.index&&(h=hp({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:ko([o,h.pathname]),pathnameBase:Bz(ko([o,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(o=ko([o,h.pathnameBase]))}return s}function hp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Iz(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:f,isOptional:h},p)=>{if(f==="*"){let x=a[p]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[p];return h&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function Iz(e,t=!1,n=!0){bi(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,(s,a,u)=>(r.push({paramName:a,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 Lz(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return bi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function bs(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 Fz(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ru(e):e;return{pathname:n?n.startsWith("/")?n:$z(n,t):t,search:Vz(r),hash:Wz(i)}}function $z(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 lx(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 zz(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cb(e){let t=zz(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function db(e,t,n,r=!1){let i;typeof e=="string"?i=ru(e):(i={...e},qt(!i.pathname||!i.pathname.includes("?"),lx("?","pathname","search",i)),qt(!i.pathname||!i.pathname.includes("#"),lx("#","pathname","hash",i)),qt(!i.search||!i.search.includes("#"),lx("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let h=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?t[h]:"/"}let u=Fz(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var ko=e=>e.join("/").replace(/\/\/+/g,"/"),Bz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Uz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var iR=["POST","PUT","PATCH","DELETE"];new Set(iR);var Hz=["GET",...iR];new Set(Hz);var iu=S.createContext(null);iu.displayName="DataRouter";var am=S.createContext(null);am.displayName="DataRouterState";var oR=S.createContext({isTransitioning:!1});oR.displayName="ViewTransition";var Yz=S.createContext(new Map);Yz.displayName="Fetchers";var qz=S.createContext(null);qz.displayName="Await";var _i=S.createContext(null);_i.displayName="Navigation";var Pd=S.createContext(null);Pd.displayName="Location";var ti=S.createContext({outlet:null,matches:[],isDataRoute:!1});ti.displayName="Route";var fb=S.createContext(null);fb.displayName="RouteError";function Gz(e,{relative:t}={}){qt(ou(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(_i),{hash:i,pathname:o,search:s}=Md(e,{relative:t}),a=o;return n!=="/"&&(a=o==="/"?n:ko([n,o])),r.createHref({pathname:a,search:s,hash:i})}function ou(){return S.useContext(Pd)!=null}function Io(){return qt(ou(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Pd).location}var sR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function aR(e){S.useContext(_i).static||S.useLayoutEffect(e)}function js(){let{isDataRoute:e}=S.useContext(ti);return e?uB():Zz()}function Zz(){qt(ou(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(iu),{basename:t,navigator:n}=S.useContext(_i),{matches:r}=S.useContext(ti),{pathname:i}=Io(),o=JSON.stringify(cb(r)),s=S.useRef(!1);return aR(()=>{s.current=!0}),S.useCallback((u,c={})=>{if(bi(s.current,sR),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=db(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ko([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}var Kz=S.createContext(null);function Xz(e){let t=S.useContext(ti).outlet;return t&&S.createElement(Kz.Provider,{value:e},t)}function Rd(){let{matches:e}=S.useContext(ti),t=e[e.length-1];return t?t.params:{}}function Md(e,{relative:t}={}){let{matches:n}=S.useContext(ti),{pathname:r}=Io(),i=JSON.stringify(cb(n));return S.useMemo(()=>db(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Qz(e,t){return lR(e,t)}function lR(e,t,n,r){var b;qt(ou(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(_i),{matches:o}=S.useContext(ti),s=o[o.length-1],a=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",f=s&&s.route;{let E=f&&f.path||"";uR(u,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let h=Io(),p;if(t){let E=typeof t=="string"?ru(t):t;qt(c==="/"||((b=E.pathname)==null?void 0:b.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${E.pathname}" was given in the \`location\` prop.`),p=E}else p=h;let m=p.pathname||"/",x=m;if(c!=="/"){let E=c.replace(/^\//,"").split("/");x="/"+m.replace(/^\//,"").split("/").slice(E.length).join("/")}let v=tR(e,{pathname:x});bi(f||v!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),bi(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=rB(v&&v.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:ko([c,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:ko([c,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&k?S.createElement(Pd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},k):k}function Jz(){let e=lB(),t=Uz(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:o},"ErrorBoundary")," or"," ",S.createElement("code",{style:o},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,s)}var eB=S.createElement(Jz,null),tB=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?S.createElement(ti.Provider,{value:this.props.routeContext},S.createElement(fb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function nB({routeContext:e,match:t,children:n}){let r=S.useContext(iu);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(ti.Provider,{value:e},n)}function rB(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let u=i.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);qt(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let s=!1,a=-1;if(n)for(let u=0;u<i.length;u++){let c=i[u];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=u),c.route.id){let{loaderData:f,errors:h}=n,p=c.route.loader&&!f.hasOwnProperty(c.route.id)&&(!h||h[c.route.id]===void 0);if(c.route.lazy||p){s=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((u,c,f)=>{let h,p=!1,m=null,x=null;n&&(h=o&&c.route.id?o[c.route.id]:void 0,m=c.route.errorElement||eB,s&&(a<0&&f===0?(uR("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,x=null):a===f&&(p=!0,x=c.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,f+1)),k=()=>{let b;return h?b=m:p?b=x:c.route.Component?b=S.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=u,S.createElement(nB,{match:c,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:b})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?S.createElement(tB,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:k(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):k()},null)}function hb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iB(e){let t=S.useContext(iu);return qt(t,hb(e)),t}function oB(e){let t=S.useContext(am);return qt(t,hb(e)),t}function sB(e){let t=S.useContext(ti);return qt(t,hb(e)),t}function pb(e){let t=sB(e),n=t.matches[t.matches.length-1];return qt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function aB(){return pb("useRouteId")}function lB(){var r;let e=S.useContext(fb),t=oB("useRouteError"),n=pb("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function uB(){let{router:e}=iB("useNavigate"),t=pb("useNavigate"),n=S.useRef(!1);return aR(()=>{n.current=!0}),S.useCallback(async(i,o={})=>{bi(n.current,sR),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var bC={};function uR(e,t,n){!t&&!bC[e]&&(bC[e]=!0,bi(!1,n))}S.memo(cB);function cB({routes:e,future:t,state:n}){return lR(e,void 0,n,t)}function dB({to:e,replace:t,state:n,relative:r}){qt(ou(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=S.useContext(_i);bi(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=S.useContext(ti),{pathname:s}=Io(),a=js(),u=db(e,cb(o),s,r==="path"),c=JSON.stringify(u);return S.useEffect(()=>{a(JSON.parse(c),{replace:t,state:n,relative:r})},[a,c,r,t,n]),null}function fB(e){return Xz(e.context)}function Gr(e){qt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hB({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){qt(!ou(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),a=S.useMemo(()=>({basename:s,navigator:i,static:o,future:{}}),[s,i,o]);typeof n=="string"&&(n=ru(n));let{pathname:u="/",search:c="",hash:f="",state:h=null,key:p="default"}=n,m=S.useMemo(()=>{let x=bs(u,s);return x==null?null:{location:{pathname:x,search:c,hash:f,state:h,key:p},navigationType:r}},[s,u,c,f,h,p,r]);return bi(m!=null,`<Router basename="${s}"> is not able to match the URL "${u}${c}${f}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:S.createElement(_i.Provider,{value:a},S.createElement(Pd.Provider,{children:t,value:m}))}function pB({children:e,location:t}){return Qz(Mw(e),t)}function Mw(e,t=[]){let n=[];return S.Children.forEach(e,(r,i)=>{if(!S.isValidElement(r))return;let o=[...t,i];if(r.type===S.Fragment){n.push.apply(n,Mw(r.props.children,o));return}qt(r.type===Gr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Mw(r.props.children,o)),n.push(s)}),n}var Xh="get",Qh="application/x-www-form-urlencoded";function lm(e){return e!=null&&typeof e.tagName=="string"}function mB(e){return lm(e)&&e.tagName.toLowerCase()==="button"}function gB(e){return lm(e)&&e.tagName.toLowerCase()==="form"}function yB(e){return lm(e)&&e.tagName.toLowerCase()==="input"}function xB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vB(e,t){return e.button===0&&(!t||t==="_self")&&!xB(e)}var Sh=null;function wB(){if(Sh===null)try{new FormData(document.createElement("form"),0),Sh=!1}catch{Sh=!0}return Sh}var bB=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ux(e){return e!=null&&!bB.has(e)?(bi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qh}"`),null):e}function kB(e,t){let n,r,i,o,s;if(gB(e)){let a=e.getAttribute("action");r=a?bs(a,t):null,n=e.getAttribute("method")||Xh,i=ux(e.getAttribute("enctype"))||Qh,o=new FormData(e)}else if(mB(e)||yB(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||a.getAttribute("action");if(r=u?bs(u,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Xh,i=ux(e.getAttribute("formenctype"))||ux(a.getAttribute("enctype"))||Qh,o=new FormData(a,e),!wB()){let{name:c,type:f,value:h}=e;if(f==="image"){let p=c?`${c}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else c&&o.append(c,h)}}else{if(lm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Xh,r=null,i=Qh,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:s}}function mb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function SB(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function EB(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function CB(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let s=await SB(o,n);return s.links?s.links():[]}return[]}));return AB(r.flat(1).filter(EB).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function kC(e,t,n,r,i,o){let s=(u,c)=>n[c]?u.route.id!==n[c].route.id:!0,a=(u,c)=>{var f;return n[c].pathname!==u.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==u.params["*"]};return o==="assets"?t.filter((u,c)=>s(u,c)||a(u,c)):o==="data"?t.filter((u,c)=>{var h;let f=r.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(s(u,c)||a(u,c))return!0;if(u.route.shouldRevalidate){let p=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function _B(e,t){return NB(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function NB(e){return[...new Set(e)]}function TB(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function AB(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(TB(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function PB(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function RB(){let e=S.useContext(iu);return mb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function MB(){let e=S.useContext(am);return mb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var gb=S.createContext(void 0);gb.displayName="FrameworkContext";function cR(){let e=S.useContext(gb);return mb(e,"You must render this element inside a <HydratedRouter> element"),e}function jB(e,t){let n=S.useContext(gb),[r,i]=S.useState(!1),[o,s]=S.useState(!1),{onFocus:a,onBlur:u,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,p=S.useRef(null);S.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=b=>{b.forEach(E=>{s(E.isIntersecting)})},k=new IntersectionObserver(v,{threshold:.5});return p.current&&k.observe(p.current),()=>{k.disconnect()}}},[e]),S.useEffect(()=>{if(r){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[r]);let m=()=>{i(!0)},x=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,p,{}]:[o,p,{onFocus:nc(a,m),onBlur:nc(u,x),onMouseEnter:nc(c,m),onMouseLeave:nc(f,x),onTouchStart:nc(h,m)}]:[!1,p,{}]}function nc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function DB({page:e,...t}){let{router:n}=RB(),r=S.useMemo(()=>tR(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?S.createElement(IB,{page:e,matches:r,...t}):null}function OB(e){let{manifest:t,routeModules:n}=cR(),[r,i]=S.useState([]);return S.useEffect(()=>{let o=!1;return CB(e,t,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,t,n]),r}function IB({page:e,matches:t,...n}){let r=Io(),{manifest:i,routeModules:o}=cR(),{loaderData:s,matches:a}=MB(),u=S.useMemo(()=>kC(e,t,a,i,r,"data"),[e,t,a,i,r]),c=S.useMemo(()=>kC(e,t,a,i,r,"assets"),[e,t,a,i,r]),f=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let m=new Set,x=!1;if(t.forEach(k=>{var E;let b=i.routes[k.route.id];!b||!b.hasLoader||(!u.some(C=>C.route.id===k.route.id)&&k.route.id in s&&((E=o[k.route.id])!=null&&E.shouldRevalidate)||b.hasClientLoader?x=!0:m.add(k.route.id))}),m.size===0)return[];let v=PB(e);return x&&m.size>0&&v.searchParams.set("_routes",t.filter(k=>m.has(k.route.id)).map(k=>k.route.id).join(",")),[v.pathname+v.search]},[s,r,i,u,t,e,o]),h=S.useMemo(()=>_B(c,i),[c,i]),p=OB(c);return S.createElement(S.Fragment,null,f.map(m=>S.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),h.map(m=>S.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),p.map(({key:m,link:x})=>S.createElement("link",{key:m,...x})))}function LB(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var dR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dR&&(window.__reactRouterVersion="7.1.3")}catch{}function FB({basename:e,children:t,window:n}){let r=S.useRef();r.current==null&&(r.current=kz({window:n,v5Compat:!0}));let i=r.current,[o,s]=S.useState({action:i.action,location:i.location}),a=S.useCallback(u=>{S.startTransition(()=>s(u))},[s]);return S.useLayoutEffect(()=>i.listen(a),[i,a]),S.createElement(hB,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var fR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jd=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:s,state:a,target:u,to:c,preventScrollReset:f,viewTransition:h,...p},m){let{basename:x}=S.useContext(_i),v=typeof c=="string"&&fR.test(c),k,b=!1;if(typeof c=="string"&&v&&(k=c,dR))try{let I=new URL(window.location.href),M=c.startsWith("//")?new URL(I.protocol+c):new URL(c),z=bs(M.pathname,x);M.origin===I.origin&&z!=null?c=z+M.search+M.hash:b=!0}catch{bi(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=Gz(c,{relative:i}),[C,N,P]=jB(r,p),T=VB(c,{replace:s,state:a,target:u,preventScrollReset:f,relative:i,viewTransition:h});function j(I){t&&t(I),I.defaultPrevented||T(I)}let R=S.createElement("a",{...p,...P,href:k||E,onClick:b||o?t:j,ref:LB(m,N),target:u,"data-discover":!v&&n==="render"?"true":void 0});return C&&!v?S.createElement(S.Fragment,null,R,S.createElement(DB,{page:E})):R});jd.displayName="Link";var $B=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:s,viewTransition:a,children:u,...c},f){let h=Md(s,{relative:c.relative}),p=Io(),m=S.useContext(am),{navigator:x,basename:v}=S.useContext(_i),k=m!=null&&qB(h)&&a===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,E=p.pathname,C=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(E=E.toLowerCase(),C=C?C.toLowerCase():null,b=b.toLowerCase()),C&&v&&(C=bs(C,v)||C);const N=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let P=E===b||!i&&E.startsWith(b)&&E.charAt(N)==="/",T=C!=null&&(C===b||!i&&C.startsWith(b)&&C.charAt(b.length)==="/"),j={isActive:P,isPending:T,isTransitioning:k},R=P?t:void 0,I;typeof r=="function"?I=r(j):I=[r,P?"active":null,T?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let M=typeof o=="function"?o(j):o;return S.createElement(jd,{...c,"aria-current":R,className:I,ref:f,style:M,to:s,viewTransition:a},typeof u=="function"?u(j):u)});$B.displayName="NavLink";var zB=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=Xh,action:a,onSubmit:u,relative:c,preventScrollReset:f,viewTransition:h,...p},m)=>{let x=HB(),v=YB(a,{relative:c}),k=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&fR.test(a),E=C=>{if(u&&u(C),C.defaultPrevented)return;C.preventDefault();let N=C.nativeEvent.submitter,P=(N==null?void 0:N.getAttribute("formmethod"))||s;x(N||C.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:i,state:o,relative:c,preventScrollReset:f,viewTransition:h})};return S.createElement("form",{ref:m,method:k,action:v,onSubmit:r?u:E,...p,"data-discover":!b&&e==="render"?"true":void 0})});zB.displayName="Form";function BB(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hR(e){let t=S.useContext(iu);return qt(t,BB(e)),t}function VB(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:s}={}){let a=js(),u=Io(),c=Md(e,{relative:o});return S.useCallback(f=>{if(vB(f,t)){f.preventDefault();let h=n!==void 0?n:Vc(u)===Vc(c);a(e,{replace:h,state:r,preventScrollReset:i,relative:o,viewTransition:s})}},[u,a,c,n,r,t,e,i,o,s])}var WB=0,UB=()=>`__${String(++WB)}__`;function HB(){let{router:e}=hR("useSubmit"),{basename:t}=S.useContext(_i),n=aB();return S.useCallback(async(r,i={})=>{let{action:o,method:s,encType:a,formData:u,body:c}=kB(r,t);if(i.navigate===!1){let f=i.fetcherKey||UB();await e.fetch(f,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:u,body:c,formMethod:i.method||s,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:u,body:c,formMethod:i.method||s,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function YB(e,{relative:t}={}){let{basename:n}=S.useContext(_i),r=S.useContext(ti);qt(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Md(e||".",{relative:t})},s=Io();if(e==null){o.search=s.search;let a=new URLSearchParams(o.search),u=a.getAll("index");if(u.some(f=>f==="")){a.delete("index"),u.filter(h=>h).forEach(h=>a.append("index",h));let f=a.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ko([n,o.pathname])),Vc(o)}function qB(e,t={}){let n=S.useContext(oR);qt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=hR("useViewTransitionState"),i=Md(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=bs(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=bs(n.nextLocation.pathname,r)||n.nextLocation.pathname;return hp(i.pathname,s)!=null||hp(i.pathname,o)!=null}new TextEncoder;/**
|
|
52
|
+
* @license lucide-react v0.468.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const GB=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pR=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
57
|
+
* @license lucide-react v0.468.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var ZB={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"};/**
|
|
62
|
+
* @license lucide-react v0.468.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const KB=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},u)=>S.createElement("svg",{ref:u,...ZB,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:pR("lucide",i),...a},[...s.map(([c,f])=>S.createElement(c,f)),...Array.isArray(o)?o:[o]]));/**
|
|
67
|
+
* @license lucide-react v0.468.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Wt=(e,t)=>{const n=S.forwardRef(({className:r,...i},o)=>S.createElement(KB,{ref:o,iconNode:t,className:pR(`lucide-${GB(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
72
|
+
* @license lucide-react v0.468.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const XB=Wt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
77
|
+
* @license lucide-react v0.468.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const QB=Wt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
82
|
+
* @license lucide-react v0.468.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const JB=Wt("BotMessageSquare",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]);/**
|
|
87
|
+
* @license lucide-react v0.468.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const mR=Wt("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
92
|
+
* @license lucide-react v0.468.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const gR=Wt("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
97
|
+
* @license lucide-react v0.468.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const yb=Wt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
102
|
+
* @license lucide-react v0.468.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const um=Wt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
107
|
+
* @license lucide-react v0.468.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const eV=Wt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
112
|
+
* @license lucide-react v0.468.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const tV=Wt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
117
|
+
* @license lucide-react v0.468.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const nV=Wt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
122
|
+
* @license lucide-react v0.468.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const cx=Wt("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
|
|
127
|
+
* @license lucide-react v0.468.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const rV=Wt("DraftingCompass",[["path",{d:"m12.99 6.74 1.93 3.44",key:"iwagvd"}],["path",{d:"M19.136 12a10 10 0 0 1-14.271 0",key:"ppmlo4"}],["path",{d:"m21 21-2.16-3.84",key:"vylbct"}],["path",{d:"m3 21 8.02-14.26",key:"1ssaw4"}],["circle",{cx:"12",cy:"5",r:"2",key:"f1ur92"}]]);/**
|
|
132
|
+
* @license lucide-react v0.468.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const iV=Wt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
137
|
+
* @license lucide-react v0.468.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const oV=Wt("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"}]]);/**
|
|
142
|
+
* @license lucide-react v0.468.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const sV=Wt("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"}]]);/**
|
|
147
|
+
* @license lucide-react v0.468.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const yR=Wt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
152
|
+
* @license lucide-react v0.468.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const aV=Wt("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
157
|
+
* @license lucide-react v0.468.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const xR=Wt("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
162
|
+
* @license lucide-react v0.468.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const Wc=Wt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
167
|
+
* @license lucide-react v0.468.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const jl=Wt("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
|
|
172
|
+
* @license lucide-react v0.468.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const lV=Wt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
177
|
+
* @license lucide-react v0.468.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const uV=Wt("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
182
|
+
* @license lucide-react v0.468.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const cV=Wt("Trash",[["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"}]]);/**
|
|
187
|
+
* @license lucide-react v0.468.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const jw=Wt("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
|
|
192
|
+
* @license lucide-react v0.468.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Ca=Wt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function vR(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=vR(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function cm(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vR(e))&&(r&&(r+=" "),r+=t);return r}var su=eR();const wR=tu(su);var dV=e=>{switch(e){case"success":return pV;case"info":return gV;case"warning":return mV;case"error":return yV;default:return null}},fV=Array(12).fill(0),hV=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},fV.map((n,r)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pV=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),mV=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),gV=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yV=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xV=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vV=()=>{let[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Dw=1,wV=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Dw++,o=this.toasts.find(a=>a.id===i),s=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...e,id:i,title:n}),{...a,...e,id:i,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,s=r.then(async u=>{if(o=["resolve",u],ne.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(kV(u)&&!u.ok){i=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:c,description:f})}else if(t.success!==void 0){i=!1;let c=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:c,description:f})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let c=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:c,description:f})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),a=()=>new Promise((u,c)=>s.then(()=>o[0]==="reject"?c(o[1]):u(o[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Dw++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Tr=new wV,bV=(e,t)=>{let n=(t==null?void 0:t.id)||Dw++;return Tr.addToast({title:e,...t,id:n}),n},kV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",SV=bV,EV=()=>Tr.toasts,nn=Object.assign(SV,{success:Tr.success,info:Tr.info,warning:Tr.warning,error:Tr.error,custom:Tr.custom,message:Tr.message,promise:Tr.promise,dismiss:Tr.dismiss,loading:Tr.loading},{getHistory:EV});function CV(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}CV(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
197
|
+
`);function Eh(e){return e.label!==void 0}var _V=3,NV="32px",TV="16px",SC=4e3,AV=356,PV=14,RV=20,MV=200;function fi(...e){return e.filter(Boolean).join(" ")}function jV(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var DV=e=>{var t,n,r,i,o,s,a,u,c,f,h;let{invert:p,toast:m,unstyled:x,interacting:v,setHeights:k,visibleToasts:b,heights:E,index:C,toasts:N,expanded:P,removeToast:T,defaultRichColors:j,closeButton:R,style:I,cancelButtonStyle:M,actionButtonStyle:z,className:F="",descriptionClassName:Y="",duration:O,position:q,gap:W,loadingIcon:Z,expandByDefault:U,classNames:B,icons:L,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:V}=e,[D,G]=ne.useState(null),[K,J]=ne.useState(null),[ee,ie]=ne.useState(!1),[ce,he]=ne.useState(!1),[Ee,fe]=ne.useState(!1),[xe,Me]=ne.useState(!1),[Ve,ot]=ne.useState(!1),[_t,Q]=ne.useState(0),[oe,ue]=ne.useState(0),Se=ne.useRef(m.duration||O||SC),we=ne.useRef(null),ge=ne.useRef(null),Ae=C===0,Fe=C+1<=b,se=m.type,pe=m.dismissible!==!1,Oe=m.className||"",et=m.descriptionClassName||"",rt=ne.useMemo(()=>E.findIndex(Ye=>Ye.toastId===m.id)||0,[E,m.id]),Rt=ne.useMemo(()=>{var Ye;return(Ye=m.closeButton)!=null?Ye:R},[m.closeButton,R]),Ke=ne.useMemo(()=>m.duration||O||SC,[m.duration,O]),st=ne.useRef(0),it=ne.useRef(0),Ut=ne.useRef(0),pt=ne.useRef(null),[gn,yt]=q.split("-"),yn=ne.useMemo(()=>E.reduce((Ye,wt,Nt)=>Nt>=rt?Ye:Ye+wt.height,0),[E,rt]),dt=vV(),Fr=m.invert||p,ur=se==="loading";it.current=ne.useMemo(()=>rt*W+yn,[rt,yn]),ne.useEffect(()=>{Se.current=Ke},[Ke]),ne.useEffect(()=>{ie(!0)},[]),ne.useEffect(()=>{let Ye=ge.current;if(Ye){let wt=Ye.getBoundingClientRect().height;return ue(wt),k(Nt=>[{toastId:m.id,height:wt,position:m.position},...Nt]),()=>k(Nt=>Nt.filter(jn=>jn.toastId!==m.id))}},[k,m.id]),ne.useLayoutEffect(()=>{if(!ee)return;let Ye=ge.current,wt=Ye.style.height;Ye.style.height="auto";let Nt=Ye.getBoundingClientRect().height;Ye.style.height=wt,ue(Nt),k(jn=>jn.find(Fn=>Fn.toastId===m.id)?jn.map(Fn=>Fn.toastId===m.id?{...Fn,height:Nt}:Fn):[{toastId:m.id,height:Nt,position:m.position},...jn])},[ee,m.title,m.description,k,m.id]);let Xn=ne.useCallback(()=>{he(!0),Q(it.current),k(Ye=>Ye.filter(wt=>wt.toastId!==m.id)),setTimeout(()=>{T(m)},MV)},[m,T,k,it]);ne.useEffect(()=>{if(m.promise&&se==="loading"||m.duration===1/0||m.type==="loading")return;let Ye;return P||v||V&&dt?(()=>{if(Ut.current<st.current){let wt=new Date().getTime()-st.current;Se.current=Se.current-wt}Ut.current=new Date().getTime()})():Se.current!==1/0&&(st.current=new Date().getTime(),Ye=setTimeout(()=>{var wt;(wt=m.onAutoClose)==null||wt.call(m,m),Xn()},Se.current)),()=>clearTimeout(Ye)},[P,v,m,se,V,dt,Xn]),ne.useEffect(()=>{m.delete&&Xn()},[Xn,m.delete]);function oi(){var Ye,wt,Nt;return L!=null&&L.loading?ne.createElement("div",{className:fi(B==null?void 0:B.loader,(Ye=m==null?void 0:m.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":se==="loading"},L.loading):Z?ne.createElement("div",{className:fi(B==null?void 0:B.loader,(wt=m==null?void 0:m.classNames)==null?void 0:wt.loader,"sonner-loader"),"data-visible":se==="loading"},Z):ne.createElement(hV,{className:fi(B==null?void 0:B.loader,(Nt=m==null?void 0:m.classNames)==null?void 0:Nt.loader),visible:se==="loading"})}return ne.createElement("li",{tabIndex:0,ref:ge,className:fi(F,Oe,B==null?void 0:B.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[se],(n=m==null?void 0:m.classNames)==null?void 0:n[se]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:j,"data-styled":!(m.jsx||m.unstyled||x),"data-mounted":ee,"data-promise":!!m.promise,"data-swiped":Ve,"data-removed":ce,"data-visible":Fe,"data-y-position":gn,"data-x-position":yt,"data-index":C,"data-front":Ae,"data-swiping":Ee,"data-dismissible":pe,"data-type":se,"data-invert":Fr,"data-swipe-out":xe,"data-swipe-direction":K,"data-expanded":!!(P||U&&ee),style:{"--index":C,"--toasts-before":C,"--z-index":N.length-C,"--offset":`${ce?_t:it.current}px`,"--initial-height":U?"auto":`${oe}px`,...I,...m.style},onPointerDown:Ye=>{ur||!pe||(we.current=new Date,Q(it.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(fe(!0),pt.current={x:Ye.clientX,y:Ye.clientY}))},onPointerUp:()=>{var Ye,wt,Nt,jn;if(xe||!pe)return;pt.current=null;let Fn=Number(((Ye=ge.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$n=Number(((wt=ge.current)==null?void 0:wt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),wr=new Date().getTime()-((Nt=we.current)==null?void 0:Nt.getTime()),xn=D==="x"?Fn:$n,$r=Math.abs(xn)/wr;if(Math.abs(xn)>=RV||$r>.11){Q(it.current),(jn=m.onDismiss)==null||jn.call(m,m),J(D==="x"?Fn>0?"right":"left":$n>0?"down":"up"),Xn(),Me(!0),ot(!1);return}fe(!1),G(null)},onPointerMove:Ye=>{var wt,Nt,jn,Fn;if(!pt.current||!pe||((wt=window.getSelection())==null?void 0:wt.toString().length)>0)return;let $n=Ye.clientY-pt.current.y,wr=Ye.clientX-pt.current.x,xn=(Nt=e.swipeDirections)!=null?Nt:jV(q);!D&&(Math.abs(wr)>1||Math.abs($n)>1)&&G(Math.abs(wr)>Math.abs($n)?"x":"y");let $r={x:0,y:0};D==="y"?(xn.includes("top")||xn.includes("bottom"))&&(xn.includes("top")&&$n<0||xn.includes("bottom")&&$n>0)&&($r.y=$n):D==="x"&&(xn.includes("left")||xn.includes("right"))&&(xn.includes("left")&&wr<0||xn.includes("right")&&wr>0)&&($r.x=wr),(Math.abs($r.x)>0||Math.abs($r.y)>0)&&ot(!0),(jn=ge.current)==null||jn.style.setProperty("--swipe-amount-x",`${$r.x}px`),(Fn=ge.current)==null||Fn.style.setProperty("--swipe-amount-y",`${$r.y}px`)}},Rt&&!m.jsx?ne.createElement("button",{"aria-label":H,"data-disabled":ur,"data-close-button":!0,onClick:ur||!pe?()=>{}:()=>{var Ye;Xn(),(Ye=m.onDismiss)==null||Ye.call(m,m)},className:fi(B==null?void 0:B.closeButton,(i=m==null?void 0:m.classNames)==null?void 0:i.closeButton)},(o=L==null?void 0:L.close)!=null?o:xV):null,m.jsx||S.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:ne.createElement(ne.Fragment,null,se||m.icon||m.promise?ne.createElement("div",{"data-icon":"",className:fi(B==null?void 0:B.icon,(s=m==null?void 0:m.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||oi():null,m.type!=="loading"?m.icon||(L==null?void 0:L[se])||dV(se):null):null,ne.createElement("div",{"data-content":"",className:fi(B==null?void 0:B.content,(a=m==null?void 0:m.classNames)==null?void 0:a.content)},ne.createElement("div",{"data-title":"",className:fi(B==null?void 0:B.title,(u=m==null?void 0:m.classNames)==null?void 0:u.title)},typeof m.title=="function"?m.title():m.title),m.description?ne.createElement("div",{"data-description":"",className:fi(Y,et,B==null?void 0:B.description,(c=m==null?void 0:m.classNames)==null?void 0:c.description)},typeof m.description=="function"?m.description():m.description):null),S.isValidElement(m.cancel)?m.cancel:m.cancel&&Eh(m.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||M,onClick:Ye=>{var wt,Nt;Eh(m.cancel)&&pe&&((Nt=(wt=m.cancel).onClick)==null||Nt.call(wt,Ye),Xn())},className:fi(B==null?void 0:B.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,S.isValidElement(m.action)?m.action:m.action&&Eh(m.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||z,onClick:Ye=>{var wt,Nt;Eh(m.action)&&((Nt=(wt=m.action).onClick)==null||Nt.call(wt,Ye),!Ye.defaultPrevented&&Xn())},className:fi(B==null?void 0:B.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function EC(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function OV(e,t){let n={};return[e,t].forEach((r,i)=>{let o=i===1,s=o?"--mobile-offset":"--offset",a=o?TV:NV;function u(c){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):u(a)}),n}var IV=S.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:s,className:a,offset:u,mobileOffset:c,theme:f="light",richColors:h,duration:p,style:m,visibleToasts:x=_V,toastOptions:v,dir:k=EC(),gap:b=PV,loadingIcon:E,icons:C,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:P}=e,[T,j]=ne.useState([]),R=ne.useMemo(()=>Array.from(new Set([r].concat(T.filter(V=>V.position).map(V=>V.position)))),[T,r]),[I,M]=ne.useState([]),[z,F]=ne.useState(!1),[Y,O]=ne.useState(!1),[q,W]=ne.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=ne.useRef(null),U=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=ne.useRef(null),L=ne.useRef(!1),H=ne.useCallback(V=>{j(D=>{var G;return(G=D.find(K=>K.id===V.id))!=null&&G.delete||Tr.dismiss(V.id),D.filter(({id:K})=>K!==V.id)})},[]);return ne.useEffect(()=>Tr.subscribe(V=>{if(V.dismiss){j(D=>D.map(G=>G.id===V.id?{...G,delete:!0}:G));return}setTimeout(()=>{wR.flushSync(()=>{j(D=>{let G=D.findIndex(K=>K.id===V.id);return G!==-1?[...D.slice(0,G),{...D[G],...V},...D.slice(G+1)]:[V,...D]})})})}),[]),ne.useEffect(()=>{if(f!=="system"){W(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{V.addListener(({matches:G})=>{try{W(G?"dark":"light")}catch(K){console.error(K)}})}},[f]),ne.useEffect(()=>{T.length<=1&&F(!1)},[T]),ne.useEffect(()=>{let V=D=>{var G,K;i.every(J=>D[J]||D.code===J)&&(F(!0),(G=Z.current)==null||G.focus()),D.code==="Escape"&&(document.activeElement===Z.current||(K=Z.current)!=null&&K.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[i]),ne.useEffect(()=>{if(Z.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,L.current=!1)}},[Z.current]),ne.createElement("section",{ref:t,"aria-label":`${N} ${U}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((V,D)=>{var G;let[K,J]=V.split("-");return T.length?ne.createElement("ol",{key:V,dir:k==="auto"?EC():k,tabIndex:-1,ref:Z,className:a,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":K,"data-lifted":z&&T.length>1&&!o,"data-x-position":J,style:{"--front-toast-height":`${((G=I[0])==null?void 0:G.height)||0}px`,"--width":`${AV}px`,"--gap":`${b}px`,...m,...OV(u,c)},onBlur:ee=>{L.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(L.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||L.current||(L.current=!0,B.current=ee.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{Y||F(!1)},onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},T.filter(ee=>!ee.position&&D===0||ee.position===V).map((ee,ie)=>{var ce,he;return ne.createElement(DV,{key:ee.id,icons:C,index:ie,toast:ee,defaultRichColors:h,duration:(ce=v==null?void 0:v.duration)!=null?ce:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:x,closeButton:(he=v==null?void 0:v.closeButton)!=null?he:s,interacting:Y,position:V,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:H,toasts:T.filter(Ee=>Ee.position==ee.position),heights:I.filter(Ee=>Ee.position==ee.position),setHeights:M,expandByDefault:o,gap:b,loadingIcon:E,expanded:z,pauseWhenPageIsHidden:P,swipeDirections:e.swipeDirections})})):null}))});const xb="-",LV=e=>{const t=$V(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(xb);return a[0]===""&&a.length!==1&&a.shift(),bR(a,t)||FV(s)},getConflictingClassGroupIds:(s,a)=>{const u=n[s]||[];return a&&r[s]?[...u,...r[s]]:u}}},bR=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?bR(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(xb);return(s=t.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},CC=/^\[(.+)\]$/,FV=e=>{if(CC.test(e)){const t=CC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},$V=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return BV(Object.entries(e.classGroups),n).forEach(([o,s])=>{Ow(s,r,o,t)}),r},Ow=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:_C(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(zV(i)){Ow(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{Ow(s,_C(t,o),n,r)})})},_C=(e,t)=>{let n=e;return t.split(xb).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zV=e=>e.isThemeGetter,BV=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o);return[n,i]}):e,VV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},kR="!",WV=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,s=a=>{const u=[];let c=0,f=0,h;for(let k=0;k<a.length;k++){let b=a[k];if(c===0){if(b===i&&(r||a.slice(k,k+o)===t)){u.push(a.slice(f,k)),f=k+o;continue}if(b==="/"){h=k;continue}}b==="["?c++:b==="]"&&c--}const p=u.length===0?a:a.substring(f),m=p.startsWith(kR),x=m?p.substring(1):p,v=h&&h>f?h-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:s}):s},UV=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},HV=e=>({cache:VV(e.cacheSize),parseClassName:WV(e),...LV(e)}),YV=/\s+/,qV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(YV);let a="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{modifiers:f,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(c);let x=!!m,v=r(x?p.substring(0,m):p);if(!v){if(!x){a=c+(a.length>0?" "+a:a);continue}if(v=r(p),!v){a=c+(a.length>0?" "+a:a);continue}x=!1}const k=UV(f).join(":"),b=h?k+kR:k,E=b+v;if(o.includes(E))continue;o.push(E);const C=i(v,x);for(let N=0;N<C.length;++N){const P=C[N];o.push(b+P)}a=c+(a.length>0?" "+a:a)}return a};function GV(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=SR(t))&&(r&&(r+=" "),r+=n);return r}const SR=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=SR(e[r]))&&(n&&(n+=" "),n+=t);return n};function ZV(e,...t){let n,r,i,o=s;function s(u){const c=t.reduce((f,h)=>h(f),e());return n=HV(c),r=n.cache.get,i=n.cache.set,o=a,a(u)}function a(u){const c=r(u);if(c)return c;const f=qV(u,n);return i(u,f),f}return function(){return o(GV.apply(null,arguments))}}const zt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ER=/^\[(?:([a-z-]+):)?(.+)\]$/i,KV=/^\d+\/\d+$/,XV=new Set(["px","full","screen"]),QV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,e6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,t6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>Sl(e)||XV.has(e)||KV.test(e),ls=e=>au(e,"length",c6),Sl=e=>!!e&&!Number.isNaN(Number(e)),dx=e=>au(e,"number",Sl),rc=e=>!!e&&Number.isInteger(Number(e)),r6=e=>e.endsWith("%")&&Sl(e.slice(0,-1)),ut=e=>ER.test(e),us=e=>QV.test(e),i6=new Set(["length","size","percentage"]),o6=e=>au(e,i6,CR),s6=e=>au(e,"position",CR),a6=new Set(["image","url"]),l6=e=>au(e,a6,f6),u6=e=>au(e,"",d6),ic=()=>!0,au=(e,t,n)=>{const r=ER.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},c6=e=>JV.test(e)&&!e6.test(e),CR=()=>!1,d6=e=>t6.test(e),f6=e=>n6.test(e),h6=()=>{const e=zt("colors"),t=zt("spacing"),n=zt("blur"),r=zt("brightness"),i=zt("borderColor"),o=zt("borderRadius"),s=zt("borderSpacing"),a=zt("borderWidth"),u=zt("contrast"),c=zt("grayscale"),f=zt("hueRotate"),h=zt("invert"),p=zt("gap"),m=zt("gradientColorStops"),x=zt("gradientColorStopPositions"),v=zt("inset"),k=zt("margin"),b=zt("opacity"),E=zt("padding"),C=zt("saturate"),N=zt("scale"),P=zt("sepia"),T=zt("skew"),j=zt("space"),R=zt("translate"),I=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",ut,t],F=()=>[ut,t],Y=()=>["",fo,ls],O=()=>["auto",Sl,ut],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",ut],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[Sl,ut];return{cacheSize:500,separator:":",theme:{colors:[ic],spacing:[fo,ls],blur:["none","",us,ut],brightness:H(),borderColor:[e],borderRadius:["none","","full",us,ut],borderSpacing:F(),borderWidth:Y(),contrast:H(),grayscale:B(),hueRotate:H(),invert:B(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[r6,ls],inset:z(),margin:z(),opacity:H(),padding:F(),saturate:H(),scale:H(),sepia:B(),skew:H(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ut]}],container:["container"],columns:[{columns:[us]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),ut]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rc,ut]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ut]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",rc,ut]}],"grid-cols":[{"grid-cols":[ic]}],"col-start-end":[{col:["auto",{span:["full",rc,ut]},ut]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[ic]}],"row-start-end":[{row:["auto",{span:[rc,ut]},ut]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ut]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ut]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ut,t]}],"min-w":[{"min-w":[ut,t,"min","max","fit"]}],"max-w":[{"max-w":[ut,t,"none","full","min","max","fit","prose",{screen:[us]},us]}],h:[{h:[ut,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ut,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ut,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ut,t,"auto","min","max","fit"]}],"font-size":[{text:["base",us,ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",dx]}],"font-family":[{font:[ic]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ut]}],"line-clamp":[{"line-clamp":["none",Sl,dx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fo,ut]}],"list-image":[{"list-image":["none",ut]}],"list-style-type":[{list:["none","disc","decimal",ut]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fo,ls]}],"underline-offset":[{"underline-offset":["auto",fo,ut]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ut]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ut]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),s6]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",o6]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},l6]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:W()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[fo,ut]}],"outline-w":[{outline:[fo,ls]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[fo,ls]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",us,u6]}],"shadow-color":[{shadow:[ic]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",us,ut]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[C]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ut]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",ut]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",ut]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[rc,ut]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ut]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ut]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ut]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fo,ls,dx]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},p6=ZV(h6);function Te(...e){return p6(cm(e))}const vb=async(e,t)=>{var r;const n=await fetch(e);if(!n.ok){const i=new Error("An error occurred while fetching the data.");throw i.info=await n.json(),i.status=n.status,t||nn.error(((r=i==null?void 0:i.info)==null?void 0:r.error)||(i==null?void 0:i.message)),i}return n.json()},m6=()=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",children:[y.jsx("circle",{cx:"18.0002",cy:"18.0002",r:"15.2365",stroke:"currentColor",strokeWidth:"1.25409"}),y.jsx("ellipse",{cx:"18.0008",cy:"18",rx:"15.2365",ry:"10.2193",transform:"rotate(45 18.0008 18)",stroke:"currentColor",strokeWidth:"1.25409"}),y.jsx("path",{d:"M11.7793 18.0547H24.3007",stroke:"currentColor",strokeWidth:"1.25409"}),y.jsx("path",{d:"M14.8574 21.2354L21.2192 14.8736",stroke:"currentColor",strokeWidth:"1.25409"}),y.jsx("path",{d:"M21.2207 21.2354L14.8589 14.8736",stroke:"currentColor",strokeWidth:"1.25409"}),y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.57571 11.2943C4.93105 13.0681 3.39081 15.4508 3.39081 17.9997C3.39081 20.5486 4.93105 22.9313 7.57571 24.7051C10.2163 26.4762 13.9001 27.592 18.0003 27.592C22.1004 27.592 25.7842 26.4762 28.4248 24.7051C31.0695 22.9313 32.6097 20.5486 32.6097 17.9997C32.6097 15.4508 31.0695 13.0681 28.4248 11.2943C25.7842 9.5232 22.1004 8.40741 18.0003 8.40741C13.9001 8.40741 10.2163 9.5232 7.57571 11.2943ZM6.87715 10.2528C9.75106 8.32521 13.6855 7.15332 18.0003 7.15332C22.315 7.15332 26.2495 8.32521 29.1234 10.2528C31.9932 12.1776 33.8638 14.9046 33.8638 17.9997C33.8638 21.0948 31.9932 23.8218 29.1234 25.7466C26.2495 27.6742 22.315 28.8461 18.0003 28.8461C13.6855 28.8461 9.75106 27.6742 6.87715 25.7466C4.00728 23.8218 2.13672 21.0948 2.13672 17.9997C2.13672 14.9046 4.00728 12.1776 6.87715 10.2528Z",fill:"currentColor"})]}),g6=[{name:"Agents",url:"/agents",icon:mR},{name:"Tools",url:"/tools",icon:rV},{name:"Workflows",url:"/workflows",icon:jw}],y6=()=>{const{pathname:e}=Io();return y.jsx("div",{className:"relative z-20 h-full text-mastra-el-6",children:y.jsxs("div",{className:"bg-mastra-bg-1 h-full w-full p-4 flex gap-6 flex-col",children:[y.jsx("div",{className:"flex items-center justify-between",children:y.jsxs("div",{className:"flex gap-2 px-2 items-center",children:[y.jsx(m6,{}),y.jsx("p",{className:"text-medium text-sm gradient py-[0.38rem] font-tasa",children:"Mastra Playground"})]})}),y.jsx("div",{children:y.jsx("div",{className:"flex flex-col gap-0.5",children:g6.map(t=>{const[n,r]=e.split("/"),i=t.name.toLowerCase(),o=t.url===e||t.name===e||r===i;return y.jsxs(jd,{to:t.url,className:Te("flex cursor-pointer w-full px-2 items-center focus-visible:outline-none transition-colors focus-visible:ring-1 focus-visible:ring-mastra-border-4 gap-3 rounded-xs group text-small hover:bg-mastra-el-6/5",o?"bg-mastra-el-6/5":""),children:[y.jsx(t.icon,{className:Te("w-[0.875rem] h-[0.875rem] text-mastra-el-3 group-hover:text-mastra-el-6",o?"text-mastra-el-6":"")}),y.jsx("p",{className:Te("py-[0.38rem] text-mastra-el-6/60 group-hover:text-mastra-el-6 transition-all capitalize ",o?"text-mastra-el-6":""),children:t.name})]})})})}),y.jsxs("div",{className:"flex mt-auto gap-2 items-center justify-center",children:[y.jsx("a",{href:"https://mastra.ai",target:"_blank",rel:"noopener",className:"text-sm text-gray-300/60 hover:text-gray-100",children:"Mastra.AI"}),y.jsx("div",{className:"w-1 h-1 bg-gray-300/60 rounded-full"}),y.jsx("a",{href:"https://mastra.ai/docs/guide",target:"_blank",rel:"noopener",className:"text-sm text-gray-300/60 hover:text-gray-100",children:"Docs"}),y.jsx("div",{className:"w-1 h-1 bg-gray-300/60 rounded-full"}),y.jsx("a",{href:"https://github.com/mastra-ai/mastra",target:"_blank",rel:"noopener",className:"text-sm text-gray-300/60 hover:text-gray-100",children:"GitHub"})]})]})})};var x6=(e,t,n,r,i,o,s,a)=>{let u=document.documentElement,c=["light","dark"];function f(m){(Array.isArray(e)?e:[e]).forEach(x=>{let v=x==="class",k=v&&o?i.map(b=>o[b]||b):i;v?(u.classList.remove(...k),u.classList.add(m)):u.setAttribute(x,m)}),h(m)}function h(m){a&&c.includes(m)&&(u.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let m=localStorage.getItem(t)||n,x=s&&m==="system"?p():m;f(x)}catch{}},v6=S.createContext(void 0),w6={setTheme:e=>{},themes:[]},b6=()=>{var e;return(e=S.useContext(v6))!=null?e:w6};S.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,themes:a,nonce:u,scriptProps:c})=>{let f=JSON.stringify([n,t,o,e,a,s,r,i]).slice(1,-1);return S.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${x6.toString()})(${f})`}})});const k6=({...e})=>{const{theme:t="system"}=b6();return y.jsx(IV,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},S6=S.createContext({theme:"system",setTheme:()=>null});function E6({children:e,defaultTheme:t="system"}){const[n,r]=S.useState(t);return S.useEffect(()=>{const i=window.document.documentElement;if(i.classList.remove("light","dark"),n==="system"){const o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";i.classList.add(o);return}i.classList.add(n)},[n]),y.jsx(S6.Provider,{value:{theme:n,setTheme:r},children:e})}const C6=({children:e})=>y.jsxs(E6,{defaultTheme:"dark",attribute:"class",children:[y.jsx(k6,{position:"bottom-right"}),y.jsxs("main",{className:"bg-mastra-bg-1 grid h-full w-full grid-cols-[15rem_minmax(0,_1fr)] overflow-clip",children:[y.jsx("div",{className:"z-20 h-full",children:y.jsx("div",{className:"h-full",children:y.jsx(y6,{})})}),y.jsx("div",{className:"bg-mastra-bg-2 grid h-[calc(100vh-1rem)] relative border-mastra-border-1 rounded-xs border-thin m-2 overflow-hidden border-solid",children:e})]})]}),sr=({title:e,rightElement:t})=>y.jsx("header",{className:"sticky top-0 z-50",children:y.jsx("div",{className:"flex h-[var(--top-bar-height)] w-full content-center items-center justify-between border-b-[0.1px] border-mastra-border-1 px-[1.31rem]",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("h1",{className:"font-medium text-sm font-mono",children:e}),y.jsx("div",{className:"ml-auto",children:t})]})})});function We({className:e,...t}){return y.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const _R=()=>{const[e,t]=S.useState({}),[n,r]=S.useState(!0);return S.useEffect(()=>{(async()=>{r(!0);try{const o=await fetch("/api/agents");if(!o.ok){const a=await o.json();t({}),console.error("Error fetching agents",a),nn.error((a==null?void 0:a.error)||"Error fetching agents");return}const s=await o.json();t(s)}catch(o){t({}),console.error("Error fetching agents",o),nn.error("Error fetching agents")}finally{r(!1)}})()},[]),{agents:e,isLoading:n}},Dd=e=>{const[t,n]=S.useState(null),[r,i]=S.useState(!0);return S.useEffect(()=>{(async()=>{i(!0);try{if(!e){n(null),i(!1);return}const s=await fetch(`/api/agents/${e}`);if(!s.ok){const u=await s.json();n(null),console.error("Error fetching agent",u),nn.error((u==null?void 0:u.error)||"Error fetching agent");return}const a=await s.json();n(a)}catch(s){n(null),console.error("Error fetching agent",s),nn.error("Error fetching agent")}finally{i(!1)}})()},[e]),{agent:t,isLoading:r}},_6=()=>{const[e,t]=S.useState({}),[n,r]=S.useState(!0);return S.useEffect(()=>{(async()=>{r(!0);try{const o=await fetch("/api/tools");if(!o.ok){const a=await o.json();t({}),console.error("Error fetching tools",a),nn.error((a==null?void 0:a.error)||"Error fetching tools");return}const s=await o.json();t(s)}catch(o){t({}),console.error("Error fetching tools",o),nn.error("Error fetching tools")}finally{r(!1)}})()},[]),{tools:e,isLoading:n}},N6=e=>{const[t,n]=S.useState(null),[r,i]=S.useState(!0);return S.useEffect(()=>{(async()=>{i(!0);try{if(!e){n(null),i(!1);return}const s=await fetch(`/api/tools/${e}`);if(!s.ok){const u=await s.json();n(null),console.error("Error fetching tool",u),nn.error((u==null?void 0:u.error)||"Error fetching tool");return}const a=await s.json();n(a)}catch(s){n(null),console.error("Error fetching tool",s),nn.error("Error fetching tool")}finally{i(!1)}})()},[e]),{tool:t,isLoading:r}},T6=()=>{const{agents:e,isLoading:t}=_R(),{tools:n,isLoading:r}=_6(),[i,o]=S.useState(null),[s,a]=S.useState(!0),{agent:u,isLoading:c}=Dd(i),f=js();if(t)return y.jsxs("div",{className:"flex flex-col h-full w-full",children:[y.jsx(sr,{title:"Tools"}),y.jsxs("div",{className:"w-full h-full grid grid-cols-[300px_1fr] py-6 px-4",children:[y.jsx("div",{className:"flex flex-col gap-4",children:y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"px-2 py-2 rounded-md bg-mastra-bg-13 mb-2",children:y.jsxs("div",{className:"flex gap-2 items-center",children:[y.jsx(We,{className:"h-3 w-3"}),y.jsx(We,{className:"h-4 w-20"})]})}),y.jsx("div",{className:"flex flex-col gap-2",children:[1,2,3].map(m=>y.jsxs("div",{className:"flex gap-2 items-center px-2 py-2 rounded-md bg-mastra-bg-13",children:[y.jsx(We,{className:"h-3 w-3"}),y.jsx(We,{className:"h-4 w-24"})]},m))})]})}),y.jsx("div",{className:"border-l border-mastra-border-1 pl-4",children:y.jsx(We,{className:"h-full w-full rounded-md"})})]})]});const h=m=>{o(m),a(!1)},p=()=>{a(!0),o(null)};return r||c?y.jsxs("div",{className:"flex flex-col h-full w-full ",children:[y.jsx(sr,{title:"Tools"}),y.jsx("div",{className:"w-full h-full grid grid-cols-[300px_1fr] ",children:y.jsx("div",{className:"w-full h-full border-r-[0.5px] border-mastra-border-1 py-6 px-4",children:y.jsx(We,{className:"h-full w-full rounded-md"})})})]}):y.jsxs("div",{className:"flex flex-col h-full w-full ",children:[y.jsx(sr,{title:"Tools"}),y.jsxs("div",{className:"w-full h-full grid grid-cols-[300px_1fr] ",children:[y.jsx("div",{className:"w-full h-full border-r-[0.5px] border-mastra-border-1 py-6 px-4",children:y.jsxs("ul",{className:" flex flex-col gap-4",children:[Object.keys(n).length>0&&y.jsx("li",{className:Te("px-2 py-2 rounded-md hover:bg-mastra-bg-4/80 transition-colors cursor-pointer",s&&"bg-mastra-bg-4/80"),onClick:p,children:y.jsxs("div",{className:"flex gap-2 items-center",children:[y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-3",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z"})}),y.jsx("p",{className:"text-sm text-mastra-el-6",children:"All Tools"})]})}),Object.entries(e).map(([m,x])=>y.jsx("li",{className:Te("px-2 py-2 rounded-md hover:bg-mastra-bg-4/80 transition-colors cursor-pointer",i===m&&"bg-mastra-bg-4/80"),onClick:()=>h(m),children:y.jsxs("div",{className:"flex gap-2 items-center",children:[y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-3",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z"})}),y.jsxs("p",{className:"text-sm text-mastra-el-6",children:[x.name," Tools"]})]})},m))]})}),y.jsx("div",{className:"flex flex-col gap-4 py-6 px-4",children:y.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2",children:c?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex flex-col gap-[0.62rem] bg-mastra-bg-13 px-[0.62rem] py-2 rounded-[0.375rem] border-[0.5px] border-mastra-border-1",children:[y.jsx(We,{className:"h-4 w-24"}),y.jsx(We,{className:"h-4 w-full"})]}),y.jsxs("div",{className:"flex flex-col gap-[0.62rem] bg-mastra-bg-13 px-[0.62rem] py-2 rounded-[0.375rem] border-[0.5px] border-mastra-border-1",children:[y.jsx(We,{className:"h-4 w-24"}),y.jsx(We,{className:"h-4 w-full"})]}),y.jsxs("div",{className:"flex flex-col gap-[0.62rem] bg-mastra-bg-13 px-[0.62rem] py-2 rounded-[0.375rem] border-[0.5px] border-mastra-border-1",children:[y.jsx(We,{className:"h-4 w-24"}),y.jsx(We,{className:"h-4 w-full"})]}),y.jsxs("div",{className:"flex flex-col gap-[0.62rem] bg-mastra-bg-13 px-[0.62rem] py-2 rounded-[0.375rem] border-[0.5px] border-mastra-border-1",children:[y.jsx(We,{className:"h-4 w-24"}),y.jsx(We,{className:"h-4 w-full"})]})]}):s?Object.entries(n).map(([m,x],v)=>y.jsxs("div",{onClick:()=>{f(`/tools/all/${x.id}`)},className:" hover:bg-mastra-bg-4/80 transition-colors flex flex-col gap-[0.62rem] bg-mastra-bg-13 px-[0.62rem] py-2 rounded-[0.375rem] cursor-pointer border-[0.5px] border-mastra-border-1",children:[y.jsx("h3",{className:"text-small text-mastra-el-6",children:m}),y.jsx("p",{className:"text-small text-mastra-el-2",children:x.description})]},v)):Object.entries((u==null?void 0:u.tools)??{}).map(([m,x],v)=>y.jsxs("div",{onClick:()=>{f(`/tools/${i}/${x.id}`)},className:" hover:bg-mastra-bg-4/80 transition-colors flex flex-col gap-[0.62rem] bg-mastra-bg-13 px-[0.62rem] py-2 rounded-[0.375rem] cursor-pointer border-[0.5px] border-mastra-border-1",children:[y.jsx("h3",{className:"text-small text-mastra-el-6",children:m}),y.jsx("p",{className:"text-small text-mastra-el-2",children:x.description})]},v))})})]})]})};function NC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function dm(...e){return t=>{let n=!1;const r=e.map(i=>{const o=NC(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():NC(e[i],null)}}}}function ht(...e){return S.useCallback(dm(...e),e)}var qi=S.forwardRef((e,t)=>{const{children:n,...r}=e,i=S.Children.toArray(n),o=i.find(A6);if(o){const s=o.props.children,a=i.map(u=>u===o?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:u);return y.jsx(Iw,{...r,ref:t,children:S.isValidElement(s)?S.cloneElement(s,void 0,a):null})}return y.jsx(Iw,{...r,ref:t,children:n})});qi.displayName="Slot";var Iw=S.forwardRef((e,t)=>{const{children:n,...r}=e;if(S.isValidElement(n)){const i=R6(n);return S.cloneElement(n,{...P6(r,n.props),ref:t?dm(t,i):i})}return S.Children.count(n)>1?S.Children.only(null):null});Iw.displayName="SlotClone";var NR=({children:e})=>y.jsx(y.Fragment,{children:e});function A6(e){return S.isValidElement(e)&&e.type===NR}function P6(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function R6(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const TC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AC=cm,lu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return AC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],h=o==null?void 0:o[c];if(f===null)return null;const p=TC(f)||TC(h);return i[c][p]}),a=n&&Object.entries(n).reduce((c,f)=>{let[h,p]=f;return p===void 0||(c[h]=p),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:h,className:p,...m}=f;return Object.entries(m).every(x=>{let[v,k]=x;return Array.isArray(k)?k.includes({...o,...a}[v]):{...o,...a}[v]===k})?[...c,h,p]:c},[]);return AC(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},El=lu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-mastra-bg-7 border-[0.5px] border-mastra-border-4 text-white hover:bg-mastra-bg-7/70",primary:"border-[0.5px] border-mastra-border-1 bg-mastra-bg-4 hover:bg-mastra-bg-2/80 text-kp-el-6",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Mt=S.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?qi:"button";return y.jsx(s,{className:Te(El({variant:t,size:n,className:e})),ref:o,...i})});Mt.displayName="Button";var M6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],He=M6.reduce((e,t)=>{const n=S.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?qi:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function TR(e,t){e&&su.flushSync(()=>e.dispatchEvent(t))}var qn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function j6(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var lr=e=>{const{present:t,children:n}=e,r=D6(t),i=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),o=ht(r.ref,O6(i));return typeof n=="function"||r.isPresent?S.cloneElement(i,{ref:o}):null};lr.displayName="Presence";function D6(e){const[t,n]=S.useState(),r=S.useRef({}),i=S.useRef(e),o=S.useRef("none"),s=e?"mounted":"unmounted",[a,u]=j6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=Ch(r.current);o.current=a==="mounted"?c:"none"},[a]),qn(()=>{const c=r.current,f=i.current;if(f!==e){const p=o.current,m=Ch(c);e?u("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),qn(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,h=m=>{const v=Ch(r.current).includes(m.animationName);if(m.target===t&&v&&(u("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=m=>{m.target===t&&(o.current=Ch(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ch(e){return(e==null?void 0:e.animationName)||"none"}function O6(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function I6(e,t){const n=S.createContext(t),r=o=>{const{children:s,...a}=o,u=S.useMemo(()=>a,Object.values(a));return y.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function i(o){const s=S.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function ni(e,t=[]){let n=[];function r(o,s){const a=S.createContext(s),u=n.length;n=[...n,s];const c=h=>{var b;const{scope:p,children:m,...x}=h,v=((b=p==null?void 0:p[e])==null?void 0:b[u])||a,k=S.useMemo(()=>x,Object.values(x));return y.jsx(v.Provider,{value:k,children:m})};c.displayName=o+"Provider";function f(h,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[u])||a,x=S.useContext(m);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[c,f]}const i=()=>{const o=n.map(s=>S.createContext(s));return function(a){const u=(a==null?void 0:a[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return i.scopeName=e,[r,L6(i,...t)]}function L6(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:u,scopeName:c})=>{const h=u(o)[`__scope${c}`];return{...a,...h}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function hn(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var F6=S.createContext(void 0);function Od(e){const t=S.useContext(F6);return e||t||"ltr"}function Lw(e,[t,n]){return Math.min(n,Math.max(t,e))}function Re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function $6(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var wb="ScrollArea",[AR,zxe]=ni(wb),[z6,ri]=AR(wb),PR=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=e,[a,u]=S.useState(null),[c,f]=S.useState(null),[h,p]=S.useState(null),[m,x]=S.useState(null),[v,k]=S.useState(null),[b,E]=S.useState(0),[C,N]=S.useState(0),[P,T]=S.useState(!1),[j,R]=S.useState(!1),I=ht(t,z=>u(z)),M=Od(i);return y.jsx(z6,{scope:n,type:r,dir:M,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:f,content:h,onContentChange:p,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:P,onScrollbarXEnabledChange:T,scrollbarY:v,onScrollbarYChange:k,scrollbarYEnabled:j,onScrollbarYEnabledChange:R,onCornerWidthChange:E,onCornerHeightChange:N,children:y.jsx(He.div,{dir:M,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});PR.displayName=wb;var RR="ScrollAreaViewport",MR=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,s=ri(RR,n),a=S.useRef(null),u=ht(t,a,s.onViewportChange);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),y.jsx(He.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});MR.displayName=RR;var Qi="ScrollAreaScrollbar",bb=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ri(Qi,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=e.orientation==="horizontal";return S.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?y.jsx(B6,{...r,ref:t,forceMount:n}):i.type==="scroll"?y.jsx(V6,{...r,ref:t,forceMount:n}):i.type==="auto"?y.jsx(jR,{...r,ref:t,forceMount:n}):i.type==="always"?y.jsx(kb,{...r,ref:t}):null});bb.displayName=Qi;var B6=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ri(Qi,e.__scopeScrollArea),[o,s]=S.useState(!1);return S.useEffect(()=>{const a=i.scrollArea;let u=0;if(a){const c=()=>{window.clearTimeout(u),s(!0)},f=()=>{u=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),y.jsx(lr,{present:n||o,children:y.jsx(jR,{"data-state":o?"visible":"hidden",...r,ref:t})})}),V6=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ri(Qi,e.__scopeScrollArea),o=e.orientation==="horizontal",s=hm(()=>u("SCROLL_END"),100),[a,u]=$6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,u]),S.useEffect(()=>{const c=i.viewport,f=o?"scrollLeft":"scrollTop";if(c){let h=c[f];const p=()=>{const m=c[f];h!==m&&(u("SCROLL"),s()),h=m};return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[i.viewport,o,u,s]),y.jsx(lr,{present:n||a!=="hidden",children:y.jsx(kb,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Re(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Re(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),jR=S.forwardRef((e,t)=>{const n=ri(Qi,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,s]=S.useState(!1),a=e.orientation==="horizontal",u=hm(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?c:f)}},10);return Dl(n.viewport,u),Dl(n.content,u),y.jsx(lr,{present:r||o,children:y.jsx(kb,{"data-state":o?"visible":"hidden",...i,ref:t})})}),kb=S.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ri(Qi,e.__scopeScrollArea),o=S.useRef(null),s=S.useRef(0),[a,u]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=FR(a.viewport,a.content),f={...r,sizes:a,onSizesChange:u,hasThumb:c>0&&c<1,onThumbChange:p=>o.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function h(p,m){return G6(p,s.current,a,m)}return n==="horizontal"?y.jsx(W6,{...f,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollLeft,m=PC(p,a,i.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=h(p,i.dir))}}):n==="vertical"?y.jsx(U6,{...f,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollTop,m=PC(p,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=h(p))}}):null}),W6=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ri(Qi,e.__scopeScrollArea),[s,a]=S.useState(),u=S.useRef(null),c=ht(t,u,o.onScrollbarXChange);return S.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),y.jsx(OR,{"data-orientation":"horizontal",...i,ref:c,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":fm(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(o.viewport){const p=o.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),zR(p,h)&&f.preventDefault()}},onResize:()=>{u.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:mp(s.paddingLeft),paddingEnd:mp(s.paddingRight)}})}})}),U6=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ri(Qi,e.__scopeScrollArea),[s,a]=S.useState(),u=S.useRef(null),c=ht(t,u,o.onScrollbarYChange);return S.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),y.jsx(OR,{"data-orientation":"vertical",...i,ref:c,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":fm(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(o.viewport){const p=o.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),zR(p,h)&&f.preventDefault()}},onResize:()=>{u.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:mp(s.paddingTop),paddingEnd:mp(s.paddingBottom)}})}})}),[H6,DR]=AR(Qi),OR=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:c,onWheelScroll:f,onResize:h,...p}=e,m=ri(Qi,n),[x,v]=S.useState(null),k=ht(t,I=>v(I)),b=S.useRef(null),E=S.useRef(""),C=m.viewport,N=r.content-r.viewport,P=hn(f),T=hn(u),j=hm(h,10);function R(I){if(b.current){const M=I.clientX-b.current.left,z=I.clientY-b.current.top;c({x:M,y:z})}}return S.useEffect(()=>{const I=M=>{const z=M.target;(x==null?void 0:x.contains(z))&&P(M,N)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[C,x,N,P]),S.useEffect(T,[r,T]),Dl(x,j),Dl(m.content,j),y.jsx(H6,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:hn(o),onThumbPointerUp:hn(s),onThumbPositionChange:T,onThumbPointerDown:hn(a),children:y.jsx(He.div,{...p,ref:k,style:{position:"absolute",...p.style},onPointerDown:Re(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),b.current=x.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:Re(e.onPointerMove,R),onPointerUp:Re(e.onPointerUp,I=>{const M=I.target;M.hasPointerCapture(I.pointerId)&&M.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=E.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),pp="ScrollAreaThumb",IR=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=DR(pp,e.__scopeScrollArea);return y.jsx(lr,{present:n||i.hasThumb,children:y.jsx(Y6,{ref:t,...r})})}),Y6=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=ri(pp,n),s=DR(pp,n),{onThumbPositionChange:a}=s,u=ht(t,h=>s.onThumbChange(h)),c=S.useRef(void 0),f=hm(()=>{c.current&&(c.current(),c.current=void 0)},100);return S.useEffect(()=>{const h=o.viewport;if(h){const p=()=>{if(f(),!c.current){const m=Z6(h,a);c.current=m,a()}};return a(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[o.viewport,f,a]),y.jsx(He.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Re(e.onPointerDownCapture,h=>{const m=h.target.getBoundingClientRect(),x=h.clientX-m.left,v=h.clientY-m.top;s.onThumbPointerDown({x,y:v})}),onPointerUp:Re(e.onPointerUp,s.onThumbPointerUp)})});IR.displayName=pp;var Sb="ScrollAreaCorner",LR=S.forwardRef((e,t)=>{const n=ri(Sb,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?y.jsx(q6,{...e,ref:t}):null});LR.displayName=Sb;var q6=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ri(Sb,n),[o,s]=S.useState(0),[a,u]=S.useState(0),c=!!(o&&a);return Dl(i.scrollbarX,()=>{var h;const f=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(f),u(f)}),Dl(i.scrollbarY,()=>{var h;const f=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(f),s(f)}),c?y.jsx(He.div,{...r,ref:t,style:{width:o,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function mp(e){return e?parseInt(e,10):0}function FR(e,t){const n=e/t;return isNaN(n)?0:n}function fm(e){const t=FR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function G6(e,t,n,r="ltr"){const i=fm(n),o=i/2,s=t||o,a=i-s,u=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,h=r==="ltr"?[0,f]:[f*-1,0];return $R([u,c],h)(e)}function PC(e,t,n="ltr"){const r=fm(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,s=t.content-t.viewport,a=o-r,u=n==="ltr"?[0,s]:[s*-1,0],c=Lw(e,u);return $R([0,s],[0,a])(c)}function $R(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function zR(e,t){return e>0&&e<t}var Z6=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function hm(e,t){const n=hn(e),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Dl(e,t){const n=hn(t);qn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var BR=PR,K6=MR,X6=LR;const Rn=S.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(BR,{ref:r,className:Te("relative overflow-hidden",e),...n,children:[y.jsx(K6,{className:"h-full w-full rounded-[inherit]",children:t}),y.jsx(VR,{}),y.jsx(X6,{})]}));Rn.displayName=BR.displayName;const VR=S.forwardRef(({className:e,orientation:t="vertical",...n},r)=>y.jsx(bb,{ref:r,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:y.jsx(IR,{className:"relative flex-1 rounded-full bg-border"})}));VR.displayName=bb.displayName;const pm=S.forwardRef(({className:e,...t},n)=>y.jsx("table",{ref:n,className:Te("w-full caption-bottom text-sm border-spacing-0",e),...t}));pm.displayName="Table";const mm=S.forwardRef(({className:e,...t},n)=>y.jsx("thead",{ref:n,className:Te("[&_tr]:border-b",e),...t}));mm.displayName="TableHeader";const gm=S.forwardRef(({className:e,...t},n)=>y.jsx("tbody",{ref:n,className:Te("[&_tr:last-child]:border-0",e),...t}));gm.displayName="TableBody";const Q6=S.forwardRef(({className:e,...t},n)=>y.jsx("tfoot",{ref:n,className:Te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Q6.displayName="TableFooter";const Qr=S.forwardRef(({className:e,...t},n)=>y.jsx("tr",{ref:n,className:Te("border-b-[0.5px] border-mastra-border-1 transition-colors hover:bg-muted/50 data-[state=selected]:bg-mastra-bg-4/70",e),...t}));Qr.displayName="TableRow";const rr=S.forwardRef(({className:e,...t},n)=>y.jsx("th",{ref:n,className:Te("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));rr.displayName="TableHead";const mt=S.forwardRef(({className:e,...t},n)=>y.jsx("td",{ref:n,className:Te("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));mt.displayName="TableCell";const J6=S.forwardRef(({className:e,...t},n)=>y.jsx("caption",{ref:n,className:Te("mt-4 text-sm text-muted-foreground",e),...t}));J6.displayName="TableCaption";function e8(){const{agents:e,isLoading:t}=_R(),n=js();return y.jsxs("div",{className:"flex flex-col h-full relative overflow-hidden",children:[y.jsx(sr,{title:"Agents"}),y.jsx("main",{className:"flex-1 relative overflow-hidden",children:y.jsx(Rn,{className:"rounded-lg h-full",children:y.jsxs(pm,{children:[y.jsx(mm,{className:"bg-[#171717] sticky top-0 z-10",children:y.jsxs(Qr,{className:"border-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(rr,{className:"w-[50px]"}),y.jsx(rr,{className:"text-mastra-el-3",children:"Name"}),y.jsx(rr,{className:"text-mastra-el-3 w-1/2",children:"Instruction"}),y.jsx(rr,{className:"text-mastra-el-3",children:"Provider"}),y.jsx(rr,{className:"text-mastra-el-3",children:"Model"}),y.jsx(rr,{className:"text-mastra-el-3",children:"Action"})]})}),y.jsx(gm,{className:"border-b border-gray-6",children:t?y.jsxs(Qr,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-8"})}),y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-full"})}),y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-full"})}),y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-full"})})]}):Object.entries(e).map(([r,i])=>{var o;return y.jsxs(Qr,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(mt,{children:y.jsx("div",{className:"h-8 w-full flex items-center justify-center",children:y.jsx(mR,{className:"h-4 w-4 text-mastra-el-5"})})}),y.jsx(mt,{className:"font-medium text-mastra-el-5",children:i.name}),y.jsx(mt,{className:"truncate w-1/2 max-w-[500px] text-mastra-el-5",children:i.instructions}),y.jsx(mt,{className:"text-mastra-el-5 text-sm",children:(o=i.provider)==null?void 0:o.toUpperCase()}),y.jsx(mt,{className:"text-mastra-el-5 text-sm",children:i.modelId}),y.jsx(mt,{className:"text-mastra-el-5 text-sm",children:y.jsx("span",{onClick:()=>{n(`/agents/${r}`)},className:"hover:no-underline",children:y.jsxs(Mt,{size:"sm",variant:"outline",children:[y.jsx(JB,{className:"h-4 w-4 text-inherit"}),"Chat with agent"]})})})]},r)})})]})})})]})}var fx={exports:{}},hx={};/**
|
|
198
|
+
* @license React
|
|
199
|
+
* use-sync-external-store-shim.production.js
|
|
200
|
+
*
|
|
201
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the MIT license found in the
|
|
204
|
+
* LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/var RC;function t8(){if(RC)return hx;RC=1;var e=nu();function t(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(h,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),v=x[0].inst,k=x[1];return o(function(){v.value=m,v.getSnapshot=p,u(v)&&k({inst:v})},[h,m,p]),i(function(){return u(v)&&k({inst:v}),h(function(){u(v)&&k({inst:v})})},[h]),s(m),m}function u(h){var p=h.getSnapshot;h=h.value;try{var m=p();return!n(h,m)}catch{return!0}}function c(h,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return hx.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,hx}var MC;function n8(){return MC||(MC=1,fx.exports=t8()),fx.exports}var r8=n8(),jC=Object.prototype.hasOwnProperty;function Fw(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Fw(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(jC.call(e,n)&&++r&&!jC.call(t,n)||!(n in t)||!Fw(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const yo=new WeakMap,ws=()=>{},ir=ws(),$w=Object,Ct=e=>e===ir,Ii=e=>typeof e=="function",ks=(e,t)=>({...e,...t}),WR=e=>Ii(e.then),px={},_h={},Eb="undefined",ym=typeof window!=Eb,zw=typeof document!=Eb,i8=()=>ym&&typeof window.requestAnimationFrame!=Eb,UR=(e,t)=>{const n=yo.get(e);return[()=>!Ct(t)&&e.get(t)||px,r=>{if(!Ct(t)){const i=e.get(t);t in _h||(_h[t]=i),n[5](t,ks(i,r),i||px)}},n[6],()=>!Ct(t)&&t in _h?_h[t]:!Ct(t)&&e.get(t)||px]};let Bw=!0;const o8=()=>Bw,[Vw,Ww]=ym&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ws,ws],s8=()=>{const e=zw&&document.visibilityState;return Ct(e)||e!=="hidden"},a8=e=>(zw&&document.addEventListener("visibilitychange",e),Vw("focus",e),()=>{zw&&document.removeEventListener("visibilitychange",e),Ww("focus",e)}),l8=e=>{const t=()=>{Bw=!0,e()},n=()=>{Bw=!1};return Vw("online",t),Vw("offline",n),()=>{Ww("online",t),Ww("offline",n)}},u8={isOnline:o8,isVisible:s8},c8={initFocus:a8,initReconnect:l8},DC=!ne.useId,Uc=!ym||"Deno"in globalThis,d8=e=>i8()?window.requestAnimationFrame(e):setTimeout(e,1),mx=Uc?S.useEffect:S.useLayoutEffect,gx=typeof navigator<"u"&&navigator.connection,OC=!Uc&&gx&&(["slow-2g","2g"].includes(gx.effectiveType)||gx.saveData),Nh=new WeakMap,yx=(e,t)=>$w.prototype.toString.call(e)===`[object ${t}]`;let f8=0;const Uw=e=>{const t=typeof e,n=yx(e,"Date"),r=yx(e,"RegExp"),i=yx(e,"Object");let o,s;if($w(e)===e&&!n&&!r){if(o=Nh.get(e),o)return o;if(o=++f8+"~",Nh.set(e,o),Array.isArray(e)){for(o="@",s=0;s<e.length;s++)o+=Uw(e[s])+",";Nh.set(e,o)}if(i){o="#";const a=$w.keys(e).sort();for(;!Ct(s=a.pop());)Ct(e[s])||(o+=s+":"+Uw(e[s])+",");Nh.set(e,o)}}else o=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},Cb=e=>{if(Ii(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Uw(e):"",[e,t]};let h8=0;const Hw=()=>++h8,HR=0,YR=1,qR=2,p8=3;var oc={__proto__:null,ERROR_REVALIDATE_EVENT:p8,FOCUS_EVENT:HR,MUTATE_EVENT:qR,RECONNECT_EVENT:YR};async function GR(...e){const[t,n,r,i]=e,o=ks({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let s=o.populateCache;const a=o.rollbackOnError;let u=o.optimisticData;const c=p=>typeof a=="function"?a(p):a!==!1,f=o.throwOnError;if(Ii(n)){const p=n,m=[],x=t.keys();for(const v of x)!/^\$(inf|sub)\$/.test(v)&&p(t.get(v)._k)&&m.push(v);return Promise.all(m.map(h))}return h(n);async function h(p){const[m]=Cb(p);if(!m)return;const[x,v]=UR(t,m),[k,b,E,C]=yo.get(t),N=()=>{const Y=k[m];return(Ii(o.revalidate)?o.revalidate(x().data,p):o.revalidate!==!1)&&(delete E[m],delete C[m],Y&&Y[0])?Y[0](qR).then(()=>x().data):x().data};if(e.length<3)return N();let P=r,T;const j=Hw();b[m]=[j,0];const R=!Ct(u),I=x(),M=I.data,z=I._c,F=Ct(z)?M:z;if(R&&(u=Ii(u)?u(F,M):u,v({data:u,_c:F})),Ii(P))try{P=P(F)}catch(Y){T=Y}if(P&&WR(P))if(P=await P.catch(Y=>{T=Y}),j!==b[m][0]){if(T)throw T;return P}else T&&R&&c(T)&&(s=!0,v({data:F,_c:ir}));if(s&&!T)if(Ii(s)){const Y=s(P,F);v({data:Y,error:ir,_c:ir})}else v({data:P,error:ir,_c:ir});if(b[m][1]=Hw(),Promise.resolve(N()).then(()=>{v({_c:ir})}),T){if(f)throw T;return}return P}}const IC=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},m8=(e,t)=>{if(!yo.has(e)){const n=ks(c8,t),r={},i=GR.bind(ir,e);let o=ws;const s={},a=(f,h)=>{const p=s[f]||[];return s[f]=p,p.push(h),()=>p.splice(p.indexOf(h),1)},u=(f,h,p)=>{e.set(f,h);const m=s[f];if(m)for(const x of m)x(h,p)},c=()=>{if(!yo.has(e)&&(yo.set(e,[r,{},{},{},i,u,a]),!Uc)){const f=n.initFocus(setTimeout.bind(ir,IC.bind(ir,r,HR))),h=n.initReconnect(setTimeout.bind(ir,IC.bind(ir,r,YR)));o=()=>{f&&f(),h&&h(),yo.delete(e)}}};return c(),[e,i,c,o]}return[e,yo.get(e)[4]]},g8=(e,t,n,r,i)=>{const o=n.errorRetryCount,s=i.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!Ct(o)&&s>o||setTimeout(r,a,i)},y8=Fw,[ZR,x8]=m8(new Map),v8=ks({onLoadingSlow:ws,onSuccess:ws,onError:ws,onErrorRetry:g8,onDiscarded:ws,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:OC?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:OC?5e3:3e3,compare:y8,isPaused:()=>!1,cache:ZR,mutate:x8,fallback:{}},u8),w8=(e,t)=>{const n=ks(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:s}=t;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=ks(i,s))}return n},b8=S.createContext({}),k8="$inf$",KR=ym&&window.__SWR_DEVTOOLS_USE__,S8=KR?window.__SWR_DEVTOOLS_USE__:[],E8=()=>{KR&&(window.__SWR_DEVTOOLS_REACT__=ne)},C8=e=>Ii(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],_b=()=>ks(v8,S.useContext(b8)),_8=e=>(t,n,r)=>e(t,n&&((...o)=>{const[s]=Cb(t),[,,,a]=yo.get(ZR);if(s.startsWith(k8))return n(...o);const u=a[s];return Ct(u)?n(...o):(delete a[s],u)}),r),N8=S8.concat(_8),T8=e=>function(...n){const r=_b(),[i,o,s]=C8(n),a=w8(r,s);let u=e;const{use:c}=a,f=(c||[]).concat(N8);for(let h=f.length;h--;)u=f[h](u);return u(i,o||a.fetcher||null,a)},A8=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};E8();const xx=ne.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),vx={dedupe:!0},P8=(e,t,n)=>{const{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:a,revalidateIfStale:u,refreshInterval:c,refreshWhenHidden:f,refreshWhenOffline:h,keepPreviousData:p}=n,[m,x,v,k]=yo.get(r),[b,E]=Cb(e),C=S.useRef(!1),N=S.useRef(!1),P=S.useRef(b),T=S.useRef(t),j=S.useRef(n),R=()=>j.current,I=()=>R().isVisible()&&R().isOnline(),[M,z,F,Y]=UR(r,b),O=S.useRef({}).current,q=Ct(s)?Ct(n.fallback)?ir:n.fallback[b]:s,W=(fe,xe)=>{for(const Me in O){const Ve=Me;if(Ve==="data"){if(!i(fe[Ve],xe[Ve])&&(!Ct(fe[Ve])||!i(K,xe[Ve])))return!1}else if(xe[Ve]!==fe[Ve])return!1}return!0},Z=S.useMemo(()=>{const fe=!b||!t?!1:Ct(a)?R().isPaused()||o?!1:u!==!1:a,xe=oe=>{const ue=ks(oe);return delete ue._k,fe?{isValidating:!0,isLoading:!0,...ue}:ue},Me=M(),Ve=Y(),ot=xe(Me),_t=Me===Ve?ot:xe(Ve);let Q=ot;return[()=>{const oe=xe(M());return W(oe,Q)?(Q.data=oe.data,Q.isLoading=oe.isLoading,Q.isValidating=oe.isValidating,Q.error=oe.error,Q):(Q=oe,oe)},()=>_t]},[r,b]),U=r8.useSyncExternalStore(S.useCallback(fe=>F(b,(xe,Me)=>{W(Me,xe)||fe()}),[r,b]),Z[0],Z[1]),B=!C.current,L=m[b]&&m[b].length>0,H=U.data,V=Ct(H)?q&&WR(q)?xx(q):q:H,D=U.error,G=S.useRef(V),K=p?Ct(H)?G.current:H:V,J=L&&!Ct(D)?!1:B&&!Ct(a)?a:R().isPaused()?!1:o?Ct(V)?!1:u:Ct(V)||u,ee=!!(b&&t&&B&&J),ie=Ct(U.isValidating)?ee:U.isValidating,ce=Ct(U.isLoading)?ee:U.isLoading,he=S.useCallback(async fe=>{const xe=T.current;if(!b||!xe||N.current||R().isPaused())return!1;let Me,Ve,ot=!0;const _t=fe||{},Q=!v[b]||!_t.dedupe,oe=()=>DC?!N.current&&b===P.current&&C.current:b===P.current,ue={isValidating:!1,isLoading:!1},Se=()=>{z(ue)},we=()=>{const Ae=v[b];Ae&&Ae[1]===Ve&&delete v[b]},ge={isValidating:!0};Ct(M().data)&&(ge.isLoading=!0);try{if(Q&&(z(ge),n.loadingTimeout&&Ct(M().data)&&setTimeout(()=>{ot&&oe()&&R().onLoadingSlow(b,n)},n.loadingTimeout),v[b]=[xe(E),Hw()]),[Me,Ve]=v[b],Me=await Me,Q&&setTimeout(we,n.dedupingInterval),!v[b]||v[b][1]!==Ve)return Q&&oe()&&R().onDiscarded(b),!1;ue.error=ir;const Ae=x[b];if(!Ct(Ae)&&(Ve<=Ae[0]||Ve<=Ae[1]||Ae[1]===0))return Se(),Q&&oe()&&R().onDiscarded(b),!1;const Fe=M().data;ue.data=i(Fe,Me)?Fe:Me,Q&&oe()&&R().onSuccess(Me,b,n)}catch(Ae){we();const Fe=R(),{shouldRetryOnError:se}=Fe;Fe.isPaused()||(ue.error=Ae,Q&&oe()&&(Fe.onError(Ae,b,Fe),(se===!0||Ii(se)&&se(Ae))&&(!R().revalidateOnFocus||!R().revalidateOnReconnect||I())&&Fe.onErrorRetry(Ae,b,Fe,pe=>{const Oe=m[b];Oe&&Oe[0]&&Oe[0](oc.ERROR_REVALIDATE_EVENT,pe)},{retryCount:(_t.retryCount||0)+1,dedupe:!0})))}return ot=!1,Se(),!0},[b,r]),Ee=S.useCallback((...fe)=>GR(r,P.current,...fe),[]);if(mx(()=>{T.current=t,j.current=n,Ct(H)||(G.current=H)}),mx(()=>{if(!b)return;const fe=he.bind(ir,vx);let xe=0;const Ve=A8(b,m,(ot,_t={})=>{if(ot==oc.FOCUS_EVENT){const Q=Date.now();R().revalidateOnFocus&&Q>xe&&I()&&(xe=Q+R().focusThrottleInterval,fe())}else if(ot==oc.RECONNECT_EVENT)R().revalidateOnReconnect&&I()&&fe();else{if(ot==oc.MUTATE_EVENT)return he();if(ot==oc.ERROR_REVALIDATE_EVENT)return he(_t)}});return N.current=!1,P.current=b,C.current=!0,z({_k:E}),J&&(Ct(V)||Uc?fe():d8(fe)),()=>{N.current=!0,Ve()}},[b]),mx(()=>{let fe;function xe(){const Ve=Ii(c)?c(M().data):c;Ve&&fe!==-1&&(fe=setTimeout(Me,Ve))}function Me(){!M().error&&(f||R().isVisible())&&(h||R().isOnline())?he(vx).then(xe):xe()}return xe(),()=>{fe&&(clearTimeout(fe),fe=-1)}},[c,f,h,b]),S.useDebugValue(K),o&&Ct(V)&&b){if(!DC&&Uc)throw new Error("Fallback data is required when using Suspense in SSR.");T.current=t,j.current=n,N.current=!1;const fe=k[b];if(!Ct(fe)){const xe=Ee(fe);xx(xe)}if(Ct(D)){const xe=he(vx);Ct(K)||(xe.status="fulfilled",xe.value=!0),xx(xe)}else throw D}return{mutate:Ee,get data(){return O.data=!0,K},get error(){return O.error=!0,D},get isValidating(){return O.isValidating=!0,ie},get isLoading(){return O.isLoading=!0,ce}}},Nb=T8(P8);function R8({text:e,copyMessage:t="Copied to clipboard!"}){const[n,r]=S.useState(!1),i=S.useRef(null),o=S.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{nn.success(t),r(!0),i.current&&(clearTimeout(i.current),i.current=null),i.current=setTimeout(()=>{r(!1)},2e3)}).catch(()=>{nn.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:n,handleCopy:o}}function Hc({content:e,copyMessage:t,classname:n}){const{isCopied:r,handleCopy:i}=R8({text:e,copyMessage:t});return y.jsxs(Mt,{variant:"ghost",size:"icon",className:Te("relative h-6 w-6",n),"aria-label":"Copy to clipboard",onClick:i,children:[y.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:y.jsx(yb,{className:Te("h-4 w-4 transition-transform ease-in-out",r?"scale-100":"scale-0")})}),y.jsx(nV,{className:Te("h-4 w-4 transition-transform ease-in-out",r?"scale-0":"scale-100")})]})}const Tb=S.createContext({});function Ab(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const xm=S.createContext(null),Pb=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class M8 extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function j8({children:e,isPresent:t}){const n=S.useId(),r=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=S.useContext(Pb);return S.useInsertionEffect(()=>{const{width:s,height:a,top:u,left:c}=i.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return o&&(f.nonce=o),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
|
|
206
|
+
[data-motion-pop-id="${n}"] {
|
|
207
|
+
position: absolute !important;
|
|
208
|
+
width: ${s}px !important;
|
|
209
|
+
height: ${a}px !important;
|
|
210
|
+
top: ${u}px !important;
|
|
211
|
+
left: ${c}px !important;
|
|
212
|
+
}
|
|
213
|
+
`),()=>{document.head.removeChild(f)}},[t]),y.jsx(M8,{isPresent:t,childRef:r,sizeRef:i,children:S.cloneElement(e,{ref:r})})}const D8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Ab(O8),u=S.useId(),c=S.useCallback(h=>{a.set(h,!0);for(const p of a.values())if(!p)return;r&&r()},[a,r]),f=S.useMemo(()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:c,register:h=>(a.set(h,!1),()=>a.delete(h))}),o?[Math.random(),c]:[n,c]);return S.useMemo(()=>{a.forEach((h,p)=>a.set(p,!1))},[n]),S.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=y.jsx(j8,{isPresent:n,children:e})),y.jsx(xm.Provider,{value:f,children:e})};function O8(){return new Map}function XR(e=!0){const t=S.useContext(xm);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=S.useId();S.useEffect(()=>{e&&i(o)},[e]);const s=S.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const Th=e=>e.key||"";function LC(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Rb=typeof window<"u",QR=Rb?S.useLayoutEffect:S.useEffect,JR=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1})=>{const[a,u]=XR(s),c=S.useMemo(()=>LC(e),[e]),f=s&&!a?[]:c.map(Th),h=S.useRef(!0),p=S.useRef(c),m=Ab(()=>new Map),[x,v]=S.useState(c),[k,b]=S.useState(c);QR(()=>{h.current=!1,p.current=c;for(let N=0;N<k.length;N++){const P=Th(k[N]);f.includes(P)?m.delete(P):m.get(P)!==!0&&m.set(P,!1)}},[k,f.length,f.join("-")]);const E=[];if(c!==x){let N=[...c];for(let P=0;P<k.length;P++){const T=k[P],j=Th(T);f.includes(j)||(N.splice(P,0,T),E.push(T))}o==="wait"&&E.length&&(N=E),b(LC(N)),v(c);return}const{forceRender:C}=S.useContext(Tb);return y.jsx(y.Fragment,{children:k.map(N=>{const P=Th(N),T=s&&!a?!1:c===k||f.includes(P),j=()=>{if(m.has(P))m.set(P,!0);else return;let R=!0;m.forEach(I=>{I||(R=!1)}),R&&(C==null||C(),b(p.current),s&&(u==null||u()),r&&r())};return y.jsx(D8,{isPresent:T,initial:!h.current||n?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:i,mode:o,onExitComplete:T?void 0:j,children:N},P)})})},Rr=e=>e;let Yw=Rr;function Mb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ol=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},So=e=>e*1e3,Eo=e=>e/1e3,I8={skipAnimations:!1,useManualTiming:!1};function L8(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){o.has(c)&&(u.schedule(c),e()),c(s)}const u={schedule:(c,f=!1,h=!1)=>{const m=h&&r?t:n;return f&&o.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),o.delete(c)},process:c=>{if(s=c,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,u.process(c))}};return u}const Ah=["read","resolveKeyframes","update","preRender","render","postRender"],F8=40;function eM(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Ah.reduce((b,E)=>(b[E]=L8(o),b),{}),{read:a,resolveKeyframes:u,update:c,preRender:f,render:h,postRender:p}=s,m=()=>{const b=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,F8),1),i.timestamp=b,i.isProcessing=!0,a.process(i),u.process(i),c.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},x=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:Ah.reduce((b,E)=>{const C=s[E];return b[E]=(N,P=!1,T=!1)=>(n||x(),C.schedule(N,P,T)),b},{}),cancel:b=>{for(let E=0;E<Ah.length;E++)s[Ah[E]].cancel(b)},state:i,steps:s}}const{schedule:Vt,cancel:Ss,state:Ln,steps:wx}=eM(typeof requestAnimationFrame<"u"?requestAnimationFrame:Rr,!0),tM=S.createContext({strict:!1}),FC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Il={};for(const e in FC)Il[e]={isEnabled:t=>FC[e].some(n=>!!t[n])};function $8(e){for(const t in e)Il[t]={...Il[t],...e[t]}}const z8=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||z8.has(e)}let nM=e=>!gp(e);function B8(e){e&&(nM=t=>t.startsWith("on")?!gp(t):e(t))}try{B8(require("@emotion/is-prop-valid").default)}catch{}function V8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(nM(i)||n===!0&&gp(i)||!t&&!gp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function W8(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const vm=S.createContext({});function Yc(e){return typeof e=="string"||Array.isArray(e)}function wm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const jb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Db=["initial",...jb];function bm(e){return wm(e.animate)||Db.some(t=>Yc(e[t]))}function rM(e){return!!(bm(e)||e.variants)}function U8(e,t){if(bm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Yc(n)?n:void 0,animate:Yc(r)?r:void 0}}return e.inherit!==!1?t:{}}function H8(e){const{initial:t,animate:n}=U8(e,S.useContext(vm));return S.useMemo(()=>({initial:t,animate:n}),[$C(t),$C(n)])}function $C(e){return Array.isArray(e)?e.join(" "):e}const Y8=Symbol.for("motionComponentSymbol");function pl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function q8(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):pl(n)&&(n.current=r))},[t])}const Ob=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),G8="framerAppearId",iM="data-"+Ob(G8),{schedule:Ib,cancel:Bxe}=eM(queueMicrotask,!1),oM=S.createContext({});function Z8(e,t,n,r,i){var o,s;const{visualElement:a}=S.useContext(vm),u=S.useContext(tM),c=S.useContext(xm),f=S.useContext(Pb).reducedMotion,h=S.useRef(null);r=r||u.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const p=h.current,m=S.useContext(oM);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&K8(h.current,n,i,m);const x=S.useRef(!1);S.useInsertionEffect(()=>{p&&x.current&&p.update(n,c)});const v=n[iM],k=S.useRef(!!v&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,v))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,v)));return QR(()=>{p&&(x.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Ib.render(p.render),k.current&&p.animationState&&p.animationState.animateChanges())}),S.useEffect(()=>{p&&(!k.current&&p.animationState&&p.animationState.animateChanges(),k.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,v)}),k.current=!1))}),p}function K8(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:sM(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&pl(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:c})}function sM(e){if(e)return e.options.allowProjection!==!1?e.projection:sM(e.parent)}function X8({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var o,s;e&&$8(e);function a(c,f){let h;const p={...S.useContext(Pb),...c,layoutId:Q8(c)},{isStatic:m}=p,x=H8(c),v=r(c,m);if(!m&&Rb){J8();const k=e9(p);h=k.MeasureLayout,x.visualElement=Z8(i,v,p,t,k.ProjectionNode)}return y.jsxs(vm.Provider,{value:x,children:[h&&x.visualElement?y.jsx(h,{visualElement:x.visualElement,...p}):null,n(i,c,q8(v,x.visualElement,f),v,m,x.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(s=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&s!==void 0?s:""})`}`;const u=S.forwardRef(a);return u[Y8]=i,u}function Q8({layoutId:e}){const t=S.useContext(Tb).id;return t&&e!==void 0?t+"-"+e:e}function J8(e,t){S.useContext(tM).strict}function e9(e){const{drag:t,layout:n}=Il;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const t9=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Lb(e){return typeof e!="string"||e.includes("-")?!1:!!(t9.indexOf(e)>-1||/[A-Z]/u.test(e))}function zC(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fb(e,t,n,r){if(typeof t=="function"){const[i,o]=zC(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=zC(r);t=t(n!==void 0?n:e.custom,i,o)}return t}const qw=e=>Array.isArray(e),n9=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),r9=e=>qw(e)?e[e.length-1]||0:e,Hn=e=>!!(e&&e.getVelocity);function Jh(e){const t=Hn(e)?e.get():e;return n9(t)?t.toValue():t}function i9({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,o){const s={latestValues:o9(r,i,o,e),renderState:t()};return n&&(s.onMount=a=>n({props:r,current:a,...s}),s.onUpdate=a=>n(a)),s}const aM=e=>(t,n)=>{const r=S.useContext(vm),i=S.useContext(xm),o=()=>i9(e,t,r,i);return n?o():Ab(o)};function o9(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=Jh(o[p]);let{initial:s,animate:a}=e;const u=bm(e),c=rM(e);t&&c&&!u&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const h=f?a:s;if(h&&typeof h!="boolean"&&!wm(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const x=Fb(e,p[m]);if(x){const{transitionEnd:v,transition:k,...b}=x;for(const E in b){let C=b[E];if(Array.isArray(C)){const N=f?C.length-1:0;C=C[N]}C!==null&&(i[E]=C)}for(const E in v)i[E]=v[E]}}}return i}const uu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_a=new Set(uu),lM=e=>t=>typeof t=="string"&&t.startsWith(e),uM=lM("--"),s9=lM("var(--"),$b=e=>s9(e)?a9.test(e.split("/*")[0].trim()):!1,a9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cM=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ao=(e,t,n)=>n>t?t:n<e?e:n,cu={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qc={...cu,transform:e=>Ao(0,1,e)},Ph={...cu,default:1},Id=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ms=Id("deg"),Bi=Id("%"),Qe=Id("px"),l9=Id("vh"),u9=Id("vw"),BC={...Bi,parse:e=>Bi.parse(e)/100,transform:e=>Bi.transform(e*100)},c9={borderWidth:Qe,borderTopWidth:Qe,borderRightWidth:Qe,borderBottomWidth:Qe,borderLeftWidth:Qe,borderRadius:Qe,radius:Qe,borderTopLeftRadius:Qe,borderTopRightRadius:Qe,borderBottomRightRadius:Qe,borderBottomLeftRadius:Qe,width:Qe,maxWidth:Qe,height:Qe,maxHeight:Qe,top:Qe,right:Qe,bottom:Qe,left:Qe,padding:Qe,paddingTop:Qe,paddingRight:Qe,paddingBottom:Qe,paddingLeft:Qe,margin:Qe,marginTop:Qe,marginRight:Qe,marginBottom:Qe,marginLeft:Qe,backgroundPositionX:Qe,backgroundPositionY:Qe},d9={rotate:ms,rotateX:ms,rotateY:ms,rotateZ:ms,scale:Ph,scaleX:Ph,scaleY:Ph,scaleZ:Ph,skew:ms,skewX:ms,skewY:ms,distance:Qe,translateX:Qe,translateY:Qe,translateZ:Qe,x:Qe,y:Qe,z:Qe,perspective:Qe,transformPerspective:Qe,opacity:qc,originX:BC,originY:BC,originZ:Qe},VC={...cu,transform:Math.round},zb={...c9,...d9,zIndex:VC,size:Qe,fillOpacity:qc,strokeOpacity:qc,numOctaves:VC},f9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},h9=uu.length;function p9(e,t,n){let r="",i=!0;for(let o=0;o<h9;o++){const s=uu[o],a=e[s];if(a===void 0)continue;let u=!0;if(typeof a=="number"?u=a===(s.startsWith("scale")?1:0):u=parseFloat(a)===0,!u||n){const c=cM(a,zb[s]);if(!u){i=!1;const f=f9[s]||s;r+=`${f}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Bb(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const u in t){const c=t[u];if(_a.has(u)){s=!0;continue}else if(uM(u)){i[u]=c;continue}else{const f=cM(c,zb[u]);u.startsWith("origin")?(a=!0,o[u]=f):r[u]=f}}if(t.transform||(s||n?r.transform=p9(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:u="50%",originY:c="50%",originZ:f=0}=o;r.transformOrigin=`${u} ${c} ${f}`}}const m9={offset:"stroke-dashoffset",array:"stroke-dasharray"},g9={offset:"strokeDashoffset",array:"strokeDasharray"};function y9(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?m9:g9;e[o.offset]=Qe.transform(-r);const s=Qe.transform(t),a=Qe.transform(n);e[o.array]=`${s} ${a}`}function WC(e,t,n){return typeof e=="string"?e:Qe.transform(t+n*e)}function x9(e,t,n){const r=WC(t,e.x,e.width),i=WC(n,e.y,e.height);return`${r} ${i}`}function Vb(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:u=0,...c},f,h){if(Bb(e,c,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:x}=e;p.transform&&(x&&(m.transform=p.transform),delete p.transform),x&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=x9(x,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&y9(p,s,a,u,!1)}const Wb=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),dM=()=>({...Wb(),attrs:{}}),Ub=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fM(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const hM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function pM(e,t,n,r){fM(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(hM.has(i)?i:Ob(i),t.attrs[i])}const yp={};function v9(e){Object.assign(yp,e)}function mM(e,{layout:t,layoutId:n}){return _a.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yp[e]||e==="opacity")}function Hb(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Hn(i[s])||t.style&&Hn(t.style[s])||mM(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function gM(e,t,n){const r=Hb(e,t,n);for(const i in e)if(Hn(e[i])||Hn(t[i])){const o=uu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function w9(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const UC=["x","y","width","height","cx","cy","r"],b9={useVisualState:aM({scrapeMotionValuesFromProps:gM,createRenderState:dM,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let o=!!e.drag;if(!o){for(const a in i)if(_a.has(a)){o=!0;break}}if(!o)return;let s=!t;if(t)for(let a=0;a<UC.length;a++){const u=UC[a];e[u]!==t[u]&&(s=!0)}s&&Vt.read(()=>{w9(n,r),Vt.render(()=>{Vb(r,i,Ub(n.tagName),e.transformTemplate),pM(n,r)})})}})},k9={useVisualState:aM({scrapeMotionValuesFromProps:Hb,createRenderState:Wb})};function yM(e,t,n){for(const r in t)!Hn(t[r])&&!mM(r,n)&&(e[r]=t[r])}function S9({transformTemplate:e},t){return S.useMemo(()=>{const n=Wb();return Bb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function E9(e,t){const n=e.style||{},r={};return yM(r,n,e),Object.assign(r,S9(e,t)),r}function C9(e,t){const n={},r=E9(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function _9(e,t,n,r){const i=S.useMemo(()=>{const o=dM();return Vb(o,t,Ub(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};yM(o,e.style,e),i.style={...o,...i.style}}return i}function N9(e=!1){return(n,r,i,{latestValues:o},s)=>{const u=(Lb(n)?_9:C9)(r,o,s,n),c=V8(r,typeof n=="string",e),f=n!==S.Fragment?{...c,...u,ref:i}:{},{children:h}=r,p=S.useMemo(()=>Hn(h)?h.get():h,[h]);return S.createElement(n,{...f,children:p})}}function T9(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const s={...Lb(r)?b9:k9,preloadedFeatures:e,useRender:N9(i),createVisualElement:t,Component:r};return X8(s)}}function xM(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function km(e,t,n){const r=e.getProps();return Fb(r,t,n!==void 0?n:r.custom,e)}const A9=Mb(()=>window.ScrollTimeline!==void 0);class P9{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(A9()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class R9 extends P9{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Yb(e,t){return e?e[t]||e.default||e:void 0}const Gw=2e4;function vM(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gw;)t+=n,r=e.next(t);return t>=Gw?1/0:t}function qb(e){return typeof e=="function"}function HC(e,t){e.timeline=t,e.onfinish=null}const Gb=e=>Array.isArray(e)&&typeof e[0]=="number",M9={linearEasing:void 0};function j9(e,t){const n=Mb(e);return()=>{var r;return(r=M9[t])!==null&&r!==void 0?r:n()}}const xp=j9(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wM=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=e(Ol(0,i-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function bM(e){return!!(typeof e=="function"&&xp()||!e||typeof e=="string"&&(e in Zw||xp())||Gb(e)||Array.isArray(e)&&e.every(bM))}const yc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yc([0,.65,.55,1]),circOut:yc([.55,0,1,.45]),backIn:yc([.31,.01,.66,-.59]),backOut:yc([.33,1.53,.69,.99])};function kM(e,t){if(e)return typeof e=="function"&&xp()?wM(e,t):Gb(e)?yc(e):Array.isArray(e)?e.map(n=>kM(n,t)||Zw.easeOut):Zw[e]}const hi={x:!1,y:!1};function SM(){return hi.x||hi.y}function D9(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const o=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function EM(e,t){const n=D9(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function YC(e){return t=>{t.pointerType==="touch"||SM()||e(t)}}function O9(e,t,n={}){const[r,i,o]=EM(e,n),s=YC(a=>{const{target:u}=a,c=t(a);if(typeof c!="function"||!u)return;const f=YC(h=>{c(h),u.removeEventListener("pointerleave",f)});u.addEventListener("pointerleave",f,i)});return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const CM=(e,t)=>t?e===t?!0:CM(e,t.parentElement):!1,Zb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,I9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function L9(e){return I9.has(e.tagName)||e.tabIndex!==-1}const xc=new WeakSet;function qC(e){return t=>{t.key==="Enter"&&e(t)}}function bx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const F9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=qC(()=>{if(xc.has(n))return;bx(n,"down");const i=qC(()=>{bx(n,"up")}),o=()=>bx(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function GC(e){return Zb(e)&&!SM()}function $9(e,t,n={}){const[r,i,o]=EM(e,n),s=a=>{const u=a.currentTarget;if(!GC(a)||xc.has(u))return;xc.add(u);const c=t(a),f=(m,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),!(!GC(m)||!xc.has(u))&&(xc.delete(u),typeof c=="function"&&c(m,{success:x}))},h=m=>{f(m,n.useGlobalTarget||CM(u,m.target))},p=m=>{f(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return r.forEach(a=>{!L9(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),a.addEventListener("focus",c=>F9(c,i),i)}),o}function z9(e){return e==="x"||e==="y"?hi[e]?null:(hi[e]=!0,()=>{hi[e]=!1}):hi.x||hi.y?null:(hi.x=hi.y=!0,()=>{hi.x=hi.y=!1})}const _M=new Set(["width","height","top","left","right","bottom",...uu]);let ep;function B9(){ep=void 0}const Vi={now:()=>(ep===void 0&&Vi.set(Ln.isProcessing||I8.useManualTiming?Ln.timestamp:performance.now()),ep),set:e=>{ep=e,queueMicrotask(B9)}};function Kb(e,t){e.indexOf(t)===-1&&e.push(t)}function Xb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Qb{constructor(){this.subscriptions=[]}add(t){return Kb(this.subscriptions,t),()=>Xb(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function NM(e,t){return t?e*(1e3/t):0}const ZC=30,V9=e=>!isNaN(parseFloat(e));class W9{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Vi.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Vi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=V9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Qb);const r=this.events[t].add(n);return t==="change"?()=>{r(),Vt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Vi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ZC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ZC);return NM(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gc(e,t){return new W9(e,t)}function U9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gc(n))}function H9(e,t){const n=km(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=r9(o[s]);U9(e,s,a)}}function Y9(e){return!!(Hn(e)&&e.add)}function Kw(e,t){const n=e.getValue("willChange");if(Y9(n))return n.add(t)}function TM(e){return e.props[iM]}const AM=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,q9=1e-7,G9=12;function Z9(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=AM(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>q9&&++a<G9);return s}function Ld(e,t,n,r){if(e===t&&n===r)return Rr;const i=o=>Z9(o,0,1,e,n);return o=>o===0||o===1?o:AM(i(o),t,r)}const PM=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,RM=e=>t=>1-e(1-t),MM=Ld(.33,1.53,.69,.99),Jb=RM(MM),jM=PM(Jb),DM=e=>(e*=2)<1?.5*Jb(e):.5*(2-Math.pow(2,-10*(e-1))),e1=e=>1-Math.sin(Math.acos(e)),OM=RM(e1),IM=PM(e1),LM=e=>/^0[^.\s]+$/u.test(e);function K9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||LM(e):!0}const Tc=e=>Math.round(e*1e5)/1e5,t1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function X9(e){return e==null}const Q9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,n1=(e,t)=>n=>!!(typeof n=="string"&&Q9.test(n)&&n.startsWith(e)||t&&!X9(n)&&Object.prototype.hasOwnProperty.call(n,t)),FM=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(t1);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},J9=e=>Ao(0,255,e),kx={...cu,transform:e=>Math.round(J9(e))},sa={test:n1("rgb","red"),parse:FM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kx.transform(e)+", "+kx.transform(t)+", "+kx.transform(n)+", "+Tc(qc.transform(r))+")"};function eW(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Xw={test:n1("#"),parse:eW,transform:sa.transform},ml={test:n1("hsl","hue"),parse:FM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Bi.transform(Tc(t))+", "+Bi.transform(Tc(n))+", "+Tc(qc.transform(r))+")"},Un={test:e=>sa.test(e)||Xw.test(e)||ml.test(e),parse:e=>sa.test(e)?sa.parse(e):ml.test(e)?ml.parse(e):Xw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?sa.transform(e):ml.transform(e)},tW=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nW(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(t1))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tW))===null||n===void 0?void 0:n.length)||0)>0}const $M="number",zM="color",rW="var",iW="var(",KC="${}",oW=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(oW,u=>(Un.test(u)?(r.color.push(o),i.push(zM),n.push(Un.parse(u))):u.startsWith(iW)?(r.var.push(o),i.push(rW),n.push(u)):(r.number.push(o),i.push($M),n.push(parseFloat(u))),++o,KC)).split(KC);return{values:n,split:a,indexes:r,types:i}}function BM(e){return Zc(e).values}function VM(e){const{split:t,types:n}=Zc(e),r=t.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=t[s],i[s]!==void 0){const a=n[s];a===$M?o+=Tc(i[s]):a===zM?o+=Un.transform(i[s]):o+=i[s]}return o}}const sW=e=>typeof e=="number"?0:e;function aW(e){const t=BM(e);return VM(e)(t.map(sW))}const Es={test:nW,parse:BM,createTransformer:VM,getAnimatableNone:aW},lW=new Set(["brightness","contrast","saturate","opacity"]);function uW(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(t1)||[];if(!r)return e;const i=n.replace(r,"");let o=lW.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const cW=/\b([a-z-]*)\(.*?\)/gu,Qw={...Es,getAnimatableNone:e=>{const t=e.match(cW);return t?t.map(uW).join(" "):e}},dW={...zb,color:Un,backgroundColor:Un,outlineColor:Un,fill:Un,stroke:Un,borderColor:Un,borderTopColor:Un,borderRightColor:Un,borderBottomColor:Un,borderLeftColor:Un,filter:Qw,WebkitFilter:Qw},r1=e=>dW[e];function WM(e,t){let n=r1(e);return n!==Qw&&(n=Es),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fW=new Set(["auto","none","0"]);function hW(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!fW.has(o)&&Zc(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=WM(n,i)}const XC=e=>e===cu||e===Qe,QC=(e,t)=>parseFloat(e.split(", ")[t]),JC=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return QC(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?QC(o[1],e):0}},pW=new Set(["x","y","z"]),mW=uu.filter(e=>!pW.has(e));function gW(e){const t=[];return mW.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ll={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:JC(4,13),y:JC(5,14)};Ll.translateX=Ll.x;Ll.translateY=Ll.y;const ca=new Set;let Jw=!1,e0=!1;function UM(){if(e0){const e=Array.from(ca).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=gW(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}e0=!1,Jw=!1,ca.forEach(e=>e.complete()),ca.clear()}function HM(){ca.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(e0=!0)})}function yW(){HM(),UM()}class i1{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ca.add(this),Jw||(Jw=!0,Vt.read(HM),Vt.resolveKeyframes(UM))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const s=i==null?void 0:i.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,a);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ca.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ca.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const YM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),xW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vW(e){const t=xW.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function qM(e,t,n=1){const[r,i]=vW(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return YM(s)?parseFloat(s):s}return $b(i)?qM(i,t,n+1):i}const GM=e=>t=>t.test(e),wW={test:e=>e==="auto",parse:e=>e},ZM=[cu,Qe,Bi,ms,u9,l9,wW],e_=e=>ZM.find(GM(e));class KM extends i1{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let c=t[u];if(typeof c=="string"&&(c=c.trim(),$b(c))){const f=qM(c,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!_M.has(r)||t.length!==2)return;const[i,o]=t,s=e_(i),a=e_(o);if(s!==a)if(XC(s)&&XC(a))for(let u=0;u<t.length;u++){const c=t[u];typeof c=="string"&&(t[u]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)K9(t[i])&&r.push(i);r.length&&hW(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ll[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const s=i.length-1,a=i[s];i[s]=Ll[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,c])=>{n.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const t_=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Es.test(e)||e==="0")&&!e.startsWith("url("));function bW(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function kW(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=t_(i,t),a=t_(o,t);return!s||!a?!1:bW(e)||(n==="spring"||qb(n))&&r}const SW=e=>e!==null;function Sm(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(SW),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const EW=40;class XM{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Vi.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>EW?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&yW(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Vi.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:s,onComplete:a,onUpdate:u,isGenerator:c}=this.options;if(!c&&!kW(t,r,i,o))if(s)this.options.duration=0;else{u&&u(Sm(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Jt=(e,t,n)=>e+(t-e)*n;function Sx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function CW({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,u=2*n-a;i=Sx(u,a,e+1/3),o=Sx(u,a,e),s=Sx(u,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function vp(e,t){return n=>n>0?t:e}const Ex=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},_W=[Xw,sa,ml],NW=e=>_W.find(t=>t.test(e));function n_(e){const t=NW(e);if(!t)return!1;let n=t.parse(e);return t===ml&&(n=CW(n)),n}const r_=(e,t)=>{const n=n_(e),r=n_(t);if(!n||!r)return vp(e,t);const i={...n};return o=>(i.red=Ex(n.red,r.red,o),i.green=Ex(n.green,r.green,o),i.blue=Ex(n.blue,r.blue,o),i.alpha=Jt(n.alpha,r.alpha,o),sa.transform(i))},TW=(e,t)=>n=>t(e(n)),Fd=(...e)=>e.reduce(TW),t0=new Set(["none","hidden"]);function AW(e,t){return t0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function PW(e,t){return n=>Jt(e,t,n)}function o1(e){return typeof e=="number"?PW:typeof e=="string"?$b(e)?vp:Un.test(e)?r_:jW:Array.isArray(e)?QM:typeof e=="object"?Un.test(e)?r_:RW:vp}function QM(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>o1(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function RW(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=o1(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function MW(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],u=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=u,i[s]++}return r}const jW=(e,t)=>{const n=Es.createTransformer(t),r=Zc(e),i=Zc(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?t0.has(e)&&!i.values.length||t0.has(t)&&!r.values.length?AW(e,t):Fd(QM(MW(r,i),i.values),n):vp(e,t)};function JM(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Jt(e,t,n):o1(e)(e,t)}const DW=5;function e2(e,t,n){const r=Math.max(t-DW,0);return NM(n-e(r),t-r)}const tn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},i_=.001;function OW({duration:e=tn.duration,bounce:t=tn.bounce,velocity:n=tn.velocity,mass:r=tn.mass}){let i,o,s=1-t;s=Ao(tn.minDamping,tn.maxDamping,s),e=Ao(tn.minDuration,tn.maxDuration,Eo(e)),s<1?(i=c=>{const f=c*s,h=f*e,p=f-n,m=n0(c,s),x=Math.exp(-h);return i_-p/m*x},o=c=>{const h=c*s*e,p=h*n+n,m=Math.pow(s,2)*Math.pow(c,2)*e,x=Math.exp(-h),v=n0(Math.pow(c,2),s);return(-i(c)+i_>0?-1:1)*((p-m)*x)/v}):(i=c=>{const f=Math.exp(-c*e),h=(c-n)*e+1;return-.001+f*h},o=c=>{const f=Math.exp(-c*e),h=(n-c)*(e*e);return f*h});const a=5/e,u=LW(i,o,a);if(e=So(e),isNaN(u))return{stiffness:tn.stiffness,damping:tn.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const IW=12;function LW(e,t,n){let r=n;for(let i=1;i<IW;i++)r=r-e(r)/t(r);return r}function n0(e,t){return e*Math.sqrt(1-t*t)}const FW=["duration","bounce"],$W=["stiffness","damping","mass"];function o_(e,t){return t.some(n=>e[n]!==void 0)}function zW(e){let t={velocity:tn.velocity,stiffness:tn.stiffness,damping:tn.damping,mass:tn.mass,isResolvedFromDuration:!1,...e};if(!o_(e,$W)&&o_(e,FW))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Ao(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:tn.mass,stiffness:i,damping:o}}else{const n=OW(e);t={...t,...n,mass:tn.mass},t.isResolvedFromDuration=!0}return t}function t2(e=tn.visualDuration,t=tn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:u,damping:c,mass:f,duration:h,velocity:p,isResolvedFromDuration:m}=zW({...n,velocity:-Eo(n.velocity||0)}),x=p||0,v=c/(2*Math.sqrt(u*f)),k=s-o,b=Eo(Math.sqrt(u/f)),E=Math.abs(k)<5;r||(r=E?tn.restSpeed.granular:tn.restSpeed.default),i||(i=E?tn.restDelta.granular:tn.restDelta.default);let C;if(v<1){const P=n0(b,v);C=T=>{const j=Math.exp(-v*b*T);return s-j*((x+v*b*k)/P*Math.sin(P*T)+k*Math.cos(P*T))}}else if(v===1)C=P=>s-Math.exp(-b*P)*(k+(x+b*k)*P);else{const P=b*Math.sqrt(v*v-1);C=T=>{const j=Math.exp(-v*b*T),R=Math.min(P*T,300);return s-j*((x+v*b*k)*Math.sinh(R)+P*k*Math.cosh(R))/P}}const N={calculatedDuration:m&&h||null,next:P=>{const T=C(P);if(m)a.done=P>=h;else{let j=0;v<1&&(j=P===0?So(x):e2(C,P,T));const R=Math.abs(j)<=r,I=Math.abs(s-T)<=i;a.done=R&&I}return a.value=a.done?s:T,a},toString:()=>{const P=Math.min(vM(N),Gw),T=wM(j=>N.next(P*j).value,P,30);return P+"ms "+T}};return N}function s_({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:u,restDelta:c=.5,restSpeed:f}){const h=e[0],p={done:!1,value:h},m=R=>a!==void 0&&R<a||u!==void 0&&R>u,x=R=>a===void 0?u:u===void 0||Math.abs(a-R)<Math.abs(u-R)?a:u;let v=n*t;const k=h+v,b=s===void 0?k:s(k);b!==k&&(v=b-h);const E=R=>-v*Math.exp(-R/r),C=R=>b+E(R),N=R=>{const I=E(R),M=C(R);p.done=Math.abs(I)<=c,p.value=p.done?b:M};let P,T;const j=R=>{m(p.value)&&(P=R,T=t2({keyframes:[p.value,x(p.value)],velocity:e2(C,R,p.value),damping:i,stiffness:o,restDelta:c,restSpeed:f}))};return j(0),{calculatedDuration:null,next:R=>{let I=!1;return!T&&P===void 0&&(I=!0,N(R),j(R)),P!==void 0&&R>=P?T.next(R-P):(!I&&N(R),p)}}}const BW=Ld(.42,0,1,1),VW=Ld(0,0,.58,1),n2=Ld(.42,0,.58,1),WW=e=>Array.isArray(e)&&typeof e[0]!="number",a_={linear:Rr,easeIn:BW,easeInOut:n2,easeOut:VW,circIn:e1,circInOut:IM,circOut:OM,backIn:Jb,backInOut:jM,backOut:MM,anticipate:DM},l_=e=>{if(Gb(e)){Yw(e.length===4);const[t,n,r,i]=e;return Ld(t,n,r,i)}else if(typeof e=="string")return Yw(a_[e]!==void 0),a_[e];return e};function UW(e,t,n){const r=[],i=n||JM,o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const u=Array.isArray(t)?t[s]||Rr:t;a=Fd(u,a)}r.push(a)}return r}function HW(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Yw(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=UW(t,r,i),u=a.length,c=f=>{if(s&&f<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(f<e[h+1]);h++);const p=Ol(e[h],e[h+1],f);return a[h](p)};return n?f=>c(Ao(e[0],e[o-1],f)):c}function YW(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ol(0,t,r);e.push(Jt(n,1,i))}}function qW(e){const t=[0];return YW(t,e.length-1),t}function GW(e,t){return e.map(n=>n*t)}function ZW(e,t){return e.map(()=>t||n2).splice(0,e.length-1)}function wp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=WW(r)?r.map(l_):l_(r),o={done:!1,value:t[0]},s=GW(n&&n.length===t.length?n:qW(t),e),a=HW(s,t,{ease:Array.isArray(i)?i:ZW(t,i)});return{calculatedDuration:e,next:u=>(o.value=a(u),o.done=u>=e,o)}}const KW=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Vt.update(t,!0),stop:()=>Ss(t),now:()=>Ln.isProcessing?Ln.timestamp:Vi.now()}},XW={decay:s_,inertia:s_,tween:wp,keyframes:wp,spring:t2},QW=e=>e/100;class s1 extends XM{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,s=(i==null?void 0:i.KeyframeResolver)||i1,a=(u,c)=>this.onKeyframesResolved(u,c);this.resolver=new s(o,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,a=qb(n)?n:XW[n]||wp;let u,c;a!==wp&&typeof t[0]!="number"&&(u=Fd(QW,JM(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});o==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=vM(f));const{calculatedDuration:h}=f,p=h+i,m=p*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:u,calculatedDuration:h,resolvedDuration:p,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:u,calculatedDuration:c,totalDuration:f,resolvedDuration:h}=r;if(this.startTime===null)return o.next(0);const{delay:p,repeat:m,repeatType:x,repeatDelay:v,onUpdate:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-p*(this.speed>=0?1:-1),E=this.speed>=0?b<0:b>f;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let C=this.currentTime,N=o;if(m){const R=Math.min(this.currentTime,f)/h;let I=Math.floor(R),M=R%1;!M&&R>=1&&(M=1),M===1&&I--,I=Math.min(I,m+1),!!(I%2)&&(x==="reverse"?(M=1-M,v&&(M-=v/h)):x==="mirror"&&(N=s)),C=Ao(0,1,M)*h}const P=E?{done:!1,value:u[0]}:N.next(C);a&&(P.value=a(P.value));let{done:T}=P;!E&&c!==null&&(T=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return j&&i!==void 0&&(P.value=Sm(u,this.options,i)),k&&k(P.value),j&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Eo(t.calculatedDuration):0}get time(){return Eo(this.currentTime)}set time(t){t=So(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Eo(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=KW,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const JW=new Set(["opacity","clipPath","filter","transform"]);function eU(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeInOut",times:u}={}){const c={[t]:n};u&&(c.offset=u);const f=kM(a,i);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const tU=Mb(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),bp=10,nU=2e4;function rU(e){return qb(e.type)||e.type==="spring"||!bM(e.ease)}function iU(e,t){const n=new s1({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<nU;)r=n.sample(o),i.push(r.value),o+=bp;return{times:void 0,keyframes:i,duration:o-bp,ease:"linear"}}const r2={anticipate:DM,backInOut:jM,circInOut:IM};function oU(e){return e in r2}class u_ extends XM{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new KM(o,(s,a)=>this.onKeyframesResolved(s,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:u,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&xp()&&oU(o)&&(o=r2[o]),rU(this.options)){const{onComplete:h,onUpdate:p,motionValue:m,element:x,...v}=this.options,k=iU(t,v);t=k.keyframes,t.length===1&&(t[1]=t[0]),r=k.duration,i=k.times,o=k.ease,s="keyframes"}const f=eU(a.owner.current,u,t,{...this.options,duration:r,times:i,ease:o});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(HC(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;a.set(Sm(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Eo(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Eo(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=So(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Rr;const{animation:r}=n;HC(r,t)}return Rr}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:h,element:p,...m}=this.options,x=new s1({...m,keyframes:r,duration:i,type:o,ease:s,times:a,isGenerator:!0}),v=So(this.time);c.setWithVelocity(x.sample(v-bp).value,x.sample(v).value,bp)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return tU()&&r&&JW.has(r)&&!u&&!c&&!i&&o!=="mirror"&&s!==0&&a!=="inertia"}}const sU={type:"spring",stiffness:500,damping:25,restSpeed:10},aU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lU={type:"keyframes",duration:.8},uU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cU=(e,{keyframes:t})=>t.length>2?lU:_a.has(e)?e.startsWith("scale")?aU(t[1]):sU:uU;function dU({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:u,elapsed:c,...f}){return!!Object.keys(f).length}const a1=(e,t,n,r={},i,o)=>s=>{const a=Yb(r,e)||{},u=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-So(u);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};dU(a)||(f={...f,...cU(e,f)}),f.duration&&(f.duration=So(f.duration)),f.repeatDelay&&(f.repeatDelay=So(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!o&&t.get()!==void 0){const p=Sm(f.keyframes,a);if(p!==void 0)return Vt.update(()=>{f.onUpdate(p),f.onComplete()}),new R9([])}return!o&&u_.supports(f)?new u_(f):new s1(f)};function fU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function i2(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...u}=t;r&&(s=r);const c=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in u){const p=e.getValue(h,(o=e.latestValues[h])!==null&&o!==void 0?o:null),m=u[h];if(m===void 0||f&&fU(f,h))continue;const x={delay:n,...Yb(s||{},h)};let v=!1;if(window.MotionHandoffAnimation){const b=TM(e);if(b){const E=window.MotionHandoffAnimation(b,h,Vt);E!==null&&(x.startTime=E,v=!0)}}Kw(e,h),p.start(a1(h,p,m,e.shouldReduceMotion&&_M.has(h)?{type:!1}:x,e,v));const k=p.animation;k&&c.push(k)}return a&&Promise.all(c).then(()=>{Vt.update(()=>{a&&H9(e,a)})}),c}function r0(e,t,n={}){var r;const i=km(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(i2(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:p}=o;return hU(e,t,f+c,h,p,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[c,f]=u==="beforeChildren"?[s,a]:[a,s];return c().then(()=>f())}else return Promise.all([s(),a(n.delay)])}function hU(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,u=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(pU).forEach((c,f)=>{c.notify("AnimationStart",t),s.push(r0(c,t,{...o,delay:n+u(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function pU(e,t){return e.sortNodePosition(t)}function mU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>r0(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=r0(e,t,n);else{const i=typeof t=="function"?km(e,t,n.custom):t;r=Promise.all(i2(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const gU=Db.length;function o2(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?o2(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<gU;n++){const r=Db[n],i=e.props[r];(Yc(i)||i===!1)&&(t[r]=i)}return t}const yU=[...jb].reverse(),xU=jb.length;function vU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>mU(e,n,r)))}function wU(e){let t=vU(e),n=c_(),r=!0;const i=u=>(c,f)=>{var h;const p=km(e,f,u==="exit"?(h=e.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(p){const{transition:m,transitionEnd:x,...v}=p;c={...c,...v,...x}}return c};function o(u){t=u(e)}function s(u){const{props:c}=e,f=o2(e.parent)||{},h=[],p=new Set;let m={},x=1/0;for(let k=0;k<xU;k++){const b=yU[k],E=n[b],C=c[b]!==void 0?c[b]:f[b],N=Yc(C),P=b===u?E.isActive:null;P===!1&&(x=k);let T=C===f[b]&&C!==c[b]&&N;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),E.protectedKeys={...m},!E.isActive&&P===null||!C&&!E.prevProp||wm(C)||typeof C=="boolean")continue;const j=bU(E.prevProp,C);let R=j||b===u&&E.isActive&&!T&&N||k>x&&N,I=!1;const M=Array.isArray(C)?C:[C];let z=M.reduce(i(b),{});P===!1&&(z={});const{prevResolvedValues:F={}}=E,Y={...F,...z},O=Z=>{R=!0,p.has(Z)&&(I=!0,p.delete(Z)),E.needsAnimating[Z]=!0;const U=e.getValue(Z);U&&(U.liveStyle=!1)};for(const Z in Y){const U=z[Z],B=F[Z];if(m.hasOwnProperty(Z))continue;let L=!1;qw(U)&&qw(B)?L=!xM(U,B):L=U!==B,L?U!=null?O(Z):p.add(Z):U!==void 0&&p.has(Z)?O(Z):E.protectedKeys[Z]=!0}E.prevProp=C,E.prevResolvedValues=z,E.isActive&&(m={...m,...z}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(T&&j)||I)&&h.push(...M.map(Z=>({animation:Z,options:{type:b}})))}if(p.size){const k={};p.forEach(b=>{const E=e.getBaseTarget(b),C=e.getValue(b);C&&(C.liveStyle=!0),k[b]=E??null}),h.push({animation:k})}let v=!!h.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(h):Promise.resolve()}function a(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(u,c)}),n[u].isActive=c;const h=s(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=c_(),r=!0}}}function bU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xM(t,e):!1}function Js(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function c_(){return{animate:Js(!0),whileInView:Js(),whileHover:Js(),whileTap:Js(),whileDrag:Js(),whileFocus:Js(),exit:Js()}}class Ds{constructor(t){this.isMounted=!1,this.node=t}update(){}}class kU extends Ds{constructor(t){super(t),t.animationState||(t.animationState=wU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let SU=0;class EU extends Ds{constructor(){super(...arguments),this.id=SU++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const CU={animation:{Feature:kU},exit:{Feature:EU}};function Kc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $d(e){return{point:{x:e.pageX,y:e.pageY}}}const _U=e=>t=>Zb(t)&&e(t,$d(t));function Ac(e,t,n,r){return Kc(e,t,_U(n),r)}const d_=(e,t)=>Math.abs(e-t);function NU(e,t){const n=d_(e.x,t.x),r=d_(e.y,t.y);return Math.sqrt(n**2+r**2)}class s2{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=_x(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=NU(h.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:x}=h,{timestamp:v}=Ln;this.history.push({...x,timestamp:v});const{onStart:k,onMove:b}=this.handlers;p||(k&&k(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Cx(p,this.transformPagePoint),Vt.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:m,onSessionEnd:x,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=_x(h.type==="pointercancel"?this.lastMoveEventInfo:Cx(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,k),x&&x(h,k)},!Zb(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=$d(t),a=Cx(s,this.transformPagePoint),{point:u}=a,{timestamp:c}=Ln;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,_x(a,this.history)),this.removeListeners=Fd(Ac(this.contextWindow,"pointermove",this.handlePointerMove),Ac(this.contextWindow,"pointerup",this.handlePointerUp),Ac(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ss(this.updatePoint)}}function Cx(e,t){return t?{point:t(e.point)}:e}function f_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _x({point:e},t){return{point:e,delta:f_(e,a2(t)),offset:f_(e,TU(t)),velocity:AU(t,.1)}}function TU(e){return e[0]}function a2(e){return e[e.length-1]}function AU(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=a2(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>So(t)));)n--;if(!r)return{x:0,y:0};const o=Eo(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const l2=1e-4,PU=1-l2,RU=1+l2,u2=.01,MU=0-u2,jU=0+u2;function Ir(e){return e.max-e.min}function DU(e,t,n){return Math.abs(e-t)<=n}function h_(e,t,n,r=.5){e.origin=r,e.originPoint=Jt(t.min,t.max,e.origin),e.scale=Ir(n)/Ir(t),e.translate=Jt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PU&&e.scale<=RU||isNaN(e.scale))&&(e.scale=1),(e.translate>=MU&&e.translate<=jU||isNaN(e.translate))&&(e.translate=0)}function Pc(e,t,n,r){h_(e.x,t.x,n.x,r?r.originX:void 0),h_(e.y,t.y,n.y,r?r.originY:void 0)}function p_(e,t,n){e.min=n.min+t.min,e.max=e.min+Ir(t)}function OU(e,t,n){p_(e.x,t.x,n.x),p_(e.y,t.y,n.y)}function m_(e,t,n){e.min=t.min-n.min,e.max=e.min+Ir(t)}function Rc(e,t,n){m_(e.x,t.x,n.x),m_(e.y,t.y,n.y)}function IU(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Jt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Jt(n,e,r.max):Math.min(e,n)),e}function g_(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function LU(e,{top:t,left:n,bottom:r,right:i}){return{x:g_(e.x,n,i),y:g_(e.y,t,r)}}function y_(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function FU(e,t){return{x:y_(e.x,t.x),y:y_(e.y,t.y)}}function $U(e,t){let n=.5;const r=Ir(e),i=Ir(t);return i>r?n=Ol(t.min,t.max-r,e.min):r>i&&(n=Ol(e.min,e.max-i,t.min)),Ao(0,1,n)}function zU(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const i0=.35;function BU(e=i0){return e===!1?e=0:e===!0&&(e=i0),{x:x_(e,"left","right"),y:x_(e,"top","bottom")}}function x_(e,t,n){return{min:v_(e,t),max:v_(e,n)}}function v_(e,t){return typeof e=="number"?e:e[t]||0}const w_=()=>({translate:0,scale:1,origin:0,originPoint:0}),gl=()=>({x:w_(),y:w_()}),b_=()=>({min:0,max:0}),sn=()=>({x:b_(),y:b_()});function Zr(e){return[e("x"),e("y")]}function c2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function VU({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function WU(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Nx(e){return e===void 0||e===1}function o0({scale:e,scaleX:t,scaleY:n}){return!Nx(e)||!Nx(t)||!Nx(n)}function ta(e){return o0(e)||d2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function d2(e){return k_(e.x)||k_(e.y)}function k_(e){return e&&e!=="0%"}function kp(e,t,n){const r=e-n,i=t*r;return n+i}function S_(e,t,n,r,i){return i!==void 0&&(e=kp(e,i,r)),kp(e,n,r)+t}function s0(e,t=0,n=1,r,i){e.min=S_(e.min,t,n,r,i),e.max=S_(e.max,t,n,r,i)}function f2(e,{x:t,y:n}){s0(e.x,t.translate,t.scale,t.originPoint),s0(e.y,n.translate,n.scale,n.originPoint)}const E_=.999999999999,C_=1.0000000000001;function UU(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&xl(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,f2(e,s)),r&&ta(o.latestValues)&&xl(e,o.latestValues))}t.x<C_&&t.x>E_&&(t.x=1),t.y<C_&&t.y>E_&&(t.y=1)}function yl(e,t){e.min=e.min+t,e.max=e.max+t}function __(e,t,n,r,i=.5){const o=Jt(e.min,e.max,i);s0(e,t,n,o,r)}function xl(e,t){__(e.x,t.x,t.scaleX,t.scale,t.originX),__(e.y,t.y,t.scaleY,t.scale,t.originY)}function h2(e,t){return c2(WU(e.getBoundingClientRect(),t))}function HU(e,t,n){const r=h2(e,n),{scroll:i}=t;return i&&(yl(r.x,i.offset.x),yl(r.y,i.offset.y)),r}const p2=({current:e})=>e?e.ownerDocument.defaultView:null,YU=new WeakMap;class qU{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=sn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($d(f).point)},o=(f,h)=>{const{drag:p,dragPropagation:m,onDragStart:x}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=z9(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zr(k=>{let b=this.getAxisMotionValue(k).get()||0;if(Bi.test(b)){const{projection:E}=this.visualElement;if(E&&E.layout){const C=E.layout.layoutBox[k];C&&(b=Ir(C)*(parseFloat(b)/100))}}this.originPoint[k]=b}),x&&Vt.postRender(()=>x(f,h)),Kw(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(f,h)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:x,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:k}=h;if(m&&this.currentDirection===null){this.currentDirection=GU(k),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),v&&v(f,h)},a=(f,h)=>this.stop(f,h),u=()=>Zr(f=>{var h;return this.getAnimationState(f)==="paused"&&((h=this.getAxisMotionValue(f).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new s2(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:p2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Vt.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Rh(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=IU(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&pl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=LU(i.layoutBox,n):this.constraints=!1,this.elastic=BU(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Zr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=zU(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pl(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=HU(r,i.root,this.visualElement.getTransformPagePoint());let s=FU(i.layout.layoutBox,o);if(n){const a=n(VU(s));this.hasMutatedConstraints=!!a,a&&(s=c2(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},c=Zr(f=>{if(!Rh(f,n,this.currentDirection))return;let h=u[f]||{};s&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:r?t[f]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(f,x)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Kw(this.visualElement,t),r.start(a1(t,r,0,n,this.visualElement,!1))}stopAnimation(){Zr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Zr(n=>{const{drag:r}=this.getProps();if(!Rh(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-Jt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zr(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const u=a.get();i[s]=$U({min:u,max:u},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zr(s=>{if(!Rh(s,t,null))return;const a=this.getAxisMotionValue(s),{min:u,max:c}=this.constraints[s];a.set(Jt(u,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;YU.set(this.visualElement,this);const t=this.visualElement.current,n=Ac(t,"pointerdown",u=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();pl(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Vt.read(r);const s=Kc(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zr(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=i0,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Rh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function GU(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ZU extends Ds{constructor(t){super(t),this.removeGroupControls=Rr,this.removeListeners=Rr,this.controls=new qU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Rr}unmount(){this.removeGroupControls(),this.removeListeners()}}const N_=e=>(t,n)=>{e&&Vt.postRender(()=>e(t,n))};class KU extends Ds{constructor(){super(...arguments),this.removePointerDownListener=Rr}onPointerDown(t){this.session=new s2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:p2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:N_(t),onStart:N_(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Vt.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Ac(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const tp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function T_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const sc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Qe.test(e))e=parseFloat(e);else return e;const n=T_(e,t.target.x),r=T_(e,t.target.y);return`${n}% ${r}%`}},XU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Es.parse(e);if(i.length>5)return r;const o=Es.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,u=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=u;const c=Jt(a,u,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),o(i)}};class QU extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;v9(JU),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),tp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Vt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ib.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function m2(e){const[t,n]=XR(),r=S.useContext(Tb);return y.jsx(QU,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(oM),isPresent:t,safeToRemove:n})}const JU={borderRadius:{...sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sc,borderTopRightRadius:sc,borderBottomLeftRadius:sc,borderBottomRightRadius:sc,boxShadow:XU};function e7(e,t,n){const r=Hn(e)?e:Gc(e);return r.start(a1("",r,t,n)),r.animation}function t7(e){return e instanceof SVGElement&&e.tagName!=="svg"}const n7=(e,t)=>e.depth-t.depth;class r7{constructor(){this.children=[],this.isDirty=!1}add(t){Kb(this.children,t),this.isDirty=!0}remove(t){Xb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(n7),this.isDirty=!1,this.children.forEach(t)}}function i7(e,t){const n=Vi.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ss(r),e(o-t))};return Vt.read(r,!0),()=>Ss(r)}const g2=["TopLeft","TopRight","BottomLeft","BottomRight"],o7=g2.length,A_=e=>typeof e=="string"?parseFloat(e):e,P_=e=>typeof e=="number"||Qe.test(e);function s7(e,t,n,r,i,o){i?(e.opacity=Jt(0,n.opacity!==void 0?n.opacity:1,a7(r)),e.opacityExit=Jt(t.opacity!==void 0?t.opacity:1,0,l7(r))):o&&(e.opacity=Jt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<o7;s++){const a=`border${g2[s]}Radius`;let u=R_(t,a),c=R_(n,a);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||P_(u)===P_(c)?(e[a]=Math.max(Jt(A_(u),A_(c),r),0),(Bi.test(c)||Bi.test(u))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Jt(t.rotate||0,n.rotate||0,r))}function R_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const a7=y2(0,.5,OM),l7=y2(.5,.95,Rr);function y2(e,t,n){return r=>r<e?0:r>t?1:n(Ol(e,t,r))}function M_(e,t){e.min=t.min,e.max=t.max}function qr(e,t){M_(e.x,t.x),M_(e.y,t.y)}function j_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function D_(e,t,n,r,i){return e-=t,e=kp(e,1/n,r),i!==void 0&&(e=kp(e,1/i,r)),e}function u7(e,t=0,n=1,r=.5,i,o=e,s=e){if(Bi.test(t)&&(t=parseFloat(t),t=Jt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Jt(o.min,o.max,r);e===o&&(a-=t),e.min=D_(e.min,t,n,a,i),e.max=D_(e.max,t,n,a,i)}function O_(e,t,[n,r,i],o,s){u7(e,t[n],t[r],t[i],t.scale,o,s)}const c7=["x","scaleX","originX"],d7=["y","scaleY","originY"];function I_(e,t,n,r){O_(e.x,t,c7,n?n.x:void 0,r?r.x:void 0),O_(e.y,t,d7,n?n.y:void 0,r?r.y:void 0)}function L_(e){return e.translate===0&&e.scale===1}function x2(e){return L_(e.x)&&L_(e.y)}function F_(e,t){return e.min===t.min&&e.max===t.max}function f7(e,t){return F_(e.x,t.x)&&F_(e.y,t.y)}function $_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function v2(e,t){return $_(e.x,t.x)&&$_(e.y,t.y)}function z_(e){return Ir(e.x)/Ir(e.y)}function B_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class h7{constructor(){this.members=[]}add(t){Kb(this.members,t),t.scheduleRender()}remove(t){if(Xb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function p7(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),x&&(r+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,u=e.y.scale*t.y;return(a!==1||u!==1)&&(r+=`scale(${a}, ${u})`),r||"none"}const na={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vc=typeof window<"u"&&window.MotionDebug!==void 0,Tx=["","X","Y","Z"],m7={visibility:"hidden"},V_=1e3;let g7=0;function Ax(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function w2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=TM(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Vt,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&w2(r)}function b2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=g7++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,vc&&(na.totalNodes=na.resolvedTargetDeltas=na.recalculatedProjection=0),this.nodes.forEach(v7),this.nodes.forEach(E7),this.nodes.forEach(C7),this.nodes.forEach(w7),vc&&window.MotionDebug.record(na)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new r7)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Qb),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const u=this.eventHandlers.get(s);u&&u.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t7(s),this.instance=s;const{layoutId:u,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||u)&&(this.isLayoutDirty=!0),e){let h;const p=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=i7(p,250),tp.hasAnimatedSinceResize&&(tp.hasAnimatedSinceResize=!1,this.nodes.forEach(U_))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||P7,{onLayoutAnimationStart:k,onLayoutAnimationComplete:b}=f.getProps(),E=!this.targetLayout||!v2(this.targetLayout,x)||m,C=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||p&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,C);const N={...Yb(v,"layout"),onPlay:k,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N)}else p||U_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ss(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_7),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&w2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const h=this.path[f];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(W_);return}this.isUpdating||this.nodes.forEach(k7),this.isUpdating=!1,this.nodes.forEach(S7),this.nodes.forEach(y7),this.nodes.forEach(x7),this.clearAllSnapshots();const a=Vi.now();Ln.delta=Ao(0,1e3/60,a-Ln.timestamp),Ln.timestamp=a,Ln.isProcessing=!0,wx.update.process(Ln),wx.preRender.process(Ln),wx.render.process(Ln),Ln.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ib.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(b7),this.sharedNodes.forEach(N7)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Vt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=sn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!x2(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;s&&(a||ta(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return s&&(u=this.removeTransform(u)),R7(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:a}=this.options;if(!a)return sn();const u=a.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(M7))){const{scroll:f}=this.root;f&&(yl(u.x,f.offset.x),yl(u.y,f.offset.y))}return u}removeElementScroll(s){var a;const u=sn();if(qr(u,s),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return u;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:h,options:p}=f;f!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&qr(u,s),yl(u.x,h.offset.x),yl(u.y,h.offset.y))}return u}applyTransform(s,a=!1){const u=sn();qr(u,s);for(let c=0;c<this.path.length;c++){const f=this.path[c];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&xl(u,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ta(f.latestValues)&&xl(u,f.latestValues)}return ta(this.latestValues)&&xl(u,this.latestValues),u}removeTransform(s){const a=sn();qr(a,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!c.instance||!ta(c.latestValues))continue;o0(c.latestValues)&&c.updateSnapshot();const f=sn(),h=c.measurePageBox();qr(f,h),I_(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ta(this.latestValues)&&I_(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ln.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!(!this.layout||!(h||p))){if(this.resolvedRelativeTargetAt=Ln.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sn(),this.relativeTargetOrigin=sn(),Rc(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),qr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=sn(),this.targetWithTransforms=sn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),OU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qr(this.target,this.layout.layoutBox),f2(this.target,this.targetDelta)):qr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sn(),this.relativeTargetOrigin=sn(),Rc(this.relativeTargetOrigin,this.target,m.target),qr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vc&&na.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||o0(this.parent.latestValues)||d2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),u=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ln.timestamp&&(c=!1),c)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;qr(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,m=this.treeScale.y;UU(this.layoutCorrected,this.treeScale,this.path,u),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=sn());const{target:x}=a;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(j_(this.prevProjectionDelta.x,this.projectionDelta.x),j_(this.prevProjectionDelta.y,this.projectionDelta.y)),Pc(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==m||!B_(this.projectionDelta.x,this.prevProjectionDelta.x)||!B_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x)),vc&&na.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),s){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gl(),this.projectionDelta=gl(),this.projectionDeltaWithTransform=gl()}setAnimationOrigin(s,a=!1){const u=this.snapshot,c=u?u.latestValues:{},f={...this.latestValues},h=gl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=sn(),m=u?u.source:void 0,x=this.layout?this.layout.source:void 0,v=m!==x,k=this.getStack(),b=!k||k.members.length<=1,E=!!(v&&!b&&this.options.crossfade===!0&&!this.path.some(A7));this.animationProgress=0;let C;this.mixTargetDelta=N=>{const P=N/1e3;H_(h.x,s.x,P),H_(h.y,s.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),T7(this.relativeTarget,this.relativeTargetOrigin,p,P),C&&f7(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=sn()),qr(C,this.relativeTarget)),v&&(this.animationValues=f,s7(f,c,this.latestValues,P,E,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ss(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vt.update(()=>{tp.hasAnimatedSinceResize=!0,this.currentAnimation=e7(0,V_,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(V_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:f}=s;if(!(!a||!u||!c)){if(this!==s&&this.layout&&c&&k2(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||sn();const h=Ir(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+h;const p=Ir(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+p}qr(a,u),xl(a,f),Pc(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new h7),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&Ax("z",s,c,this.animationValues);for(let f=0;f<Tx.length;f++)Ax(`rotate${Tx[f]}`,s,c,this.animationValues),Ax(`skew${Tx[f]}`,s,c,this.animationValues);s.render();for(const f in c)s.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);s.scheduleRender()}getProjectionStyles(s){var a,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return m7;const c={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Jh(s==null?void 0:s.pointerEvents)||"",c.transform=f?f(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=Jh(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!ta(this.latestValues)&&(v.transform=f?f({},""):"none",this.hasProjected=!1),v}const p=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=p7(this.projectionDeltaWithTransform,this.treeScale,p),f&&(c.transform=f(p,c.transform));const{x:m,y:x}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${x.origin*100}% 0`,h.animationValues?c.opacity=h===this?(u=(a=p.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const v in yp){if(p[v]===void 0)continue;const{correct:k,applyTo:b}=yp[v],E=c.transform==="none"?p[v]:k(p[v],h);if(b){const C=b.length;for(let N=0;N<C;N++)c[b[N]]=E}else c[v]=E}return this.options.layoutId&&(c.pointerEvents=h===this?Jh(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(W_),this.root.sharedNodes.clear()}}}function y7(e){e.updateLayout()}function x7(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?Zr(h=>{const p=s?n.measuredBox[h]:n.layoutBox[h],m=Ir(p);p.min=r[h].min,p.max=p.min+m}):k2(o,n.layoutBox,r)&&Zr(h=>{const p=s?n.measuredBox[h]:n.layoutBox[h],m=Ir(r[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const a=gl();Pc(a,r,n.layoutBox);const u=gl();s?Pc(u,e.applyTransform(i,!0),n.measuredBox):Pc(u,r,n.layoutBox);const c=!x2(a);let f=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const x=sn();Rc(x,n.layoutBox,p.layoutBox);const v=sn();Rc(v,r,m.layoutBox),v2(x,v)||(f=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=x,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function v7(e){vc&&na.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function w7(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function b7(e){e.clearSnapshot()}function W_(e){e.clearMeasurements()}function k7(e){e.isLayoutDirty=!1}function S7(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function U_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function E7(e){e.resolveTargetDelta()}function C7(e){e.calcProjection()}function _7(e){e.resetSkewAndRotation()}function N7(e){e.removeLeadSnapshot()}function H_(e,t,n){e.translate=Jt(t.translate,0,n),e.scale=Jt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Y_(e,t,n,r){e.min=Jt(t.min,n.min,r),e.max=Jt(t.max,n.max,r)}function T7(e,t,n,r){Y_(e.x,t.x,n.x,r),Y_(e.y,t.y,n.y,r)}function A7(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const P7={duration:.45,ease:[.4,0,.1,1]},q_=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),G_=q_("applewebkit/")&&!q_("chrome/")?Math.round:Rr;function Z_(e){e.min=G_(e.min),e.max=G_(e.max)}function R7(e){Z_(e.x),Z_(e.y)}function k2(e,t,n){return e==="position"||e==="preserve-aspect"&&!DU(z_(t),z_(n),.2)}function M7(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const j7=b2({attachResizeListener:(e,t)=>Kc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Px={current:void 0},S2=b2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Px.current){const e=new j7({});e.mount(window),e.setOptions({layoutScroll:!0}),Px.current=e}return Px.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),D7={pan:{Feature:KU},drag:{Feature:ZU,ProjectionNode:S2,MeasureLayout:m2}};function K_(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Vt.postRender(()=>o(t,$d(t)))}class O7 extends Ds{mount(){const{current:t}=this.node;t&&(this.unmount=O9(t,n=>(K_(this.node,n,"Start"),r=>K_(this.node,r,"End"))))}unmount(){}}class I7 extends Ds{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Fd(Kc(this.node.current,"focus",()=>this.onFocus()),Kc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function X_(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Vt.postRender(()=>o(t,$d(t)))}class L7 extends Ds{mount(){const{current:t}=this.node;t&&(this.unmount=$9(t,n=>(X_(this.node,n,"Start"),(r,{success:i})=>X_(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const a0=new WeakMap,Rx=new WeakMap,F7=e=>{const t=a0.get(e.target);t&&t(e)},$7=e=>{e.forEach(F7)};function z7({root:e,...t}){const n=e||document;Rx.has(n)||Rx.set(n,{});const r=Rx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver($7,{root:e,...t})),r[i]}function B7(e,t,n){const r=z7(t);return a0.set(e,n),r.observe(e),()=>{a0.delete(e),r.unobserve(e)}}const V7={some:0,all:1};class W7 extends Ds{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:V7[i]},a=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),p=c?f:h;p&&p(u)};return B7(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(U7(t,n))&&this.startObserver()}unmount(){}}function U7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const H7={inView:{Feature:W7},tap:{Feature:L7},focus:{Feature:I7},hover:{Feature:O7}},Y7={layout:{ProjectionNode:S2,MeasureLayout:m2}},l0={current:null},E2={current:!1};function q7(){if(E2.current=!0,!!Rb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l0.current=e.matches;e.addListener(t),t()}else l0.current=!1}const G7=[...ZM,Un,Es],Z7=e=>G7.find(GM(e)),Q_=new WeakMap;function K7(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Hn(i))e.addValue(r,i);else if(Hn(o))e.addValue(r,Gc(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,Gc(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const J_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class X7{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=i1,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Vi.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Vt.render(this.render,!1,!0))};const{latestValues:u,renderState:c,onUpdate:f}=s;this.onUpdate=f,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=bm(n),this.isVariantNode=rM(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const x=p[m];u[m]!==void 0&&Hn(x)&&x.set(u[m],!1)}}mount(t){this.current=t,Q_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),E2.current||q7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:l0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Q_.delete(this.current),this.projection&&this.projection.unmount(),Ss(this.notifyUpdate),Ss(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=_a.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Vt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Il){const n=Il[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<J_.length;r++){const i=J_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=t[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=K7(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(YM(i)||LM(i))?i=parseFloat(i):!Z7(i)&&Es.test(n)&&(i=WM(t,n)),this.setBaseTarget(t,Hn(i)?i.get():i)),Hn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const s=Fb(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(i=s[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Hn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qb),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class C2 extends X7{constructor(){super(...arguments),this.KeyframeResolver=KM}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Hn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Q7(e){return window.getComputedStyle(e)}class J7 extends C2{constructor(){super(...arguments),this.type="html",this.renderInstance=fM}readValueFromInstance(t,n){if(_a.has(n)){const r=r1(n);return r&&r.default||0}else{const r=Q7(t),i=(uM(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return h2(t,n)}build(t,n,r){Bb(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Hb(t,n,r)}}class eH extends C2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_a.has(n)){const r=r1(n);return r&&r.default||0}return n=hM.has(n)?n:Ob(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gM(t,n,r)}build(t,n,r){Vb(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){pM(t,n,r,i)}mount(t){this.isSVGTag=Ub(t.tagName),super.mount(t)}}const tH=(e,t)=>Lb(e)?new eH(t):new J7(t,{allowProjection:e!==S.Fragment}),nH=T9({...CU,...H7,...D7,...Y7},tH),Em=W8(nH);function rH(e,t,n){let r=i=>e(i,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}function _2(e,t,n){let r=e.length-t.length;if(r===0)return e(...t);if(r===1)return rH(e,t,n);throw new Error("Wrong number of arguments")}function eN(...e){return _2(iH,e)}var iH=(e,t)=>e.length>=t;function tN(...e){return _2(oH,e)}function oH(e,t){if(!eN(t,1))return{...e};if(!eN(t,2)){let{[t[0]]:r,...i}=e;return i}let n={...e};for(let r of t)delete n[r];return n}const l1=ne.forwardRef((e,t)=>e.file.type.startsWith("image/")?y.jsx(N2,{...e,ref:t}):e.file.type.startsWith("text/")||e.file.name.endsWith(".txt")||e.file.name.endsWith(".md")?y.jsx(T2,{...e,ref:t}):y.jsx(A2,{...e,ref:t}));l1.displayName="FilePreview";const N2=ne.forwardRef(({file:e,onRemove:t},n)=>y.jsxs(Em.div,{ref:n,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:!0,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[y.jsxs("div",{className:"flex w-full items-center space-x-2",children:[y.jsx("img",{alt:`Attachment ${e.name}`,className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted object-cover",src:URL.createObjectURL(e)}),y.jsx("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?y.jsx("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:y.jsx(Ca,{className:"h-2.5 w-2.5"})}):null]}));N2.displayName="ImageFilePreview";const T2=ne.forwardRef(({file:e,onRemove:t},n)=>{const[r,i]=ne.useState("");return S.useEffect(()=>{const o=new FileReader;o.onload=s=>{var u;const a=(u=s.target)==null?void 0:u.result;i(a.slice(0,50)+(a.length>50?"...":""))},o.readAsText(e)},[e]),y.jsxs(Em.div,{ref:n,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:!0,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[y.jsxs("div",{className:"flex w-full items-center space-x-2",children:[y.jsx("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted p-0.5",children:y.jsx("div",{className:"h-full w-full overflow-hidden text-[6px] leading-none text-muted-foreground",children:r||"Loading..."})}),y.jsx("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?y.jsx("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:y.jsx(Ca,{className:"h-2.5 w-2.5"})}):null]})});T2.displayName="TextFilePreview";const A2=ne.forwardRef(({file:e,onRemove:t},n)=>y.jsxs(Em.div,{ref:n,className:"relative flex max-w-[200px] rounded-md border p-1.5 pr-2 text-xs",layout:!0,initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},children:[y.jsxs("div",{className:"flex w-full items-center space-x-2",children:[y.jsx("div",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-sm border bg-muted",children:y.jsx(oV,{className:"h-6 w-6 text-foreground"})}),y.jsx("span",{className:"w-full truncate text-muted-foreground",children:e.name})]}),t?y.jsx("button",{className:"absolute -right-2 -top-2 flex h-4 w-4 items-center justify-center rounded-full border bg-background",type:"button",onClick:t,"aria-label":"Remove attachment",children:y.jsx(Ca,{className:"h-2.5 w-2.5"})}):null]}));A2.displayName="GenericFilePreview";function sH({ref:e,maxHeight:t=Number.MAX_SAFE_INTEGER,borderWidth:n=0,dependencies:r}){const i=S.useRef(null);S.useLayoutEffect(()=>{if(!e.current)return;const o=e.current,s=n*2;i.current===null&&(i.current=o.scrollHeight-s),o.style.removeProperty("height");const a=o.scrollHeight,u=Math.min(a,t),c=Math.max(u,i.current);o.style.height=`${c+s}px`},[t,e,...r])}function P2({placeholder:e="Ask AI...",className:t,onKeyDown:n,submitOnEnter:r=!0,stop:i,isGenerating:o,...s}){var b;const[a,u]=S.useState(!1),c=E=>{s.allowAttachments&&s.setFiles(C=>C===null?E:E===null?C:[...C,...E])},f=E=>{s.allowAttachments===!0&&(E.preventDefault(),u(!0))},h=E=>{s.allowAttachments===!0&&(E.preventDefault(),u(!1))},p=E=>{if(u(!1),s.allowAttachments!==!0)return;E.preventDefault();const C=E.dataTransfer;C.files.length&&c(Array.from(C.files))},m=E=>{var P;const C=(P=E.clipboardData)==null?void 0:P.items;if(!C)return;const N=Array.from(C).map(T=>T.getAsFile()).filter(T=>T!==null);s.allowAttachments&&N.length>0&&c(N)},x=E=>{var C;r&&E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),(C=E.currentTarget.form)==null||C.requestSubmit()),n==null||n(E)},v=S.useRef(null),k=s.allowAttachments&&s.files&&s.files.length>0;return sH({ref:v,maxHeight:240,borderWidth:1,dependencies:[s.value,k]}),y.jsxs("div",{className:"relative flex w-full",onDragOver:f,onDragLeave:h,onDrop:p,children:[y.jsx("textarea",{"aria-label":"Write your prompt here",placeholder:e,ref:v,onPaste:m,onKeyDown:x,className:Te("w-full grow resize-none rounded-xl border border-input bg-transparent p-3 pr-24 text-sm ring-offset-background transition-[border] placeholder:text-muted-foreground focus-visible:border-primary focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",k&&"pb-16",t),...s.allowAttachments?tN(s,["allowAttachments","files","setFiles"]):tN(s,["allowAttachments"])}),s.allowAttachments&&y.jsx("div",{className:"absolute inset-x-3 bottom-0 overflow-x-scroll py-3",children:y.jsx("div",{className:"flex space-x-3",children:y.jsx(JR,{mode:"popLayout",children:(b=s.files)==null?void 0:b.map(E=>y.jsx(l1,{file:E,onRemove:()=>{s.setFiles(C=>{if(!C)return null;const N=Array.from(C).filter(P=>P!==E);return N.length===0?null:N})}},E.name+String(E.lastModified)))})})}),y.jsxs("div",{className:"absolute right-3 top-3 flex gap-2",children:[s.allowAttachments&&y.jsx(Mt,{type:"button",size:"icon",variant:"outline",className:"h-8 w-8","aria-label":"Attach a file",onClick:async()=>{const E=await lH();c(E)},children:y.jsx(xR,{className:"h-4 w-4"})}),o&&i?y.jsx(Mt,{type:"button",size:"icon",className:"h-8 w-8","aria-label":"Stop generating",onClick:i,children:y.jsx(uV,{className:"h-3 w-3 animate-pulse",fill:"currentColor"})}):y.jsx(Mt,{type:"submit",size:"icon",className:"h-8 w-8 transition-opacity","aria-label":"Send message",disabled:s.value===""||o,children:y.jsx(QB,{className:"h-5 w-5"})})]}),s.allowAttachments&&y.jsx(aH,{isDragging:a})]})}P2.displayName="MessageInput";function aH({isDragging:e}){return y.jsx(JR,{children:e&&y.jsxs(Em.div,{className:"pointer-events-none absolute inset-0 flex items-center justify-center space-x-2 rounded-xl border border-dashed border-border bg-background text-sm text-muted-foreground",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},"aria-hidden":!0,children:[y.jsx(xR,{className:"h-4 w-4"}),y.jsx("span",{children:"Drop your files here to attach them."})]})})}function lH(){const e=document.createElement("input");return e.type="file",e.multiple=!0,e.accept="*/*",e.click(),new Promise(t=>{e.onchange=n=>{const r=n.currentTarget.files;if(r){t(Array.from(r));return}t(null)}})}function uH(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const cH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fH={};function nN(e,t){return(fH.jsx?dH:cH).test(e)}const hH=/[ \t\n\f\r]/g;function pH(e){return typeof e=="object"?e.type==="text"?rN(e.value):!1:rN(e)}function rN(e){return e.replace(hH,"")===""}class zd{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}zd.prototype.property={};zd.prototype.normal={};zd.prototype.space=null;function R2(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new zd(n,r,t)}function u0(e){return e.toLowerCase()}class ii{constructor(t,n){this.property=t,this.attribute=n}}ii.prototype.space=null;ii.prototype.boolean=!1;ii.prototype.booleanish=!1;ii.prototype.overloadedBoolean=!1;ii.prototype.number=!1;ii.prototype.commaSeparated=!1;ii.prototype.spaceSeparated=!1;ii.prototype.commaOrSpaceSeparated=!1;ii.prototype.mustUseProperty=!1;ii.prototype.defined=!1;let mH=0;const at=Na(),fn=Na(),M2=Na(),Ce=Na(),It=Na(),Cl=Na(),Nr=Na();function Na(){return 2**++mH}const c0=Object.freeze(Object.defineProperty({__proto__:null,boolean:at,booleanish:fn,commaOrSpaceSeparated:Nr,commaSeparated:Cl,number:Ce,overloadedBoolean:M2,spaceSeparated:It},Symbol.toStringTag,{value:"Module"})),Mx=Object.keys(c0);class u1 extends ii{constructor(t,n,r,i){let o=-1;if(super(t,n),iN(this,"space",i),typeof r=="number")for(;++o<Mx.length;){const s=Mx[o];iN(this,Mx[o],(r&c0[s])===c0[s])}}}u1.prototype.defined=!0;function iN(e,t,n){n&&(e[t]=n)}const gH={}.hasOwnProperty;function du(e){const t={},n={};let r;for(r in e.properties)if(gH.call(e.properties,r)){const i=e.properties[r],o=new u1(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[u0(r)]=r,n[u0(o.attribute)]=r}return new zd(t,n,e.space)}const j2=du({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),D2=du({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function O2(e,t){return t in e?e[t]:t}function I2(e,t){return O2(e,t.toLowerCase())}const L2=du({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:I2,properties:{xmlns:null,xmlnsXLink:null}}),F2=du({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:fn,ariaAutoComplete:null,ariaBusy:fn,ariaChecked:fn,ariaColCount:Ce,ariaColIndex:Ce,ariaColSpan:Ce,ariaControls:It,ariaCurrent:null,ariaDescribedBy:It,ariaDetails:null,ariaDisabled:fn,ariaDropEffect:It,ariaErrorMessage:null,ariaExpanded:fn,ariaFlowTo:It,ariaGrabbed:fn,ariaHasPopup:null,ariaHidden:fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:It,ariaLevel:Ce,ariaLive:null,ariaModal:fn,ariaMultiLine:fn,ariaMultiSelectable:fn,ariaOrientation:null,ariaOwns:It,ariaPlaceholder:null,ariaPosInSet:Ce,ariaPressed:fn,ariaReadOnly:fn,ariaRelevant:null,ariaRequired:fn,ariaRoleDescription:It,ariaRowCount:Ce,ariaRowIndex:Ce,ariaRowSpan:Ce,ariaSelected:fn,ariaSetSize:Ce,ariaSort:null,ariaValueMax:Ce,ariaValueMin:Ce,ariaValueNow:Ce,ariaValueText:null,role:null}}),yH=du({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:I2,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cl,acceptCharset:It,accessKey:It,action:null,allow:null,allowFullScreen:at,allowPaymentRequest:at,allowUserMedia:at,alt:null,as:null,async:at,autoCapitalize:null,autoComplete:It,autoFocus:at,autoPlay:at,blocking:It,capture:null,charSet:null,checked:at,cite:null,className:It,cols:Ce,colSpan:null,content:null,contentEditable:fn,controls:at,controlsList:It,coords:Ce|Cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:at,defer:at,dir:null,dirName:null,disabled:at,download:M2,draggable:fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:at,formTarget:null,headers:It,height:Ce,hidden:at,high:Ce,href:null,hrefLang:null,htmlFor:It,httpEquiv:It,id:null,imageSizes:null,imageSrcSet:null,inert:at,inputMode:null,integrity:null,is:null,isMap:at,itemId:null,itemProp:It,itemRef:It,itemScope:at,itemType:It,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:at,low:Ce,manifest:null,max:null,maxLength:Ce,media:null,method:null,min:null,minLength:Ce,multiple:at,muted:at,name:null,nonce:null,noModule:at,noValidate:at,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:at,optimum:Ce,pattern:null,ping:It,placeholder:null,playsInline:at,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:at,referrerPolicy:null,rel:It,required:at,reversed:at,rows:Ce,rowSpan:Ce,sandbox:It,scope:null,scoped:at,seamless:at,selected:at,shadowRootClonable:at,shadowRootDelegatesFocus:at,shadowRootMode:null,shape:null,size:Ce,sizes:null,slot:null,span:Ce,spellCheck:fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ce,step:null,style:null,tabIndex:Ce,target:null,title:null,translate:null,type:null,typeMustMatch:at,useMap:null,value:fn,width:Ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:It,axis:null,background:null,bgColor:null,border:Ce,borderColor:null,bottomMargin:Ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:at,declare:at,event:null,face:null,frame:null,frameBorder:null,hSpace:Ce,leftMargin:Ce,link:null,longDesc:null,lowSrc:null,marginHeight:Ce,marginWidth:Ce,noResize:at,noHref:at,noShade:at,noWrap:at,object:null,profile:null,prompt:null,rev:null,rightMargin:Ce,rules:null,scheme:null,scrolling:fn,standby:null,summary:null,text:null,topMargin:Ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:at,disableRemotePlayback:at,prefix:null,property:null,results:Ce,security:null,unselectable:null}}),xH=du({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:O2,properties:{about:Nr,accentHeight:Ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ce,amplitude:Ce,arabicForm:null,ascent:Ce,attributeName:null,attributeType:null,azimuth:Ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ce,by:null,calcMode:null,capHeight:Ce,className:It,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:Ce,diffuseConstant:Ce,direction:null,display:null,dur:null,divisor:Ce,dominantBaseline:null,download:at,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ce,enableBackground:null,end:null,event:null,exponent:Ce,externalResourcesRequired:null,fill:null,fillOpacity:Ce,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:Cl,g2:Cl,glyphName:Cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ce,horizOriginX:Ce,horizOriginY:Ce,id:null,ideographic:Ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ce,k:Ce,k1:Ce,k2:Ce,k3:Ce,k4:Ce,kernelMatrix:Nr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ce,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:Ce,overlineThickness:Ce,paintOrder:null,panose1:null,path:null,pathLength:Ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:It,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ce,pointsAtY:Ce,pointsAtZ:Ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nr,rev:Nr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nr,requiredFeatures:Nr,requiredFonts:Nr,requiredFormats:Nr,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:Ce,specularExponent:Ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ce,strikethroughThickness:Ce,string:null,stroke:null,strokeDashArray:Nr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ce,strokeOpacity:Ce,strokeWidth:null,style:null,surfaceScale:Ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nr,tabIndex:Ce,tableValues:null,target:null,targetX:Ce,targetY:Ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ce,underlineThickness:Ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ce,values:null,vAlphabetic:Ce,vMathematical:Ce,vectorEffect:null,vHanging:Ce,vIdeographic:Ce,version:null,vertAdvY:Ce,vertOriginX:Ce,vertOriginY:Ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),vH=/^data[-\w.:]+$/i,oN=/-[a-z]/g,wH=/[A-Z]/g;function bH(e,t){const n=u0(t);let r=t,i=ii;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vH.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(oN,SH);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!oN.test(o)){let s=o.replace(wH,kH);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=u1}return new i(r,t)}function kH(e){return"-"+e.toLowerCase()}function SH(e){return e.charAt(1).toUpperCase()}const EH={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"},CH=R2([D2,j2,L2,F2,yH],"html"),c1=R2([D2,j2,L2,F2,xH],"svg");function _H(e){return e.join(" ").trim()}var ac={},jx,sN;function NH(){if(sN)return jx;sN=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
|
|
214
|
+
`,c="/",f="*",h="",p="comment",m="declaration";jx=function(v,k){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];k=k||{};var b=1,E=1;function C(Y){var O=Y.match(t);O&&(b+=O.length);var q=Y.lastIndexOf(u);E=~q?Y.length-q:E+Y.length}function N(){var Y={line:b,column:E};return function(O){return O.position=new P(Y),R(),O}}function P(Y){this.start=Y,this.end={line:b,column:E},this.source=k.source}P.prototype.content=v;function T(Y){var O=new Error(k.source+":"+b+":"+E+": "+Y);if(O.reason=Y,O.filename=k.source,O.line=b,O.column=E,O.source=v,!k.silent)throw O}function j(Y){var O=Y.exec(v);if(O){var q=O[0];return C(q),v=v.slice(q.length),O}}function R(){j(n)}function I(Y){var O;for(Y=Y||[];O=M();)O!==!1&&Y.push(O);return Y}function M(){var Y=N();if(!(c!=v.charAt(0)||f!=v.charAt(1))){for(var O=2;h!=v.charAt(O)&&(f!=v.charAt(O)||c!=v.charAt(O+1));)++O;if(O+=2,h===v.charAt(O-1))return T("End of comment missing");var q=v.slice(2,O-2);return E+=2,C(q),v=v.slice(O),E+=2,Y({type:p,comment:q})}}function z(){var Y=N(),O=j(r);if(O){if(M(),!j(i))return T("property missing ':'");var q=j(o),W=Y({type:m,property:x(O[0].replace(e,h)),value:q?x(q[0].replace(e,h)):h});return j(s),W}}function F(){var Y=[];I(Y);for(var O;O=z();)O!==!1&&(Y.push(O),I(Y));return Y}return R(),F()};function x(v){return v?v.replace(a,h):h}return jx}var aN;function TH(){if(aN)return ac;aN=1;var e=ac.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ac,"__esModule",{value:!0}),ac.default=n;var t=e(NH());function n(r,i){var o=null;if(!r||typeof r!="string")return o;var s=(0,t.default)(r),a=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,f=u.value;a?i(c,f,u):f&&(o=o||{},o[c]=f)}}),o}return ac}var AH=TH();const lN=tu(AH),PH=lN.default||lN,$2=z2("end"),d1=z2("start");function z2(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 RH(e){const t=d1(e),n=$2(e);if(t&&n)return{start:t,end:n}}function Mc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?uN(e.position):"start"in e||"end"in e?uN(e):"line"in e||"column"in e?d0(e):""}function d0(e){return cN(e&&e.line)+":"+cN(e&&e.column)}function uN(e){return d0(e&&e.start)+"-"+d0(e&&e.end)}function cN(e){return e&&typeof e=="number"?e:1}class Zn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Mc(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Zn.prototype.file="";Zn.prototype.name="";Zn.prototype.reason="";Zn.prototype.message="";Zn.prototype.stack="";Zn.prototype.column=void 0;Zn.prototype.line=void 0;Zn.prototype.ancestors=void 0;Zn.prototype.cause=void 0;Zn.prototype.fatal=void 0;Zn.prototype.place=void 0;Zn.prototype.ruleId=void 0;Zn.prototype.source=void 0;const f1={}.hasOwnProperty,MH=new Map,jH=/[A-Z]/g,DH=/-([a-z])/g,OH=new Set(["table","tbody","thead","tfoot","tr"]),IH=new Set(["td","th"]),B2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function LH(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=HH(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=UH(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"?c1:CH,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=V2(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function V2(e,t,n){if(t.type==="element")return FH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $H(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return BH(e,t,n);if(t.type==="mdxjsEsm")return zH(e,t);if(t.type==="root")return VH(e,t,n);if(t.type==="text")return WH(e,t)}function FH(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=c1,e.schema=i),e.ancestors.push(t);const o=U2(e,t.tagName,!1),s=YH(e,t);let a=p1(e,t);return OH.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!pH(u):!0})),W2(e,s,o,t),h1(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function $H(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)}Xc(e,t.position)}function zH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xc(e,t.position)}function BH(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=c1,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:U2(e,t.name,!0),s=qH(e,t),a=p1(e,t);return W2(e,s,o,t),h1(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function VH(e,t,n){const r={};return h1(r,p1(e,t)),e.create(t,e.Fragment,r,n)}function WH(e,t){return t.value}function W2(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function h1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function UH(e,t,n){return r;function r(i,o,s,a){const c=Array.isArray(s.children)?n:t;return a?c(o,s,a):c(o,s)}}function HH(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),u=d1(r);return t(i,o,s,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function YH(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&f1.call(t.properties,i)){const o=GH(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&IH.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qH(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xc(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Xc(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function p1(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:MH;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const a=V2(e,o,s);a!==void 0&&n.push(a)}return n}function GH(e,t,n){const r=bH(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?uH(n):_H(n)),r.property==="style"){let i=typeof n=="object"?n:ZH(e,String(n));return e.stylePropertyNameCase==="css"&&(i=KH(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?EH[r.property]||r.property:r.attribute,n]}}function ZH(e,t){const n={};try{PH(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,s=new Zn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=B2+"#cannot-parse-style-attribute",s}}return n;function r(i,o){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(DH,QH)),n[s]=o}}function U2(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=nN(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=nN(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return f1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xc(e)}function Xc(e,t){const n=new Zn("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=B2+"#cannot-handle-mdx-estrees-without-createevaluater",n}function KH(e){const t={};let n;for(n in e)f1.call(e,n)&&(t[XH(n)]=e[n]);return t}function XH(e){let t=e.replace(jH,JH);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function QH(e,t){return t.toUpperCase()}function JH(e){return"-"+e.toLowerCase()}const Dx={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"]},eY={};function m1(e,t){const n=eY,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return H2(e,r,i)}function H2(e,t,n){if(tY(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 dN(e.children,t,n)}return Array.isArray(e)?dN(e,t,n):""}function dN(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=H2(e[i],t,n);return r.join("")}function tY(e){return!!(e&&typeof e=="object")}const fN=document.createElement("i");function g1(e){const t="&"+e+";";fN.innerHTML=t;const n=fN.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Mr(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Mr(e,e.length,0,t),e):t}const hN={}.hasOwnProperty;function Y2(e){const t={};let n=-1;for(;++n<e.length;)nY(t,e[n]);return t}function nY(e,t){let n;for(n in t){const i=(hN.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){hN.call(i,s)||(i[s]=[]);const a=o[s];rY(i[s],Array.isArray(a)?a:a?[a]:[])}}}function rY(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Mr(e,0,0,r)}function q2(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 wi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const or=Os(/[A-Za-z]/),Yn=Os(/[\dA-Za-z]/),iY=Os(/[#-'*+\--9=?A-Z^-~]/);function Sp(e){return e!==null&&(e<32||e===127)}const f0=Os(/\d/),oY=Os(/[\dA-Fa-f]/),sY=Os(/[!-/:-@[-`{-~]/);function Ze(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function gt(e){return e===-2||e===-1||e===32}const Cm=Os(new RegExp("\\p{P}|\\p{S}","u")),pa=Os(/\s/);function Os(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function fu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Yn(e.charCodeAt(n+1))&&Yn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function vt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(u){return gt(u)?(e.enter(n),a(u)):t(u)}function a(u){return gt(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const aY={tokenize:lY};function lY(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),vt(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return Ze(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const uY={tokenize:cY},pN={tokenize:dY};function cY(e){const t=this,n=[];let r=0,i,o,s;return a;function a(C){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,u,c)(C)}return c(C)}function u(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const N=t.events.length;let P=N,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){T=t.events[P][1].end;break}b(r);let j=N;for(;j<t.events.length;)t.events[j][1].end={...T},j++;return Mr(t.events,P+1,0,t.events.slice(N)),t.events.length=j,c(C)}return a(C)}function c(C){if(r===n.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return x(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pN,f,h)(C)}function f(C){return i&&E(),b(r),p(C)}function h(C){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,x(C)}function p(C){return t.containerState={},e.attempt(pN,m,x)(C)}function m(C){return r++,n.push([t.currentConstruct,t.containerState]),p(C)}function x(C){if(C===null){i&&E(),b(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(C)}function v(C){if(C===null){k(e.exit("chunkFlow"),!0),b(0),e.consume(C);return}return Ze(C)?(e.consume(C),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(C),v)}function k(C,N){const P=t.sliceStream(C);if(N&&P.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(P),t.parser.lazy[C.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<s&&(!i.events[T][1].end||i.events[T][1].end.offset>s))return;const j=t.events.length;let R=j,I,M;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(I){M=t.events[R][1].end;break}I=!0}for(b(r),T=j;T<t.events.length;)t.events[T][1].end={...M},T++;Mr(t.events,R+1,0,t.events.slice(j)),t.events.length=T}}function b(C){let N=n.length;for(;N-- >C;){const P=n[N];t.containerState=P[1],P[0].exit.call(t,e)}n.length=C}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dY(e,t,n){return vt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fl(e){if(e===null||jt(e)||pa(e))return 1;if(Cm(e))return 2}function _m(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const h0={name:"attention",resolveAll:fY,tokenize:hY};function fY(e,t){let n=-1,r,i,o,s,a,u,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};mN(h,-u),mN(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Xr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Xr(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),c=Xr(c,_m(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Xr(c,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=Xr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Mr(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function hY(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fl(r);let o;return s;function s(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const c=e.exit("attentionSequence"),f=Fl(u),h=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return c._open=!!(o===42?h:h&&(i||!p)),c._close=!!(o===42?p:p&&(f||!h)),t(u)}}function mN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pY={name:"autolink",tokenize:mY};function mY(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return or(m)?(e.consume(m),s):m===64?n(m):c(m)}function s(m){return m===43||m===45||m===46||Yn(m)?(r=1,a(m)):c(m)}function a(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||Yn(m))&&r++<32?(e.consume(m),a):(r=0,c(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Sp(m)?n(m):(e.consume(m),u)}function c(m){return m===64?(e.consume(m),f):iY(m)?(e.consume(m),c):n(m)}function f(m){return Yn(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,f):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||Yn(m))&&r++<63){const x=m===45?p:h;return e.consume(m),x}return n(m)}}const Bd={partial:!0,tokenize:gY};function gY(e,t,n){return r;function r(o){return gt(o)?vt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ze(o)?t(o):n(o)}}const G2={continuation:{tokenize:xY},exit:vY,name:"blockQuote",tokenize:yY};function yY(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return gt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function xY(e,t,n){const r=this;return i;function i(s){return gt(s)?vt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(G2,t,n)(s)}}function vY(e){e.exit("blockQuote")}const Z2={name:"characterEscape",tokenize:wY};function wY(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return sY(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const K2={name:"characterReference",tokenize:bY};function bY(e,t,n){const r=this;let i=0,o,s;return a;function a(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"),o=31,s=Yn,f(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=oY,f):(e.enter("characterReferenceValue"),o=7,s=f0,f(h))}function f(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return s===Yn&&!g1(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<o?(e.consume(h),f):n(h)}}const gN={partial:!0,tokenize:SY},yN={concrete:!0,name:"codeFenced",tokenize:kY};function kY(e,t,n){const r=this,i={partial:!0,tokenize:P};let o=0,s=0,a;return u;function u(T){return c(T)}function c(T){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,a=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(T)}function f(T){return T===a?(s++,e.consume(T),f):s<3?n(T):(e.exit("codeFencedFenceSequence"),gt(T)?vt(e,h,"whitespace")(T):h(T))}function h(T){return T===null||Ze(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(gN,v,N)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===null||Ze(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(T)):gt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),vt(e,m,"whitespace")(T)):T===96&&T===a?n(T):(e.consume(T),p)}function m(T){return T===null||Ze(T)?h(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(T))}function x(T){return T===null||Ze(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(T)):T===96&&T===a?n(T):(e.consume(T),x)}function v(T){return e.attempt(i,N,k)(T)}function k(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),b}function b(T){return o>0&>(T)?vt(e,E,"linePrefix",o+1)(T):E(T)}function E(T){return T===null||Ze(T)?e.check(gN,v,N)(T):(e.enter("codeFlowValue"),C(T))}function C(T){return T===null||Ze(T)?(e.exit("codeFlowValue"),E(T)):(e.consume(T),C)}function N(T){return e.exit("codeFenced"),t(T)}function P(T,j,R){let I=0;return M;function M(q){return T.enter("lineEnding"),T.consume(q),T.exit("lineEnding"),z}function z(q){return T.enter("codeFencedFence"),gt(q)?vt(T,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):F(q)}function F(q){return q===a?(T.enter("codeFencedFenceSequence"),Y(q)):R(q)}function Y(q){return q===a?(I++,T.consume(q),Y):I>=s?(T.exit("codeFencedFenceSequence"),gt(q)?vt(T,O,"whitespace")(q):O(q)):R(q)}function O(q){return q===null||Ze(q)?(T.exit("codeFencedFence"),j(q)):R(q)}}}function SY(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ox={name:"codeIndented",tokenize:CY},EY={partial:!0,tokenize:_Y};function CY(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),vt(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):Ze(c)?e.attempt(EY,s,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||Ze(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),t(c)}}function _Y(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):vt(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):Ze(s)?i(s):n(s)}}const NY={name:"codeText",previous:AY,resolve:TY,tokenize:PY};function TY(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 AY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PY(e,t,n){let r=0,i,o;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(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?(o=e.enter("codeTextSequence"),i=0,f(h)):Ze(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||Ze(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),c)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",c(h))}}class RY{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&lc(this.left,r),o.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),lc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),lc(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);lc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);lc(this.left,n.reverse())}}}function lc(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 X2(e){const t={};let n=-1,r,i,o,s,a,u,c;const f=new RY(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,MY(f,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=f.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(s[1].type!=="linePrefix")break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return Mr(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function MY(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,u=[],c={};let f,h,p=-1,m=n,x=0,v=0;const k=[v];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(null),h&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(v=p+1,k.push(v),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):k.pop(),p=k.length;p--;){const b=a.slice(k[p],k[p+1]),E=o.pop();u.push([E,E+b.length-1]),e.splice(E,2,b)}for(u.reverse(),p=-1;++p<u.length;)c[x+u[p][0]]=x+u[p][1],x+=u[p][1]-u[p][0]-1;return c}const jY={resolve:OY,tokenize:IY},DY={partial:!0,tokenize:LY};function OY(e){return X2(e),e}function IY(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):Ze(a)?e.check(DY,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function LY(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),vt(e,o,"linePrefix")}function o(s){if(s===null||Ze(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Q2(e,t,n,r,i,o,s,a,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return h;function h(b){return b===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(b),e.exit(o),p):b===null||b===32||b===41||Sp(b)?n(b):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),v(b))}function p(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(a),p(b)):b===null||b===60||Ze(b)?n(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function v(b){return!f&&(b===null||b===41||jt(b))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(b)):f<c&&b===40?(e.consume(b),f++,v):b===41?(e.consume(b),f--,v):b===null||b===32||b===40||Sp(b)?n(b):(e.consume(b),b===92?k:v)}function k(b){return b===40||b===41||b===92?(e.consume(b),v):v(b)}}function J2(e,t,n,r,i,o){const s=this;let a=0,u;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(o),f}function f(m){return a>999||m===null||m===91||m===93&&!u||m===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):Ze(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||Ze(m)||a++>999?(e.exit("chunkString"),f(m)):(e.consume(m),u||(u=!gt(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,h):h(m)}}function ej(e,t,n,r,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),c(p))}function c(p){return p===s?(e.exit(o),u(s)):p===null?n(p):Ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),vt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||Ze(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?h:f)}function h(p){return p===s||p===92?(e.consume(p),f):f(p)}}function jc(e,t){let n;return r;function r(i){return Ze(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):gt(i)?vt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const FY={name:"definition",tokenize:zY},$Y={partial:!0,tokenize:BY};function zY(e,t,n){const r=this;let i;return o;function o(m){return e.enter("definition"),s(m)}function s(m){return J2.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function a(m){return i=wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return jt(m)?jc(e,c)(m):c(m)}function c(m){return Q2(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt($Y,h,h)(m)}function h(m){return gt(m)?vt(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Ze(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function BY(e,t,n){return r;function r(a){return jt(a)?jc(e,i)(a):n(a)}function i(a){return ej(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return gt(a)?vt(e,s,"whitespace")(a):s(a)}function s(a){return a===null||Ze(a)?t(a):n(a)}}const VY={name:"hardBreakEscape",tokenize:WY};function WY(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Ze(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const UY={name:"headingAtx",resolve:HY,tokenize:YY};function HY(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Mr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function YY(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||jt(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||Ze(f)?(e.exit("atxHeading"),t(f)):gt(f)?vt(e,a,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function c(f){return f===null||f===35||jt(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),c)}}const qY=["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"],xN=["pre","script","style","textarea"],GY={concrete:!0,name:"htmlFlow",resolveTo:XY,tokenize:QY},ZY={partial:!0,tokenize:eq},KY={partial:!0,tokenize:JY};function XY(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 QY(e,t,n){const r=this;let i,o,s,a,u;return c;function c(D){return f(D)}function f(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),h}function h(D){return D===33?(e.consume(D),p):D===47?(e.consume(D),o=!0,v):D===63?(e.consume(D),i=3,r.interrupt?t:L):or(D)?(e.consume(D),s=String.fromCharCode(D),k):n(D)}function p(D){return D===45?(e.consume(D),i=2,m):D===91?(e.consume(D),i=5,a=0,x):or(D)?(e.consume(D),i=4,r.interrupt?t:L):n(D)}function m(D){return D===45?(e.consume(D),r.interrupt?t:L):n(D)}function x(D){const G="CDATA[";return D===G.charCodeAt(a++)?(e.consume(D),a===G.length?r.interrupt?t:F:x):n(D)}function v(D){return or(D)?(e.consume(D),s=String.fromCharCode(D),k):n(D)}function k(D){if(D===null||D===47||D===62||jt(D)){const G=D===47,K=s.toLowerCase();return!G&&!o&&xN.includes(K)?(i=1,r.interrupt?t(D):F(D)):qY.includes(s.toLowerCase())?(i=6,G?(e.consume(D),b):r.interrupt?t(D):F(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?E(D):C(D))}return D===45||Yn(D)?(e.consume(D),s+=String.fromCharCode(D),k):n(D)}function b(D){return D===62?(e.consume(D),r.interrupt?t:F):n(D)}function E(D){return gt(D)?(e.consume(D),E):M(D)}function C(D){return D===47?(e.consume(D),M):D===58||D===95||or(D)?(e.consume(D),N):gt(D)?(e.consume(D),C):M(D)}function N(D){return D===45||D===46||D===58||D===95||Yn(D)?(e.consume(D),N):P(D)}function P(D){return D===61?(e.consume(D),T):gt(D)?(e.consume(D),P):C(D)}function T(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),u=D,j):gt(D)?(e.consume(D),T):R(D)}function j(D){return D===u?(e.consume(D),u=null,I):D===null||Ze(D)?n(D):(e.consume(D),j)}function R(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||jt(D)?P(D):(e.consume(D),R)}function I(D){return D===47||D===62||gt(D)?C(D):n(D)}function M(D){return D===62?(e.consume(D),z):n(D)}function z(D){return D===null||Ze(D)?F(D):gt(D)?(e.consume(D),z):n(D)}function F(D){return D===45&&i===2?(e.consume(D),W):D===60&&i===1?(e.consume(D),Z):D===62&&i===4?(e.consume(D),H):D===63&&i===3?(e.consume(D),L):D===93&&i===5?(e.consume(D),B):Ze(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ZY,V,Y)(D)):D===null||Ze(D)?(e.exit("htmlFlowData"),Y(D)):(e.consume(D),F)}function Y(D){return e.check(KY,O,V)(D)}function O(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return D===null||Ze(D)?Y(D):(e.enter("htmlFlowData"),F(D))}function W(D){return D===45?(e.consume(D),L):F(D)}function Z(D){return D===47?(e.consume(D),s="",U):F(D)}function U(D){if(D===62){const G=s.toLowerCase();return xN.includes(G)?(e.consume(D),H):F(D)}return or(D)&&s.length<8?(e.consume(D),s+=String.fromCharCode(D),U):F(D)}function B(D){return D===93?(e.consume(D),L):F(D)}function L(D){return D===62?(e.consume(D),H):D===45&&i===2?(e.consume(D),L):F(D)}function H(D){return D===null||Ze(D)?(e.exit("htmlFlowData"),V(D)):(e.consume(D),H)}function V(D){return e.exit("htmlFlow"),t(D)}}function JY(e,t,n){const r=this;return i;function i(s){return Ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function eq(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Bd,t,n)}}const tq={name:"htmlText",tokenize:nq};function nq(e,t,n){const r=this;let i,o,s;return a;function a(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),u}function u(L){return L===33?(e.consume(L),c):L===47?(e.consume(L),P):L===63?(e.consume(L),C):or(L)?(e.consume(L),R):n(L)}function c(L){return L===45?(e.consume(L),f):L===91?(e.consume(L),o=0,x):or(L)?(e.consume(L),E):n(L)}function f(L){return L===45?(e.consume(L),m):n(L)}function h(L){return L===null?n(L):L===45?(e.consume(L),p):Ze(L)?(s=h,Z(L)):(e.consume(L),h)}function p(L){return L===45?(e.consume(L),m):h(L)}function m(L){return L===62?W(L):L===45?p(L):h(L)}function x(L){const H="CDATA[";return L===H.charCodeAt(o++)?(e.consume(L),o===H.length?v:x):n(L)}function v(L){return L===null?n(L):L===93?(e.consume(L),k):Ze(L)?(s=v,Z(L)):(e.consume(L),v)}function k(L){return L===93?(e.consume(L),b):v(L)}function b(L){return L===62?W(L):L===93?(e.consume(L),b):v(L)}function E(L){return L===null||L===62?W(L):Ze(L)?(s=E,Z(L)):(e.consume(L),E)}function C(L){return L===null?n(L):L===63?(e.consume(L),N):Ze(L)?(s=C,Z(L)):(e.consume(L),C)}function N(L){return L===62?W(L):C(L)}function P(L){return or(L)?(e.consume(L),T):n(L)}function T(L){return L===45||Yn(L)?(e.consume(L),T):j(L)}function j(L){return Ze(L)?(s=j,Z(L)):gt(L)?(e.consume(L),j):W(L)}function R(L){return L===45||Yn(L)?(e.consume(L),R):L===47||L===62||jt(L)?I(L):n(L)}function I(L){return L===47?(e.consume(L),W):L===58||L===95||or(L)?(e.consume(L),M):Ze(L)?(s=I,Z(L)):gt(L)?(e.consume(L),I):W(L)}function M(L){return L===45||L===46||L===58||L===95||Yn(L)?(e.consume(L),M):z(L)}function z(L){return L===61?(e.consume(L),F):Ze(L)?(s=z,Z(L)):gt(L)?(e.consume(L),z):I(L)}function F(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,Y):Ze(L)?(s=F,Z(L)):gt(L)?(e.consume(L),F):(e.consume(L),O)}function Y(L){return L===i?(e.consume(L),i=void 0,q):L===null?n(L):Ze(L)?(s=Y,Z(L)):(e.consume(L),Y)}function O(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||jt(L)?I(L):(e.consume(L),O)}function q(L){return L===47||L===62||jt(L)?I(L):n(L)}function W(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),U}function U(L){return gt(L)?vt(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),s(L)}}const y1={name:"labelEnd",resolveAll:sq,resolveTo:aq,tokenize:lq},rq={tokenize:uq},iq={tokenize:cq},oq={tokenize:dq};function sq(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&&Mr(e,0,e.length,n),e}function aq(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",u,t],["enter",c,t]],a=Xr(a,e.slice(o+1,o+r+3)),a=Xr(a,[["enter",f,t]]),a=Xr(a,_m(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=Xr(a,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),a=Xr(a,e.slice(s+1)),a=Xr(a,[["exit",u,t]]),Mr(e,o,e.length,a),e}function lq(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?h(p):(s=r.parser.defined.includes(wi(r.sliceSerialize({start:o.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(rq,f,s?f:h)(p):p===91?e.attempt(iq,f,s?c:h)(p):s?f(p):h(p)}function c(p){return e.attempt(oq,f,h)(p)}function f(p){return t(p)}function h(p){return o._balanced=!0,n(p)}}function uq(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 jt(h)?jc(e,o)(h):o(h)}function o(h){return h===41?f(h):Q2(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return jt(h)?jc(e,u)(h):f(h)}function a(h){return n(h)}function u(h){return h===34||h===39||h===40?ej(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function c(h){return jt(h)?jc(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function cq(e,t,n){const r=this;return i;function i(a){return J2.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function dq(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const fq={name:"labelStartImage",resolveAll:y1.resolveAll,tokenize:hq};function hq(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const pq={name:"labelStartLink",resolveAll:y1.resolveAll,tokenize:mq};function mq(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ix={name:"lineEnding",tokenize:gq};function gq(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),vt(e,t,"linePrefix")}}const np={name:"thematicBreak",tokenize:yq};function yq(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||Ze(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),gt(c)?vt(e,a,"whitespace")(c):a(c))}}const gr={continuation:{tokenize:bq},exit:Sq,name:"list",tokenize:wq},xq={partial:!0,tokenize:Eq},vq={partial:!0,tokenize:kq};function wq(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(m){const x=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:f0(m)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(np,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return f0(m)&&++s<10?(e.consume(m),u):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Bd,r.interrupt?n:f,e.attempt(xq,p,h))}function f(m){return r.containerState.initialBlankLine=!0,o++,p(m)}function h(m){return gt(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function bq(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bd,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,vt(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!gt(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(vq,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,vt(e,e.attempt(gr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function kq(e,t,n){const r=this;return vt(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Sq(e){e.exit(this.containerState.type)}function Eq(e,t,n){const r=this;return vt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!gt(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const vN={name:"setextUnderline",resolveTo:Cq,tokenize:_q};function Cq(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function _q(e,t,n){const r=this;let i;return o;function o(c){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),gt(c)?vt(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Ze(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Nq={tokenize:Tq};function Tq(e){const t=this,n=e.attempt(Bd,r,e.attempt(this.parser.constructs.flowInitial,i,vt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(jY,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Aq={resolveAll:nj()},Pq=tj("string"),Rq=tj("text");function tj(e){return{resolveAll:nj(e==="text"?Mq:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(f){return c(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return c(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function c(f){if(f===null)return!0;const h=i[f];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function nj(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Mq(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,u;for(;o--;){const c=i[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)u=!0,a++;else if(c!==-1){o++;break}}if(a){const c={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const jq={42:gr,43:gr,45:gr,48:gr,49:gr,50:gr,51:gr,52:gr,53:gr,54:gr,55:gr,56:gr,57:gr,62:G2},Dq={91:FY},Oq={[-2]:Ox,[-1]:Ox,32:Ox},Iq={35:UY,42:np,45:[vN,np],60:GY,61:vN,95:np,96:yN,126:yN},Lq={38:K2,92:Z2},Fq={[-5]:Ix,[-4]:Ix,[-3]:Ix,33:fq,38:K2,42:h0,60:[pY,tq],91:pq,92:[VY,Z2],93:y1,95:h0,96:NY},$q={null:[h0,Aq]},zq={null:[42,95]},Bq={null:[]},Vq=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:zq,contentInitial:Dq,disable:Bq,document:jq,flow:Iq,flowInitial:Oq,insideSpan:$q,string:Lq,text:Fq},Symbol.toStringTag,{value:"Module"}));function Wq(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={},o=[];let s=[],a=[];const u={attempt:j(P),check:j(T),consume:E,enter:C,exit:N,interrupt:j(T,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let f=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function h(z){return s=Xr(s,z),k(),s[s.length-1]!==null?[]:(R(t,0),c.events=_m(o,c.events,c),c.events)}function p(z,F){return Hq(m(z),F)}function m(z){return Uq(s,z)}function x(){const{_bufferIndex:z,_index:F,line:Y,column:O,offset:q}=r;return{_bufferIndex:z,_index:F,line:Y,column:O,offset:q}}function v(z){i[z.line]=z.column,M()}function k(){let z;for(;r._index<s.length;){const F=s[r._index];if(typeof F=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<F.length;)b(F.charCodeAt(r._bufferIndex));else b(F)}}function b(z){f=f(z)}function E(z){Ze(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,M()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=z}function C(z,F){const Y=F||{};return Y.type=z,Y.start=x(),c.events.push(["enter",Y,c]),a.push(Y),Y}function N(z){const F=a.pop();return F.end=x(),c.events.push(["exit",F,c]),F}function P(z,F){R(z,F.from)}function T(z,F){F.restore()}function j(z,F){return Y;function Y(O,q,W){let Z,U,B,L;return Array.isArray(O)?V(O):"tokenize"in O?V([O]):H(O);function H(J){return ee;function ee(ie){const ce=ie!==null&&J[ie],he=ie!==null&&J.null,Ee=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(he)?he:he?[he]:[]];return V(Ee)(ie)}}function V(J){return Z=J,U=0,J.length===0?W:D(J[U])}function D(J){return ee;function ee(ie){return L=I(),B=J,J.partial||(c.currentConstruct=J),J.name&&c.parser.constructs.disable.null.includes(J.name)?K():J.tokenize.call(F?Object.assign(Object.create(c),F):c,u,G,K)(ie)}}function G(J){return z(B,L),q}function K(J){return L.restore(),++U<Z.length?D(Z[U]):W}}}function R(z,F){z.resolveAll&&!o.includes(z)&&o.push(z),z.resolve&&Mr(c.events,F,c.events.length-F,z.resolve(c.events.slice(F),c)),z.resolveTo&&(c.events=z.resolveTo(c.events,c))}function I(){const z=x(),F=c.previous,Y=c.currentConstruct,O=c.events.length,q=Array.from(a);return{from:O,restore:W};function W(){r=z,c.previous=F,c.currentConstruct=Y,c.events.length=O,a=q,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Uq(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Hq(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
215
|
+
`;break}case-3:{s=`\r
|
|
216
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Yq(e){const r={constructs:Y2([Vq,...(e||{}).extensions||[]]),content:i(aY),defined:[],document:i(uY),flow:i(Nq),lazy:{},string:i(Pq),text:i(Rq)};return r;function i(o){return s;function s(a){return Wq(r,o,a)}}}function qq(e){for(;!X2(e););return e}const wN=/[\0\t\n\r]/g;function Gq(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const u=[];let c,f,h,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(wN.lastIndex=h,c=wN.exec(o),p=c&&c.index!==void 0?c.index:o.length,m=o.charCodeAt(p),!c){t=o.slice(h);break}if(m===10&&h===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<p&&(u.push(o.slice(h,p)),e+=p-h),m){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Zq=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kq(e){return e.replace(Zq,Xq)}function Xq(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return q2(n.slice(o?2:1),o?16:10)}return g1(n)||e}const rj={}.hasOwnProperty;function Qq(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Jq(n)(qq(Yq(n).document().write(Gq()(e,t,!0))))}function Jq(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(oe),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(Ve),blockQuote:o(he),characterEscape:I,characterReference:I,codeFenced:o(Ee),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Ee,s),codeText:o(fe,s),codeTextData:I,data:I,codeFlowValue:I,definition:o(xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Me),hardBreakEscape:o(ot),hardBreakTrailing:o(ot),htmlFlow:o(_t,s),htmlFlowData:I,htmlText:o(_t,s),htmlTextData:I,image:o(Q),label:s,link:o(oe),listItem:o(Se),listItemValue:p,listOrdered:o(ue,h),listUnordered:o(ue),paragraph:o(we),reference:D,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Ve),strong:o(ge),thematicBreak:o(Fe)},exit:{atxHeading:u(),atxHeadingSequence:P,autolink:u(),autolinkEmail:ce,autolinkProtocol:ie,blockQuote:u(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:J,characterReference:ee,codeFenced:u(k),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:x,codeFlowValue:M,codeIndented:u(b),codeText:u(q),codeTextData:M,data:M,definition:u(),definitionDestinationString:N,definitionLabelString:E,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(Y),htmlFlowData:M,htmlText:u(O),htmlTextData:M,image:u(Z),label:B,labelText:U,lineEnding:z,link:u(W),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:G,resourceDestinationString:L,resourceTitleString:H,resource:V,setextHeading:u(R),setextHeadingLineSequence:j,setextHeadingText:T,strong:u(),thematicBreak:u()}};ij(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(se){let pe={type:"root",children:[]};const Oe={stack:[pe],tokenStack:[],config:t,enter:a,exit:c,buffer:s,resume:f,data:n},et=[];let rt=-1;for(;++rt<se.length;)if(se[rt][1].type==="listOrdered"||se[rt][1].type==="listUnordered")if(se[rt][0]==="enter")et.push(rt);else{const Rt=et.pop();rt=i(se,Rt,rt)}for(rt=-1;++rt<se.length;){const Rt=t[se[rt][0]];rj.call(Rt,se[rt][1].type)&&Rt[se[rt][1].type].call(Object.assign({sliceSerialize:se[rt][2].sliceSerialize},Oe),se[rt][1])}if(Oe.tokenStack.length>0){const Rt=Oe.tokenStack[Oe.tokenStack.length-1];(Rt[1]||bN).call(Oe,void 0,Rt[0])}for(pe.position={start:cs(se.length>0?se[0][1].start:{line:1,column:1,offset:0}),end:cs(se.length>0?se[se.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)pe=t.transforms[rt](pe)||pe;return pe}function i(se,pe,Oe){let et=pe-1,rt=-1,Rt=!1,Ke,st,it,Ut;for(;++et<=Oe;){const pt=se[et];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?rt++:rt--,Ut=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Ke&&!Ut&&!rt&&!it&&(it=et),Ut=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ut=void 0}if(!rt&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||rt===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Ke){let gn=et;for(st=void 0;gn--;){const yt=se[gn];if(yt[1].type==="lineEnding"||yt[1].type==="lineEndingBlank"){if(yt[0]==="exit")continue;st&&(se[st][1].type="lineEndingBlank",Rt=!0),yt[1].type="lineEnding",st=gn}else if(!(yt[1].type==="linePrefix"||yt[1].type==="blockQuotePrefix"||yt[1].type==="blockQuotePrefixWhitespace"||yt[1].type==="blockQuoteMarker"||yt[1].type==="listItemIndent"))break}it&&(!st||it<st)&&(Ke._spread=!0),Ke.end=Object.assign({},st?se[st][1].start:pt[1].end),se.splice(st||et,0,["exit",Ke,pt[2]]),et++,Oe++}if(pt[1].type==="listItemPrefix"){const gn={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Ke=gn,se.splice(et,0,["enter",gn,pt[2]]),et++,Oe++,it=void 0,Ut=!0}}}return se[pe][1]._spread=Rt,Oe}function o(se,pe){return Oe;function Oe(et){a.call(this,se(et),et),pe&&pe.call(this,et)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(se,pe,Oe){this.stack[this.stack.length-1].children.push(se),this.stack.push(se),this.tokenStack.push([pe,Oe||void 0]),se.position={start:cs(pe.start),end:void 0}}function u(se){return pe;function pe(Oe){se&&se.call(this,Oe),c.call(this,Oe)}}function c(se,pe){const Oe=this.stack.pop(),et=this.tokenStack.pop();if(et)et[0].type!==se.type&&(pe?pe.call(this,se,et[0]):(et[1]||bN).call(this,se,et[0]));else throw new Error("Cannot close `"+se.type+"` ("+Mc({start:se.start,end:se.end})+"): it’s not open");Oe.position.end=cs(se.end)}function f(){return m1(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(se){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(se),10),this.data.expectingFirstListItemValue=void 0}}function m(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=se}function x(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=se}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.value=se.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.value=se.replace(/(\r?\n|\r)$/g,"")}function E(se){const pe=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=pe,Oe.identifier=wi(this.sliceSerialize(se)).toLowerCase()}function C(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.title=se}function N(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.url=se}function P(se){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Oe=this.sliceSerialize(se).length;pe.depth=Oe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function j(se){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(se).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function I(se){const Oe=this.stack[this.stack.length-1].children;let et=Oe[Oe.length-1];(!et||et.type!=="text")&&(et=Ae(),et.position={start:cs(se.start),end:void 0},Oe.push(et)),this.stack.push(et)}function M(se){const pe=this.stack.pop();pe.value+=this.sliceSerialize(se),pe.position.end=cs(se.end)}function z(se){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=pe.children[pe.children.length-1];Oe.position.end=cs(se.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(I.call(this,se),M.call(this,se))}function F(){this.data.atHardBreak=!0}function Y(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.value=se}function O(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.value=se}function q(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.value=se}function W(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=pe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function Z(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=pe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function U(se){const pe=this.sliceSerialize(se),Oe=this.stack[this.stack.length-2];Oe.label=Kq(pe),Oe.identifier=wi(pe).toLowerCase()}function B(){const se=this.stack[this.stack.length-1],pe=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const et=se.children;Oe.children=et}else Oe.alt=pe}function L(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.url=se}function H(){const se=this.resume(),pe=this.stack[this.stack.length-1];pe.title=se}function V(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function G(se){const pe=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=pe,Oe.identifier=wi(this.sliceSerialize(se)).toLowerCase(),this.data.referenceType="full"}function K(se){this.data.characterReferenceType=se.type}function J(se){const pe=this.sliceSerialize(se),Oe=this.data.characterReferenceType;let et;Oe?(et=q2(pe,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):et=g1(pe);const rt=this.stack[this.stack.length-1];rt.value+=et}function ee(se){const pe=this.stack.pop();pe.position.end=cs(se.end)}function ie(se){M.call(this,se);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(se)}function ce(se){M.call(this,se);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(se)}function he(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function fe(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Me(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function _t(){return{type:"html",value:""}}function Q(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function ue(se){return{type:"list",ordered:se.type==="listOrdered",start:null,spread:se._spread,children:[]}}function Se(se){return{type:"listItem",spread:se._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function ge(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Fe(){return{type:"thematicBreak"}}}function cs(e){return{line:e.line,column:e.column,offset:e.offset}}function ij(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ij(e,r):eG(e,r)}}function eG(e,t){let n;for(n in t)if(rj.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"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function bN(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mc({start:t.start,end:t.end})+") is still open")}function tG(e){const t=this;t.parser=n;function n(r){return Qq(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function nG(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 rG(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
217
|
+
`}]}function iG(e,t){const n=t.value?t.value+`
|
|
218
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function oG(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sG(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aG(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=fu(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function lG(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 uG(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function oj(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),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function cG(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return oj(e,t);const i={src:fu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function dG(e,t){const n={src:fu(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 fG(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 hG(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return oj(e,t);const i={href:fu(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function pG(e,t){const n={href:fu(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 mG(e,t,n){const r=e.all(t),i=n?gG(n):sj(t),o={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(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:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
|
|
219
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
220
|
+
`});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)}function gG(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=sj(n[r])}return t}function sj(e){const t=e.spread;return t??e.children.length>1}function yG(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 s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function xG(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vG(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wG(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bG(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=d1(t.children[1]),u=$2(t.children[t.children.length-1]);a&&u&&(s.position={start:a,end:u}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function kG(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<a;){const h=t.children[u],p={},m=s?s[u]:void 0;m&&(p.align=m);let x={type:"element",tagName:o,properties:p,children:[]};h&&(x.children=e.all(h),e.patch(h,x),x=e.applyData(h,x)),c.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function SG(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const kN=9,SN=32;function EG(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(EN(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(EN(t.slice(i),i>0,!1)),o.join("")}function EN(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===kN||o===SN;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===kN||o===SN;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function CG(e,t){const n={type:"text",value:EG(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function _G(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const NG={blockquote:nG,break:rG,code:iG,delete:oG,emphasis:sG,footnoteReference:aG,heading:lG,html:uG,imageReference:cG,image:dG,inlineCode:fG,linkReference:hG,link:pG,listItem:mG,list:yG,paragraph:xG,root:vG,strong:wG,table:bG,tableCell:SG,tableRow:kG,text:CG,thematicBreak:_G,toml:Mh,yaml:Mh,definition:Mh,footnoteDefinition:Mh};function Mh(){}const aj=-1,Nm=0,Dc=1,Ep=2,x1=3,v1=4,w1=5,b1=6,lj=7,uj=8,CN=typeof self=="object"?self:globalThis,TG=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Nm:case aj:return n(s,i);case Dc:{const a=n([],i);for(const u of s)a.push(r(u));return a}case Ep:{const a=n({},i);for(const[u,c]of s)a[r(u)]=r(c);return a}case x1:return n(new Date(s),i);case v1:{const{source:a,flags:u}=s;return n(new RegExp(a,u),i)}case w1:{const a=n(new Map,i);for(const[u,c]of s)a.set(r(u),r(c));return a}case b1:{const a=n(new Set,i);for(const u of s)a.add(r(u));return a}case lj:{const{name:a,message:u}=s;return n(new CN[a](u),i)}case uj:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(new CN[o](s),i)};return r},_N=e=>TG(new Map,e)(0),il="",{toString:AG}={},{keys:PG}=Object,uc=e=>{const t=typeof e;if(t!=="object"||!e)return[Nm,t];const n=AG.call(e).slice(8,-1);switch(n){case"Array":return[Dc,il];case"Object":return[Ep,il];case"Date":return[x1,il];case"RegExp":return[v1,il];case"Map":return[w1,il];case"Set":return[b1,il];case"DataView":return[Dc,n]}return n.includes("Array")?[Dc,n]:n.includes("Error")?[lj,n]:[Ep,n]},jh=([e,t])=>e===Nm&&(t==="function"||t==="symbol"),RG=(e,t,n,r)=>{const i=(s,a)=>{const u=r.push(s)-1;return n.set(a,u),u},o=s=>{if(n.has(s))return n.get(s);let[a,u]=uc(s);switch(a){case Nm:{let f=s;switch(u){case"bigint":a=uj,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([aj],s)}return i([a,f],s)}case Dc:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}const f=[],h=i([a,f],s);for(const p of s)f.push(o(p));return h}case Ep:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const f=[],h=i([a,f],s);for(const p of PG(s))(e||!jh(uc(s[p])))&&f.push([o(p),o(s[p])]);return h}case x1:return i([a,s.toISOString()],s);case v1:{const{source:f,flags:h}=s;return i([a,{source:f,flags:h}],s)}case w1:{const f=[],h=i([a,f],s);for(const[p,m]of s)(e||!(jh(uc(p))||jh(uc(m))))&&f.push([o(p),o(m)]);return h}case b1:{const f=[],h=i([a,f],s);for(const p of s)(e||!jh(uc(p)))&&f.push(o(p));return h}}const{message:c}=s;return i([a,{name:u,message:c}],s)};return o},NN=(e,{json:t,lossy:n}={})=>{const r=[];return RG(!(t||n),!!t,new Map,r)(e),r},Cp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?_N(NN(e,t)):structuredClone(e):(e,t)=>_N(NN(e,t));function MG(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 jG(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function DG(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||MG,r=e.options.footnoteBackLabel||jG,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),h=String(c.identifier).toUpperCase(),p=fu(h.toLowerCase());let m=0;const x=[],v=e.footnoteCounts.get(h);for(;v!==void 0&&++m<=v;){x.length>0&&x.push({type:"text",value:" "});let E=typeof n=="string"?n:n(u,m);typeof E=="string"&&(E={type:"text",value:E}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,m),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const k=f[f.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const E=k.children[k.children.length-1];E&&E.type==="text"?E.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...x)}else f.push(...x);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Cp(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
221
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
222
|
+
`}]}}const Tm=function(e){if(e==null)return FG;if(typeof e=="function")return Am(e);if(typeof e=="object")return Array.isArray(e)?OG(e):IG(e);if(typeof e=="string")return LG(e);throw new Error("Expected function, string, or object as test")};function OG(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tm(e[n]);return Am(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function IG(e){const t=e;return Am(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function LG(e){return Am(t);function t(n){return n&&n.type===e}}function Am(e){return t;function t(n,r,i){return!!($G(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function FG(){return!0}function $G(e){return e!==null&&typeof e=="object"&&"type"in e}const cj=[],zG=!0,p0=!1,BG="skip";function dj(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Tm(i),s=r?-1:1;a(e,void 0,[])();function a(u,c,f){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=cj,x,v,k;if((!t||o(u,c,f[f.length-1]||void 0))&&(m=VG(n(u,f)),m[0]===p0))return m;if("children"in u&&u.children){const b=u;if(b.children&&m[0]!==BG)for(v=(r?b.children.length:-1)+s,k=f.concat(b);v>-1&&v<b.children.length;){const E=b.children[v];if(x=a(E,v,k)(),x[0]===p0)return x;v=typeof x[1]=="number"?x[1]:v+s}}return m}}}function VG(e){return Array.isArray(e)?e:typeof e=="number"?[zG,e]:e==null?cj:[e]}function k1(e,t,n,r){let i,o,s;typeof t=="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),dj(e,o,a,i);function a(u,c){const f=c[c.length-1],h=f?f.children.indexOf(u):void 0;return s(u,h,f)}}const m0={}.hasOwnProperty,WG={};function UG(e,t){const n=t||WG,r=new Map,i=new Map,o=new Map,s={...NG,...n.handlers},a={all:c,applyData:YG,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:u,options:n,patch:HG,wrap:GG};return k1(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();h.has(p)||h.set(p,f)}}),a;function u(f,h){const p=f.type,m=a.handlers[p];if(m0.call(a.handlers,p)&&m)return m(a,f,h);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:v,...k}=f,b=Cp(k);return b.children=a.all(f),b}return Cp(f)}return(a.options.unknownHandler||qG)(a,f,h)}function c(f){const h=[];if("children"in f){const p=f.children;let m=-1;for(;++m<p.length;){const x=a.one(p[m],f);if(x){if(m&&p[m-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=TN(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=TN(v.value))}Array.isArray(x)?h.push(...x):h.push(x)}}}return h}}function HG(e,t){e.position&&(t.position=RH(e))}function YG(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Cp(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function qG(e,t){const n=t.data||{},r="value"in t&&!(m0.call(n,"hProperties")||m0.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 GG(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
223
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
224
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
225
|
+
`}),n}function TN(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function AN(e,t){const n=UG(e,t),r=n.one(e,void 0),i=DG(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
226
|
+
`},i),o}function ZG(e,t){return e&&"run"in e?async function(n,r){const i=AN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return AN(n,{file:r,...e||t})}}function PN(e){if(e)throw e}var Lx,RN;function KG(){if(RN)return Lx;RN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},o=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var f=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!h)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,f){n&&f.name==="__proto__"?n(c,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):c[f.name]=f.newValue},a=function(c,f){if(f==="__proto__")if(e.call(c,f)){if(r)return r(c,f).value}else return;return c[f]};return Lx=function u(){var c,f,h,p,m,x,v=arguments[0],k=1,b=arguments.length,E=!1;for(typeof v=="boolean"&&(E=v,v=arguments[1]||{},k=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});k<b;++k)if(c=arguments[k],c!=null)for(f in c)h=a(v,f),p=a(c,f),v!==p&&(E&&p&&(o(p)||(m=i(p)))?(m?(m=!1,x=h&&i(h)?h:[]):x=h&&o(h)?h:{},s(v,{name:f,newValue:u(E,x,p)})):typeof p<"u"&&s(v,{name:f,newValue:p}));return v},Lx}var XG=KG();const Fx=tu(XG);function g0(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 QG(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...c){const f=e[++o];let h=-1;if(u){s(u);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,f?JG(f,a)(...c):s(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 JG(e,t){let n;return r;function r(...s){const a=e.length>s.length;let u;a&&s.push(i);try{u=e.apply(this,s)}catch(c){const f=c;if(a&&n)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const Oi={basename:eZ,dirname:tZ,extname:nZ,join:rZ,sep:"/"};function eZ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vd(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function tZ(e){if(Vd(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 nZ(e){Vd(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function rZ(...e){let t=-1,n;for(;++t<e.length;)Vd(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":iZ(n)}function iZ(e){Vd(e);const t=e.codePointAt(0)===47;let n=oZ(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function oZ(e,t){let n="",r=0,i=-1,o=0,s=-1,a,u;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===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=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Vd(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sZ={cwd:aZ};function aZ(){return"/"}function y0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lZ(e){if(typeof e=="string")e=new URL(e);else if(!y0(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 uZ(e)}function uZ(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 $x=["history","path","basename","stem","extname","dirname"];class fj{constructor(t){let n;t?y0(t)?n={path:t}:typeof t=="string"||cZ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sZ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$x.length;){const o=$x[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)$x.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Oi.basename(this.path):void 0}set basename(t){Bx(t,"basename"),zx(t,"basename"),this.path=Oi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Oi.dirname(this.path):void 0}set dirname(t){MN(this.basename,"dirname"),this.path=Oi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Oi.extname(this.path):void 0}set extname(t){if(zx(t,"extname"),MN(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=Oi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){y0(t)&&(t=lZ(t)),Bx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Oi.basename(this.path,this.extname):void 0}set stem(t){Bx(t,"stem"),zx(t,"stem"),this.path=Oi.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 Zn(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 zx(e,t){if(e&&e.includes(Oi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Oi.sep+"`")}function Bx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function MN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cZ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dZ=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},fZ={}.hasOwnProperty;class S1 extends dZ{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=QG()}copy(){const t=new S1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Fx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ux("data",this.frozen),this.namespace[t]=n,this):fZ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ux("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=Dh(t),r=this.parser||this.Parser;return Vx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vx("process",this.parser||this.Parser),Wx("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const a=Dh(t),u=r.parse(a);r.run(u,a,function(f,h,p){if(f||!h||!p)return c(f);const m=h,x=r.stringify(m,p);mZ(x)?p.value=x:p.result=x,c(f,p)});function c(f,h){f||!h?s(f):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Vx("processSync",this.parser||this.Parser),Wx("processSync",this.compiler||this.Compiler),this.process(t,i),DN("processSync","process",n),r;function i(o,s){n=!0,PN(o),r=s}}run(t,n,r){jN(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){const u=Dh(n);i.run(t,u,c);function c(f,h,p){const m=h||t;f?a(f):s?s(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),DN("runSync","run",r),i;function o(s,a){PN(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=Dh(n),i=this.compiler||this.Compiler;return Wx("stringify",i),jN(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ux("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;u(f,h)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(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");a(c.plugins),c.settings&&(i.settings=Fx(!0,i.settings,c.settings))}function a(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===c){p=h;break}if(p===-1)r.push([c,...f]);else if(f.length>0){let[m,...x]=f;const v=r[p][1];g0(v)&&g0(m)&&(m=Fx(!0,v,m)),r[p]=[c,m,...x]}}}}const hZ=new S1().freeze();function Vx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ux(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 jN(e){if(!g0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DN(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dh(e){return pZ(e)?e:new fj(e)}function pZ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mZ(e){return typeof e=="string"||gZ(e)}function gZ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yZ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ON=[],IN={allowDangerousHtml:!0},xZ=/^(https?|ircs?|mailto|xmpp)$/i,vZ=[{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 wZ(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,s=e.disallowedElements,a=e.rehypePlugins||ON,u=e.remarkPlugins||ON,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...IN}:IN,f=e.skipHtml,h=e.unwrapDisallowed,p=e.urlTransform||bZ,m=hZ().use(tG).use(u).use(ZG,c).use(a),x=new fj;typeof r=="string"&&(x.value=r);for(const E of vZ)Object.hasOwn(e,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+yZ+E.id,void 0);const v=m.parse(x);let k=m.runSync(v,x);return i&&(k={type:"element",tagName:"div",properties:{className:i},children:k.type==="root"?k.children:[k]}),k1(k,b),LH(k,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function b(E,C,N){if(E.type==="raw"&&N&&typeof C=="number")return f?N.children.splice(C,1):N.children[C]={type:"text",value:E.value},C;if(E.type==="element"){let P;for(P in Dx)if(Object.hasOwn(Dx,P)&&Object.hasOwn(E.properties,P)){const T=E.properties[P],j=Dx[P];(j===null||j.includes(E.tagName))&&(E.properties[P]=p(String(T||""),P,E))}}if(E.type==="element"){let P=t?!t.includes(E.tagName):s?s.includes(E.tagName):!1;if(!P&&n&&typeof C=="number"&&(P=!n(E,C,N)),P&&N&&typeof C=="number")return h&&E.children?N.children.splice(C,1,...E.children):N.children.splice(C,1),C}}}function bZ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||xZ.test(e.slice(0,t))?e:""}function LN(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 kZ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function SZ(e,t,n){const i=Tm(n.ignore||[]),o=EZ(t);let s=-1;for(;++s<o.length;)dj(e,"text",a);function a(c,f){let h=-1,p;for(;++h<f.length;){const m=f[h],x=p?p.children:void 0;if(i(m,x?x.indexOf(m):void 0,p))return;p=m}if(p)return u(c,f)}function u(c,f){const h=f[f.length-1],p=o[s][0],m=o[s][1];let x=0;const k=h.children.indexOf(c);let b=!1,E=[];p.lastIndex=0;let C=p.exec(c.value);for(;C;){const N=C.index,P={index:C.index,input:C.input,stack:[...f,c]};let T=m(...C,P);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?p.lastIndex=N+1:(x!==N&&E.push({type:"text",value:c.value.slice(x,N)}),Array.isArray(T)?E.push(...T):T&&E.push(T),x=N+C[0].length,b=!0),!p.global)break;C=p.exec(c.value)}return b?(x<c.value.length&&E.push({type:"text",value:c.value.slice(x)}),h.children.splice(k,1,...E)):E=[c],k+E.length}}function EZ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([CZ(i[0]),_Z(i[1])])}return t}function CZ(e){return typeof e=="string"?new RegExp(kZ(e),"g"):e}function _Z(e){return typeof e=="function"?e:function(){return e}}const Hx="phrasing",Yx=["autolink","link","image","label"];function NZ(){return{transforms:[DZ],enter:{literalAutolink:AZ,literalAutolinkEmail:qx,literalAutolinkHttp:qx,literalAutolinkWww:qx},exit:{literalAutolink:jZ,literalAutolinkEmail:MZ,literalAutolinkHttp:PZ,literalAutolinkWww:RZ}}}function TZ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hx,notInConstruct:Yx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Hx,notInConstruct:Yx},{character:":",before:"[ps]",after:"\\/",inConstruct:Hx,notInConstruct:Yx}]}}function AZ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qx(e){this.config.enter.autolinkProtocol.call(this,e)}function PZ(e){this.config.exit.autolinkProtocol.call(this,e)}function RZ(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 MZ(e){this.config.exit.autolinkEmail.call(this,e)}function jZ(e){this.exit(e)}function DZ(e){SZ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OZ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IZ]],{ignore:["link","linkReference"]})}function OZ(e,t,n,r,i){let o="";if(!hj(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!LZ(n)))return!1;const s=FZ(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function IZ(e,t,n,r){return!hj(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function LZ(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 FZ(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=LN(e,"(");let o=LN(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function hj(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||pa(n)||Cm(n))&&(!t||n!==47)}pj.peek=ZZ;function $Z(){return{enter:{gfmFootnoteDefinition:BZ,gfmFootnoteDefinitionLabelString:VZ,gfmFootnoteCall:HZ,gfmFootnoteCallString:YZ},exit:{gfmFootnoteDefinition:UZ,gfmFootnoteDefinitionLabelString:WZ,gfmFootnoteCall:GZ,gfmFootnoteCallString:qZ}}}function zZ(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:KZ,footnoteReference:pj}}}function BZ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VZ(){this.buffer()}function WZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=wi(this.sliceSerialize(e)).toLowerCase()}function UZ(e){this.exit(e)}function HZ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function YZ(){this.buffer()}function qZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=wi(this.sliceSerialize(e)).toLowerCase()}function GZ(e){this.exit(e)}function pj(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),a(),s(),o+=i.move("]"),o}function ZZ(){return"["}function KZ(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),a(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),XZ)),s(),o}function XZ(e,t,n){return t===0?e:(n?"":" ")+e}const QZ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mj.peek=rK;function JZ(){return{canContainEols:["delete"],enter:{strikethrough:tK},exit:{strikethrough:nK}}}function eK(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:QZ}],handlers:{delete:mj}}}function tK(e){this.enter({type:"delete",children:[]},e)}function nK(e){this.exit(e)}function mj(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function rK(){return"~"}function iK(e){return e.length}function oK(e,t){const n=t,r=(n.align||[]).concat(),i=n.stringLength||iK,o=[],s=[],a=[],u=[];let c=0,f=-1;for(;++f<e.length;){const v=[],k=[];let b=-1;for(e[f].length>c&&(c=e[f].length);++b<e[f].length;){const E=sK(e[f][b]);if(n.alignDelimiters!==!1){const C=i(E);k[b]=C,(u[b]===void 0||C>u[b])&&(u[b]=C)}v.push(E)}s[f]=v,a[f]=k}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<c;)o[h]=FN(r[h]);else{const v=FN(r);for(;++h<c;)o[h]=v}h=-1;const p=[],m=[];for(;++h<c;){const v=o[h];let k="",b="";v===99?(k=":",b=":"):v===108?k=":":v===114&&(b=":");let E=n.alignDelimiters===!1?1:Math.max(1,u[h]-k.length-b.length);const C=k+"-".repeat(E)+b;n.alignDelimiters!==!1&&(E=k.length+E+b.length,E>u[h]&&(u[h]=E),m[h]=E),p[h]=C}s.splice(1,0,p),a.splice(1,0,m),f=-1;const x=[];for(;++f<s.length;){const v=s[f],k=a[f];h=-1;const b=[];for(;++h<c;){const E=v[h]||"";let C="",N="";if(n.alignDelimiters!==!1){const P=u[h]-(k[h]||0),T=o[h];T===114?C=" ".repeat(P):T===99?P%2?(C=" ".repeat(P/2+.5),N=" ".repeat(P/2-.5)):(C=" ".repeat(P/2),N=C):N=" ".repeat(P)}n.delimiterStart!==!1&&!h&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||h)&&b.push(" "),n.alignDelimiters!==!1&&b.push(C),b.push(E),n.alignDelimiters!==!1&&b.push(N),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||h!==c-1)&&b.push("|")}x.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return x.join(`
|
|
227
|
+
`)}function sK(e){return e==null?"":String(e)}function FN(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}function aK(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),lK);return i(),s}function lK(e,t,n){return">"+(n?"":" ")+e}function uK(e,t){return $N(e,t.inConstruct,!0)&&!$N(e,t.notInConstruct,!1)}function $N(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 zN(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
228
|
+
`&&uK(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
229
|
+
`}function cK(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function dK(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function fK(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 hK(e,t,n,r){const i=fK(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(dK(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(o,pK);return h(),p}const a=n.createTracker(r),u=i.repeat(Math.max(cK(o,i)+1,3)),c=n.enter("codeFenced");let f=a.move(u);if(e.lang){const h=n.enter(`codeFencedLang${s}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
|
|
230
|
+
`,encode:["`"],...a.current()})),h()}return f+=a.move(`
|
|
231
|
+
`),o&&(f+=a.move(o+`
|
|
232
|
+
`)),f+=a.move(u),c(),f}function pK(e,t,n){return(n?"":" ")+e}function E1(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 mK(e,t,n,r){const i=E1(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=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("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(a=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
233
|
+
`,...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),a()),s(),c}function gK(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 Qc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _p(e,t,n){const r=Fl(e),i=Fl(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}}gj.peek=yK;function gj(e,t,n,r){const i=gK(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const c=u.charCodeAt(0),f=_p(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Qc(c)+u.slice(1));const h=u.charCodeAt(u.length-1),p=_p(r.after.charCodeAt(0),h,i);p.inside&&(u=u.slice(0,-1)+Qc(h));const m=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+m}function yK(e,t,n){return n.options.emphasis||"*"}function xK(e,t){let n=!1;return k1(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,p0}),!!((!e.depth||e.depth<3)&&m1(e)&&(t.options.setext||n))}function vK(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(xK(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
234
|
+
`,after:`
|
|
235
|
+
`});return h(),f(),p+`
|
|
236
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
237
|
+
`))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),u=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
238
|
+
`,...o.current()});return/^[\t ]/.test(c)&&(c=Qc(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),a(),c}yj.peek=wK;function yj(e){return e.value||""}function wK(){return"<"}xj.peek=bK;function xj(e,t,n,r){const i=E1(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=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("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(a=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),a()),c+=u.move(")"),s(),c}function bK(){return"!"}vj.peek=kK;function vj(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");const c=n.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==h?u+=a.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function kK(){return"!"}wj.peek=SK;function wj(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let u;if(s.atBreak)for(;u=a.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 SK(){return"`"}function bj(e,t){const n=m1(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))}kj.peek=EK;function kj(e,t,n,r){const i=E1(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,u;if(bj(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),a(),n.stack=f,h}a=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),a(),c}function EK(e,t,n){return bj(e,n)?"<":"["}Sj.peek=CK;function Sj(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==h?u+=a.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function CK(){return"["}function C1(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 _K(e){const t=C1(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 NK(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 Ej(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 TK(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?NK(n):C1(n);const a=e.ordered?s==="."?")":".":_K(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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),Ej(n)===s&&f){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&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),c}function AK(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 PK(e,t,n,r){const i=AK(n);let o=n.bulletCurrent||C1(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),f);return u(),c;function f(h,p,m){return p?(m?"":" ".repeat(s))+h:(m?o:o+" ".repeat(s-o.length))+h}}function RK(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const MK=Tm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jK(e,t,n,r){return(e.children.some(function(s){return MK(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function DK(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Cj.peek=OK;function Cj(e,t,n,r){const i=DK(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const c=u.charCodeAt(0),f=_p(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Qc(c)+u.slice(1));const h=u.charCodeAt(u.length-1),p=_p(r.after.charCodeAt(0),h,i);p.inside&&(u=u.slice(0,-1)+Qc(h));const m=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+m}function OK(e,t,n){return n.options.strong||"*"}function IK(e,t,n,r){return n.safe(e.value,r)}function LK(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 FK(e,t,n){const r=(Ej(n)+(n.options.ruleSpaces?" ":"")).repeat(LK(n));return n.options.ruleSpaces?r.slice(0,-1):r}const _j={blockquote:aK,break:zN,code:hK,definition:mK,emphasis:gj,hardBreak:zN,heading:vK,html:yj,image:xj,imageReference:vj,inlineCode:wj,link:kj,linkReference:Sj,list:TK,listItem:PK,paragraph:RK,root:jK,strong:Cj,text:IK,thematicBreak:FK};function $K(){return{enter:{table:zK,tableData:BN,tableHeader:BN,tableRow:VK},exit:{codeText:WK,table:BK,tableData:Gx,tableHeader:Gx,tableRow:Gx}}}function zK(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function BK(e){this.exit(e),this.data.inTable=void 0}function VK(e){this.enter({type:"tableRow",children:[]},e)}function Gx(e){this.exit(e)}function BN(e){this.enter({type:"tableCell",children:[]},e)}function WK(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,UK));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function UK(e,t){return t==="|"?t:e}function HK(e){const t=e,n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
239
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:a}};function s(m,x,v,k){return c(f(m,v,k),m.align)}function a(m,x,v,k){const b=h(m,v,k),E=c([b]);return E.slice(0,E.indexOf(`
|
|
240
|
+
`))}function u(m,x,v,k){const b=v.enter("tableCell"),E=v.enter("phrasing"),C=v.containerPhrasing(m,{...k,before:o,after:o});return E(),b(),C}function c(m,x){return oK(m,{align:x,alignDelimiters:r,padding:n,stringLength:i})}function f(m,x,v){const k=m.children;let b=-1;const E=[],C=x.enter("table");for(;++b<k.length;)E[b]=h(k[b],x,v);return C(),E}function h(m,x,v){const k=m.children;let b=-1;const E=[],C=x.enter("tableRow");for(;++b<k.length;)E[b]=u(k[b],m,x,v);return C(),E}function p(m,x,v){let k=_j.inlineCode(m,x,v);return v.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function YK(){return{exit:{taskListCheckValueChecked:VN,taskListCheckValueUnchecked:VN,paragraph:GK}}}function qK(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ZK}}}function VN(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function GK(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 o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===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 ZK(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let u=_j.listItem(e,t,n,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+s}}function KK(){return[NZ(),$Z(),JZ(),$K(),YK()]}function XK(e){return{extensions:[TZ(),zZ(),eK(),HK(e),qK()]}}const QK={tokenize:iX,partial:!0},Nj={tokenize:oX,partial:!0},Tj={tokenize:sX,partial:!0},Aj={tokenize:aX,partial:!0},JK={tokenize:lX,partial:!0},Pj={name:"wwwAutolink",tokenize:nX,previous:Mj},Rj={name:"protocolAutolink",tokenize:rX,previous:jj},Lo={name:"emailAutolink",tokenize:tX,previous:Dj},Ji={};function eX(){return{text:Ji}}let ea=48;for(;ea<123;)Ji[ea]=Lo,ea++,ea===58?ea=65:ea===91&&(ea=97);Ji[43]=Lo;Ji[45]=Lo;Ji[46]=Lo;Ji[95]=Lo;Ji[72]=[Lo,Rj];Ji[104]=[Lo,Rj];Ji[87]=[Lo,Pj];Ji[119]=[Lo,Pj];function tX(e,t,n){const r=this;let i,o;return s;function s(h){return!x0(h)||!Dj.call(r,r.previous)||_1(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return x0(h)?(e.consume(h),a):h===64?(e.consume(h),u):n(h)}function u(h){return h===46?e.check(JK,f,c)(h):h===45||h===95||Yn(h)?(o=!0,e.consume(h),u):f(h)}function c(h){return e.consume(h),i=!0,u}function f(h){return o&&i&&or(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function nX(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Mj.call(r,r.previous)||_1(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(QK,e.attempt(Nj,e.attempt(Tj,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function rX(e,t,n){const r=this;let i="",o=!1;return s;function s(h){return(h===72||h===104)&&jj.call(r,r.previous)&&!_1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):n(h)}function a(h){if(or(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;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),o?c:(o=!0,u)):n(h)}function c(h){return h===null||Sp(h)||jt(h)||pa(h)||Cm(h)?n(h):e.attempt(Nj,e.attempt(Tj,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function iX(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function oX(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(Aj,u,a)(c):c===null||jt(c)||pa(c)||c!==45&&Cm(c)?u(c):(o=!0,e.consume(c),s)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!o?n(c):t(c)}}function sX(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Aj,t,o)(s):s===null||jt(s)||pa(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function aX(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||jt(a)||pa(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||jt(a)||pa(a)?t(a):r(a)}function o(a){return or(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):or(a)?(e.consume(a),s):n(a)}}function lX(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Yn(o)?n(o):t(o)}}function Mj(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jt(e)}function jj(e){return!or(e)}function Dj(e){return!(e===47||x0(e))}function x0(e){return e===43||e===45||e===46||e===95||Yn(e)}function _1(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 uX={tokenize:yX,partial:!0};function cX(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pX,continuation:{tokenize:mX},exit:gX}},text:{91:{name:"gfmFootnoteCall",tokenize:hX},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dX,resolveTo:fX}}}}function dX(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!s||!s._balanced)return n(u);const c=wi(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function fX(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 o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function hX(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return a;function a(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(o>999||h===93&&!s||h===null||h===91||jt(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(wi(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return jt(h)||(s=!0),o++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}}function pX(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,a;return u;function u(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(x)}function f(x){if(s>999||x===93&&!a||x===null||x===91||jt(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=wi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return jt(x)||(a=!0),s++,e.consume(x),x===92?h:f}function h(x){return x===91||x===92||x===93?(e.consume(x),s++,f):f(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(o)||i.push(o),vt(e,m,"gfmFootnoteDefinitionWhitespace")):n(x)}function m(x){return t(x)}}function mX(e,t,n){return e.check(Bd,t,e.attempt(uX,t,n))}function gX(e){e.exit("gfmFootnoteDefinition")}function yX(e,t,n){const r=this;return vt(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function xX(e){let n=e.singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},h={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",f,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",h,a]],m=a.parser.constructs.insideSpan.null;m&&Mr(p,p.length,0,_m(m,s.slice(c+1,u),a)),Mr(p,p.length,0,[["exit",h,a],["enter",s[u][1],a],["exit",s[u][1],a],["exit",f,a]]),Mr(s,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,a,u){const c=this.previous,f=this.events;let h=0;return p;function p(x){return c===126&&f[f.length-1][1].type!=="characterEscape"?u(x):(s.enter("strikethroughSequenceTemporary"),m(x))}function m(x){const v=Fl(c);if(x===126)return h>1?u(x):(s.consume(x),h++,m);if(h<2&&!n)return u(x);const k=s.exit("strikethroughSequenceTemporary"),b=Fl(x);return k._open=!b||b===2&&!!v,k._close=!v||v===2&&!!b,a(x)}}}class vX{constructor(){this.map=[]}add(t,n,r){wX(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[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 o of i)t.push(o);i=r.pop()}this.map.length=0}}function wX(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function bX(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 o=r.length-1;r[o]=r[o]==="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 kX(){return{flow:{null:{name:"table",tokenize:SX,resolveAll:EX}}}}function SX(e,t,n){const r=this;let i=0,o=0,s;return a;function a(M){let z=r.events.length-1;for(;z>-1;){const O=r.events[z][1].type;if(O==="lineEnding"||O==="linePrefix")z--;else break}const F=z>-1?r.events[z][1].type:null,Y=F==="tableHead"||F==="tableRow"?T:u;return Y===T&&r.parser.lazy[r.now().line]?n(M):Y(M)}function u(M){return e.enter("tableHead"),e.enter("tableRow"),c(M)}function c(M){return M===124||(s=!0,o+=1),f(M)}function f(M){return M===null?n(M):Ze(M)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),m):n(M):gt(M)?vt(e,f,"whitespace")(M):(o+=1,s&&(s=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),h(M)))}function h(M){return M===null||M===124||jt(M)?(e.exit("data"),f(M)):(e.consume(M),M===92?p:h)}function p(M){return M===92||M===124?(e.consume(M),h):h(M)}function m(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),s=!1,gt(M)?vt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):x(M))}function x(M){return M===45||M===58?k(M):M===124?(s=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),v):P(M)}function v(M){return gt(M)?vt(e,k,"whitespace")(M):k(M)}function k(M){return M===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),b):M===45?(o+=1,b(M)):M===null||Ze(M)?N(M):P(M)}function b(M){return M===45?(e.enter("tableDelimiterFiller"),E(M)):P(M)}function E(M){return M===45?(e.consume(M),E):M===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(M))}function C(M){return gt(M)?vt(e,N,"whitespace")(M):N(M)}function N(M){return M===124?x(M):M===null||Ze(M)?!s||i!==o?P(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):P(M)}function P(M){return n(M)}function T(M){return e.enter("tableRow"),j(M)}function j(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),j):M===null||Ze(M)?(e.exit("tableRow"),t(M)):gt(M)?vt(e,j,"whitespace")(M):(e.enter("data"),R(M))}function R(M){return M===null||M===124||jt(M)?(e.exit("data"),j(M)):(e.consume(M),M===92?I:R)}function I(M){return M===92||M===124?(e.consume(M),R):R(M)}}function EX(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,u=0,c,f,h;const p=new vX;for(;++n<e.length;){const m=e[n],x=m[1];m[0]==="enter"?x.type==="tableHead"?(a=!1,u!==0&&(WN(p,t,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},p.add(n,0,[["enter",c,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},p.add(n,0,[["enter",f,t]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],h=Oh(p,t,o,i,void 0,h),o=[0,0,0,0]),s[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],h=Oh(p,t,o,i,void 0,h)),o=s,s=[o[1],n,0,0])):x.type==="tableHead"?(a=!0,u=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(u=n,o[1]!==0?(s[0]=s[1],h=Oh(p,t,o,i,n,h)):s[1]!==0&&(h=Oh(p,t,s,i,n,h)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&WN(p,t,u,c,f),p.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=bX(t.events,n))}return e}function Oh(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},dl(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=dl(t.events,n[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=dl(t.events,n[2]),f=dl(t.events,n[3]),h={type:a,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],m=t.events[n[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(o.end=Object.assign({},dl(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function WN(e,t,n,r,i){const o=[],s=dl(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function dl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const CX={name:"tasklistCheck",tokenize:NX};function _X(){return{text:{91:CX}}}function NX(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"),o)}function o(u){return jt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return Ze(u)?t(u):gt(u)?e.check({tokenize:TX},t,n)(u):n(u)}}function TX(e,t,n){return vt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function AX(e){return Y2([eX(),cX(),xX(e),kX(),_X()])}const PX={};function RX(e){const t=this,n=e||PX,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(AX(n)),o.push(KK()),s.push(XK(n))}const MX="modulepreload",jX=function(e){return"/"+e},UN={},DX=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=jX(u),u in UN)return;UN[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":MX,c||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};async function OX(e,t){const{codeToTokens:n,bundledLanguages:r}=await DX(async()=>{const{codeToTokens:o,bundledLanguages:s}=await import("./index-M9glaXJD.js");return{codeToTokens:o,bundledLanguages:s}},[]);if(!(t in r))return null;const{tokens:i}=await n(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return i}function IX({children:e}){const t=e.replace(/\\n/g,`
|
|
241
|
+
`);return y.jsx(wZ,{remarkPlugins:[RX],components:FX,className:"space-y-3",children:t})}const Oj=ne.memo(({children:e,language:t,...n})=>{const[r,i]=S.useState([]);return S.useEffect(()=>{OX(e,t).then(o=>{o&&i(o)})},[e,t]),r.length?y.jsx("pre",{...n,children:y.jsx("code",{children:r.map((o,s)=>y.jsxs(y.Fragment,{children:[y.jsx("span",{children:o.map((a,u)=>{const c=typeof a.htmlStyle=="string"?void 0:a.htmlStyle;return y.jsx("span",{className:"text-shiki-light bg-shiki-light-bg dark:text-shiki-dark dark:bg-shiki-dark-bg",style:c,children:a.content},u)})},s),s!==r.length-1&&`
|
|
242
|
+
`]}))})}):y.jsx("pre",{...n,children:e})});Oj.displayName="HighlightedCode";const LX=({children:e,className:t,language:n,...r})=>{const i=typeof e=="string"?e:v0(e),o=Te("overflow-x-scroll rounded-md border bg-background/50 p-4 font-mono text-sm [scrollbar-width:none]",t);return y.jsxs("div",{className:"group/code relative mb-4",children:[y.jsx(S.Suspense,{fallback:y.jsx("pre",{className:o,...r,children:e}),children:y.jsx(Oj,{language:n,className:o,children:i})}),y.jsx("div",{className:"invisible absolute right-2 top-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100",children:y.jsx(Hc,{content:i,copyMessage:"Copied code to clipboard"})})]})};function v0(e){var t;if(typeof e=="string")return e;if((t=e==null?void 0:e.props)!=null&&t.children){let n=e.props.children;return Array.isArray(n)?n.map(r=>v0(r)).join(""):v0(n)}return""}const FX={h1:In("h1","text-2xl font-semibold"),h2:In("h2","font-semibold text-xl"),h3:In("h3","font-semibold text-lg"),h4:In("h4","font-semibold text-base"),h5:In("h5","font-medium"),strong:In("strong","font-semibold"),a:In("a","text-primary underline underline-offset-2"),blockquote:In("blockquote","border-l-2 border-primary pl-4"),code:({children:e,className:t,node:n,...r})=>{const i=/language-(\w+)/.exec(t||"");return i?y.jsx(LX,{className:t,language:i[1],...r,children:e}):y.jsx("code",{className:Te("font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:bg-background/50 [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"),...r,children:e})},pre:({children:e})=>e,ol:In("ol","list-decimal space-y-2 pl-6"),ul:In("ul","list-disc space-y-2 pl-6"),li:In("li","my-1.5"),table:In("table","w-full border-collapse overflow-y-auto rounded-md border border-foreground/20"),th:In("th","border border-foreground/20 px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right"),td:In("td","border border-foreground/20 px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right"),tr:In("tr","m-0 border-t p-0 even:bg-muted"),p:In("p","whitespace-pre-wrap leading-relaxed"),hr:In("hr","border-foreground/20")};function In(e,t){const n=({node:r,...i})=>y.jsx(e,{className:t,...i});return n.displayName=e,n}const $X=lu("group/message relative break-words rounded-lg p-3 text-sm sm:max-w-[70%]",{variants:{isUser:{true:"bg-primary text-primary-foreground",false:"bg-muted text-foreground"},isError:{true:"bg-red-100 dark:bg-red-900/20",false:""},animation:{none:"",slide:"duration-300 animate-in fade-in-0",scale:"duration-300 animate-in fade-in-0 zoom-in-75",fade:"duration-500 animate-in fade-in-0"}},compoundVariants:[{isUser:!0,animation:"slide",class:"slide-in-from-right"},{isUser:!1,animation:"slide",class:"slide-in-from-left"},{isUser:!0,animation:"scale",class:"origin-bottom-right"},{isUser:!1,animation:"scale",class:"origin-bottom-left"}]}),zX=({role:e,content:t,createdAt:n,showTimeStamp:r=!1,animation:i="scale",actions:o,className:s,experimental_attachments:a,isError:u=!1})=>{const c=e==="user",f=S.useMemo(()=>a==null?void 0:a.map(p=>{const m=BX(p.url);return new File([m],p.name??"Unknown")}),[a]),h=n==null?void 0:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return y.jsxs("div",{className:Te("flex flex-col",c?"items-end":"items-start"),children:[f?y.jsx("div",{className:"mb-1 flex gap-2 flex-wrap",children:f.map((p,m)=>y.jsx(l1,{file:p},m))}):null,y.jsxs("div",{className:Te($X({isUser:c,isError:u,animation:i}),s),children:[y.jsx("div",{children:y.jsx(IX,{children:t})}),e==="assistant"&&o?y.jsx("div",{className:"absolute -bottom-4 right-2 flex space-x-1 rounded-lg border bg-background p-1 opacity-0 transition-opacity group-hover/message:opacity-100 text-foreground",children:o}):null]}),r&&n?y.jsx("time",{dateTime:n.toISOString(),className:Te("mt-1 block px-1 text-xs opacity-50",i!=="none"&&"duration-500 animate-in fade-in-0"),children:h}):null]})};function BX(e){const t=e.split(",")[1],n=Buffer.from(t??"","base64");return new Uint8Array(n)}function VX(){return y.jsx("div",{className:"justify-left flex space-x-1",children:y.jsx("div",{className:"rounded-lg bg-muted p-3",children:y.jsxs("div",{className:"flex -space-x-2.5",children:[y.jsx(cx,{className:"h-5 w-5 animate-typing-dot-bounce"}),y.jsx(cx,{className:"h-5 w-5 animate-typing-dot-bounce [animation-delay:90ms]"}),y.jsx(cx,{className:"h-5 w-5 animate-typing-dot-bounce [animation-delay:180ms]"})]})})})}function WX({messages:e,showTimeStamps:t=!0,isTyping:n=!1,messageOptions:r}){return y.jsxs("div",{className:"space-y-4 overflow-visible",children:[e.map((i,o)=>{const s=typeof r=="function"?r(i):r;return i.role==="assistant"&&!i.content.trim()?null:y.jsx(zX,{showTimeStamp:t,...i,...s},o)}),n&&y.jsx(VX,{})]})}function UX({label:e,append:t,suggestions:n}){return y.jsxs("div",{className:"space-y-6",children:[y.jsx("h2",{className:"text-center text-2xl font-bold",children:e}),y.jsx("div",{className:"flex flex-col sm:flex-row gap-6 text-sm items-center justify-center",children:n.map(r=>y.jsx("button",{onClick:()=>t({role:"user",content:r}),className:"h-max rounded-xl border bg-transparent p-4 hover:bg-accent",children:y.jsx("p",{children:r})},r))})]})}const HX=50;function YX(e){const t=S.useRef(null),n=S.useRef(null),[r,i]=S.useState(!0),o=()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},s=()=>{if(t.current){const{scrollTop:u,scrollHeight:c,clientHeight:f}=t.current;if(n.current?u<n.current:!1)i(!1);else{const p=Math.abs(c-u-f)<HX;i(p)}n.current=u}},a=()=>{i(!1)};return S.useEffect(()=>{t.current&&(n.current=t.current.scrollTop)},[]),S.useEffect(()=>{r&&o()},e),{containerRef:t,scrollToBottom:o,handleScroll:s,shouldAutoScroll:r,handleTouchStart:a}}function qX({messages:e,children:t}){const{containerRef:n,scrollToBottom:r,handleScroll:i,shouldAutoScroll:o,handleTouchStart:s}=YX([e]);return y.jsxs("div",{className:"grid overflow-y-auto pb-4 grid-cols-1",ref:n,onScroll:i,onTouchStart:s,children:[y.jsx("div",{className:"[grid-column:1/1] [grid-row:1/1] max-w-full",children:t}),y.jsx("div",{className:"flex justify-end items-end [grid-column:1/1] [grid-row:1/1] flex-1",children:!o&&y.jsx("div",{className:"sticky bottom-0 left-0 flex w-full justify-end",children:y.jsx(Mt,{onClick:r,className:"h-8 w-8 rounded-full ease-in-out animate-in fade-in-0 slide-in-from-bottom-1",size:"icon",variant:"ghost",children:y.jsx(XB,{className:"h-4 w-4"})})})})]})}const Ij=S.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:Te("grid max-h-full w-full grid-rows-[1fr_auto]",e),...t}));Ij.displayName="ChatContainer";const Lj=S.forwardRef(({children:e,handleSubmit:t,isPending:n,className:r},i)=>{const[o,s]=S.useState(null),a=u=>{if(n){u.preventDefault();return}if(!o){t(u);return}const c=GX(o);t(u,{experimental_attachments:c}),s(null)};return y.jsx("form",{ref:i,onSubmit:a,className:r,children:e({files:o,setFiles:s})})});Lj.displayName="ChatForm";function GX(e){const t=new DataTransfer;for(const n of Array.from(e))t.items.add(n);return t.files}function ZX({agentId:e,initialMessages:t=[],agentName:n,threadId:r,memory:i}){const[o,s]=S.useState(t),[a,u]=S.useState(""),[c,f]=S.useState(!1),{mutate:h}=_b();S.useEffect(()=>{t&&s(t)},[t]);const p=S.useCallback(C=>{u(C.target.value)},[]),m=async C=>{var j;if((j=C==null?void 0:C.preventDefault)==null||j.call(C),!a.trim()||c)return;const N=a;u(""),f(!0);const P={id:Date.now().toString(),role:"user",content:N},T={id:(Date.now()+1).toString(),role:"assistant",content:""};s(R=>[...R,P,T]);try{const R=await fetch("/api/agents/"+e+"/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:[N],...i?{threadId:r,resourceid:e}:{}})});if(!R.body)throw new Error("No response body");if(R.status!==200){const O=await R.json();throw new Error(O.message)}h(`/api/memory/threads?resourceid=${e}&agentId=${e}`);const I=R.body.getReader(),M=new TextDecoder;let z="",F="",Y="";try{for(;;){const{done:O,value:q}=await I.read();if(O)break;const W=M.decode(q);z+=W;const Z=z.matchAll(/0:"([^"]*)"/g),U=z.matchAll(/3:"([^"]*)"/g);if(U)for(const B of U){const L=B[1];Y+=L,s(H=>[...H.slice(0,-1),{...H[H.length-1],content:Y,isError:!0}])}for(const B of Z){const L=B[1];F+=L,s(H=>[...H.slice(0,-1),{...H[H.length-1],content:F}])}z=""}}catch(O){throw new Error(O.message)}finally{I.releaseLock()}}catch(R){s(I=>[...I.slice(0,-1),{...I[I.length-1],content:(R==null?void 0:R.message)||"An error occurred while processing your request.",isError:!0}])}finally{f(!1)}},x=o.at(-1),v=o.length===0,k=c&&(x==null?void 0:x.role)==="assistant"&&!(x!=null&&x.content.trim()),b=S.useCallback(C=>{u(C.content),m()},[m]),E=["What capabilities do you have?","How can you help me?","Tell me about yourself"];return y.jsxs(Ij,{className:"h-full px-4 pb-3 pt-4 max-w-[1000px] mx-auto",children:[y.jsx("div",{className:"flex flex-col h-full",children:v?y.jsx("div",{className:"mx-auto max-w-2xl",children:y.jsx(UX,{label:`Chat with ${n}`,append:b,suggestions:E})}):y.jsx(Rn,{className:" h-[calc(100vh-15rem)] px-4",children:y.jsx(qX,{messages:o,children:y.jsx(WX,{messages:o,isTyping:k})})})}),y.jsxs("div",{className:"flex flex-col mt-auto gap-2",children:[y.jsx(Lj,{isPending:c||k,handleSubmit:m,children:({files:C,setFiles:N})=>y.jsx(P2,{value:a,onChange:p,files:C,setFiles:N,isGenerating:c,placeholder:"Enter your message..."})}),!i&&y.jsxs("div",{className:"flex items-center gap-1 text-sm text-mastra-el-5",children:[y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-purple-400",children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("path",{d:"M12 16v-4"}),y.jsx("path",{d:"M12 8h.01"})]}),y.jsxs("span",{className:"text-xs text-gray-300/60",children:["Agent will not remember previous messages. To enable memory for agent see"," ",y.jsx("a",{href:"https://mastra.ai/docs/agents/01-agent-memory",target:"_blank",rel:"noopener",className:"text-gray-300/60 hover:text-gray-100 underline",children:"docs."})]})]})]})]})}const Fj=S.forwardRef(({...e},t)=>y.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Fj.displayName="Breadcrumb";const $j=S.forwardRef(({className:e,...t},n)=>y.jsx("ol",{ref:n,className:Te("text-mastra-el-6 flex items-center gap-2 break-words text-[calc(13_/_16_*_1rem)] font-medium",e),...t}));$j.displayName="BreadcrumbList";const zj=S.forwardRef(({className:e,...t},n)=>y.jsx("li",{ref:n,className:Te("inline-flex items-center gap-1.5",e),...t}));zj.displayName="BreadcrumbItem";const Bj=S.forwardRef(({asChild:e,className:t,...n},r)=>{const i=e?qi:"a";return y.jsx(i,{ref:r,className:Te("hover:text-text transition-colors",t),...n})});Bj.displayName="BreadcrumbLink";const Vj=S.forwardRef(({className:e,...t},n)=>y.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:Te("text-mastra-el-5 text-sm font-medium",e),...t}));Vj.displayName="BreadcrumbPage";const Wj=({children:e,className:t,...n})=>y.jsx("li",{role:"presentation","aria-hidden":"true",className:Te(t),...n,children:e??y.jsx(um,{className:"text-mastra-el-3 !h-[0.625rem] !w-[0.625rem] -rotate-90"})});Wj.displayName="BreadcrumbSeparator";function Wd({items:e,pageClassName:t,icon:n}){return y.jsxs("div",{className:"flex items-center gap-4",children:[n,y.jsx(Fj,{children:y.jsx($j,{children:e.map((r,i)=>y.jsxs("span",{className:"flex flex-nowrap items-center gap-2",children:[y.jsx(zj,{children:r.isCurrent?y.jsx(Vj,{className:t,children:r.label}):y.jsx(Bj,{asChild:!0,children:y.jsx(jd,{to:r.href,className:"text-mastra-el-3",children:r.label})})},r.href),i<e.length-1&&y.jsx(Wj,{})]},i))})})]})}function N1(e){const t=e+"CollectionProvider",[n,r]=ni(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:x,children:v}=m,k=ne.useRef(null),b=ne.useRef(new Map).current;return y.jsx(i,{scope:x,itemMap:b,collectionRef:k,children:v})};s.displayName=t;const a=e+"CollectionSlot",u=ne.forwardRef((m,x)=>{const{scope:v,children:k}=m,b=o(a,v),E=ht(x,b.collectionRef);return y.jsx(qi,{ref:E,children:k})});u.displayName=a;const c=e+"CollectionItemSlot",f="data-radix-collection-item",h=ne.forwardRef((m,x)=>{const{scope:v,children:k,...b}=m,E=ne.useRef(null),C=ht(x,E),N=o(c,v);return ne.useEffect(()=>(N.itemMap.set(E,{ref:E,...b}),()=>void N.itemMap.delete(E))),y.jsx(qi,{[f]:"",ref:C,children:k})});h.displayName=c;function p(m){const x=o(e+"CollectionConsumer",m);return ne.useCallback(()=>{const k=x.collectionRef.current;if(!k)return[];const b=Array.from(k.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((N,P)=>b.indexOf(N.ref.current)-b.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},p,r]}var KX=mz.useId||(()=>{}),XX=0;function En(e){const[t,n]=S.useState(KX());return qn(()=>{e||n(r=>r??String(XX++))},[e]),e||(t?`radix-${t}`:"")}function Po({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=QX({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=hn(n),u=S.useCallback(c=>{if(o){const h=typeof c=="function"?c(e):c;h!==e&&a(h)}else i(c)},[o,e,i,a]);return[s,u]}function QX({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,i=S.useRef(r),o=hn(t);return S.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Zx="rovingFocusGroup.onEntryFocus",JX={bubbles:!1,cancelable:!0},Pm="RovingFocusGroup",[w0,Uj,eQ]=N1(Pm),[tQ,Rm]=ni(Pm,[eQ]),[nQ,rQ]=tQ(Pm),Hj=S.forwardRef((e,t)=>y.jsx(w0.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(w0.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(iQ,{...e,ref:t})})}));Hj.displayName=Pm;var iQ=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...h}=e,p=S.useRef(null),m=ht(t,p),x=Od(o),[v=null,k]=Po({prop:s,defaultProp:a,onChange:u}),[b,E]=S.useState(!1),C=hn(c),N=Uj(n),P=S.useRef(!1),[T,j]=S.useState(0);return S.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Zx,C),()=>R.removeEventListener(Zx,C)},[C]),y.jsx(nQ,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:v,onItemFocus:S.useCallback(R=>k(R),[k]),onItemShiftTab:S.useCallback(()=>E(!0),[]),onFocusableItemAdd:S.useCallback(()=>j(R=>R+1),[]),onFocusableItemRemove:S.useCallback(()=>j(R=>R-1),[]),children:y.jsx(He.div,{tabIndex:b||T===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,()=>{P.current=!0}),onFocus:Re(e.onFocus,R=>{const I=!P.current;if(R.target===R.currentTarget&&I&&!b){const M=new CustomEvent(Zx,JX);if(R.currentTarget.dispatchEvent(M),!M.defaultPrevented){const z=N().filter(W=>W.focusable),F=z.find(W=>W.active),Y=z.find(W=>W.id===v),q=[F,Y,...z].filter(Boolean).map(W=>W.ref.current);Gj(q,f)}}P.current=!1}),onBlur:Re(e.onBlur,()=>E(!1))})})}),Yj="RovingFocusGroupItem",qj=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=En(),u=o||a,c=rQ(Yj,n),f=c.currentTabStopId===u,h=Uj(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=c;return S.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),y.jsx(w0.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:y.jsx(He.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:Re(e.onMouseDown,x=>{r?c.onItemFocus(u):x.preventDefault()}),onFocus:Re(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Re(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=aQ(x,c.orientation,c.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=h().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")b.reverse();else if(v==="prev"||v==="next"){v==="prev"&&b.reverse();const E=b.indexOf(x.currentTarget);b=c.loop?lQ(b,E+1):b.slice(E+1)}setTimeout(()=>Gj(b))}})})})});qj.displayName=Yj;var oQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sQ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aQ(e,t,n){const r=sQ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return oQ[r]}function Gj(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zj=Hj,Kj=qj,T1="Tabs",[uQ,Wxe]=ni(T1,[Rm]),Xj=Rm(),[cQ,A1]=uQ(T1),Qj=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:u="automatic",...c}=e,f=Od(a),[h,p]=Po({prop:r,onChange:i,defaultProp:o});return y.jsx(cQ,{scope:n,baseId:En(),value:h,onValueChange:p,orientation:s,dir:f,activationMode:u,children:y.jsx(He.div,{dir:f,"data-orientation":s,...c,ref:t})})});Qj.displayName=T1;var Jj="TabsList",eD=S.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=A1(Jj,n),s=Xj(n);return y.jsx(Zj,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:y.jsx(He.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});eD.displayName=Jj;var tD="TabsTrigger",nD=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=A1(tD,n),a=Xj(n),u=oD(s.baseId,r),c=sD(s.baseId,r),f=r===s.value;return y.jsx(Kj,{asChild:!0,...a,focusable:!i,active:f,children:y.jsx(He.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Re(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(r):h.preventDefault()}),onKeyDown:Re(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(r)}),onFocus:Re(e.onFocus,()=>{const h=s.activationMode!=="manual";!f&&!i&&h&&s.onValueChange(r)})})})});nD.displayName=tD;var rD="TabsContent",iD=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=A1(rD,n),u=oD(a.baseId,r),c=sD(a.baseId,r),f=r===a.value,h=S.useRef(f);return S.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),y.jsx(lr,{present:i||f,children:({present:p})=>y.jsx(He.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:p&&o})})});iD.displayName=rD;function oD(e,t){return`${e}-trigger-${t}`}function sD(e,t){return`${e}-content-${t}`}var dQ=Qj,aD=eD,lD=nD,uD=iD;const P1=dQ,Mm=S.forwardRef(({className:e,...t},n)=>y.jsx(aD,{ref:n,className:Te(e),...t}));Mm.displayName=aD.displayName;const Co=S.forwardRef(({className:e,...t},n)=>y.jsx(lD,{ref:n,className:Te(e),...t}));Co.displayName=lD.displayName;const _o=S.forwardRef(({className:e,...t},n)=>y.jsx(uD,{ref:n,className:Te("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));_o.displayName=uD.displayName;function fQ({agentId:e}){var i;const{isLoading:t,agent:n}=Dd(e),r=js();return t?y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"})]})]})]})}):y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"Name"}),y.jsx("p",{className:"text-mastra-el-5",children:n==null?void 0:n.name})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"Instructions"}),y.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:n==null?void 0:n.instructions})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"Model"}),y.jsx("p",{className:"text-mastra-el-5",children:n==null?void 0:n.modelId})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"Provider"}),y.jsx("p",{className:"text-mastra-el-5",children:(i=n==null?void 0:n.provider)==null?void 0:i.split(".")[0].toUpperCase()})]}),y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"Tools"}),y.jsx("div",{className:"flex flex-col gap-2 text-mastra-el-5",children:Object.entries((n==null?void 0:n.tools)??{}).map(([o,s])=>y.jsx("span",{onClick:()=>{r(`/tools/${e}/${s.id}`)},className:"no-underline",children:s.id},o))})]})]})})}function hQ({agentId:e}){return y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs w-[400px]",children:y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"GET"}),y.jsx("p",{className:"text-mastra-el-5",children:"/api/agents"})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"GET"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"GET"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/evals/ci"]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"GET"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/evals/live"]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"POST"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/instructions"]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"POST"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/generate"]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"POST"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/stream"]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"POST"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/text-object"]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"POST"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/stream-object"]})]})]})})}const cD=e=>{const[t,n]=S.useState([]),[r,i]=S.useState(!0),o=async s=>{i(!0);try{const a=await fetch(`/api/logs/${s??e}`);if(!a.ok){const c=await a.json();n([]),console.error("Error fetching logs",c),nn.error((c==null?void 0:c.error)||"Error fetching logs");return}const u=await a.json();n(u)}catch(a){n([]),console.error("Error fetching logs",a),nn.error("Error fetching logs")}finally{i(!1)}};return S.useEffect(()=>{o(e)},[e]),{logs:t,isLoading:r,refetchLogs:o}};function pQ({agentId:e}){const{logs:t,isLoading:n,refetchLogs:r}=cD(e);return y.jsxs(Rn,{className:"h-[calc(100vh-126px)] px-4 pb-4 text-xs w-[400px]",children:[y.jsx("div",{className:"flex justify-end sticky top-0 bg-mastra-bg-2 py-2",children:y.jsx(Mt,{variant:"outline",onClick:()=>r(),children:n?y.jsx(jl,{className:"w-4 h-4 animate-spin"}):y.jsx(jl,{className:"w-4 h-4"})})}),y.jsx("div",{className:"space-y-4",children:t.length===0?y.jsxs("p",{className:"text-gray-300/60",children:["No log drains. By default, logs are sent to the console. To configure log drains see"," ",y.jsx("a",{href:"https://mastra.ai/docs/reference/observability/create-logger#upstash-logger-remote-log-drain",target:"_blank",rel:"noopener",className:" hover:text-gray-100 underline",children:"docs."})]}):t.map(i=>{const o=JSON.parse(i.message);return y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex gap-2 items-center",children:[y.jsxs("p",{className:"text-mastra-el-4",children:["[",i.timestamp,"]"]}),y.jsxs("p",{className:"text-mastra-el-5",children:["[",i.level,"]"]})]}),y.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:y.jsx("code",{children:JSON.stringify(o,null,2)})})]},i.timestamp)})})]})}function HN({agentId:e}){const t=js();return y.jsxs(P1,{defaultValue:"details",children:[y.jsxs(Mm,{className:"flex shrink-0 border-b",children:[y.jsx(Co,{value:"details",className:"group",children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Details"})}),y.jsx(Co,{value:"endpoints",className:"group",children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Endpoints"})}),y.jsx(Co,{value:"logs",className:"group",children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Log Drains"})}),y.jsx("button",{className:"group",onClick:()=>t(`/agents/${e}/evals`),children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3",children:"Evals"})})]}),y.jsx(_o,{value:"details",children:e?y.jsx(fQ,{agentId:e}):null}),y.jsx(_o,{value:"endpoints",children:y.jsx(hQ,{agentId:e})}),y.jsx(_o,{value:"logs",children:y.jsx(pQ,{agentId:e})})]})}function mQ(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e);S.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var gQ="DismissableLayer",b0="dismissableLayer.update",yQ="dismissableLayer.pointerDownOutside",xQ="dismissableLayer.focusOutside",YN,dD=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ud=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...u}=e,c=S.useContext(dD),[f,h]=S.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=S.useState({}),x=ht(t,j=>h(j)),v=Array.from(c.layers),[k]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(k),E=f?v.indexOf(f):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,N=E>=b,P=bQ(j=>{const R=j.target,I=[...c.branches].some(M=>M.contains(R));!N||I||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},p),T=kQ(j=>{const R=j.target;[...c.branches].some(M=>M.contains(R))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},p);return mQ(j=>{E===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},p),S.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(YN=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),qN(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=YN)}},[f,p,n,c]),S.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),qN())},[f,c]),S.useEffect(()=>{const j=()=>m({});return document.addEventListener(b0,j),()=>document.removeEventListener(b0,j)},[]),y.jsx(He.div,{...u,ref:x,style:{pointerEvents:C?N?"auto":"none":void 0,...e.style},onFocusCapture:Re(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Re(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Re(e.onPointerDownCapture,P.onPointerDownCapture)})});Ud.displayName=gQ;var vQ="DismissableLayerBranch",wQ=S.forwardRef((e,t)=>{const n=S.useContext(dD),r=S.useRef(null),i=ht(t,r);return S.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),y.jsx(He.div,{...e,ref:i})});wQ.displayName=vQ;function bQ(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e),r=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){fD(yQ,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kQ(e,t=globalThis==null?void 0:globalThis.document){const n=hn(e),r=S.useRef(!1);return S.useEffect(()=>{const i=o=>{o.target&&!r.current&&fD(xQ,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qN(){const e=new CustomEvent(b0);document.dispatchEvent(e)}function fD(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?TR(i,o):i.dispatchEvent(o)}var Kx="focusScope.autoFocusOnMount",Xx="focusScope.autoFocusOnUnmount",GN={bubbles:!1,cancelable:!0},SQ="FocusScope",Hd=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,u]=S.useState(null),c=hn(i),f=hn(o),h=S.useRef(null),p=ht(t,v=>u(v)),m=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let v=function(C){if(m.paused||!a)return;const N=C.target;a.contains(N)?h.current=N:gs(h.current,{select:!0})},k=function(C){if(m.paused||!a)return;const N=C.relatedTarget;N!==null&&(a.contains(N)||gs(h.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&gs(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",k);const E=new MutationObserver(b);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",k),E.disconnect()}}},[r,a,m.paused]),S.useEffect(()=>{if(a){KN.add(m);const v=document.activeElement;if(!a.contains(v)){const b=new CustomEvent(Kx,GN);a.addEventListener(Kx,c),a.dispatchEvent(b),b.defaultPrevented||(EQ(AQ(hD(a)),{select:!0}),document.activeElement===v&&gs(a))}return()=>{a.removeEventListener(Kx,c),setTimeout(()=>{const b=new CustomEvent(Xx,GN);a.addEventListener(Xx,f),a.dispatchEvent(b),b.defaultPrevented||gs(v??document.body,{select:!0}),a.removeEventListener(Xx,f),KN.remove(m)},0)}}},[a,c,f,m]);const x=S.useCallback(v=>{if(!n&&!r||m.paused)return;const k=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(k&&b){const E=v.currentTarget,[C,N]=CQ(E);C&&N?!v.shiftKey&&b===N?(v.preventDefault(),n&&gs(C,{select:!0})):v.shiftKey&&b===C&&(v.preventDefault(),n&&gs(N,{select:!0})):b===E&&v.preventDefault()}},[n,r,m.paused]);return y.jsx(He.div,{tabIndex:-1,...s,ref:p,onKeyDown:x})});Hd.displayName=SQ;function EQ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gs(r,{select:t}),document.activeElement!==n)return}function CQ(e){const t=hD(e),n=ZN(t,e),r=ZN(t.reverse(),e);return[n,r]}function hD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ZN(e,t){for(const n of e)if(!_Q(n,{upTo:t}))return n}function _Q(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function NQ(e){return e instanceof HTMLInputElement&&"select"in e}function gs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&NQ(e)&&t&&e.select()}}var KN=TQ();function TQ(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=XN(e,t),e.unshift(t)},remove(t){var n;e=XN(e,t),(n=e[0])==null||n.resume()}}}function XN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AQ(e){return e.filter(t=>t.tagName!=="A")}var PQ="Portal",Yd=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=S.useState(!1);qn(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?wR.createPortal(y.jsx(He.div,{...r,ref:t}),s):null});Yd.displayName=PQ;var Qx=0;function jm(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??QN()),document.body.insertAdjacentElement("beforeend",e[1]??QN()),Qx++,()=>{Qx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qx--}},[])}function QN(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Li=function(){return Li=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Li.apply(this,arguments)};function pD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function RQ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var rp="right-scroll-bar-position",ip="width-before-scroll-bar",MQ="with-scroll-bars-hidden",jQ="--removed-body-scroll-bar-size";function Jx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function DQ(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var OQ=typeof window<"u"?S.useLayoutEffect:S.useEffect,JN=new WeakMap;function IQ(e,t){var n=DQ(null,function(r){return e.forEach(function(i){return Jx(i,r)})});return OQ(function(){var r=JN.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;i.forEach(function(a){o.has(a)||Jx(a,null)}),o.forEach(function(a){i.has(a)||Jx(a,s)})}JN.set(n,e)},[e]),n}function LQ(e){return e}function FQ(e,t){t===void 0&&(t=LQ);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var u=function(){var f=s;s=[],f.forEach(o)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(f){s.push(f),c()},filter:function(f){return s=s.filter(f),n}}}};return i}function $Q(e){e===void 0&&(e={});var t=FQ(null);return t.options=Li({async:!0,ssr:!1},e),t}var mD=function(e){var t=e.sideCar,n=pD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,Li({},n))};mD.isSideCarExport=!0;function zQ(e,t){return e.useMedium(t),mD}var gD=$Q(),ev=function(){},Dm=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:ev,onWheelCapture:ev,onTouchMoveCapture:ev}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,u=e.className,c=e.removeScrollBar,f=e.enabled,h=e.shards,p=e.sideCar,m=e.noIsolation,x=e.inert,v=e.allowPinchZoom,k=e.as,b=k===void 0?"div":k,E=e.gapMode,C=pD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,P=IQ([n,t]),T=Li(Li({},C),i);return S.createElement(S.Fragment,null,f&&S.createElement(N,{sideCar:gD,removeScrollBar:c,shards:h,noIsolation:m,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:E}),s?S.cloneElement(S.Children.only(a),Li(Li({},T),{ref:P})):S.createElement(b,Li({},T,{className:u,ref:P}),a))});Dm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Dm.classNames={fullWidth:ip,zeroRight:rp};var BQ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VQ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=BQ();return t&&e.setAttribute("nonce",t),e}function WQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function UQ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var HQ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=VQ())&&(WQ(t,n),UQ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},YQ=function(){var e=HQ();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yD=function(){var e=YQ(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},qQ={left:0,top:0,right:0,gap:0},tv=function(e){return parseInt(e||"",10)||0},GQ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[tv(n),tv(r),tv(i)]},ZQ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qQ;var t=GQ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},KQ=yD(),_l="data-scroll-locked",XQ=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
243
|
+
.`.concat(MQ,` {
|
|
244
|
+
overflow: hidden `).concat(r,`;
|
|
245
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
246
|
+
}
|
|
247
|
+
body[`).concat(_l,`] {
|
|
248
|
+
overflow: hidden `).concat(r,`;
|
|
249
|
+
overscroll-behavior: contain;
|
|
250
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
251
|
+
padding-left: `.concat(i,`px;
|
|
252
|
+
padding-top: `).concat(o,`px;
|
|
253
|
+
padding-right: `).concat(s,`px;
|
|
254
|
+
margin-left:0;
|
|
255
|
+
margin-top:0;
|
|
256
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
257
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.`).concat(rp,` {
|
|
261
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.`).concat(ip,` {
|
|
265
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.`).concat(rp," .").concat(rp,` {
|
|
269
|
+
right: 0 `).concat(r,`;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.`).concat(ip," .").concat(ip,` {
|
|
273
|
+
margin-right: 0 `).concat(r,`;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
body[`).concat(_l,`] {
|
|
277
|
+
`).concat(jQ,": ").concat(a,`px;
|
|
278
|
+
}
|
|
279
|
+
`)},eT=function(){var e=parseInt(document.body.getAttribute(_l)||"0",10);return isFinite(e)?e:0},QQ=function(){S.useEffect(function(){return document.body.setAttribute(_l,(eT()+1).toString()),function(){var e=eT()-1;e<=0?document.body.removeAttribute(_l):document.body.setAttribute(_l,e.toString())}},[])},JQ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;QQ();var o=S.useMemo(function(){return ZQ(i)},[i]);return S.createElement(KQ,{styles:XQ(o,!t,i,n?"":"!important")})},k0=!1;if(typeof window<"u")try{var Ih=Object.defineProperty({},"passive",{get:function(){return k0=!0,!0}});window.addEventListener("test",Ih,Ih),window.removeEventListener("test",Ih,Ih)}catch{k0=!1}var ol=k0?{passive:!1}:!1,eJ=function(e){return e.tagName==="TEXTAREA"},xD=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eJ(e)&&n[t]==="visible")},tJ=function(e){return xD(e,"overflowY")},nJ=function(e){return xD(e,"overflowX")},tT=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=vD(e,r);if(i){var o=wD(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rJ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},iJ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vD=function(e,t){return e==="v"?tJ(t):nJ(t)},wD=function(e,t){return e==="v"?rJ(t):iJ(t)},oJ=function(e,t){return e==="h"&&t==="rtl"?-1:1},sJ=function(e,t,n,r,i){var o=oJ(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,u=t.contains(a),c=!1,f=s>0,h=0,p=0;do{var m=wD(e,a),x=m[0],v=m[1],k=m[2],b=v-k-o*x;(x||b)&&vD(e,a)&&(h+=b,p+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(f&&Math.abs(h)<1||!f&&Math.abs(p)<1)&&(c=!0),c},Lh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nT=function(e){return[e.deltaX,e.deltaY]},rT=function(e){return e&&"current"in e?e.current:e},aJ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lJ=function(e){return`
|
|
280
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
281
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
282
|
+
`)},uJ=0,sl=[];function cJ(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(uJ++)[0],o=S.useState(yD)[0],s=S.useRef(e);S.useEffect(function(){s.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=RQ([e.lockRef.current],(e.shards||[]).map(rT),!0).filter(Boolean);return v.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(v,k){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var b=Lh(v),E=n.current,C="deltaX"in v?v.deltaX:E[0]-b[0],N="deltaY"in v?v.deltaY:E[1]-b[1],P,T=v.target,j=Math.abs(C)>Math.abs(N)?"h":"v";if("touches"in v&&j==="h"&&T.type==="range")return!1;var R=tT(j,T);if(!R)return!0;if(R?P=j:(P=j==="v"?"h":"v",R=tT(j,T)),!R)return!1;if(!r.current&&"changedTouches"in v&&(C||N)&&(r.current=P),!P)return!0;var I=r.current||P;return sJ(I,k,v,I==="h"?C:N)},[]),u=S.useCallback(function(v){var k=v;if(!(!sl.length||sl[sl.length-1]!==o)){var b="deltaY"in k?nT(k):Lh(k),E=t.current.filter(function(P){return P.name===k.type&&(P.target===k.target||k.target===P.shadowParent)&&aJ(P.delta,b)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var C=(s.current.shards||[]).map(rT).filter(Boolean).filter(function(P){return P.contains(k.target)}),N=C.length>0?a(k,C[0]):!s.current.noIsolation;N&&k.cancelable&&k.preventDefault()}}},[]),c=S.useCallback(function(v,k,b,E){var C={name:v,delta:k,target:b,should:E,shadowParent:dJ(b)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(N){return N!==C})},1)},[]),f=S.useCallback(function(v){n.current=Lh(v),r.current=void 0},[]),h=S.useCallback(function(v){c(v.type,nT(v),v.target,a(v,e.lockRef.current))},[]),p=S.useCallback(function(v){c(v.type,Lh(v),v.target,a(v,e.lockRef.current))},[]);S.useEffect(function(){return sl.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",u,ol),document.addEventListener("touchmove",u,ol),document.addEventListener("touchstart",f,ol),function(){sl=sl.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,ol),document.removeEventListener("touchmove",u,ol),document.removeEventListener("touchstart",f,ol)}},[]);var m=e.removeScrollBar,x=e.inert;return S.createElement(S.Fragment,null,x?S.createElement(o,{styles:lJ(i)}):null,m?S.createElement(JQ,{gapMode:e.gapMode}):null)}function dJ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fJ=zQ(gD,cJ);var qd=S.forwardRef(function(e,t){return S.createElement(Dm,Li({},e,{ref:t,sideCar:fJ}))});qd.classNames=Dm.classNames;var hJ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},al=new WeakMap,Fh=new WeakMap,$h={},nv=0,bD=function(e){return e&&(e.host||bD(e.parentNode))},pJ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bD(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mJ=function(e,t,n,r){var i=pJ(t,Array.isArray(e)?e:[e]);$h[n]||($h[n]=new WeakMap);var o=$h[n],s=[],a=new Set,u=new Set(i),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};i.forEach(c);var f=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))f(p);else try{var m=p.getAttribute(r),x=m!==null&&m!=="false",v=(al.get(p)||0)+1,k=(o.get(p)||0)+1;al.set(p,v),o.set(p,k),s.push(p),v===1&&x&&Fh.set(p,!0),k===1&&p.setAttribute(n,"true"),x||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),a.clear(),nv++,function(){s.forEach(function(h){var p=al.get(h)-1,m=o.get(h)-1;al.set(h,p),o.set(h,m),p||(Fh.has(h)||h.removeAttribute(r),Fh.delete(h)),m||h.removeAttribute(n)}),nv--,nv||(al=new WeakMap,al=new WeakMap,Fh=new WeakMap,$h={})}},Om=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=hJ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),mJ(r,i,n,"aria-hidden")):function(){return null}},R1="Dialog",[kD,SD]=ni(R1),[gJ,Ni]=kD(R1),ED=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=S.useRef(null),u=S.useRef(null),[c=!1,f]=Po({prop:r,defaultProp:i,onChange:o});return y.jsx(gJ,{scope:t,triggerRef:a,contentRef:u,contentId:En(),titleId:En(),descriptionId:En(),open:c,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(h=>!h),[f]),modal:s,children:n})};ED.displayName=R1;var CD="DialogTrigger",_D=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ni(CD,n),o=ht(t,i.triggerRef);return y.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":D1(i.open),...r,ref:o,onClick:Re(e.onClick,i.onOpenToggle)})});_D.displayName=CD;var M1="DialogPortal",[yJ,ND]=kD(M1,{forceMount:void 0}),TD=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Ni(M1,t);return y.jsx(yJ,{scope:t,forceMount:n,children:S.Children.map(r,s=>y.jsx(lr,{present:n||o.open,children:y.jsx(Yd,{asChild:!0,container:i,children:s})}))})};TD.displayName=M1;var Np="DialogOverlay",AD=S.forwardRef((e,t)=>{const n=ND(Np,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ni(Np,e.__scopeDialog);return o.modal?y.jsx(lr,{present:r||o.open,children:y.jsx(xJ,{...i,ref:t})}):null});AD.displayName=Np;var xJ=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ni(Np,n);return y.jsx(qd,{as:qi,allowPinchZoom:!0,shards:[i.contentRef],children:y.jsx(He.div,{"data-state":D1(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ma="DialogContent",PD=S.forwardRef((e,t)=>{const n=ND(ma,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ni(ma,e.__scopeDialog);return y.jsx(lr,{present:r||o.open,children:o.modal?y.jsx(vJ,{...i,ref:t}):y.jsx(wJ,{...i,ref:t})})});PD.displayName=ma;var vJ=S.forwardRef((e,t)=>{const n=Ni(ma,e.__scopeDialog),r=S.useRef(null),i=ht(t,n.contentRef,r);return S.useEffect(()=>{const o=r.current;if(o)return Om(o)},[]),y.jsx(RD,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Re(e.onFocusOutside,o=>o.preventDefault())})}),wJ=S.forwardRef((e,t)=>{const n=Ni(ma,e.__scopeDialog),r=S.useRef(!1),i=S.useRef(!1);return y.jsx(RD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),RD=S.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Ni(ma,n),u=S.useRef(null),c=ht(t,u);return jm(),y.jsxs(y.Fragment,{children:[y.jsx(Hd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:y.jsx(Ud,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":D1(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(kJ,{titleId:a.titleId}),y.jsx(EJ,{contentRef:u,descriptionId:a.descriptionId})]})]})}),j1="DialogTitle",MD=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ni(j1,n);return y.jsx(He.h2,{id:i.titleId,...r,ref:t})});MD.displayName=j1;var jD="DialogDescription",DD=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ni(jD,n);return y.jsx(He.p,{id:i.descriptionId,...r,ref:t})});DD.displayName=jD;var OD="DialogClose",ID=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ni(OD,n);return y.jsx(He.button,{type:"button",...r,ref:t,onClick:Re(e.onClick,()=>i.onOpenChange(!1))})});ID.displayName=OD;function D1(e){return e?"open":"closed"}var LD="DialogTitleWarning",[bJ,FD]=I6(LD,{contentName:ma,titleName:j1,docsSlug:"dialog"}),kJ=({titleId:e})=>{const t=FD(LD),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
283
|
+
|
|
284
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
285
|
+
|
|
286
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},SJ="DialogDescriptionWarning",EJ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${FD(SJ).contentName}}.`;return S.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},$D=ED,CJ=_D,zD=TD,BD=AD,VD=PD,_J=MD,NJ=DD,WD=ID,UD="AlertDialog",[TJ,Uxe]=ni(UD,[SD]),Fo=SD(),HD=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fo(t);return y.jsx($D,{...r,...n,modal:!0})};HD.displayName=UD;var AJ="AlertDialogTrigger",YD=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Fo(n);return y.jsx(CJ,{...i,...r,ref:t})});YD.displayName=AJ;var PJ="AlertDialogPortal",qD=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fo(t);return y.jsx(zD,{...r,...n})};qD.displayName=PJ;var RJ="AlertDialogOverlay",GD=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Fo(n);return y.jsx(BD,{...i,...r,ref:t})});GD.displayName=RJ;var Nl="AlertDialogContent",[MJ,jJ]=TJ(Nl),ZD=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Fo(n),s=S.useRef(null),a=ht(t,s),u=S.useRef(null);return y.jsx(bJ,{contentName:Nl,titleName:KD,docsSlug:"alert-dialog",children:y.jsx(MJ,{scope:n,cancelRef:u,children:y.jsxs(VD,{role:"alertdialog",...o,...i,ref:a,onOpenAutoFocus:Re(i.onOpenAutoFocus,c=>{var f;c.preventDefault(),(f=u.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[y.jsx(NR,{children:r}),y.jsx(OJ,{contentRef:s})]})})})});ZD.displayName=Nl;var KD="AlertDialogTitle",XD=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Fo(n);return y.jsx(_J,{...i,...r,ref:t})});XD.displayName=KD;var QD="AlertDialogDescription",JD=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Fo(n);return y.jsx(NJ,{...i,...r,ref:t})});JD.displayName=QD;var DJ="AlertDialogAction",eO=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Fo(n);return y.jsx(WD,{...i,...r,ref:t})});eO.displayName=DJ;var tO="AlertDialogCancel",nO=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=jJ(tO,n),o=Fo(n),s=ht(t,i);return y.jsx(WD,{...o,...r,ref:s})});nO.displayName=tO;var OJ=({contentRef:e})=>{const t=`\`${Nl}\` requires a description for the component to be accessible for screen reader users.
|
|
287
|
+
|
|
288
|
+
You can add a description to the \`${Nl}\` by passing a \`${QD}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
289
|
+
|
|
290
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Nl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
291
|
+
|
|
292
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},IJ=HD,LJ=YD,FJ=qD,rO=GD,iO=ZD,oO=eO,sO=nO,aO=XD,lO=JD;const $J=IJ,zJ=LJ,uO=FJ;function Pn({open:e,onOpenChange:t,children:n}){return y.jsx($J,{open:e,onOpenChange:t,children:n})}const O1=S.forwardRef(({className:e,...t},n)=>y.jsx(rO,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));O1.displayName=rO.displayName;const cO=S.forwardRef(({className:e,...t},n)=>y.jsxs(uO,{children:[y.jsx(O1,{}),y.jsx(iO,{ref:n,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));cO.displayName=iO.displayName;const dO=({className:e,...t})=>y.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});dO.displayName="AlertDialogHeader";const fO=({className:e,...t})=>y.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fO.displayName="AlertDialogFooter";const hO=S.forwardRef(({className:e,...t},n)=>y.jsx(aO,{ref:n,className:Te("text-lg font-semibold",e),...t}));hO.displayName=aO.displayName;const pO=S.forwardRef(({className:e,...t},n)=>y.jsx(lO,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));pO.displayName=lO.displayName;const mO=S.forwardRef(({className:e,...t},n)=>y.jsx(oO,{ref:n,className:Te(El(),e),...t}));mO.displayName=oO.displayName;const gO=S.forwardRef(({className:e,...t},n)=>y.jsx(sO,{ref:n,className:Te(El({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));gO.displayName=sO.displayName;Pn.Trigger=zJ;Pn.Portal=uO;Pn.Overlay=O1;Pn.Content=cO;Pn.Header=dO;Pn.Footer=fO;Pn.Title=hO;Pn.Description=pO;Pn.Action=mO;Pn.Cancel=gO;const BJ=["top","right","bottom","left"],Cs=Math.min,Ar=Math.max,Tp=Math.round,zh=Math.floor,Wi=e=>({x:e,y:e}),VJ={left:"right",right:"left",bottom:"top",top:"bottom"},WJ={start:"end",end:"start"};function S0(e,t,n){return Ar(e,Cs(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function Mo(e){return e.split("-")[0]}function hu(e){return e.split("-")[1]}function I1(e){return e==="x"?"y":"x"}function L1(e){return e==="y"?"height":"width"}function _s(e){return["top","bottom"].includes(Mo(e))?"y":"x"}function F1(e){return I1(_s(e))}function UJ(e,t,n){n===void 0&&(n=!1);const r=hu(e),i=F1(e),o=L1(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Ap(s)),[s,Ap(s)]}function HJ(e){const t=Ap(e);return[E0(e),t,E0(t)]}function E0(e){return e.replace(/start|end/g,t=>WJ[t])}function YJ(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function qJ(e,t,n,r){const i=hu(e);let o=YJ(Mo(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(E0)))),o}function Ap(e){return e.replace(/left|right|bottom|top/g,t=>VJ[t])}function GJ(e){return{top:0,right:0,bottom:0,left:0,...e}}function yO(e){return typeof e!="number"?GJ(e):{top:e,right:e,bottom:e,left:e}}function Pp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function iT(e,t,n){let{reference:r,floating:i}=e;const o=_s(t),s=F1(t),a=L1(s),u=Mo(t),c=o==="y",f=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-i.width,y:h};break;default:m={x:r.x,y:r.y}}switch(hu(t)){case"start":m[s]-=p*(n&&c?-1:1);break;case"end":m[s]+=p*(n&&c?-1:1);break}return m}const ZJ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=iT(c,r,u),p=r,m={},x=0;for(let v=0;v<a.length;v++){const{name:k,fn:b}=a[v],{x:E,y:C,data:N,reset:P}=await b({x:f,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});f=E??f,h=C??h,m={...m,[k]:{...m[k],...N}},P&&x<=50&&(x++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(c=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:f,y:h}=iT(c,p,u)),v=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:m}};async function Jc(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=Ro(t,e),x=yO(m),k=a[p?h==="floating"?"reference":"floating":h],b=Pp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(k)))==null||n?k:k.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:u})),E=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),N=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Pp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:C,strategy:u}):E);return{top:(b.top-P.top+x.top)/N.y,bottom:(P.bottom-b.bottom+x.bottom)/N.y,left:(b.left-P.left+x.left)/N.x,right:(P.right-b.right+x.right)/N.x}}const KJ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:f=0}=Ro(e,t)||{};if(c==null)return{};const h=yO(f),p={x:n,y:r},m=F1(i),x=L1(m),v=await s.getDimensions(c),k=m==="y",b=k?"top":"left",E=k?"bottom":"right",C=k?"clientHeight":"clientWidth",N=o.reference[x]+o.reference[m]-p[m]-o.floating[x],P=p[m]-o.reference[m],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let j=T?T[C]:0;(!j||!await(s.isElement==null?void 0:s.isElement(T)))&&(j=a.floating[C]||o.floating[x]);const R=N/2-P/2,I=j/2-v[x]/2-1,M=Cs(h[b],I),z=Cs(h[E],I),F=M,Y=j-v[x]-z,O=j/2-v[x]/2+R,q=S0(F,O,Y),W=!u.arrow&&hu(i)!=null&&O!==q&&o.reference[x]/2-(O<F?M:z)-v[x]/2<0,Z=W?O<F?O-F:O-Y:0;return{[m]:p[m]+Z,data:{[m]:q,centerOffset:O-q-Z,...W&&{alignmentOffset:Z}},reset:W}}}),XJ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...k}=Ro(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=Mo(i),E=_s(a),C=Mo(a)===a,N=await(u.isRTL==null?void 0:u.isRTL(c.floating)),P=p||(C||!v?[Ap(a)]:HJ(a)),T=x!=="none";!p&&T&&P.push(...qJ(a,v,x,N));const j=[a,...P],R=await Jc(t,k),I=[];let M=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&I.push(R[b]),h){const O=UJ(i,s,N);I.push(R[O[0]],R[O[1]])}if(M=[...M,{placement:i,overflows:I}],!I.every(O=>O<=0)){var z,F;const O=(((z=o.flip)==null?void 0:z.index)||0)+1,q=j[O];if(q)return{data:{index:O,overflows:M},reset:{placement:q}};let W=(F=M.filter(Z=>Z.overflows[0]<=0).sort((Z,U)=>Z.overflows[1]-U.overflows[1])[0])==null?void 0:F.placement;if(!W)switch(m){case"bestFit":{var Y;const Z=(Y=M.filter(U=>{if(T){const B=_s(U.placement);return B===E||B==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(B=>B>0).reduce((B,L)=>B+L,0)]).sort((U,B)=>U[1]-B[1])[0])==null?void 0:Y[0];Z&&(W=Z);break}case"initialPlacement":W=a;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function oT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sT(e){return BJ.some(t=>e[t]>=0)}const QJ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ro(e,t);switch(r){case"referenceHidden":{const o=await Jc(t,{...i,elementContext:"reference"}),s=oT(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:sT(s)}}}case"escaped":{const o=await Jc(t,{...i,altBoundary:!0}),s=oT(o,n.floating);return{data:{escapedOffsets:s,escaped:sT(s)}}}default:return{}}}}};async function JJ(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Mo(n),a=hu(n),u=_s(n)==="y",c=["left","top"].includes(s)?-1:1,f=o&&u?-1:1,h=Ro(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof x=="number"&&(m=a==="end"?x*-1:x),u?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const eee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,u=await JJ(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:s}}}}},tee=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:k=>{let{x:b,y:E}=k;return{x:b,y:E}}},...u}=Ro(e,t),c={x:n,y:r},f=await Jc(t,u),h=_s(Mo(i)),p=I1(h);let m=c[p],x=c[h];if(o){const k=p==="y"?"top":"left",b=p==="y"?"bottom":"right",E=m+f[k],C=m-f[b];m=S0(E,m,C)}if(s){const k=h==="y"?"top":"left",b=h==="y"?"bottom":"right",E=x+f[k],C=x-f[b];x=S0(E,x,C)}const v=a.fn({...t,[p]:m,[h]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[h]:s}}}}}},nee=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=Ro(e,t),f={x:n,y:r},h=_s(i),p=I1(h);let m=f[p],x=f[h];const v=Ro(a,t),k=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const C=p==="y"?"height":"width",N=o.reference[p]-o.floating[C]+k.mainAxis,P=o.reference[p]+o.reference[C]-k.mainAxis;m<N?m=N:m>P&&(m=P)}if(c){var b,E;const C=p==="y"?"width":"height",N=["top","left"].includes(Mo(i)),P=o.reference[h]-o.floating[C]+(N&&((b=s.offset)==null?void 0:b[h])||0)+(N?0:k.crossAxis),T=o.reference[h]+o.reference[C]+(N?0:((E=s.offset)==null?void 0:E[h])||0)-(N?k.crossAxis:0);x<P?x=P:x>T&&(x=T)}return{[p]:m,[h]:x}}}},ree=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:u=()=>{},...c}=Ro(e,t),f=await Jc(t,c),h=Mo(i),p=hu(i),m=_s(i)==="y",{width:x,height:v}=o.floating;let k,b;h==="top"||h==="bottom"?(k=h,b=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=h,k=p==="end"?"top":"bottom");const E=v-f.top-f.bottom,C=x-f.left-f.right,N=Cs(v-f[k],E),P=Cs(x-f[b],C),T=!t.middlewareData.shift;let j=N,R=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=E),T&&!p){const M=Ar(f.left,0),z=Ar(f.right,0),F=Ar(f.top,0),Y=Ar(f.bottom,0);m?R=x-2*(M!==0||z!==0?M+z:Ar(f.left,f.right)):j=v-2*(F!==0||Y!==0?F+Y:Ar(f.top,f.bottom))}await u({...t,availableWidth:R,availableHeight:j});const I=await s.getDimensions(a.floating);return x!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function Im(){return typeof window<"u"}function pu(e){return xO(e)?(e.nodeName||"").toLowerCase():"#document"}function jr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function eo(e){var t;return(t=(xO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xO(e){return Im()?e instanceof Node||e instanceof jr(e).Node:!1}function ki(e){return Im()?e instanceof Element||e instanceof jr(e).Element:!1}function Gi(e){return Im()?e instanceof HTMLElement||e instanceof jr(e).HTMLElement:!1}function aT(e){return!Im()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jr(e).ShadowRoot}function Gd(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Si(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function iee(e){return["table","td","th"].includes(pu(e))}function Lm(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function $1(e){const t=z1(),n=ki(e)?Si(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function oee(e){let t=Ns(e);for(;Gi(t)&&!$l(t);){if($1(t))return t;if(Lm(t))return null;t=Ns(t)}return null}function z1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $l(e){return["html","body","#document"].includes(pu(e))}function Si(e){return jr(e).getComputedStyle(e)}function Fm(e){return ki(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ns(e){if(pu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aT(e)&&e.host||eo(e);return aT(t)?t.host:t}function vO(e){const t=Ns(e);return $l(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gi(t)&&Gd(t)?t:vO(t)}function ed(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=vO(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=jr(i);if(o){const a=C0(s);return t.concat(s,s.visualViewport||[],Gd(i)?i:[],a&&n?ed(a):[])}return t.concat(i,ed(i,[],n))}function C0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wO(e){const t=Si(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Gi(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Tp(n)!==o||Tp(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function B1(e){return ki(e)?e:e.contextElement}function Tl(e){const t=B1(e);if(!Gi(t))return Wi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=wO(t);let s=(o?Tp(n.width):n.width)/r,a=(o?Tp(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const see=Wi(0);function bO(e){const t=jr(e);return!z1()||!t.visualViewport?see:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aee(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jr(e)?!1:t}function ga(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=B1(e);let s=Wi(1);t&&(r?ki(r)&&(s=Tl(r)):s=Tl(e));const a=aee(o,n,r)?bO(o):Wi(0);let u=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,f=i.width/s.x,h=i.height/s.y;if(o){const p=jr(o),m=r&&ki(r)?jr(r):r;let x=p,v=C0(x);for(;v&&r&&m!==x;){const k=Tl(v),b=v.getBoundingClientRect(),E=Si(v),C=b.left+(v.clientLeft+parseFloat(E.paddingLeft))*k.x,N=b.top+(v.clientTop+parseFloat(E.paddingTop))*k.y;u*=k.x,c*=k.y,f*=k.x,h*=k.y,u+=C,c+=N,x=jr(v),v=C0(x)}}return Pp({width:f,height:h,x:u,y:c})}function V1(e,t){const n=Fm(e).scrollLeft;return t?t.left+n:ga(eo(e)).left+n}function kO(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:V1(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function lee(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=eo(r),a=t?Lm(t.floating):!1;if(r===s||a&&o)return n;let u={scrollLeft:0,scrollTop:0},c=Wi(1);const f=Wi(0),h=Gi(r);if((h||!h&&!o)&&((pu(r)!=="body"||Gd(s))&&(u=Fm(r)),Gi(r))){const m=ga(r);c=Tl(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=s&&!h&&!o?kO(s,u,!0):Wi(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-u.scrollTop*c.y+f.y+p.y}}function uee(e){return Array.from(e.getClientRects())}function cee(e){const t=eo(e),n=Fm(e),r=e.ownerDocument.body,i=Ar(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ar(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+V1(e);const a=-n.scrollTop;return Si(r).direction==="rtl"&&(s+=Ar(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function dee(e,t){const n=jr(e),r=eo(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;const c=z1();(!c||c&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a,y:u}}function fee(e,t){const n=ga(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Gi(e)?Tl(e):Wi(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,u=i*o.x,c=r*o.y;return{width:s,height:a,x:u,y:c}}function lT(e,t,n){let r;if(t==="viewport")r=dee(e,n);else if(t==="document")r=cee(eo(e));else if(ki(t))r=fee(t,n);else{const i=bO(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Pp(r)}function SO(e,t){const n=Ns(e);return n===t||!ki(n)||$l(n)?!1:Si(n).position==="fixed"||SO(n,t)}function hee(e,t){const n=t.get(e);if(n)return n;let r=ed(e,[],!1).filter(a=>ki(a)&&pu(a)!=="body"),i=null;const o=Si(e).position==="fixed";let s=o?Ns(e):e;for(;ki(s)&&!$l(s);){const a=Si(s),u=$1(s);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gd(s)&&!u&&SO(e,s))?r=r.filter(f=>f!==s):i=a,s=Ns(s)}return t.set(e,r),r}function pee(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Lm(t)?[]:hee(t,this._c):[].concat(n),r],a=s[0],u=s.reduce((c,f)=>{const h=lT(t,f,i);return c.top=Ar(h.top,c.top),c.right=Cs(h.right,c.right),c.bottom=Cs(h.bottom,c.bottom),c.left=Ar(h.left,c.left),c},lT(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function mee(e){const{width:t,height:n}=wO(e);return{width:t,height:n}}function gee(e,t,n){const r=Gi(t),i=eo(t),o=n==="fixed",s=ga(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const u=Wi(0);if(r||!r&&!o)if((pu(t)!=="body"||Gd(i))&&(a=Fm(t)),r){const p=ga(t,!0,o,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=V1(i));const c=i&&!r&&!o?kO(i,a):Wi(0),f=s.left+a.scrollLeft-u.x-c.x,h=s.top+a.scrollTop-u.y-c.y;return{x:f,y:h,width:s.width,height:s.height}}function rv(e){return Si(e).position==="static"}function uT(e,t){if(!Gi(e)||Si(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return eo(e)===n&&(n=n.ownerDocument.body),n}function EO(e,t){const n=jr(e);if(Lm(e))return n;if(!Gi(e)){let i=Ns(e);for(;i&&!$l(i);){if(ki(i)&&!rv(i))return i;i=Ns(i)}return n}let r=uT(e,t);for(;r&&iee(r)&&rv(r);)r=uT(r,t);return r&&$l(r)&&rv(r)&&!$1(r)?n:r||oee(e)||n}const yee=async function(e){const t=this.getOffsetParent||EO,n=this.getDimensions,r=await n(e.floating);return{reference:gee(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xee(e){return Si(e).direction==="rtl"}const vee={convertOffsetParentRelativeRectToViewportRelativeRect:lee,getDocumentElement:eo,getClippingRect:pee,getOffsetParent:EO,getElementRects:yee,getClientRects:uee,getDimensions:mee,getScale:Tl,isElement:ki,isRTL:xee};function CO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wee(e,t){let n=null,r;const i=eo(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const c=e.getBoundingClientRect(),{left:f,top:h,width:p,height:m}=c;if(a||t(),!p||!m)return;const x=zh(h),v=zh(i.clientWidth-(f+p)),k=zh(i.clientHeight-(h+m)),b=zh(f),C={rootMargin:-x+"px "+-v+"px "+-k+"px "+-b+"px",threshold:Ar(0,Cs(1,u))||1};let N=!0;function P(T){const j=T[0].intersectionRatio;if(j!==u){if(!N)return s();j?s(!1,j):r=setTimeout(()=>{s(!1,1e-7)},1e3)}j===1&&!CO(c,e.getBoundingClientRect())&&s(),N=!1}try{n=new IntersectionObserver(P,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return s(!0),o}function bee(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=B1(e),f=i||o?[...c?ed(c):[],...ed(t)]:[];f.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const h=c&&a?wee(c,n):null;let p=-1,m=null;s&&(m=new ResizeObserver(b=>{let[E]=b;E&&E.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),c&&!u&&m.observe(c),m.observe(t));let x,v=u?ga(e):null;u&&k();function k(){const b=ga(e);v&&!CO(v,b)&&n(),v=b,x=requestAnimationFrame(k)}return n(),()=>{var b;f.forEach(E=>{i&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(x)}}const kee=eee,See=tee,Eee=XJ,Cee=ree,_ee=QJ,cT=KJ,Nee=nee,Tee=(e,t,n)=>{const r=new Map,i={platform:vee,...n},o={...i.platform,_c:r};return ZJ(e,t,{...i,platform:o})};var op=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Rp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Rp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function _O(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dT(e,t){const n=_O(e);return Math.round(t*n)/n}function iv(e){const t=S.useRef(e);return op(()=>{t.current=e}),t}function Aee(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[f,h]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=S.useState(r);Rp(p,r)||m(r);const[x,v]=S.useState(null),[k,b]=S.useState(null),E=S.useCallback(U=>{U!==T.current&&(T.current=U,v(U))},[]),C=S.useCallback(U=>{U!==j.current&&(j.current=U,b(U))},[]),N=o||x,P=s||k,T=S.useRef(null),j=S.useRef(null),R=S.useRef(f),I=u!=null,M=iv(u),z=iv(i),F=iv(c),Y=S.useCallback(()=>{if(!T.current||!j.current)return;const U={placement:t,strategy:n,middleware:p};z.current&&(U.platform=z.current),Tee(T.current,j.current,U).then(B=>{const L={...B,isPositioned:F.current!==!1};O.current&&!Rp(R.current,L)&&(R.current=L,su.flushSync(()=>{h(L)}))})},[p,t,n,z,F]);op(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(U=>({...U,isPositioned:!1})))},[c]);const O=S.useRef(!1);op(()=>(O.current=!0,()=>{O.current=!1}),[]),op(()=>{if(N&&(T.current=N),P&&(j.current=P),N&&P){if(M.current)return M.current(N,P,Y);Y()}},[N,P,Y,M,I]);const q=S.useMemo(()=>({reference:T,floating:j,setReference:E,setFloating:C}),[E,C]),W=S.useMemo(()=>({reference:N,floating:P}),[N,P]),Z=S.useMemo(()=>{const U={position:n,left:0,top:0};if(!W.floating)return U;const B=dT(W.floating,f.x),L=dT(W.floating,f.y);return a?{...U,transform:"translate("+B+"px, "+L+"px)",..._O(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:L}},[n,a,W.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:Y,refs:q,elements:W,floatingStyles:Z}),[f,Y,q,W,Z])}const Pee=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?cT({element:r.current,padding:i}).fn(n):{}:r?cT({element:r,padding:i}).fn(n):{}}}},Ree=(e,t)=>({...kee(e),options:[e,t]}),Mee=(e,t)=>({...See(e),options:[e,t]}),jee=(e,t)=>({...Nee(e),options:[e,t]}),Dee=(e,t)=>({...Eee(e),options:[e,t]}),Oee=(e,t)=>({...Cee(e),options:[e,t]}),Iee=(e,t)=>({..._ee(e),options:[e,t]}),Lee=(e,t)=>({...Pee(e),options:[e,t]});var Fee="Arrow",NO=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return y.jsx(He.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});NO.displayName=Fee;var $ee=NO;function TO(e){const[t,n]=S.useState(void 0);return qn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var W1="Popper",[AO,mu]=ni(W1),[zee,PO]=AO(W1),RO=e=>{const{__scopePopper:t,children:n}=e,[r,i]=S.useState(null);return y.jsx(zee,{scope:t,anchor:r,onAnchorChange:i,children:n})};RO.displayName=W1;var MO="PopperAnchor",jO=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=PO(MO,n),s=S.useRef(null),a=ht(t,s);return S.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:y.jsx(He.div,{...i,ref:a})});jO.displayName=MO;var U1="PopperContent",[Bee,Vee]=AO(U1),DO=S.forwardRef((e,t)=>{var ee,ie,ce,he,Ee,fe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:x,...v}=e,k=PO(U1,n),[b,E]=S.useState(null),C=ht(t,xe=>E(xe)),[N,P]=S.useState(null),T=TO(N),j=(T==null?void 0:T.width)??0,R=(T==null?void 0:T.height)??0,I=r+(o!=="center"?"-"+o:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(c)?c:[c],F=z.length>0,Y={padding:M,boundary:z.filter(Uee),altBoundary:F},{refs:O,floatingStyles:q,placement:W,isPositioned:Z,middlewareData:U}=Aee({strategy:"fixed",placement:I,whileElementsMounted:(...xe)=>bee(...xe,{animationFrame:m==="always"}),elements:{reference:k.anchor},middleware:[Ree({mainAxis:i+R,alignmentAxis:s}),u&&Mee({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?jee():void 0,...Y}),u&&Dee({...Y}),Oee({...Y,apply:({elements:xe,rects:Me,availableWidth:Ve,availableHeight:ot})=>{const{width:_t,height:Q}=Me.reference,oe=xe.floating.style;oe.setProperty("--radix-popper-available-width",`${Ve}px`),oe.setProperty("--radix-popper-available-height",`${ot}px`),oe.setProperty("--radix-popper-anchor-width",`${_t}px`),oe.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),N&&Lee({element:N,padding:a}),Hee({arrowWidth:j,arrowHeight:R}),p&&Iee({strategy:"referenceHidden",...Y})]}),[B,L]=LO(W),H=hn(x);qn(()=>{Z&&(H==null||H())},[Z,H]);const V=(ee=U.arrow)==null?void 0:ee.x,D=(ie=U.arrow)==null?void 0:ie.y,G=((ce=U.arrow)==null?void 0:ce.centerOffset)!==0,[K,J]=S.useState();return qn(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),y.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:Z?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(he=U.transformOrigin)==null?void 0:he.x,(Ee=U.transformOrigin)==null?void 0:Ee.y].join(" "),...((fe=U.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(Bee,{scope:n,placedSide:B,onArrowChange:P,arrowX:V,arrowY:D,shouldHideArrow:G,children:y.jsx(He.div,{"data-side":B,"data-align":L,...v,ref:C,style:{...v.style,animation:Z?void 0:"none"}})})})});DO.displayName=U1;var OO="PopperArrow",Wee={top:"bottom",right:"left",bottom:"top",left:"right"},IO=S.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Vee(OO,r),s=Wee[o.placedSide];return y.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:y.jsx($ee,{...i,ref:n,style:{...i.style,display:"block"}})})});IO.displayName=OO;function Uee(e){return e!==null}var Hee=e=>({name:"transformOrigin",options:e,fn(t){var k,b,E;const{placement:n,rects:r,middlewareData:i}=t,s=((k=i.arrow)==null?void 0:k.centerOffset)!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[c,f]=LO(n),h={start:"0%",center:"50%",end:"100%"}[f],p=(((b=i.arrow)==null?void 0:b.x)??0)+a/2,m=(((E=i.arrow)==null?void 0:E.y)??0)+u/2;let x="",v="";return c==="bottom"?(x=s?h:`${p}px`,v=`${-u}px`):c==="top"?(x=s?h:`${p}px`,v=`${r.floating.height+u}px`):c==="right"?(x=`${-u}px`,v=s?h:`${m}px`):c==="left"&&(x=`${r.floating.width+u}px`,v=s?h:`${m}px`),{data:{x,y:v}}}});function LO(e){const[t,n="center"]=e.split("-");return[t,n]}var $m=RO,zm=jO,H1=DO,Y1=IO,_0=["Enter"," "],Yee=["ArrowDown","PageUp","Home"],FO=["ArrowUp","PageDown","End"],qee=[...Yee,...FO],Gee={ltr:[..._0,"ArrowRight"],rtl:[..._0,"ArrowLeft"]},Zee={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Zd="Menu",[td,Kee,Xee]=N1(Zd),[Ta,$O]=ni(Zd,[Xee,mu,Rm]),Kd=mu(),zO=Rm(),[BO,Is]=Ta(Zd),[Qee,Xd]=Ta(Zd),VO=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=Kd(t),[u,c]=S.useState(null),f=S.useRef(!1),h=hn(o),p=Od(i);return S.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),y.jsx($m,{...a,children:y.jsx(BO,{scope:t,open:n,onOpenChange:h,content:u,onContentChange:c,children:y.jsx(Qee,{scope:t,onClose:S.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:p,modal:s,children:r})})})};VO.displayName=Zd;var Jee="MenuAnchor",q1=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Kd(n);return y.jsx(zm,{...i,...r,ref:t})});q1.displayName=Jee;var G1="MenuPortal",[ete,WO]=Ta(G1,{forceMount:void 0}),UO=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Is(G1,t);return y.jsx(ete,{scope:t,forceMount:n,children:y.jsx(lr,{present:n||o.open,children:y.jsx(Yd,{asChild:!0,container:i,children:r})})})};UO.displayName=G1;var ei="MenuContent",[tte,Z1]=Ta(ei),HO=S.forwardRef((e,t)=>{const n=WO(ei,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Is(ei,e.__scopeMenu),s=Xd(ei,e.__scopeMenu);return y.jsx(td.Provider,{scope:e.__scopeMenu,children:y.jsx(lr,{present:r||o.open,children:y.jsx(td.Slot,{scope:e.__scopeMenu,children:s.modal?y.jsx(nte,{...i,ref:t}):y.jsx(rte,{...i,ref:t})})})})}),nte=S.forwardRef((e,t)=>{const n=Is(ei,e.__scopeMenu),r=S.useRef(null),i=ht(t,r);return S.useEffect(()=>{const o=r.current;if(o)return Om(o)},[]),y.jsx(K1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Re(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),rte=S.forwardRef((e,t)=>{const n=Is(ei,e.__scopeMenu);return y.jsx(K1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),K1=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:x,...v}=e,k=Is(ei,n),b=Xd(ei,n),E=Kd(n),C=zO(n),N=Kee(n),[P,T]=S.useState(null),j=S.useRef(null),R=ht(t,j,k.onContentChange),I=S.useRef(0),M=S.useRef(""),z=S.useRef(0),F=S.useRef(null),Y=S.useRef("right"),O=S.useRef(0),q=x?qd:S.Fragment,W=x?{as:qi,allowPinchZoom:!0}:void 0,Z=B=>{var ee,ie;const L=M.current+B,H=N().filter(ce=>!ce.disabled),V=document.activeElement,D=(ee=H.find(ce=>ce.ref.current===V))==null?void 0:ee.textValue,G=H.map(ce=>ce.textValue),K=mte(G,L,D),J=(ie=H.find(ce=>ce.textValue===K))==null?void 0:ie.ref.current;(function ce(he){M.current=he,window.clearTimeout(I.current),he!==""&&(I.current=window.setTimeout(()=>ce(""),1e3))})(L),J&&setTimeout(()=>J.focus())};S.useEffect(()=>()=>window.clearTimeout(I.current),[]),jm();const U=S.useCallback(B=>{var H,V;return Y.current===((H=F.current)==null?void 0:H.side)&&yte(B,(V=F.current)==null?void 0:V.area)},[]);return y.jsx(tte,{scope:n,searchRef:M,onItemEnter:S.useCallback(B=>{U(B)&&B.preventDefault()},[U]),onItemLeave:S.useCallback(B=>{var L;U(B)||((L=j.current)==null||L.focus(),T(null))},[U]),onTriggerLeave:S.useCallback(B=>{U(B)&&B.preventDefault()},[U]),pointerGraceTimerRef:z,onPointerGraceIntentChange:S.useCallback(B=>{F.current=B},[]),children:y.jsx(q,{...W,children:y.jsx(Hd,{asChild:!0,trapped:i,onMountAutoFocus:Re(o,B=>{var L;B.preventDefault(),(L=j.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:y.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:m,children:y.jsx(Zj,{asChild:!0,...C,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:T,onEntryFocus:Re(u,B=>{b.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsx(H1,{role:"menu","aria-orientation":"vertical","data-state":lI(k.open),"data-radix-menu-content":"",dir:b.dir,...E,...v,ref:R,style:{outline:"none",...v.style},onKeyDown:Re(v.onKeyDown,B=>{const H=B.target.closest("[data-radix-menu-content]")===B.currentTarget,V=B.ctrlKey||B.altKey||B.metaKey,D=B.key.length===1;H&&(B.key==="Tab"&&B.preventDefault(),!V&&D&&Z(B.key));const G=j.current;if(B.target!==G||!qee.includes(B.key))return;B.preventDefault();const J=N().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);FO.includes(B.key)&&J.reverse(),hte(J)}),onBlur:Re(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(I.current),M.current="")}),onPointerMove:Re(e.onPointerMove,nd(B=>{const L=B.target,H=O.current!==B.clientX;if(B.currentTarget.contains(L)&&H){const V=B.clientX>O.current?"right":"left";Y.current=V,O.current=B.clientX}}))})})})})})})});HO.displayName=ei;var ite="MenuGroup",X1=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(He.div,{role:"group",...r,ref:t})});X1.displayName=ite;var ote="MenuLabel",YO=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(He.div,{...r,ref:t})});YO.displayName=ote;var Mp="MenuItem",fT="menu.itemSelect",Bm=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=S.useRef(null),s=Xd(Mp,e.__scopeMenu),a=Z1(Mp,e.__scopeMenu),u=ht(t,o),c=S.useRef(!1),f=()=>{const h=o.current;if(!n&&h){const p=new CustomEvent(fT,{bubbles:!0,cancelable:!0});h.addEventListener(fT,m=>r==null?void 0:r(m),{once:!0}),TR(h,p),p.defaultPrevented?c.current=!1:s.onClose()}};return y.jsx(qO,{...i,ref:u,disabled:n,onClick:Re(e.onClick,f),onPointerDown:h=>{var p;(p=e.onPointerDown)==null||p.call(e,h),c.current=!0},onPointerUp:Re(e.onPointerUp,h=>{var p;c.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:Re(e.onKeyDown,h=>{const p=a.searchRef.current!=="";n||p&&h.key===" "||_0.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Bm.displayName=Mp;var qO=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=Z1(Mp,n),a=zO(n),u=S.useRef(null),c=ht(t,u),[f,h]=S.useState(!1),[p,m]=S.useState("");return S.useEffect(()=>{const x=u.current;x&&m((x.textContent??"").trim())},[o.children]),y.jsx(td.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:y.jsx(Kj,{asChild:!0,...a,focusable:!r,children:y.jsx(He.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:c,onPointerMove:Re(e.onPointerMove,nd(x=>{r?s.onItemLeave(x):(s.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Re(e.onPointerLeave,nd(x=>s.onItemLeave(x))),onFocus:Re(e.onFocus,()=>h(!0)),onBlur:Re(e.onBlur,()=>h(!1))})})})}),ste="MenuCheckboxItem",GO=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return y.jsx(JO,{scope:e.__scopeMenu,checked:n,children:y.jsx(Bm,{role:"menuitemcheckbox","aria-checked":jp(n)?"mixed":n,...i,ref:t,"data-state":ek(n),onSelect:Re(i.onSelect,()=>r==null?void 0:r(jp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});GO.displayName=ste;var ZO="MenuRadioGroup",[ate,lte]=Ta(ZO,{value:void 0,onValueChange:()=>{}}),KO=S.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=hn(r);return y.jsx(ate,{scope:e.__scopeMenu,value:n,onValueChange:o,children:y.jsx(X1,{...i,ref:t})})});KO.displayName=ZO;var XO="MenuRadioItem",QO=S.forwardRef((e,t)=>{const{value:n,...r}=e,i=lte(XO,e.__scopeMenu),o=n===i.value;return y.jsx(JO,{scope:e.__scopeMenu,checked:o,children:y.jsx(Bm,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":ek(o),onSelect:Re(r.onSelect,()=>{var s;return(s=i.onValueChange)==null?void 0:s.call(i,n)},{checkForDefaultPrevented:!1})})})});QO.displayName=XO;var Q1="MenuItemIndicator",[JO,ute]=Ta(Q1,{checked:!1}),eI=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=ute(Q1,n);return y.jsx(lr,{present:r||jp(o.checked)||o.checked===!0,children:y.jsx(He.span,{...i,ref:t,"data-state":ek(o.checked)})})});eI.displayName=Q1;var cte="MenuSeparator",tI=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(He.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tI.displayName=cte;var dte="MenuArrow",nI=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Kd(n);return y.jsx(Y1,{...i,...r,ref:t})});nI.displayName=dte;var J1="MenuSub",[fte,rI]=Ta(J1),iI=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,o=Is(J1,t),s=Kd(t),[a,u]=S.useState(null),[c,f]=S.useState(null),h=hn(i);return S.useEffect(()=>(o.open===!1&&h(!1),()=>h(!1)),[o.open,h]),y.jsx($m,{...s,children:y.jsx(BO,{scope:t,open:r,onOpenChange:h,content:c,onContentChange:f,children:y.jsx(fte,{scope:t,contentId:En(),triggerId:En(),trigger:a,onTriggerChange:u,children:n})})})};iI.displayName=J1;var wc="MenuSubTrigger",oI=S.forwardRef((e,t)=>{const n=Is(wc,e.__scopeMenu),r=Xd(wc,e.__scopeMenu),i=rI(wc,e.__scopeMenu),o=Z1(wc,e.__scopeMenu),s=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=o,c={__scopeMenu:e.__scopeMenu},f=S.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return S.useEffect(()=>f,[f]),S.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),u(null)}},[a,u]),y.jsx(q1,{asChild:!0,...c,children:y.jsx(qO,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":lI(n.open),...e,ref:dm(t,i.onTriggerChange),onClick:h=>{var p;(p=e.onClick)==null||p.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Re(e.onPointerMove,nd(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Re(e.onPointerLeave,nd(h=>{var m,x;f();const p=(m=n.content)==null?void 0:m.getBoundingClientRect();if(p){const v=(x=n.content)==null?void 0:x.dataset.side,k=v==="right",b=k?-5:5,E=p[k?"left":"right"],C=p[k?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:E,y:p.top},{x:C,y:p.top},{x:C,y:p.bottom},{x:E,y:p.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Re(e.onKeyDown,h=>{var m;const p=o.searchRef.current!=="";e.disabled||p&&h.key===" "||Gee[r.dir].includes(h.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),h.preventDefault())})})})});oI.displayName=wc;var sI="MenuSubContent",aI=S.forwardRef((e,t)=>{const n=WO(ei,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Is(ei,e.__scopeMenu),s=Xd(ei,e.__scopeMenu),a=rI(sI,e.__scopeMenu),u=S.useRef(null),c=ht(t,u);return y.jsx(td.Provider,{scope:e.__scopeMenu,children:y.jsx(lr,{present:r||o.open,children:y.jsx(td.Slot,{scope:e.__scopeMenu,children:y.jsx(K1,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var h;s.isUsingKeyboardRef.current&&((h=u.current)==null||h.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:Re(e.onFocusOutside,f=>{f.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Re(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:Re(e.onKeyDown,f=>{var m;const h=f.currentTarget.contains(f.target),p=Zee[s.dir].includes(f.key);h&&p&&(o.onOpenChange(!1),(m=a.trigger)==null||m.focus(),f.preventDefault())})})})})})});aI.displayName=sI;function lI(e){return e?"open":"closed"}function jp(e){return e==="indeterminate"}function ek(e){return jp(e)?"indeterminate":e?"checked":"unchecked"}function hte(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function pte(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function mte(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=pte(e,Math.max(o,0));i.length===1&&(s=s.filter(c=>c!==n));const u=s.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function gte(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,u=t[o].y,c=t[s].x,f=t[s].y;u>r!=f>r&&n<(c-a)*(r-u)/(f-u)+a&&(i=!i)}return i}function yte(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return gte(n,t)}function nd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var xte=VO,vte=q1,wte=UO,bte=HO,kte=X1,Ste=YO,Ete=Bm,Cte=GO,_te=KO,Nte=QO,Tte=eI,Ate=tI,Pte=nI,Rte=iI,Mte=oI,jte=aI,tk="DropdownMenu",[Dte,Hxe]=ni(tk,[$O]),Kn=$O(),[Ote,uI]=Dte(tk),cI=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,u=Kn(t),c=S.useRef(null),[f=!1,h]=Po({prop:i,defaultProp:o,onChange:s});return y.jsx(Ote,{scope:t,triggerId:En(),triggerRef:c,contentId:En(),open:f,onOpenChange:h,onOpenToggle:S.useCallback(()=>h(p=>!p),[h]),modal:a,children:y.jsx(xte,{...u,open:f,onOpenChange:h,dir:r,modal:a,children:n})})};cI.displayName=tk;var dI="DropdownMenuTrigger",fI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=uI(dI,n),s=Kn(n);return y.jsx(vte,{asChild:!0,...s,children:y.jsx(He.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:dm(t,o.triggerRef),onPointerDown:Re(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:Re(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});fI.displayName=dI;var Ite="DropdownMenuPortal",hI=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Kn(t);return y.jsx(wte,{...r,...n})};hI.displayName=Ite;var pI="DropdownMenuContent",mI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=uI(pI,n),o=Kn(n),s=S.useRef(!1);return y.jsx(bte,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Re(e.onCloseAutoFocus,a=>{var u;s.current||(u=i.triggerRef.current)==null||u.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:Re(e.onInteractOutside,a=>{const u=a.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,f=u.button===2||c;(!i.modal||f)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mI.displayName=pI;var Lte="DropdownMenuGroup",gI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(kte,{...i,...r,ref:t})});gI.displayName=Lte;var Fte="DropdownMenuLabel",yI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Ste,{...i,...r,ref:t})});yI.displayName=Fte;var $te="DropdownMenuItem",xI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Ete,{...i,...r,ref:t})});xI.displayName=$te;var zte="DropdownMenuCheckboxItem",vI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Cte,{...i,...r,ref:t})});vI.displayName=zte;var Bte="DropdownMenuRadioGroup",wI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(_te,{...i,...r,ref:t})});wI.displayName=Bte;var Vte="DropdownMenuRadioItem",bI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Nte,{...i,...r,ref:t})});bI.displayName=Vte;var Wte="DropdownMenuItemIndicator",kI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Tte,{...i,...r,ref:t})});kI.displayName=Wte;var Ute="DropdownMenuSeparator",SI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Ate,{...i,...r,ref:t})});SI.displayName=Ute;var Hte="DropdownMenuArrow",Yte=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Pte,{...i,...r,ref:t})});Yte.displayName=Hte;var qte=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:o}=e,s=Kn(t),[a=!1,u]=Po({prop:r,defaultProp:o,onChange:i});return y.jsx(Rte,{...s,open:a,onOpenChange:u,children:n})},Gte="DropdownMenuSubTrigger",EI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(Mte,{...i,...r,ref:t})});EI.displayName=Gte;var Zte="DropdownMenuSubContent",CI=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Kn(n);return y.jsx(jte,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});CI.displayName=Zte;var Kte=cI,_I=fI,NI=hI,TI=mI,Xte=gI,AI=yI,PI=xI,RI=vI,Qte=wI,MI=bI,jI=kI,DI=SI,Jte=qte,OI=EI,II=CI;function ll(e,t,n){let r=n.initialDeps??[],i;return()=>{var o,s,a,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const f=e();if(!(f.length!==r.length||f.some((m,x)=>r[x]!==m)))return i;r=f;let p;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(p=Date.now()),i=t(...f),n.key&&((a=n.debug)!=null&&a.call(n))){const m=Math.round((Date.now()-c)*100)/100,x=Math.round((Date.now()-p)*100)/100,v=x/16,k=(b,E)=>{for(b=String(b);b.length<E;)b=" "+b;return b};console.info(`%c⏱ ${k(x,5)} /${k(m,5)} ms`,`
|
|
293
|
+
font-size: .6rem;
|
|
294
|
+
font-weight: bold;
|
|
295
|
+
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,i),i}}function ov(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const ene=(e,t)=>Math.abs(e-t)<1,tne=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},nne=e=>e,rne=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},ine=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=s=>{const{width:a,height:u}=s;t({width:Math.round(a),height:Math.round(u)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(s=>{const a=s[0];if(a!=null&&a.borderBoxSize){const u=a.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(n.getBoundingClientRect())});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},hT={passive:!0},one=typeof window>"u"?!0:"onscrollend"in window,sne=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const o=e.options.useScrollendEvent&&one?()=>{}:tne(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),s=c=>()=>{const{horizontal:f,isRtl:h}=e.options;i=f?n.scrollLeft*(h&&-1||1):n.scrollTop,o(),t(i,c)},a=s(!0),u=s(!1);return u(),n.addEventListener("scroll",a,hT),n.addEventListener("scrollend",u,hT),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",u)}},ane=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},lne=(e,{adjustments:t=0,behavior:n},r)=>{var i,o;const s=e+t;(o=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class une{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{this._measureElement(o.target,o)})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=r())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=r())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:nne,rangeExtractor:rne,onChange:()=>{},measureElement:ane,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=ll(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,o=new Map;for(let s=r-1;s>=0;s--){const a=n[s];if(i.has(a.lane))continue;const u=o.get(a.lane);if(u==null||a.end>u.end?o.set(a.lane,a):a.end<u.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=ll(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,i,o,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:s}),{key:!1}),this.getMeasurements=ll(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:s},a)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,u);for(let f=u;f<n;f++){const h=o(f),p=this.options.lanes===1?c[f-1]:this.getFurthestMeasurement(c,f),m=p?p.end+this.options.gap:r+i,x=a.get(h),v=typeof x=="number"?x:this.options.estimateSize(f),k=m+v,b=p?p.lane:f%this.options.lanes;c[f]={index:f,start:m,size:v,end:k,key:h,lane:b}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ll(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,i)=>this.range=n.length>0&&r>0?cne({measurements:n,outerSize:r,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=ll(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,o,s)=>o===null||s===null?[]:n({startIndex:o,endIndex:s,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),o=this.measurementsCache[i];if(!o)return;const s=o.key,a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const o=this.itemSizeCache.get(i.key)??i.size,s=r-o;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=ll(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let o=0,s=n.length;o<s;o++){const a=n[o],u=r[a];i.push(u)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return ov(r[LI(0,r.length-1,i=>ov(r[i]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const i=this.getSize(),o=this.getScrollOffset();r==="auto"&&n>=o+i&&(r="end"),r==="end"&&(n-=i);const s=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const o=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(i.end>=s+o-this.options.scrollPaddingEnd)r="end";else if(i.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];const a=i.start-this.options.scrollPaddingStart+(i.size-o)/2;switch(r){case"center":return[this.getOffsetForAlignment(a,r),r];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const o=this.getOffsetForIndex(n,r);if(!o)return;const[s,a]=o;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=ov(this.getOffsetForIndex(n,a));ene(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:i})}else this.scrollToIndex(n,{align:a,behavior:i})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(o=>o.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const LI=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,o=n(i);if(o<r)e=i+1;else if(o>r)t=i-1;else return i}return e>0?e-1:0};function cne({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=LI(0,r,a=>e[a].start,n);let s=o;for(;s<r&&e[s].end<n+t;)s++;return{startIndex:o,endIndex:s}}const pT=typeof document<"u"?S.useLayoutEffect:S.useEffect;function dne(e){const t=S.useReducer(()=>({}),{})[1],n={...e,onChange:(i,o)=>{var s;o?su.flushSync(t):t(),(s=e.onChange)==null||s.call(e,i,o)}},[r]=S.useState(()=>new une(n));return r.setOptions(n),pT(()=>r._didMount(),[]),pT(()=>r._willUpdate()),r}function fne(e){return dne({observeElementRect:ine,observeElementOffset:sne,scrollToFn:lne,...e})}const hne=Kte,pne=Xte,mne=NI,gne=Jte,yne=Qte,FI=S.forwardRef(({className:e,inset:t,children:n,...r},i)=>y.jsx(_I,{ref:i,className:Te("focus-visible:ring-ring focus:outline-none focus-visible:rounded focus-visible:outline-none focus-visible:ring-1",e),...r,children:n}));FI.displayName=_I.displayName;const $I=S.forwardRef(({className:e,inset:t,children:n,...r},i)=>y.jsxs(OI,{ref:i,className:Te("focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",t&&"pl-8",e),...r,children:[n,y.jsx(um,{className:"ml-auto -rotate-90"})]}));$I.displayName=OI.displayName;const zI=S.forwardRef(({className:e,...t},n)=>y.jsx(II,{ref:n,className:Te("popover-backdrop-filter popover-background popover-border popover-shadow popover-foreground data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 min-w-[8rem] overflow-auto overflow-x-hidden rounded-md p-1",e),...t}));zI.displayName=II.displayName;const BI=S.forwardRef(({className:e,container:t,sideOffset:n=4,...r},i)=>y.jsx(NI,{container:t,children:y.jsx(TI,{ref:i,sideOffset:n,className:Te("popover-backdrop-filter bg-mastra-bg-2 popover-border popover-shadow popover-foreground data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 min-w-[8rem] overflow-auto overflow-x-hidden rounded-md p-1",e),...r})}));BI.displayName=TI.displayName;const VI=S.forwardRef(({className:e,inset:t,...n},r)=>y.jsx(PI,{ref:r,className:Te("focus:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-[0.8125rem] outline-none transition-colors focus:bg-[#66686A]/20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>span]:truncate",t&&"pl-8",e),...n}));VI.displayName=PI.displayName;const WI=S.forwardRef(({className:e,children:t,checked:n,...r},i)=>y.jsxs(RI,{ref:i,className:Te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(jI,{children:y.jsx(yb,{className:"h-2 w-2 fill-current"})})}),t]}));WI.displayName=RI.displayName;const UI=S.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(MI,{ref:r,className:Te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(jI,{children:y.jsx(tV,{className:"h-2 w-2 fill-current"})})}),t]}));UI.displayName=MI.displayName;const HI=S.forwardRef(({className:e,inset:t,...n},r)=>y.jsx(AI,{ref:r,className:Te("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));HI.displayName=AI.displayName;const YI=S.forwardRef(({className:e,...t},n)=>y.jsx(DI,{ref:n,className:Te("popover-dividers-bg -mx-1 my-1 h-px",e),...t}));YI.displayName=DI.displayName;const qI=({className:e,...t})=>y.jsx("span",{className:Te("ml-auto text-xs tracking-widest opacity-60",e),...t});qI.displayName="DropdownMenuShortcut";function Sn({open:e,onOpenChange:t,children:n,modal:r}){return y.jsx(hne,{modal:r,open:e,onOpenChange:t,children:n})}function xne({itemsCount:e,items:t,renderItem:n,...r}){const i=S.useRef(null),o=fne({count:e,estimateSize:()=>35,getScrollElement:()=>i.current,overscan:5,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?s=>s==null?void 0:s.getBoundingClientRect().height:void 0});return y.jsx("div",{ref:i,className:"h-64 overflow-auto",children:y.jsx("div",{className:"relative w-full overflow-auto",style:{height:`${o.getTotalSize()}px`},children:o==null?void 0:o.getVirtualItems().map((s,a)=>y.jsx("button",{className:"text-accent-foreground absolute left-0 top-0 flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-[0.8125rem] outline-none transition-colors hover:bg-[#66686A]/20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>span]:truncate",style:{height:`${s.size}px`,transform:`translateY(${s.start}px)`},...r,children:n(t[a])},s.index))})})}Sn.Trigger=FI;Sn.Content=BI;Sn.Group=pne;Sn.Portal=mne;Sn.Item=VI;Sn.CheckboxItem=WI;Sn.RadioItem=UI;Sn.Label=HI;Sn.Separator=YI;Sn.Shortcut=qI;Sn.Sub=gne;Sn.SubContent=zI;Sn.SubTrigger=$I;Sn.RadioGroup=yne;Sn.VirtualizedItems=xne;const vne=e=>{const{data:t,isLoading:n,mutate:r}=Nb(`/api/memory/status?agentId=${e}`,vb,{fallbackData:{result:!1}});return{memory:t,isLoading:n,mutate:r}},wne=({resourceid:e,agentId:t})=>{const{data:n,isLoading:r,mutate:i}=Nb(`/api/memory/threads?resourceid=${e}&agentId=${t}`,vb,{fallbackData:[],isPaused:()=>!e,revalidateOnFocus:!1});return S.useEffect(()=>{e&&i()},[e]),{threads:n,isLoading:r,mutate:i}},bne=({threadId:e,memory:t,agentId:n})=>{const{data:r,isLoading:i,mutate:o}=Nb(`/api/memory/threads/${e}/messages?agentId=${n}`,s=>vb(s,!0),{fallbackData:{uiMessages:[],messages:[]},revalidateOnFocus:!1,isPaused:()=>!e,shouldRetryOnError:!1});return S.useEffect(()=>{e&&t&&o()},[e,t]),{messages:r==null?void 0:r.uiMessages,isLoading:i,mutate:o}},kne=()=>{const{mutate:e}=_b();return{deleteThread:async({threadId:n,resourceid:r,agentId:i})=>{const o=fetch(`/api/memory/threads/${n}?agentId=${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}});nn.promise(o,{loading:"Deleting chat...",success:()=>(e(`/api/memory/threads?resourceid=${r}&agentId=${i}`),"Chat deleted successfully"),error:"Failed to delete chat"})}}};function Sne({agentId:e,threadId:t}){const{threads:n,isLoading:r}=wne({resourceid:e,agentId:e}),{deleteThread:i}=kne(),o=js(),[s,a]=S.useState(null),[u,c]=S.useState(!1),f=async()=>{await i({threadId:s,resourceid:e,agentId:e}),c(!1),s===t&&o(`/agents/${e}`)};return r?y.jsxs("div",{className:"p-4 w-full h-full space-y-2",children:[y.jsx("div",{className:"flex justify-end",children:y.jsx(We,{className:"h-9 w-9"})}),y.jsx(We,{className:"h-4"}),y.jsx(We,{className:"h-4"}),y.jsx(We,{className:"h-4"}),y.jsx(We,{className:"h-4"}),y.jsx(We,{className:"h-4"})]}):n!=null&&n.length?y.jsxs(Rn,{className:"h-full px-4 pb-4 w-[256px]",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex justify-between items-center pl-2 sticky top-0 bg-mastra-bg-2 pt-4",children:[y.jsx("div",{className:"text-sm text-mastra-el-5",children:"Chat history"}),y.jsx(Mt,{variant:"primary",size:"icon",onClick:()=>o(`/agents/${e}/${crypto.randomUUID()}`),children:y.jsx(Wc,{})})]}),n.map(h=>{const p=h.id===t;return y.jsxs("div",{className:Te("flex cursor-pointer w-full px-2 items-center focus-visible:outline-none transition-colors focus-visible:ring-1 focus-visible:ring-mastra-border-4 gap-3 rounded-xs group text-small hover:bg-mastra-el-6/5",p?"bg-mastra-el-6/5":""),children:[y.jsx(jd,{to:`/agents/${e}/${h.id}`,className:"flex-1",children:y.jsx("p",{className:Te("py-[0.38rem] text-mastra-el-6/60 group-hover:text-mastra-el-6 transition-all capitalize ",p?"text-mastra-el-6":""),children:h.title})}),y.jsxs(Sn,{children:[y.jsx(Sn.Trigger,{asChild:!0,children:y.jsxs(Mt,{variant:"ghost",size:"icon",className:"ml-auto",children:[y.jsx(iV,{}),y.jsx("span",{className:"sr-only",children:"More"})]})}),y.jsx(Sn.Content,{children:y.jsxs(Sn.Item,{className:"cursor-pointer text-destructive focus:bg-destructive/15 focus:text-destructive dark:text-red-500",onSelect:()=>{a(h.id),c(!0)},children:[y.jsx(cV,{}),y.jsx("span",{children:"Delete"})]})})]})]},h.id)})]}),y.jsx(Pn,{open:u,onOpenChange:c,children:y.jsxs(Pn.Content,{children:[y.jsxs(Pn.Header,{children:[y.jsx(Pn.Title,{children:"Are you absolutely sure?"}),y.jsx(Pn.Description,{children:"This action cannot be undone. This will permanently delete your chat and remove it from our servers."})]}),y.jsxs(Pn.Footer,{children:[y.jsx(Pn.Cancel,{children:"Cancel"}),y.jsx(Pn.Action,{onClick:f,children:"Continue"})]})]})})]}):y.jsxs("div",{className:"p-4 w-full space-y-2 h-full",children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsx("div",{className:"text-sm text-mastra-el-5",children:"Chat history"}),y.jsx(Mt,{variant:"primary",size:"icon",onClick:()=>o(`/agents/${e}/${crypto.randomUUID()}`),children:y.jsx(Wc,{})})]}),y.jsx("div",{className:"text-small text-mastra-el-3",children:"Your conversations will appear here once you start chatting!"})]})}function mT(){const{agentId:e,threadId:t}=Rd(),{agent:n,isLoading:r}=Dd(e),{memory:i}=vne(e),{messages:o,isLoading:s}=bne({agentId:e,threadId:t,memory:!!(i!=null&&i.result)}),[a,u]=S.useState(!0);if(r)return y.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y.jsx(sr,{title:y.jsx(We,{className:"h-6 w-[200px]"})}),y.jsxs("main",{className:"flex-1 relative grid grid-cols-[256px_1fr_400px] divide-x",children:[y.jsx("div",{className:"p-4",children:y.jsx(We,{className:"h-[600px]"})}),y.jsx("div",{className:"p-4",children:y.jsx(We,{className:"h-[600px]"})}),y.jsx("div",{className:"flex flex-col",children:y.jsx(HN,{agentId:e})})]})]});const c=[{label:"Agents",href:"/agents"},{label:n==null?void 0:n.name,href:`/agents/${e}`,isCurrent:!0}];return y.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y.jsx(sr,{title:y.jsx(Wd,{items:c})}),y.jsxs("main",{className:Te("flex-1 relative grid divide-x",a&&(i!=null&&i.result)?"grid-cols-[256px_1fr_400px] overflow-y-hidden h-full":"grid-cols-[1fr_400px]"),children:[a&&(i!=null&&i.result)?y.jsx(Sne,{agentId:e,threadId:t}):null,y.jsxs("div",{className:"relative",children:[i!=null&&i.result?y.jsx(Mt,{variant:"primary",size:"icon",className:"absolute top-4 left-4 z-50",onClick:()=>u(!a),children:y.jsx(aV,{})}):null,y.jsx(ZX,{agentId:e,agentName:n==null?void 0:n.name,threadId:t,initialMessages:s?void 0:o,memory:i==null?void 0:i.result})]}),y.jsx("div",{className:"flex flex-col",children:y.jsx(HN,{agentId:e})})]})]})}const gT=(e,t)=>{const[n,r]=S.useState([]),[i,o]=S.useState(!0),s=async a=>{o(!0);try{const u=await fetch(`/api/agents/${a??e}/evals/${t}`);if(!u.ok){const f=await u.json();r([]),console.error("Error fetching evals",f),nn.error((f==null?void 0:f.error)||"Error fetching evals");return}const c=await u.json();r(c.evals)}catch(u){r([]),console.error("Error fetching evals",u),nn.error("Error fetching evals")}finally{o(!1)}};return S.useEffect(()=>{s(e)},[e]),{evals:n,isLoading:i,refetchEvals:s}};function Ene({agentId:e}){const[t,n]=S.useState("live"),{evals:r,isLoading:i,refetchEvals:o}=gT(e,"live"),{evals:s,isLoading:a,refetchEvals:u}=gT(e,"ci"),c=()=>{t==="live"?o():u()};return y.jsx("div",{className:"flex-1 relative overflow-hidden",children:y.jsx("div",{className:"flex justify-between sticky top-0 bg-mastra-bg-2 p-4",children:y.jsxs(P1,{value:t,onValueChange:f=>n(f),className:"w-full",children:[y.jsxs(Mm,{children:[y.jsx(Co,{value:"live",className:"mr-4",children:"Live"}),y.jsx(Co,{value:"ci",children:"CI"})]}),y.jsx("div",{className:"flex justify-end my-2",children:y.jsx(Mt,{variant:"outline",onClick:c,disabled:t==="live"?i:a,children:(t==="live"?i:a)?y.jsx(jl,{className:"w-4 h-4 animate-spin"}):y.jsx(jl,{className:"w-4 h-4"})})}),y.jsxs(Rn,{className:"rounded-lg h-[calc(100vh-180px)]",children:[y.jsx(_o,{value:"live",className:"mt-0",children:y.jsx(yT,{showTestName:!1,evals:r,isLoading:i})}),y.jsx(_o,{value:"ci",className:"mt-0",children:y.jsx(yT,{showTestName:!0,evals:s,isLoading:a})})]})]})})})}function yT({showTestName:e=!1,evals:t,isLoading:n}){const[r,i]=S.useState(new Set),o=a=>{const u=new Set(r);u.has(a)?u.delete(a):u.add(a),i(u)},s=a=>a.reduce((u,c)=>{const f=u.find(h=>h.metricName===c.meta.metricName);return f?(f.evals.push(c),f.averageScore=f.evals.reduce((h,p)=>h+p.result.score,0)/f.evals.length):u.push({metricName:c.meta.metricName,averageScore:c.result.score,evals:[c]}),u},[]);return y.jsxs(pm,{children:[y.jsx(mm,{className:"bg-[#171717] sticky top-0 z-10",children:y.jsxs(Qr,{className:"border-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(rr,{className:"w-[50px]"}),y.jsx(rr,{className:"w-[300px] text-mastra-el-3",children:"Metric"}),y.jsx(rr,{className:"w-[600px] text-mastra-el-3"}),y.jsx(rr,{className:"w-[200px] text-mastra-el-3",children:"Average Score"}),y.jsx(rr,{className:"text-mastra-el-3",children:"Total Evaluations"})]})}),y.jsx(gm,{className:"border-b border-gray-6",children:n?y.jsxs(Qr,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(mt,{className:"w-[50px]",children:y.jsx(We,{className:"h-8 w-8"})}),y.jsx(mt,{className:"w-[400px]",children:y.jsx(We,{className:"h-8 w-full"})}),y.jsx(mt,{className:"w-[400px]",children:y.jsx(We,{className:"h-8 w-full"})}),y.jsx(mt,{className:"w-[200px]",children:y.jsx(We,{className:"h-8 w-full"})}),y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-full"})})]}):s(t).map(a=>y.jsxs(y.Fragment,{children:[y.jsxs(Qr,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem] cursor-pointer hover:bg-mastra-bg-3",onClick:()=>o(a.metricName),children:[y.jsx(mt,{className:"w-[50px]",children:y.jsx("div",{className:"h-8 w-full flex items-center justify-center",children:r.has(a.metricName)?y.jsx(um,{className:"h-4 w-4 text-mastra-el-5"}):y.jsx(eV,{className:"h-4 w-4 text-mastra-el-5"})})}),y.jsx(mt,{className:"w-[300px] font-medium text-mastra-el-5",children:a.metricName}),y.jsx(mt,{className:"w-[600px] text-mastra-el-5"}),y.jsx(mt,{className:"w-[200px] text-mastra-el-5",children:a.averageScore.toFixed(2)}),y.jsx(mt,{className:"text-mastra-el-5",children:a.evals.length})]},a.metricName),r.has(a.metricName)&&y.jsxs(y.Fragment,{children:[y.jsxs(Qr,{className:"bg-mastra-bg-3 text-[0.7rem] text-mastra-el-3",children:[y.jsx(mt,{className:"w-[50px]"}),y.jsx(mt,{className:"w-[300px] pl-8",children:"Timestamp"}),y.jsx(mt,{className:"w-[600px] pl-8",children:"Input"}),y.jsx(mt,{className:"w-[200px]",children:"Score"}),e&&y.jsx(mt,{children:"Test Name"})]}),a.evals.map((u,c)=>y.jsxs(Qr,{className:"bg-mastra-bg-3 text-[0.8125rem]",children:[y.jsx(mt,{className:"w-[50px]"}),y.jsx(mt,{className:"w-[300px] text-mastra-el-4 pl-8",children:new Date(u.meta.timestamp).toLocaleString()}),y.jsx(mt,{className:"w-[600px] text-mastra-el-4",children:u.input}),y.jsx(mt,{className:"w-[200px] text-mastra-el-4",children:u.result.score}),e&&y.jsx(mt,{className:"text-mastra-el-4",children:u.meta.testName})]},`${a.metricName}-${c}`))]})]}))})]})}function Cne(){const{agentId:e}=Rd(),{agent:t,isLoading:n}=Dd(e);if(n)return y.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y.jsx(sr,{title:y.jsx(We,{className:"h-6 w-[200px]"})}),y.jsxs("main",{className:"flex-1",children:[y.jsx("div",{className:"p-4",children:y.jsx(We,{className:"h-[600px]"})}),y.jsx("div",{className:"p-4",children:y.jsx(We,{className:"h-[600px]"})})]})]});const r=[{label:"Agents",href:"/agents"},{label:t==null?void 0:t.name,href:`/agents/${e}`},{label:"Evals",href:`/agents/${e}/evals`,isCurrent:!0}];return y.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y.jsx(sr,{title:y.jsx(Wd,{items:r})}),y.jsx("main",{className:"flex-1",children:y.jsx(Ene,{agentId:e})})]})}const GI=(e,t)=>e.anyOf.length?e.anyOf.length===1?Mn(e.anyOf[0],{...t,path:[...t.path,"anyOf",0]}):`z.union([${e.anyOf.map((n,r)=>Mn(n,{...t,path:[...t.path,"anyOf",r]})).join(", ")}])`:"z.any()",_ne=e=>"z.boolean()",Nne=e=>"z.any()",Tne=(e,t)=>`z.union([${e.type.map(n=>Mn({...e,type:n},t)).join(", ")}])`,Ane=(e,t)=>`z.any().refine((value) => !${Mn(e.not,{...t,path:[...t.path,"not"]})}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`,Pne=e=>"z.null()",Rne=e=>[e.slice(0,e.length/2),e.slice(e.length/2)],bc=Symbol("Original index"),Mne=e=>{let t=[];for(let n=0;n<e.length;n++){const r=e[n];if(typeof r=="boolean")t.push(r?{[bc]:n}:{[bc]:n,not:{}});else{if(bc in r)return e;t.push({...r,[bc]:n})}}return t};function Dp(e,t){if(e.allOf.length===0)return"z.never()";if(e.allOf.length===1){const n=e.allOf[0];return Mn(n,{...t,path:[...t.path,"allOf",n[bc]]})}else{const[n,r]=Rne(Mne(e.allOf));return`z.intersection(${Dp({allOf:n},t)}, ${Dp({allOf:r},t)})`}}function An(e,t,n){var o;const r=e[t];let i="";if(r!==void 0){const s=n({value:r,json:JSON.stringify(r)});if(s){const a=s[0],u=s.length===3?s[1]:"",c=s.length===3?s[2]:s[1];i+=a,((o=e.errorMessage)==null?void 0:o[t])!==void 0&&(i+=u+JSON.stringify(e.errorMessage[t])),i+=c}}return i}const jne=(e,t)=>{if(Array.isArray(e.items))return`z.tuple([${e.items.map((r,i)=>Mn(r,{...t,path:[...t.path,"items",i]}))}])`;let n=e.items?`z.array(${Mn(e.items,{...t,path:[...t.path,"items"]})})`:"z.array(z.any())";return n+=An(e,"minItems",({json:r})=>[`.min(${r}`,", ",")"]),n+=An(e,"maxItems",({json:r})=>[`.max(${r}`,", ",")"]),n},Dne=e=>`z.literal(${JSON.stringify(e.const)})`,One=e=>e.enum.length===0?"z.never()":e.enum.length===1?`z.literal(${JSON.stringify(e.enum[0])})`:e.enum.every(t=>typeof t=="string")?`z.enum([${e.enum.map(t=>JSON.stringify(t))}])`:`z.union([${e.enum.map(t=>`z.literal(${JSON.stringify(t)})`).join(", ")}])`,Ine=(e,t)=>{const n=Mn(e.if,{...t,path:[...t.path,"if"]}),r=Mn(e.then,{...t,path:[...t.path,"then"]}),i=Mn(e.else,{...t,path:[...t.path,"else"]});return`z.union([${r}, ${i}]).superRefine((value,ctx) => {
|
|
296
|
+
const result = ${n}.safeParse(value).success
|
|
297
|
+
? ${r}.safeParse(value)
|
|
298
|
+
: ${i}.safeParse(value);
|
|
299
|
+
if (!result.success) {
|
|
300
|
+
result.error.errors.forEach((error) => ctx.addIssue(error))
|
|
301
|
+
}
|
|
302
|
+
})`},Lne=e=>{let t="z.number()";return e.type==="integer"?t+=An(e,"type",()=>[".int(",")"]):t+=An(e,"format",({value:n})=>{if(n==="int64")return[".int(",")"]}),t+=An(e,"multipleOf",({value:n,json:r})=>n===1?t.startsWith("z.number().int(")?void 0:[".int(",")"]:[`.multipleOf(${r}`,", ",")"]),typeof e.minimum=="number"?e.exclusiveMinimum===!0?t+=An(e,"minimum",({json:n})=>[`.gt(${n}`,", ",")"]):t+=An(e,"minimum",({json:n})=>[`.gte(${n}`,", ",")"]):typeof e.exclusiveMinimum=="number"&&(t+=An(e,"exclusiveMinimum",({json:n})=>[`.gt(${n}`,", ",")"])),typeof e.maximum=="number"?e.exclusiveMaximum===!0?t+=An(e,"maximum",({json:n})=>[`.lt(${n}`,", ",")"]):t+=An(e,"maximum",({json:n})=>[`.lte(${n}`,", ",")"]):typeof e.exclusiveMaximum=="number"&&(t+=An(e,"exclusiveMaximum",({json:n})=>[`.lt(${n}`,", ",")"])),t},ZI=(e,t)=>e.oneOf.length?e.oneOf.length===1?Mn(e.oneOf[0],{...t,path:[...t.path,"oneOf",0]}):`z.any().superRefine((x, ctx) => {
|
|
303
|
+
const schemas = [${e.oneOf.map((n,r)=>Mn(n,{...t,path:[...t.path,"oneOf",r]})).join(", ")}];
|
|
304
|
+
const errors = schemas.reduce<z.ZodError[]>(
|
|
305
|
+
(errors, schema) =>
|
|
306
|
+
((result) =>
|
|
307
|
+
result.error ? [...errors, result.error] : errors)(
|
|
308
|
+
schema.safeParse(x),
|
|
309
|
+
),
|
|
310
|
+
[],
|
|
311
|
+
);
|
|
312
|
+
if (schemas.length - errors.length !== 1) {
|
|
313
|
+
ctx.addIssue({
|
|
314
|
+
path: ctx.path,
|
|
315
|
+
code: "invalid_union",
|
|
316
|
+
unionErrors: errors,
|
|
317
|
+
message: "Invalid input: Should pass single schema",
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
})`:"z.any()",KI=e=>{const t=e.split(`
|
|
321
|
+
`);return`/**${t.length===1?t[0]:`
|
|
322
|
+
${t.map(r=>`* ${r}`).join(`
|
|
323
|
+
`)}
|
|
324
|
+
`}*/
|
|
325
|
+
`},Fne=(e,t)=>{const n=e.description;return n?`
|
|
326
|
+
${KI(n)}${t}`:t};function $ne(e,t){let n;e.properties&&(Object.keys(e.properties).length?(n="z.object({ ",n+=Object.keys(e.properties).map(s=>{const a=e.properties[s];let u=`${JSON.stringify(s)}: ${Mn(a,{...t,path:[...t.path,"properties",s]})}`;t.withJsdocs&&typeof a=="object"&&(u=Fne(a,u));const c=typeof a=="object"&&a.default!==void 0,f=Array.isArray(e.required)?e.required.includes(s):typeof a=="object"&&a.required===!0;return!c&&!f?`${u}.optional()`:u}).join(", "),n+=" })"):n="z.object({})");const r=e.additionalProperties!==void 0?Mn(e.additionalProperties,{...t,path:[...t.path,"additionalProperties"]}):void 0;let i;if(e.patternProperties){const s=Object.fromEntries(Object.entries(e.patternProperties).map(([a,u])=>[a,Mn(u,{...t,path:[...t.path,"patternProperties",a]})],{}));i="",n?r?i+=`.catchall(z.union([${[...Object.values(s),r].join(", ")}]))`:Object.keys(s).length>1?i+=`.catchall(z.union([${Object.values(s).join(", ")}]))`:i+=`.catchall(${Object.values(s)})`:r?i+=`z.record(z.union([${[...Object.values(s),r].join(", ")}]))`:Object.keys(s).length>1?i+=`z.record(z.union([${Object.values(s).join(", ")}]))`:i+=`z.record(${Object.values(s)})`,i+=`.superRefine((value, ctx) => {
|
|
327
|
+
`,i+=`for (const key in value) {
|
|
328
|
+
`,r&&(e.properties?i+=`let evaluated = [${Object.keys(e.properties).map(a=>JSON.stringify(a)).join(", ")}].includes(key)
|
|
329
|
+
`:i+=`let evaluated = false
|
|
330
|
+
`);for(const a in e.patternProperties)i+="if (key.match(new RegExp("+JSON.stringify(a)+`))) {
|
|
331
|
+
`,r&&(i+=`evaluated = true
|
|
332
|
+
`),i+="const result = "+s[a]+`.safeParse(value[key])
|
|
333
|
+
`,i+=`if (!result.success) {
|
|
334
|
+
`,i+=`ctx.addIssue({
|
|
335
|
+
path: [...ctx.path, key],
|
|
336
|
+
code: 'custom',
|
|
337
|
+
message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
|
|
338
|
+
params: {
|
|
339
|
+
issues: result.error.issues
|
|
340
|
+
}
|
|
341
|
+
})
|
|
342
|
+
`,i+=`}
|
|
343
|
+
`,i+=`}
|
|
344
|
+
`;r&&(i+=`if (!evaluated) {
|
|
345
|
+
`,i+="const result = "+r+`.safeParse(value[key])
|
|
346
|
+
`,i+=`if (!result.success) {
|
|
347
|
+
`,i+=`ctx.addIssue({
|
|
348
|
+
path: [...ctx.path, key],
|
|
349
|
+
code: 'custom',
|
|
350
|
+
message: \`Invalid input: must match catchall schema\`,
|
|
351
|
+
params: {
|
|
352
|
+
issues: result.error.issues
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
`,i+=`}
|
|
356
|
+
`,i+=`}
|
|
357
|
+
`),i+=`}
|
|
358
|
+
`,i+="})"}let o=n?i?n+i:r?r==="z.never()"?n+".strict()":n+`.catchall(${r})`:n:i||(r?`z.record(${r})`:"z.record(z.any())");return bn.an.anyOf(e)&&(o+=`.and(${GI({...e,anyOf:e.anyOf.map(s=>typeof s=="object"&&!s.type&&(s.properties||s.additionalProperties||s.patternProperties)?{...s,type:"object"}:s)},t)})`),bn.a.oneOf(e)&&(o+=`.and(${ZI({...e,oneOf:e.oneOf.map(s=>typeof s=="object"&&!s.type&&(s.properties||s.additionalProperties||s.patternProperties)?{...s,type:"object"}:s)},t)})`),bn.an.allOf(e)&&(o+=`.and(${Dp({...e,allOf:e.allOf.map(s=>typeof s=="object"&&!s.type&&(s.properties||s.additionalProperties||s.patternProperties)?{...s,type:"object"}:s)},t)})`),o}const zne=e=>{let t="z.string()";t+=An(e,"format",({value:r})=>{switch(r){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime({ offset: true",", message: "," })"];case"time":return[".time(",")"];case"date":return[".date(",")"];case"binary":return[".base64(",")"];case"duration":return[".duration(",")"]}}),t+=An(e,"pattern",({json:r})=>[`.regex(new RegExp(${r})`,", ",")"]),t+=An(e,"minLength",({json:r})=>[`.min(${r}`,", ",")"]),t+=An(e,"maxLength",({json:r})=>[`.max(${r}`,", ",")"]),t+=An(e,"contentEncoding",({value:r})=>{if(r==="base64")return[".base64(",")"]});const n=An(e,"contentMediaType",({value:r})=>{if(r==="application/json")return['.transform((str, ctx) => { try { return JSON.parse(str); } catch (err) { ctx.addIssue({ code: "custom", message: "Invalid JSON" }); }}',", ",")"]});return n!=""&&(t+=n,t+=An(e,"contentSchema",({value:r})=>{if(r&&r instanceof Object)return[`.pipe(${Mn(r)}`,", ",")"]})),t},Bne=(e,...t)=>Object.keys(e).reduce((n,r)=>(t.includes(r)||(n[r]=e[r]),n),{}),Vne=(e,t)=>`${Mn(Bne(e,"nullable"),t,!0)}.nullable()`,Mn=(e,t={seen:new Map,path:[]},n)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const o=t.parserOverride(e,t);if(typeof o=="string")return o}let r=t.seen.get(e);if(r){if(r.r!==void 0)return r.r;if(t.depth===void 0||r.n>=t.depth)return"z.any()";r.n+=1}else r={r:void 0,n:0},t.seen.set(e,r);let i=Yne(e,t);return n||(t.withoutDescribes||(i=Wne(e,i)),t.withoutDefaults||(i=Une(e,i)),i=Hne(e,i)),r.r=i,i},Wne=(e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),Une=(e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),Hne=(e,t)=>(e.readOnly&&(t+=".readonly()"),t),Yne=(e,t)=>bn.a.nullable(e)?Vne(e,t):bn.an.object(e)?$ne(e,t):bn.an.array(e)?jne(e,t):bn.an.anyOf(e)?GI(e,t):bn.an.allOf(e)?Dp(e,t):bn.a.oneOf(e)?ZI(e,t):bn.a.not(e)?Ane(e,t):bn.an.enum(e)?One(e):bn.a.const(e)?Dne(e):bn.a.multipleType(e)?Tne(e,t):bn.a.primitive(e,"string")?zne(e):bn.a.primitive(e,"number")||bn.a.primitive(e,"integer")?Lne(e):bn.a.primitive(e,"boolean")?_ne():bn.a.primitive(e,"null")?Pne():bn.a.conditional(e)?Ine(e,t):Nne(),bn={an:{object:e=>e.type==="object",array:e=>e.type==="array",anyOf:e=>e.anyOf!==void 0,allOf:e=>e.allOf!==void 0,enum:e=>e.enum!==void 0},a:{nullable:e=>e.nullable===!0,multipleType:e=>Array.isArray(e.type),not:e=>e.not!==void 0,const:e=>e.const!==void 0,primitive:(e,t)=>e.type===t,conditional:e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),oneOf:e=>e.oneOf!==void 0}},nk=(e,{module:t,name:n,type:r,noImport:i,...o}={})=>{if(r&&(!n||t!=="esm"))throw new Error("Option `type` requires `name` to be set and `module` to be `esm`");let s=Mn(e,{module:t,name:n,path:[],seen:new Map,...o});const a=o.withJsdocs&&typeof e!="boolean"&&e.description?KI(e.description):"";if(t==="cjs"?(s=`${a}module.exports = ${n?`{ ${JSON.stringify(n)}: ${s} }`:s}
|
|
359
|
+
`,i||(s=`${a}const { z } = require("zod")
|
|
360
|
+
|
|
361
|
+
${s}`)):t==="esm"?(s=`${a}export ${n?`const ${n} =`:"default"} ${s}
|
|
362
|
+
`,i||(s=`import { z } from "zod"
|
|
363
|
+
|
|
364
|
+
${s}`)):n&&(s=`${a}const ${n} = ${s}`),r&&n){let u=typeof r=="string"?r:`${n[0].toUpperCase()}${n.substring(1)}`;s+=`export type ${u} = z.infer<typeof ${n}>
|
|
365
|
+
`}return s};class qne{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class XI{constructor(t){this.generateIdentifier=t,this.kv=new qne}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class Gne extends XI{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Zne(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Kne(e,t){const n=Zne(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const o=r[i];if(t(o))return o}}function zl(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function sp(e,t){return e.indexOf(t)!==-1}function xT(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class Xne{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return Kne(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Qne=e=>Object.prototype.toString.call(e).slice(8,-1),QI=e=>typeof e>"u",Jne=e=>e===null,rd=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,N0=e=>rd(e)&&Object.keys(e).length===0,Ts=e=>Array.isArray(e),ere=e=>typeof e=="string",tre=e=>typeof e=="number"&&!isNaN(e),nre=e=>typeof e=="boolean",rre=e=>e instanceof RegExp,id=e=>e instanceof Map,od=e=>e instanceof Set,JI=e=>Qne(e)==="Symbol",ire=e=>e instanceof Date&&!isNaN(e.valueOf()),ore=e=>e instanceof Error,vT=e=>typeof e=="number"&&isNaN(e),sre=e=>nre(e)||Jne(e)||QI(e)||tre(e)||ere(e)||JI(e),are=e=>typeof e=="bigint",lre=e=>e===1/0||e===-1/0,ure=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),cre=e=>e instanceof URL,eL=e=>e.replace(/\./g,"\\."),sv=e=>e.map(String).map(eL).join("."),Oc=e=>{const t=[];let n="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(o==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(o==="."){t.push(n),n="";continue}n+=o}const r=n;return t.push(r),t};function Di(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const tL=[Di(QI,"undefined",()=>null,()=>{}),Di(are,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Di(ire,"Date",e=>e.toISOString(),e=>new Date(e)),Di(ore,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),Di(rre,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Di(od,"set",e=>[...e.values()],e=>new Set(e)),Di(id,"map",e=>[...e.entries()],e=>new Map(e)),Di(e=>vT(e)||lre(e),"number",e=>vT(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Di(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Di(cre,"URL",e=>e.toString(),e=>new URL(e))];function Vm(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const nL=Vm((e,t)=>JI(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),dre=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),rL=Vm(ure,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=dre[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function iL(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const oL=Vm(iL,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),sL=Vm((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),fre=[oL,nL,sL,rL],wT=(e,t)=>{const n=xT(fre,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=xT(tL,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},aL={};tL.forEach(e=>{aL[e.annotation]=e});const hre=(e,t,n)=>{if(Ts(t))switch(t[0]){case"symbol":return nL.untransform(e,t,n);case"class":return oL.untransform(e,t,n);case"custom":return sL.untransform(e,t,n);case"typed-array":return rL.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=aL[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},vl=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function lL(e){if(sp(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(sp(e,"prototype"))throw new Error("prototype is not allowed as a property");if(sp(e,"constructor"))throw new Error("constructor is not allowed as a property")}const pre=(e,t)=>{lL(t);for(let n=0;n<t.length;n++){const r=t[n];if(od(e))e=vl(e,+r);else if(id(e)){const i=+r,o=+t[++n]==0?"key":"value",s=vl(e,i);switch(o){case"key":e=s;break;case"value":e=e.get(s);break}}else e=e[r]}return e},T0=(e,t,n)=>{if(lL(t),t.length===0)return n(e);let r=e;for(let o=0;o<t.length-1;o++){const s=t[o];if(Ts(r)){const a=+s;r=r[a]}else if(rd(r))r=r[s];else if(od(r)){const a=+s;r=vl(r,a)}else if(id(r)){if(o===t.length-2)break;const u=+s,c=+t[++o]==0?"key":"value",f=vl(r,u);switch(c){case"key":r=f;break;case"value":r=r.get(f);break}}}const i=t[t.length-1];if(Ts(r)?r[+i]=n(r[+i]):rd(r)&&(r[i]=n(r[i])),od(r)){const o=vl(r,+i),s=n(o);o!==s&&(r.delete(o),r.add(s))}if(id(r)){const o=+t[t.length-2],s=vl(r,o);switch(+i==0?"key":"value"){case"key":{const u=n(s);r.set(u,r.get(s)),u!==s&&r.delete(s);break}case"value":{r.set(s,n(r.get(s)));break}}}return e};function A0(e,t,n=[]){if(!e)return;if(!Ts(e)){zl(e,(o,s)=>A0(o,t,[...n,...Oc(s)]));return}const[r,i]=e;i&&zl(i,(o,s)=>{A0(o,t,[...n,...Oc(s)])}),t(r,n)}function mre(e,t,n){return A0(t,(r,i)=>{e=T0(e,i,o=>hre(o,r,n))}),e}function gre(e,t){function n(r,i){const o=pre(e,Oc(i));r.map(Oc).forEach(s=>{e=T0(e,s,()=>o)})}if(Ts(t)){const[r,i]=t;r.forEach(o=>{e=T0(e,Oc(o),()=>e)}),i&&zl(i,n)}else zl(t,n);return e}const yre=(e,t)=>rd(e)||Ts(e)||id(e)||od(e)||iL(e,t);function xre(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function vre(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(a=>a.map(String)).sort((a,u)=>a.length-u.length));const[o,...s]=i;o.length===0?r=s.map(sv):n[sv(o)]=s.map(sv)}),r?N0(n)?[r]:[r,n]:N0(n)?void 0:n}const uL=(e,t,n,r,i=[],o=[],s=new Map)=>{const a=sre(e);if(!a){xre(e,i,t);const m=s.get(e);if(m)return r?{transformedValue:null}:m}if(!yre(e,n)){const m=wT(e,n),x=m?{transformedValue:m.value,annotations:[m.type]}:{transformedValue:e};return a||s.set(e,x),x}if(sp(o,e))return{transformedValue:null};const u=wT(e,n),c=(u==null?void 0:u.value)??e,f=Ts(c)?[]:{},h={};zl(c,(m,x)=>{if(x==="__proto__"||x==="constructor"||x==="prototype")throw new Error(`Detected property ${x}. This is a prototype pollution risk, please remove it from your object.`);const v=uL(m,t,n,r,[...i,x],[...o,e],s);f[x]=v.transformedValue,Ts(v.annotations)?h[x]=v.annotations:rd(v.annotations)&&zl(v.annotations,(k,b)=>{h[eL(x)+"."+b]=k})});const p=N0(h)?{transformedValue:f,annotations:u?[u.type]:void 0}:{transformedValue:f,annotations:u?[u.type,h]:h};return a||s.set(e,p),p};function cL(e){return Object.prototype.toString.call(e).slice(8,-1)}function bT(e){return cL(e)==="Array"}function wre(e){if(cL(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function bre(e,t,n,r,i){const o={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=n),i&&o==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function P0(e,t={}){if(bT(e))return e.map(i=>P0(i,t));if(!wre(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,o)=>{if(bT(t.props)&&!t.props.includes(o))return i;const s=e[o],a=P0(s,t);return bre(i,o,a,e,t.nonenumerable),i},{})}class Dt{constructor({dedupe:t=!1}={}){this.classRegistry=new Gne,this.symbolRegistry=new XI(n=>n.description??""),this.customTransformerRegistry=new Xne,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=uL(t,n,this,this.dedupe),i={json:r.transformedValue};r.annotations&&(i.meta={...i.meta,values:r.annotations});const o=vre(n,this.dedupe);return o&&(i.meta={...i.meta,referentialEqualities:o}),i}deserialize(t){const{json:n,meta:r}=t;let i=P0(n);return r!=null&&r.values&&(i=mre(i,r.values,this)),r!=null&&r.referentialEqualities&&(i=gre(i,r.referentialEqualities)),i}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}Dt.defaultInstance=new Dt;Dt.serialize=Dt.defaultInstance.serialize.bind(Dt.defaultInstance);Dt.deserialize=Dt.defaultInstance.deserialize.bind(Dt.defaultInstance);Dt.stringify=Dt.defaultInstance.stringify.bind(Dt.defaultInstance);Dt.parse=Dt.defaultInstance.parse.bind(Dt.defaultInstance);Dt.registerClass=Dt.defaultInstance.registerClass.bind(Dt.defaultInstance);Dt.registerSymbol=Dt.defaultInstance.registerSymbol.bind(Dt.defaultInstance);Dt.registerCustom=Dt.defaultInstance.registerCustom.bind(Dt.defaultInstance);Dt.allowErrorProps=Dt.defaultInstance.allowErrorProps.bind(Dt.defaultInstance);const rk=Dt.parse;var xt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},e.find=(i,o)=>{for(const s of i)if(o(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(xt||(xt={}));var R0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(R0||(R0={}));const De=xt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),go=e=>{switch(typeof e){case"undefined":return De.undefined;case"string":return De.string;case"number":return isNaN(e)?De.nan:De.number;case"boolean":return De.boolean;case"function":return De.function;case"bigint":return De.bigint;case"symbol":return De.symbol;case"object":return Array.isArray(e)?De.array:e===null?De.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?De.promise:typeof Map<"u"&&e instanceof Map?De.map:typeof Set<"u"&&e instanceof Set?De.set:typeof Date<"u"&&e instanceof Date?De.date:De.object;default:return De.unknown}},ke=xt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),kre=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Dr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,u=0;for(;u<s.path.length;){const c=s.path[u];u===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return i(this),r}static assert(t){if(!(t instanceof Dr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,xt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Dr.create=e=>new Dr(e);const Bl=(e,t)=>{let n;switch(e.code){case ke.invalid_type:e.received===De.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ke.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,xt.jsonStringifyReplacer)}`;break;case ke.unrecognized_keys:n=`Unrecognized key(s) in object: ${xt.joinValues(e.keys,", ")}`;break;case ke.invalid_union:n="Invalid input";break;case ke.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${xt.joinValues(e.options)}`;break;case ke.invalid_enum_value:n=`Invalid enum value. Expected ${xt.joinValues(e.options)}, received '${e.received}'`;break;case ke.invalid_arguments:n="Invalid function arguments";break;case ke.invalid_return_type:n="Invalid function return type";break;case ke.invalid_date:n="Invalid date";break;case ke.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:xt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ke.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ke.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ke.custom:n="Invalid input";break;case ke.invalid_intersection_types:n="Intersection results could not be merged";break;case ke.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ke.not_finite:n="Number must be finite";break;default:n=t.defaultError,xt.assertNever(e)}return{message:n}};let dL=Bl;function Sre(e){dL=e}function Op(){return dL}const Ip=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)a=c(s,{data:t,defaultError:a}).message;return{...i,path:o,message:a}},Ere=[];function Pe(e,t){const n=Op(),r=Ip({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Bl?void 0:Bl].filter(i=>!!i)});e.common.issues.push(r)}class Gn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return tt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,s=await i.value;r.push({key:o,value:s})}return Gn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return tt;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:t.value,value:r}}}const tt=Object.freeze({status:"aborted"}),wl=e=>({status:"dirty",value:e}),ar=e=>({status:"valid",value:e}),M0=e=>e.status==="aborted",j0=e=>e.status==="dirty",ya=e=>e.status==="valid",sd=e=>typeof Promise<"u"&&e instanceof Promise;function Lp(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function fL(e,t,n,r,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Be;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Be||(Be={}));var kc,Sc;class Zi{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kT=(e,t)=>{if(ya(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Dr(e.common.issues);return this._error=n,this._error}}};function lt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,a)=>{var u,c;const{message:f}=e;return s.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(u=f??r)!==null&&u!==void 0?u:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=f??n)!==null&&c!==void 0?c:a.defaultError}},description:i}}class ct{get description(){return this._def.description}_getType(t){return go(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:go(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Gn,ctx:{common:t.parent.common,data:t.data,parsedType:go(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(sd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:go(t)},o=this._parseSync({data:t,path:i.path,parent:i});return kT(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:go(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return ya(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>ya(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:go(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(sd(i)?i:Promise.resolve(i));return kT(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const s=t(i),a=()=>o.addIssue({code:ke.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ei({schema:this,typeName:Je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ui.create(this,this._def)}nullable(){return Rs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Or.create(this)}promise(){return Hl.create(this,this._def)}or(t){return xa.create([this,t],this._def)}and(t){return ud.create(this,t,this._def)}transform(t){return new Ei({...lt(this._def),schema:this,typeName:Je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new hd({...lt(this._def),innerType:this,defaultValue:n,typeName:Je.ZodDefault})}brand(){return new ik({typeName:Je.ZodBranded,type:this,...lt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new pd({...lt(this._def),innerType:this,catchValue:n,typeName:Je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Qd.create(this,t)}readonly(){return md.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Cre=/^c[^\s-]{8,}$/i,_re=/^[0-9a-z]+$/,Nre=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Tre=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Are=/^[a-z0-9_-]{21}$/i,Pre=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Rre=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Mre=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jre="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let av;const Dre=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ore=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ire=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Lre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fre=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$re=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hL="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",zre=new RegExp(`^${hL}$`);function pL(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Bre(e){return new RegExp(`^${pL(e)}$`)}function mL(e){let t=`${hL}T${pL(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Vre(e,t){return!!((t==="v4"||!t)&&Dre.test(e)||(t==="v6"||!t)&&Ire.test(e))}function Wre(e,t){if(!Pre.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ure(e,t){return!!((t==="v4"||!t)&&Ore.test(e)||(t==="v6"||!t)&&Lre.test(e))}class yi extends ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==De.string){const o=this._getOrReturnCtx(t);return Pe(o,{code:ke.invalid_type,expected:De.string,received:o.parsedType}),tt}const r=new Gn;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=t.data.length>o.value,a=t.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(t,i),s?Pe(i,{code:ke.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Pe(i,{code:ke.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Mre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"email",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")av||(av=new RegExp(jre,"u")),av.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"emoji",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Tre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"uuid",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")Are.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"nanoid",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Cre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"cuid",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")_re.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"cuid2",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Nre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"ulid",code:ke.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Pe(i,{validation:"url",code:ke.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"regex",code:ke.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?mL(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?zre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Bre(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?Rre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"duration",code:ke.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Vre(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"ip",code:ke.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Wre(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"jwt",code:ke.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Ure(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"cidr",code:ke.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?Fre.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"base64",code:ke.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?$re.test(t.data)||(i=this._getOrReturnCtx(t,i),Pe(i,{validation:"base64url",code:ke.invalid_string,message:o.message}),r.dirty()):xt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:ke.invalid_string,...Be.errToObj(r)})}_addCheck(t){return new yi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Be.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Be.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Be.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Be.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Be.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Be.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Be.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Be.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Be.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Be.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Be.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Be.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Be.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Be.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Be.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Be.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Be.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Be.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Be.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Be.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Be.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Be.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Be.errToObj(n)})}nonempty(t){return this.min(1,Be.errToObj(t))}trim(){return new yi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}yi.create=e=>{var t;return new yi({checks:[],typeName:Je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...lt(e)})};function Hre(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}class jo extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==De.number){const o=this._getOrReturnCtx(t);return Pe(o,{code:ke.invalid_type,expected:De.number,received:o.parsedType}),tt}let r;const i=new Gn;for(const o of this._def.checks)o.kind==="int"?xt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Hre(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.not_finite,message:o.message}),i.dirty()):xt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Be.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Be.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Be.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Be.toString(n))}setLimit(t,n,r,i){return new jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Be.toString(i)}]})}_addCheck(t){return new jo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Be.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Be.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Be.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Be.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Be.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Be.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Be.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Be.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Be.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&xt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}jo.create=e=>new jo({checks:[],typeName:Je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...lt(e)});class As extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==De.bigint)return this._getInvalidInput(t);let r;const i=new Gn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:ke.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):xt.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Pe(n,{code:ke.invalid_type,expected:De.bigint,received:n.parsedType}),tt}gte(t,n){return this.setLimit("min",t,!0,Be.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Be.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Be.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Be.toString(n))}setLimit(t,n,r,i){return new As({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Be.toString(i)}]})}_addCheck(t){return new As({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Be.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Be.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Be.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Be.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Be.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}As.create=e=>{var t;return new As({checks:[],typeName:Je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...lt(e)})};class Vl extends ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==De.boolean){const r=this._getOrReturnCtx(t);return Pe(r,{code:ke.invalid_type,expected:De.boolean,received:r.parsedType}),tt}return ar(t.data)}}Vl.create=e=>new Vl({typeName:Je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...lt(e)});class Ps extends ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==De.date){const o=this._getOrReturnCtx(t);return Pe(o,{code:ke.invalid_type,expected:De.date,received:o.parsedType}),tt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Pe(o,{code:ke.invalid_date}),tt}const r=new Gn;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),Pe(i,{code:ke.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):xt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ps({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Be.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Be.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ps.create=e=>new Ps({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Je.ZodDate,...lt(e)});class Fp extends ct{_parse(t){if(this._getType(t)!==De.symbol){const r=this._getOrReturnCtx(t);return Pe(r,{code:ke.invalid_type,expected:De.symbol,received:r.parsedType}),tt}return ar(t.data)}}Fp.create=e=>new Fp({typeName:Je.ZodSymbol,...lt(e)});class ad extends ct{_parse(t){if(this._getType(t)!==De.undefined){const r=this._getOrReturnCtx(t);return Pe(r,{code:ke.invalid_type,expected:De.undefined,received:r.parsedType}),tt}return ar(t.data)}}ad.create=e=>new ad({typeName:Je.ZodUndefined,...lt(e)});class ld extends ct{_parse(t){if(this._getType(t)!==De.null){const r=this._getOrReturnCtx(t);return Pe(r,{code:ke.invalid_type,expected:De.null,received:r.parsedType}),tt}return ar(t.data)}}ld.create=e=>new ld({typeName:Je.ZodNull,...lt(e)});class Wl extends ct{constructor(){super(...arguments),this._any=!0}_parse(t){return ar(t.data)}}Wl.create=e=>new Wl({typeName:Je.ZodAny,...lt(e)});class da extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ar(t.data)}}da.create=e=>new da({typeName:Je.ZodUnknown,...lt(e)});class Do extends ct{_parse(t){const n=this._getOrReturnCtx(t);return Pe(n,{code:ke.invalid_type,expected:De.never,received:n.parsedType}),tt}}Do.create=e=>new Do({typeName:Je.ZodNever,...lt(e)});class $p extends ct{_parse(t){if(this._getType(t)!==De.undefined){const r=this._getOrReturnCtx(t);return Pe(r,{code:ke.invalid_type,expected:De.void,received:r.parsedType}),tt}return ar(t.data)}}$p.create=e=>new $p({typeName:Je.ZodVoid,...lt(e)});class Or extends ct{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==De.array)return Pe(n,{code:ke.invalid_type,expected:De.array,received:n.parsedType}),tt;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(Pe(n,{code:s?ke.too_big:ke.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Pe(n,{code:ke.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Pe(n,{code:ke.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new Zi(n,s,n.path,a)))).then(s=>Gn.mergeArray(r,s));const o=[...n.data].map((s,a)=>i.type._parseSync(new Zi(n,s,n.path,a)));return Gn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Or({...this._def,minLength:{value:t,message:Be.toString(n)}})}max(t,n){return new Or({...this._def,maxLength:{value:t,message:Be.toString(n)}})}length(t,n){return new Or({...this._def,exactLength:{value:t,message:Be.toString(n)}})}nonempty(t){return this.min(1,t)}}Or.create=(e,t)=>new Or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Je.ZodArray,...lt(t)});function fl(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ui.create(fl(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof Or?new Or({...e._def,type:fl(e.element)}):e instanceof Ui?Ui.create(fl(e.unwrap())):e instanceof Rs?Rs.create(fl(e.unwrap())):e instanceof Ki?Ki.create(e.items.map(t=>fl(t))):e}class Qt extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=xt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==De.object){const c=this._getOrReturnCtx(t);return Pe(c,{code:ke.invalid_type,expected:De.object,received:c.parsedType}),tt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||a.push(c);const u=[];for(const c of s){const f=o[c],h=i.data[c];u.push({key:{status:"valid",value:c},value:f._parse(new Zi(i,h,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Do){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of a)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(c==="strict")a.length>0&&(Pe(i,{code:ke.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of a){const h=i.data[f];u.push({key:{status:"valid",value:f},value:c._parse(new Zi(i,h,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of u){const h=await f.key,p=await f.value;c.push({key:h,value:p,alwaysSet:f.alwaysSet})}return c}).then(c=>Gn.mergeObjectSync(r,c)):Gn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Be.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,s,a;const u=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Be.errToObj(t).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};return xt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}omit(t){const n={};return xt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}deepPartial(){return fl(this)}partial(t){const n={};return xt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Qt({...this._def,shape:()=>n})}required(t){const n={};return xt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Ui;)o=o._def.innerType;n[r]=o}}),new Qt({...this._def,shape:()=>n})}keyof(){return gL(xt.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:Je.ZodObject,...lt(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:Je.ZodObject,...lt(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:Je.ZodObject,...lt(t)});class xa extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new Dr(a.ctx.common.issues));return Pe(n,{code:ke.invalid_union,unionErrors:s}),tt}if(n.common.async)return Promise.all(r.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const u of r){const c={...n,common:{...n.common,issues:[]},parent:null},f=u._parseSync({data:n.data,path:n.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(u=>new Dr(u));return Pe(n,{code:ke.invalid_union,unionErrors:a}),tt}}get options(){return this._def.options}}xa.create=(e,t)=>new xa({options:e,typeName:Je.ZodUnion,...lt(t)});const mo=e=>e instanceof dd?mo(e.schema):e instanceof Ei?mo(e.innerType()):e instanceof Ul?[e.value]:e instanceof Xi?e.options:e instanceof fd?xt.objectValues(e.enum):e instanceof hd?mo(e._def.innerType):e instanceof ad?[void 0]:e instanceof ld?[null]:e instanceof Ui?[void 0,...mo(e.unwrap())]:e instanceof Rs?[null,...mo(e.unwrap())]:e instanceof ik||e instanceof md?mo(e.unwrap()):e instanceof pd?mo(e._def.innerType):[];class Wm extends ct{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==De.object)return Pe(n,{code:ke.invalid_type,expected:De.object,received:n.parsedType}),tt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Pe(n,{code:ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),tt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const s=mo(o.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,o)}}return new Wm({typeName:Je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...lt(r)})}}function D0(e,t){const n=go(e),r=go(t);if(e===t)return{valid:!0,data:e};if(n===De.object&&r===De.object){const i=xt.objectKeys(t),o=xt.objectKeys(e).filter(a=>i.indexOf(a)!==-1),s={...e,...t};for(const a of o){const u=D0(e[a],t[a]);if(!u.valid)return{valid:!1};s[a]=u.data}return{valid:!0,data:s}}else if(n===De.array&&r===De.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const s=e[o],a=t[o],u=D0(s,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===De.date&&r===De.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ud extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,s)=>{if(M0(o)||M0(s))return tt;const a=D0(o.value,s.value);return a.valid?((j0(o)||j0(s))&&n.dirty(),{status:n.value,value:a.data}):(Pe(r,{code:ke.invalid_intersection_types}),tt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ud.create=(e,t,n)=>new ud({left:e,right:t,typeName:Je.ZodIntersection,...lt(n)});class Ki extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==De.array)return Pe(r,{code:ke.invalid_type,expected:De.array,received:r.parsedType}),tt;if(r.data.length<this._def.items.length)return Pe(r,{code:ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&r.data.length>this._def.items.length&&(Pe(r,{code:ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((s,a)=>{const u=this._def.items[a]||this._def.rest;return u?u._parse(new Zi(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Gn.mergeArray(n,s)):Gn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ki({...this._def,rest:t})}}Ki.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ki({items:e,typeName:Je.ZodTuple,rest:null,...lt(t)})};class cd extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==De.object)return Pe(r,{code:ke.invalid_type,expected:De.object,received:r.parsedType}),tt;const i=[],o=this._def.keyType,s=this._def.valueType;for(const a in r.data)i.push({key:o._parse(new Zi(r,a,r.path,a)),value:s._parse(new Zi(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Gn.mergeObjectAsync(n,i):Gn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ct?new cd({keyType:t,valueType:n,typeName:Je.ZodRecord,...lt(r)}):new cd({keyType:yi.create(),valueType:t,typeName:Je.ZodRecord,...lt(n)})}}class zp extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==De.map)return Pe(r,{code:ke.invalid_type,expected:De.map,received:r.parsedType}),tt;const i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,u],c)=>({key:i._parse(new Zi(r,a,r.path,[c,"key"])),value:o._parse(new Zi(r,u,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const u of s){const c=await u.key,f=await u.value;if(c.status==="aborted"||f.status==="aborted")return tt;(c.status==="dirty"||f.status==="dirty")&&n.dirty(),a.set(c.value,f.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const u of s){const c=u.key,f=u.value;if(c.status==="aborted"||f.status==="aborted")return tt;(c.status==="dirty"||f.status==="dirty")&&n.dirty(),a.set(c.value,f.value)}return{status:n.value,value:a}}}}zp.create=(e,t,n)=>new zp({valueType:t,keyType:e,typeName:Je.ZodMap,...lt(n)});class va extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==De.set)return Pe(r,{code:ke.invalid_type,expected:De.set,received:r.parsedType}),tt;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Pe(r,{code:ke.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Pe(r,{code:ke.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function s(u){const c=new Set;for(const f of u){if(f.status==="aborted")return tt;f.status==="dirty"&&n.dirty(),c.add(f.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((u,c)=>o._parse(new Zi(r,u,r.path,c)));return r.common.async?Promise.all(a).then(u=>s(u)):s(a)}min(t,n){return new va({...this._def,minSize:{value:t,message:Be.toString(n)}})}max(t,n){return new va({...this._def,maxSize:{value:t,message:Be.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}va.create=(e,t)=>new va({valueType:e,minSize:null,maxSize:null,typeName:Je.ZodSet,...lt(t)});class Al extends ct{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==De.function)return Pe(n,{code:ke.invalid_type,expected:De.function,received:n.parsedType}),tt;function r(a,u){return Ip({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Op(),Bl].filter(c=>!!c),issueData:{code:ke.invalid_arguments,argumentsError:u}})}function i(a,u){return Ip({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Op(),Bl].filter(c=>!!c),issueData:{code:ke.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Hl){const a=this;return ar(async function(...u){const c=new Dr([]),f=await a._def.args.parseAsync(u,o).catch(m=>{throw c.addIssue(r(u,m)),c}),h=await Reflect.apply(s,this,f);return await a._def.returns._def.type.parseAsync(h,o).catch(m=>{throw c.addIssue(i(h,m)),c})})}else{const a=this;return ar(function(...u){const c=a._def.args.safeParse(u,o);if(!c.success)throw new Dr([r(u,c.error)]);const f=Reflect.apply(s,this,c.data),h=a._def.returns.safeParse(f,o);if(!h.success)throw new Dr([i(f,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Al({...this._def,args:Ki.create(t).rest(da.create())})}returns(t){return new Al({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Al({args:t||Ki.create([]).rest(da.create()),returns:n||da.create(),typeName:Je.ZodFunction,...lt(r)})}}class dd extends ct{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}dd.create=(e,t)=>new dd({getter:e,typeName:Je.ZodLazy,...lt(t)});class Ul extends ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Pe(n,{received:n.data,code:ke.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ul.create=(e,t)=>new Ul({value:e,typeName:Je.ZodLiteral,...lt(t)});function gL(e,t){return new Xi({values:e,typeName:Je.ZodEnum,...lt(t)})}class Xi extends ct{constructor(){super(...arguments),kc.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Pe(n,{expected:xt.joinValues(r),received:n.parsedType,code:ke.invalid_type}),tt}if(Lp(this,kc)||fL(this,kc,new Set(this._def.values)),!Lp(this,kc).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Pe(n,{received:n.data,code:ke.invalid_enum_value,options:r}),tt}return ar(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Xi.create(t,{...this._def,...n})}exclude(t,n=this._def){return Xi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}kc=new WeakMap;Xi.create=gL;class fd extends ct{constructor(){super(...arguments),Sc.set(this,void 0)}_parse(t){const n=xt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==De.string&&r.parsedType!==De.number){const i=xt.objectValues(n);return Pe(r,{expected:xt.joinValues(i),received:r.parsedType,code:ke.invalid_type}),tt}if(Lp(this,Sc)||fL(this,Sc,new Set(xt.getValidEnumValues(this._def.values))),!Lp(this,Sc).has(t.data)){const i=xt.objectValues(n);return Pe(r,{received:r.data,code:ke.invalid_enum_value,options:i}),tt}return ar(t.data)}get enum(){return this._def.values}}Sc=new WeakMap;fd.create=(e,t)=>new fd({values:e,typeName:Je.ZodNativeEnum,...lt(t)});class Hl extends ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==De.promise&&n.common.async===!1)return Pe(n,{code:ke.invalid_type,expected:De.promise,received:n.parsedType}),tt;const r=n.parsedType===De.promise?n.data:Promise.resolve(n.data);return ar(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Hl.create=(e,t)=>new Hl({type:e,typeName:Je.ZodPromise,...lt(t)});class Ei extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s=>{Pe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return tt;const u=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return u.status==="aborted"?tt:u.status==="dirty"||n.value==="dirty"?wl(u.value):u});{if(n.value==="aborted")return tt;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?tt:a.status==="dirty"||n.value==="dirty"?wl(a.value):a}}if(i.type==="refinement"){const s=a=>{const u=i.refinement(a,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?tt:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?tt:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ya(s))return s;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>ya(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):s);xt.assertNever(i)}}Ei.create=(e,t,n)=>new Ei({schema:e,typeName:Je.ZodEffects,effect:t,...lt(n)});Ei.createWithPreprocess=(e,t,n)=>new Ei({schema:t,effect:{type:"preprocess",transform:e},typeName:Je.ZodEffects,...lt(n)});class Ui extends ct{_parse(t){return this._getType(t)===De.undefined?ar(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ui.create=(e,t)=>new Ui({innerType:e,typeName:Je.ZodOptional,...lt(t)});class Rs extends ct{_parse(t){return this._getType(t)===De.null?ar(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rs.create=(e,t)=>new Rs({innerType:e,typeName:Je.ZodNullable,...lt(t)});class hd extends ct{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===De.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}hd.create=(e,t)=>new hd({innerType:e,typeName:Je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...lt(t)});class pd extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return sd(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Dr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Dr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}pd.create=(e,t)=>new pd({innerType:e,typeName:Je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...lt(t)});class Bp extends ct{_parse(t){if(this._getType(t)!==De.nan){const r=this._getOrReturnCtx(t);return Pe(r,{code:ke.invalid_type,expected:De.nan,received:r.parsedType}),tt}return{status:"valid",value:t.data}}}Bp.create=e=>new Bp({typeName:Je.ZodNaN,...lt(e)});const Yre=Symbol("zod_brand");class ik extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Qd extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?tt:o.status==="dirty"?(n.dirty(),wl(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?tt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Qd({in:t,out:n,typeName:Je.ZodPipeline})}}class md extends ct{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ya(i)&&(i.value=Object.freeze(i.value)),i);return sd(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}md.create=(e,t)=>new md({innerType:e,typeName:Je.ZodReadonly,...lt(t)});function yL(e,t={},n){return e?Wl.create().superRefine((r,i)=>{var o,s;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(s=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:!0,c=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...c,fatal:u})}}):Wl.create()}const qre={object:Qt.lazycreate};var Je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Je||(Je={}));const Gre=(e,t={message:`Input not instance of ${e.name}`})=>yL(n=>n instanceof e,t),xL=yi.create,vL=jo.create,Zre=Bp.create,Kre=As.create,wL=Vl.create,Xre=Ps.create,Qre=Fp.create,Jre=ad.create,eie=ld.create,tie=Wl.create,nie=da.create,rie=Do.create,iie=$p.create,oie=Or.create,sie=Qt.create,aie=Qt.strictCreate,lie=xa.create,uie=Wm.create,cie=ud.create,die=Ki.create,fie=cd.create,hie=zp.create,pie=va.create,mie=Al.create,gie=dd.create,yie=Ul.create,xie=Xi.create,vie=fd.create,wie=Hl.create,ST=Ei.create,bie=Ui.create,kie=Rs.create,Sie=Ei.createWithPreprocess,Eie=Qd.create,Cie=()=>xL().optional(),_ie=()=>vL().optional(),Nie=()=>wL().optional(),Tie={string:e=>yi.create({...e,coerce:!0}),number:e=>jo.create({...e,coerce:!0}),boolean:e=>Vl.create({...e,coerce:!0}),bigint:e=>As.create({...e,coerce:!0}),date:e=>Ps.create({...e,coerce:!0})},Aie=tt;var Yt=Object.freeze({__proto__:null,defaultErrorMap:Bl,setErrorMap:Sre,getErrorMap:Op,makeIssue:Ip,EMPTY_PATH:Ere,addIssueToContext:Pe,ParseStatus:Gn,INVALID:tt,DIRTY:wl,OK:ar,isAborted:M0,isDirty:j0,isValid:ya,isAsync:sd,get util(){return xt},get objectUtil(){return R0},ZodParsedType:De,getParsedType:go,ZodType:ct,datetimeRegex:mL,ZodString:yi,ZodNumber:jo,ZodBigInt:As,ZodBoolean:Vl,ZodDate:Ps,ZodSymbol:Fp,ZodUndefined:ad,ZodNull:ld,ZodAny:Wl,ZodUnknown:da,ZodNever:Do,ZodVoid:$p,ZodArray:Or,ZodObject:Qt,ZodUnion:xa,ZodDiscriminatedUnion:Wm,ZodIntersection:ud,ZodTuple:Ki,ZodRecord:cd,ZodMap:zp,ZodSet:va,ZodFunction:Al,ZodLazy:dd,ZodLiteral:Ul,ZodEnum:Xi,ZodNativeEnum:fd,ZodPromise:Hl,ZodEffects:Ei,ZodTransformer:Ei,ZodOptional:Ui,ZodNullable:Rs,ZodDefault:hd,ZodCatch:pd,ZodNaN:Bp,BRAND:Yre,ZodBranded:ik,ZodPipeline:Qd,ZodReadonly:md,custom:yL,Schema:ct,ZodSchema:ct,late:qre,get ZodFirstPartyTypeKind(){return Je},coerce:Tie,any:tie,array:oie,bigint:Kre,boolean:wL,date:Xre,discriminatedUnion:uie,effect:ST,enum:xie,function:mie,instanceof:Gre,intersection:cie,lazy:gie,literal:yie,map:hie,nan:Zre,nativeEnum:vie,never:rie,null:eie,nullable:kie,number:vL,object:sie,oboolean:Nie,onumber:_ie,optional:bie,ostring:Cie,pipeline:Eie,preprocess:Sie,promise:wie,record:fie,set:pie,strictObject:aie,string:xL,symbol:Qre,transformer:ST,tuple:die,undefined:Jre,union:lie,unknown:nie,void:iie,NEVER:Aie,ZodIssueCode:ke,quotelessJson:kre,ZodError:Dr}),Jd=e=>e.type==="checkbox",aa=e=>e instanceof Date,nr=e=>e==null;const bL=e=>typeof e=="object";var ln=e=>!nr(e)&&!Array.isArray(e)&&bL(e)&&!aa(e),kL=e=>ln(e)&&e.target?Jd(e.target)?e.target.checked:e.target.value:e,Pie=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,SL=(e,t)=>e.has(Pie(t)),Rie=e=>{const t=e.constructor&&e.constructor.prototype;return ln(t)&&t.hasOwnProperty("isPrototypeOf")},ok=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kn(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ok&&(e instanceof Blob||r))&&(n||ln(e)))if(t=n?[]:{},!n&&!Rie(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=kn(e[i]));else return e;return t}var ef=e=>Array.isArray(e)?e.filter(Boolean):[],Bt=e=>e===void 0,Ne=(e,t,n)=>{if(!t||!ln(e))return n;const r=ef(t.split(/[,[\].]+?/)).reduce((i,o)=>nr(i)?i:i[o],e);return Bt(r)||r===e?Bt(e[t])?n:e[t]:r},Kr=e=>typeof e=="boolean",sk=e=>/^\w*$/.test(e),EL=e=>ef(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Et=(e,t,n)=>{let r=-1;const i=sk(t)?[t]:EL(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let u=n;if(r!==s){const c=e[a];u=ln(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=u,e=e[a]}return e};const Vp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Jr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ho={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mie=ne.createContext(null),Um=()=>ne.useContext(Mie);var CL=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Jr.all&&(t._proxyFormState[s]=!r||Jr.all),n&&(n[s]=!0),e[s]}});return i},tr=e=>ln(e)&&!Object.keys(e).length,_L=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return tr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Jr.all))},yr=e=>Array.isArray(e)?e:[e],NL=(e,t,n)=>!e||!t||e===t||yr(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Hm(e){const t=ne.useRef(e);t.current=e,ne.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function jie(e){const t=Um(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[s,a]=ne.useState(n._formState),u=ne.useRef(!0),c=ne.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=ne.useRef(i);return f.current=i,Hm({disabled:r,next:h=>u.current&&NL(f.current,h.name,o)&&_L(h,c.current,n._updateFormState)&&a({...n._formState,...h}),subject:n._subjects.state}),ne.useEffect(()=>(u.current=!0,c.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),ne.useMemo(()=>CL(s,n,c.current,!1),[s,n])}var $i=e=>typeof e=="string",TL=(e,t,n,r,i)=>$i(e)?(r&&t.watch.add(e),Ne(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Ne(n,o))):(r&&(t.watchAll=!0),n);function Die(e){const t=Um(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e,a=ne.useRef(r);a.current=r,Hm({disabled:o,subject:n._subjects.values,next:f=>{NL(a.current,f.name,s)&&c(kn(TL(a.current,n._names,f.values||n._formValues,!1,i)))}});const[u,c]=ne.useState(n._getWatch(r,i));return ne.useEffect(()=>n._removeUnmounted()),u}function Oie(e){const t=Um(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=SL(i._names.array,n),a=Die({control:i,name:n,defaultValue:Ne(i._formValues,n,Ne(i._defaultValues,n,e.defaultValue)),exact:!0}),u=jie({control:i,name:n,exact:!0}),c=ne.useRef(i.register(n,{...e.rules,value:a,...Kr(e.disabled)?{disabled:e.disabled}:{}})),f=ne.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ne(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ne(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ne(u.validatingFields,n)},error:{enumerable:!0,get:()=>Ne(u.errors,n)}}),[u,n]),h=ne.useMemo(()=>({name:n,value:a,...Kr(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:p=>c.current.onChange({target:{value:kL(p),name:n},type:Vp.CHANGE}),onBlur:()=>c.current.onBlur({target:{value:Ne(i._formValues,n),name:n},type:Vp.BLUR}),ref:p=>{const m=Ne(i._fields,n);m&&p&&(m._f.ref={focus:()=>p.focus(),select:()=>p.select(),setCustomValidity:x=>p.setCustomValidity(x),reportValidity:()=>p.reportValidity()})}}),[n,i._formValues,r,u.disabled,a,i._fields]);return ne.useEffect(()=>{const p=i._options.shouldUnregister||o,m=(x,v)=>{const k=Ne(i._fields,x);k&&k._f&&(k._f.mount=v)};if(m(n,!0),p){const x=kn(Ne(i._options.defaultValues,n));Et(i._defaultValues,n,x),Bt(Ne(i._formValues,n))&&Et(i._formValues,n,x)}return!s&&i.register(n),()=>{(s?p&&!i._state.action:p)?i.unregister(n):m(n,!1)}},[n,i,s,o]),ne.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),ne.useMemo(()=>({field:h,formState:u,fieldState:f}),[h,u,f])}const gu=e=>e.render(Oie(e));var AL=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ds=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},lv=(e,t,n={})=>n.shouldFocus||Bt(n.shouldFocus)?n.focusName||`${e}.${Bt(n.focusIndex)?t:n.focusIndex}.`:"",Ic=e=>({isOnSubmit:!e||e===Jr.onSubmit,isOnBlur:e===Jr.onBlur,isOnChange:e===Jr.onChange,isOnAll:e===Jr.all,isOnTouch:e===Jr.onTouched}),O0=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Pl=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Ne(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(Pl(a,t))break}else if(ln(a)&&Pl(a,t))break}}};var PL=(e,t,n)=>{const r=yr(Ne(e,n));return Et(r,"root",t[n]),Et(e,n,r),e},ak=e=>e.type==="file",Fi=e=>typeof e=="function",Wp=e=>{if(!ok)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ap=e=>$i(e),lk=e=>e.type==="radio",Up=e=>e instanceof RegExp;const ET={value:!1,isValid:!1},CT={value:!0,isValid:!0};var RL=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Bt(e[0].attributes.value)?Bt(e[0].value)||e[0].value===""?CT:{value:e[0].value,isValid:!0}:CT:ET}return ET};const _T={isValid:!1,value:null};var ML=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,_T):_T;function NT(e,t,n="validate"){if(ap(e)||Array.isArray(e)&&e.every(ap)||Kr(e)&&!e)return{type:n,message:ap(e)?e:"",ref:t}}var ul=e=>ln(e)&&!Up(e)?e:{value:e,message:""},I0=async(e,t,n,r,i,o)=>{const{ref:s,refs:a,required:u,maxLength:c,minLength:f,min:h,max:p,pattern:m,validate:x,name:v,valueAsNumber:k,mount:b}=e._f,E=Ne(n,v);if(!b||t.has(v))return{};const C=a?a[0]:s,N=F=>{i&&C.reportValidity&&(C.setCustomValidity(Kr(F)?"":F||""),C.reportValidity())},P={},T=lk(s),j=Jd(s),R=T||j,I=(k||ak(s))&&Bt(s.value)&&Bt(E)||Wp(s)&&s.value===""||E===""||Array.isArray(E)&&!E.length,M=AL.bind(null,v,r,P),z=(F,Y,O,q=ho.maxLength,W=ho.minLength)=>{const Z=F?Y:O;P[v]={type:F?q:W,message:Z,ref:s,...M(F?q:W,Z)}};if(o?!Array.isArray(E)||!E.length:u&&(!R&&(I||nr(E))||Kr(E)&&!E||j&&!RL(a).isValid||T&&!ML(a).isValid)){const{value:F,message:Y}=ap(u)?{value:!!u,message:u}:ul(u);if(F&&(P[v]={type:ho.required,message:Y,ref:C,...M(ho.required,Y)},!r))return N(Y),P}if(!I&&(!nr(h)||!nr(p))){let F,Y;const O=ul(p),q=ul(h);if(!nr(E)&&!isNaN(E)){const W=s.valueAsNumber||E&&+E;nr(O.value)||(F=W>O.value),nr(q.value)||(Y=W<q.value)}else{const W=s.valueAsDate||new Date(E),Z=L=>new Date(new Date().toDateString()+" "+L),U=s.type=="time",B=s.type=="week";$i(O.value)&&E&&(F=U?Z(E)>Z(O.value):B?E>O.value:W>new Date(O.value)),$i(q.value)&&E&&(Y=U?Z(E)<Z(q.value):B?E<q.value:W<new Date(q.value))}if((F||Y)&&(z(!!F,O.message,q.message,ho.max,ho.min),!r))return N(P[v].message),P}if((c||f)&&!I&&($i(E)||o&&Array.isArray(E))){const F=ul(c),Y=ul(f),O=!nr(F.value)&&E.length>+F.value,q=!nr(Y.value)&&E.length<+Y.value;if((O||q)&&(z(O,F.message,Y.message),!r))return N(P[v].message),P}if(m&&!I&&$i(E)){const{value:F,message:Y}=ul(m);if(Up(F)&&!E.match(F)&&(P[v]={type:ho.pattern,message:Y,ref:s,...M(ho.pattern,Y)},!r))return N(Y),P}if(x){if(Fi(x)){const F=await x(E,n),Y=NT(F,C);if(Y&&(P[v]={...Y,...M(ho.validate,Y.message)},!r))return N(Y.message),P}else if(ln(x)){let F={};for(const Y in x){if(!tr(F)&&!r)break;const O=NT(await x[Y](E,n),C,Y);O&&(F={...O,...M(Y,O.message)},N(O.message),r&&(P[v]=F))}if(!tr(F)&&(P[v]={ref:C,...F},!r))return P}}return N(!0),P},uv=(e,t)=>[...e,...yr(t)],cv=e=>Array.isArray(e)?e.map(()=>{}):void 0;function dv(e,t,n){return[...e.slice(0,t),...yr(n),...e.slice(t)]}var fv=(e,t,n)=>Array.isArray(e)?(Bt(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],hv=(e,t)=>[...yr(t),...yr(e)];function Iie(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return ef(r).length?r:[]}var pv=(e,t)=>Bt(t)?[]:Iie(e,yr(t).sort((n,r)=>n-r)),mv=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Lie(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Bt(e)?r++:e[t[r++]];return e}function Fie(e){for(const t in e)if(e.hasOwnProperty(t)&&!Bt(e[t]))return!1;return!0}function dn(e,t){const n=Array.isArray(t)?t:sk(t)?[t]:EL(t),r=n.length===1?e:Lie(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(ln(r)&&tr(r)||Array.isArray(r)&&Fie(r))&&dn(e,n.slice(0,-1)),e}var TT=(e,t,n)=>(e[t]=n,e);function uk(e){const t=Um(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o,rules:s}=e,[a,u]=ne.useState(n._getFieldArray(r)),c=ne.useRef(n._getFieldArray(r).map(ds)),f=ne.useRef(a),h=ne.useRef(r),p=ne.useRef(!1);h.current=r,f.current=a,n._names.array.add(r),s&&n.register(r,s),Hm({next:({values:T,name:j})=>{if(j===h.current||!j){const R=Ne(T,h.current);Array.isArray(R)&&(u(R),c.current=R.map(ds))}},subject:n._subjects.array});const m=ne.useCallback(T=>{p.current=!0,n._updateFieldArray(r,T)},[n,r]),x=(T,j)=>{const R=yr(kn(T)),I=uv(n._getFieldArray(r),R);n._names.focus=lv(r,I.length-1,j),c.current=uv(c.current,R.map(ds)),m(I),u(I),n._updateFieldArray(r,I,uv,{argA:cv(T)})},v=(T,j)=>{const R=yr(kn(T)),I=hv(n._getFieldArray(r),R);n._names.focus=lv(r,0,j),c.current=hv(c.current,R.map(ds)),m(I),u(I),n._updateFieldArray(r,I,hv,{argA:cv(T)})},k=T=>{const j=pv(n._getFieldArray(r),T);c.current=pv(c.current,T),m(j),u(j),!Array.isArray(Ne(n._fields,r))&&Et(n._fields,r,void 0),n._updateFieldArray(r,j,pv,{argA:T})},b=(T,j,R)=>{const I=yr(kn(j)),M=dv(n._getFieldArray(r),T,I);n._names.focus=lv(r,T,R),c.current=dv(c.current,T,I.map(ds)),m(M),u(M),n._updateFieldArray(r,M,dv,{argA:T,argB:cv(j)})},E=(T,j)=>{const R=n._getFieldArray(r);mv(R,T,j),mv(c.current,T,j),m(R),u(R),n._updateFieldArray(r,R,mv,{argA:T,argB:j},!1)},C=(T,j)=>{const R=n._getFieldArray(r);fv(R,T,j),fv(c.current,T,j),m(R),u(R),n._updateFieldArray(r,R,fv,{argA:T,argB:j},!1)},N=(T,j)=>{const R=kn(j),I=TT(n._getFieldArray(r),T,R);c.current=[...I].map((M,z)=>!M||z===T?ds():c.current[z]),m(I),u([...I]),n._updateFieldArray(r,I,TT,{argA:T,argB:R},!0,!1)},P=T=>{const j=yr(kn(T));c.current=j.map(ds),m([...j]),u([...j]),n._updateFieldArray(r,[...j],R=>R,{},!0,!1)};return ne.useEffect(()=>{if(n._state.action=!1,O0(r,n._names)&&n._subjects.state.next({...n._formState}),p.current&&(!Ic(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(T=>{const j=Ne(T.errors,r),R=Ne(n._formState.errors,r);(R?!j&&R.type||j&&(R.type!==j.type||R.message!==j.message):j&&j.type)&&(j?Et(n._formState.errors,r,j):dn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const T=Ne(n._fields,r);T&&T._f&&!(Ic(n._options.reValidateMode).isOnSubmit&&Ic(n._options.mode).isOnSubmit)&&I0(T,n._names.disabled,n._formValues,n._options.criteriaMode===Jr.all,n._options.shouldUseNativeValidation,!0).then(j=>!tr(j)&&n._subjects.state.next({errors:PL(n._formState.errors,j,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Pl(n._fields,(T,j)=>{if(n._names.focus&&j.startsWith(n._names.focus)&&T.focus)return T.focus(),1}),n._names.focus="",n._updateValid(),p.current=!1},[a,r,n]),ne.useEffect(()=>(!Ne(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)}),[r,n,i,o]),{swap:ne.useCallback(E,[m,r,n]),move:ne.useCallback(C,[m,r,n]),prepend:ne.useCallback(v,[m,r,n]),append:ne.useCallback(x,[m,r,n]),remove:ne.useCallback(k,[m,r,n]),insert:ne.useCallback(b,[m,r,n]),update:ne.useCallback(N,[m,r,n]),replace:ne.useCallback(P,[m,r,n]),fields:ne.useMemo(()=>a.map((T,j)=>({...T,[i]:c.current[j]||ds()})),[a,i])}}var gv=()=>{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},L0=e=>nr(e)||!bL(e);function xs(e,t){if(L0(e)||L0(t))return e===t;if(aa(e)&&aa(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(aa(o)&&aa(s)||ln(o)&&ln(s)||Array.isArray(o)&&Array.isArray(s)?!xs(o,s):o!==s)return!1}}return!0}var jL=e=>e.type==="select-multiple",$ie=e=>lk(e)||Jd(e),yv=e=>Wp(e)&&e.isConnected,DL=e=>{for(const t in e)if(Fi(e[t]))return!0;return!1};function Hp(e,t={}){const n=Array.isArray(e);if(ln(e)||n)for(const r in e)Array.isArray(e[r])||ln(e[r])&&!DL(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Hp(e[r],t[r])):nr(e[r])||(t[r]=!0);return t}function OL(e,t,n){const r=Array.isArray(e);if(ln(e)||r)for(const i in e)Array.isArray(e[i])||ln(e[i])&&!DL(e[i])?Bt(t)||L0(n[i])?n[i]=Array.isArray(e[i])?Hp(e[i],[]):{...Hp(e[i])}:OL(e[i],nr(t)?{}:t[i],n[i]):n[i]=!xs(e[i],t[i]);return n}var cc=(e,t)=>OL(e,t,Hp(t)),IL=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Bt(e)?e:t?e===""?NaN:e&&+e:n&&$i(e)?new Date(e):r?r(e):e;function xv(e){const t=e.ref;return ak(t)?t.files:lk(t)?ML(e.refs).value:jL(t)?[...t.selectedOptions].map(({value:n})=>n):Jd(t)?RL(e.refs).value:IL(Bt(t.value)?e.ref.value:t.value,e)}var zie=(e,t,n,r)=>{const i={};for(const o of e){const s=Ne(t,o);s&&Et(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},dc=e=>Bt(e)?e:Up(e)?e.source:ln(e)?Up(e.value)?e.value.source:e.value:e;const AT="AsyncFunction";var Bie=e=>!!e&&!!e.validate&&!!(Fi(e.validate)&&e.validate.constructor.name===AT||ln(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===AT)),Vie=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function PT(e,t,n){const r=Ne(e,n);if(r||sk(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=Ne(t,o),a=Ne(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var Wie=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Uie=(e,t)=>!ef(Ne(e,t)).length&&dn(e,t);const Hie={mode:Jr.onSubmit,reValidateMode:Jr.onChange,shouldFocusError:!0};function Yie(e={}){let t={...Hie,...e},n={submitCount:0,isDirty:!1,isLoading:Fi(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=ln(t.defaultValues)||ln(t.values)?kn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:kn(i),s={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:gv(),array:gv(),state:gv()},p=Ic(t.mode),m=Ic(t.reValidateMode),x=t.criteriaMode===Jr.all,v=Q=>oe=>{clearTimeout(c),c=setTimeout(Q,oe)},k=async Q=>{if(!t.disabled&&(f.isValid||Q)){const oe=t.resolver?tr((await R()).errors):await M(r,!0);oe!==n.isValid&&h.state.next({isValid:oe})}},b=(Q,oe)=>{!t.disabled&&(f.isValidating||f.validatingFields)&&((Q||Array.from(a.mount)).forEach(ue=>{ue&&(oe?Et(n.validatingFields,ue,oe):dn(n.validatingFields,ue))}),h.state.next({validatingFields:n.validatingFields,isValidating:!tr(n.validatingFields)}))},E=(Q,oe=[],ue,Se,we=!0,ge=!0)=>{if(Se&&ue&&!t.disabled){if(s.action=!0,ge&&Array.isArray(Ne(r,Q))){const Ae=ue(Ne(r,Q),Se.argA,Se.argB);we&&Et(r,Q,Ae)}if(ge&&Array.isArray(Ne(n.errors,Q))){const Ae=ue(Ne(n.errors,Q),Se.argA,Se.argB);we&&Et(n.errors,Q,Ae),Uie(n.errors,Q)}if(f.touchedFields&&ge&&Array.isArray(Ne(n.touchedFields,Q))){const Ae=ue(Ne(n.touchedFields,Q),Se.argA,Se.argB);we&&Et(n.touchedFields,Q,Ae)}f.dirtyFields&&(n.dirtyFields=cc(i,o)),h.state.next({name:Q,isDirty:F(Q,oe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Et(o,Q,oe)},C=(Q,oe)=>{Et(n.errors,Q,oe),h.state.next({errors:n.errors})},N=Q=>{n.errors=Q,h.state.next({errors:n.errors,isValid:!1})},P=(Q,oe,ue,Se)=>{const we=Ne(r,Q);if(we){const ge=Ne(o,Q,Bt(ue)?Ne(i,Q):ue);Bt(ge)||Se&&Se.defaultChecked||oe?Et(o,Q,oe?ge:xv(we._f)):q(Q,ge),s.mount&&k()}},T=(Q,oe,ue,Se,we)=>{let ge=!1,Ae=!1;const Fe={name:Q};if(!t.disabled){const se=!!(Ne(r,Q)&&Ne(r,Q)._f&&Ne(r,Q)._f.disabled);if(!ue||Se){f.isDirty&&(Ae=n.isDirty,n.isDirty=Fe.isDirty=F(),ge=Ae!==Fe.isDirty);const pe=se||xs(Ne(i,Q),oe);Ae=!!(!se&&Ne(n.dirtyFields,Q)),pe||se?dn(n.dirtyFields,Q):Et(n.dirtyFields,Q,!0),Fe.dirtyFields=n.dirtyFields,ge=ge||f.dirtyFields&&Ae!==!pe}if(ue){const pe=Ne(n.touchedFields,Q);pe||(Et(n.touchedFields,Q,ue),Fe.touchedFields=n.touchedFields,ge=ge||f.touchedFields&&pe!==ue)}ge&&we&&h.state.next(Fe)}return ge?Fe:{}},j=(Q,oe,ue,Se)=>{const we=Ne(n.errors,Q),ge=f.isValid&&Kr(oe)&&n.isValid!==oe;if(t.delayError&&ue?(u=v(()=>C(Q,ue)),u(t.delayError)):(clearTimeout(c),u=null,ue?Et(n.errors,Q,ue):dn(n.errors,Q)),(ue?!xs(we,ue):we)||!tr(Se)||ge){const Ae={...Se,...ge&&Kr(oe)?{isValid:oe}:{},errors:n.errors,name:Q};n={...n,...Ae},h.state.next(Ae)}},R=async Q=>{b(Q,!0);const oe=await t.resolver(o,t.context,zie(Q||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(Q),oe},I=async Q=>{const{errors:oe}=await R(Q);if(Q)for(const ue of Q){const Se=Ne(oe,ue);Se?Et(n.errors,ue,Se):dn(n.errors,ue)}else n.errors=oe;return oe},M=async(Q,oe,ue={valid:!0})=>{for(const Se in Q){const we=Q[Se];if(we){const{_f:ge,...Ae}=we;if(ge){const Fe=a.array.has(ge.name),se=we._f&&Bie(we._f);se&&f.validatingFields&&b([Se],!0);const pe=await I0(we,a.disabled,o,x,t.shouldUseNativeValidation&&!oe,Fe);if(se&&f.validatingFields&&b([Se]),pe[ge.name]&&(ue.valid=!1,oe))break;!oe&&(Ne(pe,ge.name)?Fe?PL(n.errors,pe,ge.name):Et(n.errors,ge.name,pe[ge.name]):dn(n.errors,ge.name))}!tr(Ae)&&await M(Ae,oe,ue)}}return ue.valid},z=()=>{for(const Q of a.unMount){const oe=Ne(r,Q);oe&&(oe._f.refs?oe._f.refs.every(ue=>!yv(ue)):!yv(oe._f.ref))&&J(Q)}a.unMount=new Set},F=(Q,oe)=>!t.disabled&&(Q&&oe&&Et(o,Q,oe),!xs(H(),i)),Y=(Q,oe,ue)=>TL(Q,a,{...s.mount?o:Bt(oe)?i:$i(Q)?{[Q]:oe}:oe},ue,oe),O=Q=>ef(Ne(s.mount?o:i,Q,t.shouldUnregister?Ne(i,Q,[]):[])),q=(Q,oe,ue={})=>{const Se=Ne(r,Q);let we=oe;if(Se){const ge=Se._f;ge&&(!ge.disabled&&Et(o,Q,IL(oe,ge)),we=Wp(ge.ref)&&nr(oe)?"":oe,jL(ge.ref)?[...ge.ref.options].forEach(Ae=>Ae.selected=we.includes(Ae.value)):ge.refs?Jd(ge.ref)?ge.refs.length>1?ge.refs.forEach(Ae=>(!Ae.defaultChecked||!Ae.disabled)&&(Ae.checked=Array.isArray(we)?!!we.find(Fe=>Fe===Ae.value):we===Ae.value)):ge.refs[0]&&(ge.refs[0].checked=!!we):ge.refs.forEach(Ae=>Ae.checked=Ae.value===we):ak(ge.ref)?ge.ref.value="":(ge.ref.value=we,ge.ref.type||h.values.next({name:Q,values:{...o}})))}(ue.shouldDirty||ue.shouldTouch)&&T(Q,we,ue.shouldTouch,ue.shouldDirty,!0),ue.shouldValidate&&L(Q)},W=(Q,oe,ue)=>{for(const Se in oe){const we=oe[Se],ge=`${Q}.${Se}`,Ae=Ne(r,ge);(a.array.has(Q)||ln(we)||Ae&&!Ae._f)&&!aa(we)?W(ge,we,ue):q(ge,we,ue)}},Z=(Q,oe,ue={})=>{const Se=Ne(r,Q),we=a.array.has(Q),ge=kn(oe);Et(o,Q,ge),we?(h.array.next({name:Q,values:{...o}}),(f.isDirty||f.dirtyFields)&&ue.shouldDirty&&h.state.next({name:Q,dirtyFields:cc(i,o),isDirty:F(Q,ge)})):Se&&!Se._f&&!nr(ge)?W(Q,ge,ue):q(Q,ge,ue),O0(Q,a)&&h.state.next({...n}),h.values.next({name:s.mount?Q:void 0,values:{...o}})},U=async Q=>{s.mount=!0;const oe=Q.target;let ue=oe.name,Se=!0;const we=Ne(r,ue),ge=()=>oe.type?xv(we._f):kL(Q),Ae=Fe=>{Se=Number.isNaN(Fe)||aa(Fe)&&isNaN(Fe.getTime())||xs(Fe,Ne(o,ue,Fe))};if(we){let Fe,se;const pe=ge(),Oe=Q.type===Vp.BLUR||Q.type===Vp.FOCUS_OUT,et=!Vie(we._f)&&!t.resolver&&!Ne(n.errors,ue)&&!we._f.deps||Wie(Oe,Ne(n.touchedFields,ue),n.isSubmitted,m,p),rt=O0(ue,a,Oe);Et(o,ue,pe),Oe?(we._f.onBlur&&we._f.onBlur(Q),u&&u(0)):we._f.onChange&&we._f.onChange(Q);const Rt=T(ue,pe,Oe,!1),Ke=!tr(Rt)||rt;if(!Oe&&h.values.next({name:ue,type:Q.type,values:{...o}}),et)return f.isValid&&(t.mode==="onBlur"&&Oe?k():Oe||k()),Ke&&h.state.next({name:ue,...rt?{}:Rt});if(!Oe&&rt&&h.state.next({...n}),t.resolver){const{errors:st}=await R([ue]);if(Ae(pe),Se){const it=PT(n.errors,r,ue),Ut=PT(st,r,it.name||ue);Fe=Ut.error,ue=Ut.name,se=tr(st)}}else b([ue],!0),Fe=(await I0(we,a.disabled,o,x,t.shouldUseNativeValidation))[ue],b([ue]),Ae(pe),Se&&(Fe?se=!1:f.isValid&&(se=await M(r,!0)));Se&&(we._f.deps&&L(we._f.deps),j(ue,se,Fe,Rt))}},B=(Q,oe)=>{if(Ne(n.errors,oe)&&Q.focus)return Q.focus(),1},L=async(Q,oe={})=>{let ue,Se;const we=yr(Q);if(t.resolver){const ge=await I(Bt(Q)?Q:we);ue=tr(ge),Se=Q?!we.some(Ae=>Ne(ge,Ae)):ue}else Q?(Se=(await Promise.all(we.map(async ge=>{const Ae=Ne(r,ge);return await M(Ae&&Ae._f?{[ge]:Ae}:Ae)}))).every(Boolean),!(!Se&&!n.isValid)&&k()):Se=ue=await M(r);return h.state.next({...!$i(Q)||f.isValid&&ue!==n.isValid?{}:{name:Q},...t.resolver||!Q?{isValid:ue}:{},errors:n.errors}),oe.shouldFocus&&!Se&&Pl(r,B,Q?we:a.mount),Se},H=Q=>{const oe={...s.mount?o:i};return Bt(Q)?oe:$i(Q)?Ne(oe,Q):Q.map(ue=>Ne(oe,ue))},V=(Q,oe)=>({invalid:!!Ne((oe||n).errors,Q),isDirty:!!Ne((oe||n).dirtyFields,Q),error:Ne((oe||n).errors,Q),isValidating:!!Ne(n.validatingFields,Q),isTouched:!!Ne((oe||n).touchedFields,Q)}),D=Q=>{Q&&yr(Q).forEach(oe=>dn(n.errors,oe)),h.state.next({errors:Q?n.errors:{}})},G=(Q,oe,ue)=>{const Se=(Ne(r,Q,{_f:{}})._f||{}).ref,we=Ne(n.errors,Q)||{},{ref:ge,message:Ae,type:Fe,...se}=we;Et(n.errors,Q,{...se,...oe,ref:Se}),h.state.next({name:Q,errors:n.errors,isValid:!1}),ue&&ue.shouldFocus&&Se&&Se.focus&&Se.focus()},K=(Q,oe)=>Fi(Q)?h.values.subscribe({next:ue=>Q(Y(void 0,oe),ue)}):Y(Q,oe,!0),J=(Q,oe={})=>{for(const ue of Q?yr(Q):a.mount)a.mount.delete(ue),a.array.delete(ue),oe.keepValue||(dn(r,ue),dn(o,ue)),!oe.keepError&&dn(n.errors,ue),!oe.keepDirty&&dn(n.dirtyFields,ue),!oe.keepTouched&&dn(n.touchedFields,ue),!oe.keepIsValidating&&dn(n.validatingFields,ue),!t.shouldUnregister&&!oe.keepDefaultValue&&dn(i,ue);h.values.next({values:{...o}}),h.state.next({...n,...oe.keepDirty?{isDirty:F()}:{}}),!oe.keepIsValid&&k()},ee=({disabled:Q,name:oe,field:ue,fields:Se})=>{(Kr(Q)&&s.mount||Q||a.disabled.has(oe))&&(Q?a.disabled.add(oe):a.disabled.delete(oe),T(oe,xv(ue?ue._f:Ne(Se,oe)._f),!1,!1,!0))},ie=(Q,oe={})=>{let ue=Ne(r,Q);const Se=Kr(oe.disabled)||Kr(t.disabled);return Et(r,Q,{...ue||{},_f:{...ue&&ue._f?ue._f:{ref:{name:Q}},name:Q,mount:!0,...oe}}),a.mount.add(Q),ue?ee({field:ue,disabled:Kr(oe.disabled)?oe.disabled:t.disabled,name:Q}):P(Q,!0,oe.value),{...Se?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:dc(oe.min),max:dc(oe.max),minLength:dc(oe.minLength),maxLength:dc(oe.maxLength),pattern:dc(oe.pattern)}:{},name:Q,onChange:U,onBlur:U,ref:we=>{if(we){ie(Q,oe),ue=Ne(r,Q);const ge=Bt(we.value)&&we.querySelectorAll&&we.querySelectorAll("input,select,textarea")[0]||we,Ae=$ie(ge),Fe=ue._f.refs||[];if(Ae?Fe.find(se=>se===ge):ge===ue._f.ref)return;Et(r,Q,{_f:{...ue._f,...Ae?{refs:[...Fe.filter(yv),ge,...Array.isArray(Ne(i,Q))?[{}]:[]],ref:{type:ge.type,name:Q}}:{ref:ge}}}),P(Q,!1,void 0,ge)}else ue=Ne(r,Q,{}),ue._f&&(ue._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(SL(a.array,Q)&&s.action)&&a.unMount.add(Q)}}},ce=()=>t.shouldFocusError&&Pl(r,B,a.mount),he=Q=>{Kr(Q)&&(h.state.next({disabled:Q}),Pl(r,(oe,ue)=>{const Se=Ne(r,ue);Se&&(oe.disabled=Se._f.disabled||Q,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(we=>{we.disabled=Se._f.disabled||Q}))},0,!1))},Ee=(Q,oe)=>async ue=>{let Se;ue&&(ue.preventDefault&&ue.preventDefault(),ue.persist&&ue.persist());let we=kn(o);if(a.disabled.size)for(const ge of a.disabled)Et(we,ge,void 0);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ge,values:Ae}=await R();n.errors=ge,we=Ae}else await M(r);if(dn(n.errors,"root"),tr(n.errors)){h.state.next({errors:{}});try{await Q(we,ue)}catch(ge){Se=ge}}else oe&&await oe({...n.errors},ue),ce(),setTimeout(ce);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tr(n.errors)&&!Se,submitCount:n.submitCount+1,errors:n.errors}),Se)throw Se},fe=(Q,oe={})=>{Ne(r,Q)&&(Bt(oe.defaultValue)?Z(Q,kn(Ne(i,Q))):(Z(Q,oe.defaultValue),Et(i,Q,kn(oe.defaultValue))),oe.keepTouched||dn(n.touchedFields,Q),oe.keepDirty||(dn(n.dirtyFields,Q),n.isDirty=oe.defaultValue?F(Q,kn(Ne(i,Q))):F()),oe.keepError||(dn(n.errors,Q),f.isValid&&k()),h.state.next({...n}))},xe=(Q,oe={})=>{const ue=Q?kn(Q):i,Se=kn(ue),we=tr(Q),ge=we?i:Se;if(oe.keepDefaultValues||(i=ue),!oe.keepValues){if(oe.keepDirtyValues){const Ae=new Set([...a.mount,...Object.keys(cc(i,o))]);for(const Fe of Array.from(Ae))Ne(n.dirtyFields,Fe)?Et(ge,Fe,Ne(o,Fe)):Z(Fe,Ne(ge,Fe))}else{if(ok&&Bt(Q))for(const Ae of a.mount){const Fe=Ne(r,Ae);if(Fe&&Fe._f){const se=Array.isArray(Fe._f.refs)?Fe._f.refs[0]:Fe._f.ref;if(Wp(se)){const pe=se.closest("form");if(pe){pe.reset();break}}}}r={}}o=t.shouldUnregister?oe.keepDefaultValues?kn(i):{}:kn(ge),h.array.next({values:{...ge}}),h.values.next({values:{...ge}})}a={mount:oe.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues,s.watch=!!t.shouldUnregister,h.state.next({submitCount:oe.keepSubmitCount?n.submitCount:0,isDirty:we?!1:oe.keepDirty?n.isDirty:!!(oe.keepDefaultValues&&!xs(Q,i)),isSubmitted:oe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:we?{}:oe.keepDirtyValues?oe.keepDefaultValues&&o?cc(i,o):n.dirtyFields:oe.keepDefaultValues&&Q?cc(i,Q):oe.keepDirty?n.dirtyFields:{},touchedFields:oe.keepTouched?n.touchedFields:{},errors:oe.keepErrors?n.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Me=(Q,oe)=>xe(Fi(Q)?Q(o):Q,oe);return{control:{register:ie,unregister:J,getFieldState:V,handleSubmit:Ee,setError:G,_executeSchema:R,_getWatch:Y,_getDirty:F,_updateValid:k,_removeUnmounted:z,_updateFieldArray:E,_updateDisabledField:ee,_getFieldArray:O,_reset:xe,_resetDefaultValues:()=>Fi(t.defaultValues)&&t.defaultValues().then(Q=>{Me(Q,t.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:Q=>{n={...n,...Q}},_disableForm:he,_subjects:h,_proxyFormState:f,_setErrors:N,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(Q){s=Q},get _defaultValues(){return i},get _names(){return a},set _names(Q){a=Q},get _formState(){return n},set _formState(Q){n=Q},get _options(){return t},set _options(Q){t={...t,...Q}}},trigger:L,register:ie,handleSubmit:Ee,watch:K,setValue:Z,getValues:H,reset:Me,resetField:fe,clearErrors:D,unregister:J,setError:G,setFocus:(Q,oe={})=>{const ue=Ne(r,Q),Se=ue&&ue._f;if(Se){const we=Se.refs?Se.refs[0]:Se.ref;we.focus&&(we.focus(),oe.shouldSelect&&Fi(we.select)&&we.select())}},getFieldState:V}}function qie(e={}){const t=ne.useRef(void 0),n=ne.useRef(void 0),[r,i]=ne.useState({isDirty:!1,isValidating:!1,isLoading:Fi(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Fi(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Yie(e),formState:r});const o=t.current.control;return o._options=e,Hm({subject:o._subjects.state,next:s=>{_L(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),ne.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ne.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),ne.useEffect(()=>{e.values&&!xs(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[e.values,o]),ne.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),ne.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),ne.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=CL(r,o),t.current}const RT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ne(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},LL=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?RT(r.ref,n,e):r.refs&&r.refs.forEach(i=>RT(i,n,e))}},Gie=(e,t)=>{t.shouldUseNativeValidation&&LL(e,t);const n={};for(const r in e){const i=Ne(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Zie(t.names||Object.keys(e),r)){const s=Object.assign({},Ne(n,r));Et(s,"root",o),Et(n,r,s)}else Et(n,r,o)}return n},Zie=(e,t)=>e.some(n=>n.startsWith(t+"."));var Kie=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[s]={message:a.message,type:a.code}}else n[s]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(f){return f.errors.forEach(function(h){return e.push(h)})}),t){var u=n[s].types,c=u&&u[r.code];n[s]=AL(s,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n},Xie=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,a){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return o.shouldUseNativeValidation&&LL({},o),{errors:{},values:n.raw?r:c}})}catch(c){return a(c)}return u&&u.then?u.then(void 0,a):u}(0,function(s){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(s))return{values:{},errors:Gie(Kie(s.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const Qie=e=>{const t={};return e.errors.forEach(n=>{if(n.path.length>0){const r=n.path.join(".");t[r]={type:"validation",message:n.message}}}),t};function ck(e){return Function("z",`"use strict";return (${e});`)(Yt)}const Jie=(e,t)=>async n=>{var s,a;const r=((a=(s=e==null?void 0:e._def)==null?void 0:s.options)==null?void 0:a.find(u=>{var c,f,h;return((h=(f=(c=u==null?void 0:u.shape)==null?void 0:c[t])==null?void 0:f._def)==null?void 0:h.value)===n[t]}))||Yt.object({[t]:Yt.string()}),i=Object.fromEntries(Object.entries(n).filter(([u])=>{var c;return(c=r==null?void 0:r.shape)==null?void 0:c[u]})),o=r.safeParse(i);if(o.success)return{values:o.data,errors:{}};{const u=Qie(o.error);return{values:{},errors:u}}};function FL({name:e,control:t,renderField:n}){const{fields:r,append:i,remove:o}=uk({control:t,name:e});return y.jsxs("div",{className:"space-y-2 w-full",children:[r.map((s,a)=>y.jsxs("div",{className:"relative w-full flex items-center gap-2",children:[n({fieldName:`${e}.${a}`,index:a}),y.jsx(Mt,{type:"button",variant:"ghost",size:"icon",className:"absolute -right-2 -top-2",onClick:()=>o(a),children:y.jsx(Ca,{className:"h-4 w-4"})})]},s.id)),y.jsxs(Mt,{type:"button",variant:"outline",size:"sm",className:"w-full",onClick:()=>i({}),children:[y.jsx(Wc,{className:"mr-2 h-4 w-4"}),"Add Item"]})]})}function $L(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var dk="Switch",[eoe,Yxe]=ni(dk),[toe,noe]=eoe(dk),zL=S.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:u="on",onCheckedChange:c,form:f,...h}=e,[p,m]=S.useState(null),x=ht(t,C=>m(C)),v=S.useRef(!1),k=p?f||!!p.closest("form"):!0,[b=!1,E]=Po({prop:i,defaultProp:o,onChange:c});return y.jsxs(toe,{scope:n,checked:b,disabled:a,children:[y.jsx(He.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":WL(b),"data-disabled":a?"":void 0,disabled:a,value:u,...h,ref:x,onClick:Re(e.onClick,C=>{E(N=>!N),k&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),k&&y.jsx(roe,{control:p,bubbles:!v.current,name:r,value:u,checked:b,required:s,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});zL.displayName=dk;var BL="SwitchThumb",VL=S.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=noe(BL,n);return y.jsx(He.span,{"data-state":WL(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});VL.displayName=BL;var roe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=S.useRef(null),s=$L(n),a=TO(t);return S.useEffect(()=>{const u=o.current,c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(s!==n&&h){const p=new Event("click",{bubbles:r});h.call(u,n),u.dispatchEvent(p)}},[s,n,r]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function WL(e){return e?"checked":"unchecked"}var UL=zL,ioe=VL;const HL=S.forwardRef(({className:e,...t},n)=>y.jsx(UL,{className:Te("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-mastra-bg-7 data-[state=unchecked]:bg-input",e),...t,ref:n,children:y.jsx(ioe,{className:Te("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));HL.displayName=UL.displayName;function ooe({name:e,control:t,handleFieldChange:n}){return y.jsx(gu,{name:e,control:t,render:({field:r})=>y.jsx(HL,{checked:r.value,onCheckedChange:i=>{r.onChange(i),n==null||n({key:e,value:i})}})})}const soe=lu("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function aoe({className:e,variant:t,...n}){return y.jsx("div",{className:Te(soe({variant:t}),e),...n})}var MT=1,loe=.9,uoe=.8,coe=.17,vv=.1,wv=.999,doe=.9999,foe=.99,hoe=/[\\\/_+.#"@\[\(\{&]/,poe=/[\\\/_+.#"@\[\(\{&]/g,moe=/[\s-]/,YL=/[\s-]/g;function F0(e,t,n,r,i,o,s){if(o===t.length)return i===e.length?MT:foe;var a=`${i},${o}`;if(s[a]!==void 0)return s[a];for(var u=r.charAt(o),c=n.indexOf(u,i),f=0,h,p,m,x;c>=0;)h=F0(e,t,n,r,c+1,o+1,s),h>f&&(c===i?h*=MT:hoe.test(e.charAt(c-1))?(h*=uoe,m=e.slice(i,c-1).match(poe),m&&i>0&&(h*=Math.pow(wv,m.length))):moe.test(e.charAt(c-1))?(h*=loe,x=e.slice(i,c-1).match(YL),x&&i>0&&(h*=Math.pow(wv,x.length))):(h*=coe,i>0&&(h*=Math.pow(wv,c-i))),e.charAt(c)!==t.charAt(o)&&(h*=doe)),(h<vv&&n.charAt(c-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(c-1)!==r.charAt(o))&&(p=F0(e,t,n,r,c+1,o+2,s),p*vv>h&&(h=p*vv)),h>f&&(f=h),c=n.indexOf(u,c+1);return s[a]=f,f}function jT(e){return e.toLowerCase().replace(YL," ")}function goe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,F0(e,t,jT(e),jT(t),0,0,{})}var bv={exports:{}},kv={};/**
|
|
366
|
+
* @license React
|
|
367
|
+
* use-sync-external-store-shim.production.js
|
|
368
|
+
*
|
|
369
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the MIT license found in the
|
|
372
|
+
* LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/var DT;function yoe(){if(DT)return kv;DT=1;var e=nu();function t(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(h,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),v=x[0].inst,k=x[1];return o(function(){v.value=m,v.getSnapshot=p,u(v)&&k({inst:v})},[h,m,p]),i(function(){return u(v)&&k({inst:v}),h(function(){u(v)&&k({inst:v})})},[h]),s(m),m}function u(h){var p=h.getSnapshot;h=h.value;try{var m=p();return!n(h,m)}catch{return!0}}function c(h,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return kv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,kv}var OT;function qL(){return OT||(OT=1,bv.exports=yoe()),bv.exports}var xoe=qL(),fc='[cmdk-group=""]',Sv='[cmdk-group-items=""]',voe='[cmdk-group-heading=""]',fk='[cmdk-item=""]',IT=`${fk}:not([aria-disabled="true"])`,$0="cmdk-item-select",oa="data-value",woe=(e,t,n)=>goe(e,t,n),GL=S.createContext(void 0),tf=()=>S.useContext(GL),ZL=S.createContext(void 0),hk=()=>S.useContext(ZL),KL=S.createContext(void 0),XL=S.forwardRef((e,t)=>{let n=hl(()=>{var V,D;return{search:"",value:(D=(V=e.value)!=null?V:e.defaultValue)!=null?D:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=hl(()=>new Set),i=hl(()=>new Map),o=hl(()=>new Map),s=hl(()=>new Set),a=QL(e),{label:u,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,loop:x,disablePointerSelection:v=!1,vimBindings:k=!0,...b}=e,E=En(),C=En(),N=En(),P=S.useRef(null),T=Roe();wa(()=>{if(f!==void 0){let V=f.trim();n.current.value=V,j.emit()}},[f]),wa(()=>{T(6,Y)},[]);let j=S.useMemo(()=>({subscribe:V=>(s.current.add(V),()=>s.current.delete(V)),snapshot:()=>n.current,setState:(V,D,G)=>{var K,J,ee;if(!Object.is(n.current[V],D)){if(n.current[V]=D,V==="search")F(),M(),T(1,z);else if(V==="value"&&(G||T(5,Y),((K=a.current)==null?void 0:K.value)!==void 0)){let ie=D??"";(ee=(J=a.current).onValueChange)==null||ee.call(J,ie);return}j.emit()}},emit:()=>{s.current.forEach(V=>V())}}),[]),R=S.useMemo(()=>({value:(V,D,G)=>{var K;D!==((K=o.current.get(V))==null?void 0:K.value)&&(o.current.set(V,{value:D,keywords:G}),n.current.filtered.items.set(V,I(D,G)),T(2,()=>{M(),j.emit()}))},item:(V,D)=>(r.current.add(V),D&&(i.current.has(D)?i.current.get(D).add(V):i.current.set(D,new Set([V]))),T(3,()=>{F(),M(),n.current.value||z(),j.emit()}),()=>{o.current.delete(V),r.current.delete(V),n.current.filtered.items.delete(V);let G=O();T(4,()=>{F(),(G==null?void 0:G.getAttribute("id"))===V&&z(),j.emit()})}),group:V=>(i.current.has(V)||i.current.set(V,new Set),()=>{o.current.delete(V),i.current.delete(V)}),filter:()=>a.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:E,inputId:N,labelId:C,listInnerRef:P}),[]);function I(V,D){var G,K;let J=(K=(G=a.current)==null?void 0:G.filter)!=null?K:woe;return V?J(V,n.current.search,D):0}function M(){if(!n.current.search||a.current.shouldFilter===!1)return;let V=n.current.filtered.items,D=[];n.current.filtered.groups.forEach(K=>{let J=i.current.get(K),ee=0;J.forEach(ie=>{let ce=V.get(ie);ee=Math.max(ce,ee)}),D.push([K,ee])});let G=P.current;q().sort((K,J)=>{var ee,ie;let ce=K.getAttribute("id"),he=J.getAttribute("id");return((ee=V.get(he))!=null?ee:0)-((ie=V.get(ce))!=null?ie:0)}).forEach(K=>{let J=K.closest(Sv);J?J.appendChild(K.parentElement===J?K:K.closest(`${Sv} > *`)):G.appendChild(K.parentElement===G?K:K.closest(`${Sv} > *`))}),D.sort((K,J)=>J[1]-K[1]).forEach(K=>{var J;let ee=(J=P.current)==null?void 0:J.querySelector(`${fc}[${oa}="${encodeURIComponent(K[0])}"]`);ee==null||ee.parentElement.appendChild(ee)})}function z(){let V=q().find(G=>G.getAttribute("aria-disabled")!=="true"),D=V==null?void 0:V.getAttribute(oa);j.setState("value",D||void 0)}function F(){var V,D,G,K;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let ee of r.current){let ie=(D=(V=o.current.get(ee))==null?void 0:V.value)!=null?D:"",ce=(K=(G=o.current.get(ee))==null?void 0:G.keywords)!=null?K:[],he=I(ie,ce);n.current.filtered.items.set(ee,he),he>0&&J++}for(let[ee,ie]of i.current)for(let ce of ie)if(n.current.filtered.items.get(ce)>0){n.current.filtered.groups.add(ee);break}n.current.filtered.count=J}function Y(){var V,D,G;let K=O();K&&(((V=K.parentElement)==null?void 0:V.firstChild)===K&&((G=(D=K.closest(fc))==null?void 0:D.querySelector(voe))==null||G.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function O(){var V;return(V=P.current)==null?void 0:V.querySelector(`${fk}[aria-selected="true"]`)}function q(){var V;return Array.from(((V=P.current)==null?void 0:V.querySelectorAll(IT))||[])}function W(V){let D=q()[V];D&&j.setState("value",D.getAttribute(oa))}function Z(V){var D;let G=O(),K=q(),J=K.findIndex(ie=>ie===G),ee=K[J+V];(D=a.current)!=null&&D.loop&&(ee=J+V<0?K[K.length-1]:J+V===K.length?K[0]:K[J+V]),ee&&j.setState("value",ee.getAttribute(oa))}function U(V){let D=O(),G=D==null?void 0:D.closest(fc),K;for(;G&&!K;)G=V>0?Aoe(G,fc):Poe(G,fc),K=G==null?void 0:G.querySelector(IT);K?j.setState("value",K.getAttribute(oa)):Z(V)}let B=()=>W(q().length-1),L=V=>{V.preventDefault(),V.metaKey?B():V.altKey?U(1):Z(1)},H=V=>{V.preventDefault(),V.metaKey?W(0):V.altKey?U(-1):Z(-1)};return S.createElement(He.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:V=>{var D;if((D=b.onKeyDown)==null||D.call(b,V),!V.defaultPrevented)switch(V.key){case"n":case"j":{k&&V.ctrlKey&&L(V);break}case"ArrowDown":{L(V);break}case"p":case"k":{k&&V.ctrlKey&&H(V);break}case"ArrowUp":{H(V);break}case"Home":{V.preventDefault(),W(0);break}case"End":{V.preventDefault(),B();break}case"Enter":if(!V.nativeEvent.isComposing&&V.keyCode!==229){V.preventDefault();let G=O();if(G){let K=new Event($0);G.dispatchEvent(K)}}}}},S.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:joe},u),Ym(e,V=>S.createElement(ZL.Provider,{value:j},S.createElement(GL.Provider,{value:R},V))))}),boe=S.forwardRef((e,t)=>{var n,r;let i=En(),o=S.useRef(null),s=S.useContext(KL),a=tf(),u=QL(e),c=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;wa(()=>{if(!c)return a.item(i,s==null?void 0:s.id)},[c]);let f=JL(i,o,[e.value,e.children,o],e.keywords),h=hk(),p=ba(T=>T.value&&T.value===f.current),m=ba(T=>c||a.filter()===!1?!0:T.search?T.filtered.items.get(i)>0:!0);S.useEffect(()=>{let T=o.current;if(!(!T||e.disabled))return T.addEventListener($0,x),()=>T.removeEventListener($0,x)},[m,e.onSelect,e.disabled]);function x(){var T,j;v(),(j=(T=u.current).onSelect)==null||j.call(T,f.current)}function v(){h.setState("value",f.current,!0)}if(!m)return null;let{disabled:k,value:b,onSelect:E,forceMount:C,keywords:N,...P}=e;return S.createElement(He.div,{ref:gd([o,t]),...P,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!p,"data-disabled":!!k,"data-selected":!!p,onPointerMove:k||a.getDisablePointerSelection()?void 0:v,onClick:k?void 0:x},e.children)}),koe=S.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,s=En(),a=S.useRef(null),u=S.useRef(null),c=En(),f=tf(),h=ba(m=>i||f.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);wa(()=>f.group(s),[]),JL(s,a,[e.value,e.heading,u]);let p=S.useMemo(()=>({id:s,forceMount:i}),[i]);return S.createElement(He.div,{ref:gd([a,t]),...o,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&S.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Ym(e,m=>S.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},S.createElement(KL.Provider,{value:p},m))))}),Soe=S.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=S.useRef(null),o=ba(s=>!s.search);return!n&&!o?null:S.createElement(He.div,{ref:gd([i,t]),...r,"cmdk-separator":"",role:"separator"})}),Eoe=S.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=hk(),s=ba(f=>f.search),a=ba(f=>f.value),u=tf(),c=S.useMemo(()=>{var f;let h=(f=u.listInnerRef.current)==null?void 0:f.querySelector(`${fk}[${oa}="${encodeURIComponent(a)}"]`);return h==null?void 0:h.getAttribute("id")},[]);return S.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),S.createElement(He.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":c,id:u.inputId,type:"text",value:i?e.value:s,onChange:f=>{i||o.setState("search",f.target.value),n==null||n(f.target.value)}})}),Coe=S.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=S.useRef(null),s=S.useRef(null),a=tf();return S.useEffect(()=>{if(s.current&&o.current){let u=s.current,c=o.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(f),h.unobserve(u)}}},[]),S.createElement(He.div,{ref:gd([o,t]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:a.listId},Ym(e,u=>S.createElement("div",{ref:gd([s,a.listInnerRef]),"cmdk-list-sizer":""},u)))}),_oe=S.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:s,...a}=e;return S.createElement($D,{open:n,onOpenChange:r},S.createElement(zD,{container:s},S.createElement(BD,{"cmdk-overlay":"",className:i}),S.createElement(VD,{"aria-label":e.label,"cmdk-dialog":"",className:o},S.createElement(XL,{ref:t,...a}))))}),Noe=S.forwardRef((e,t)=>ba(n=>n.filtered.count===0)?S.createElement(He.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Toe=S.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return S.createElement(He.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Ym(e,s=>S.createElement("div",{"aria-hidden":!0},s)))}),vr=Object.assign(XL,{List:Coe,Item:boe,Input:Eoe,Group:koe,Separator:Soe,Dialog:_oe,Empty:Noe,Loading:Toe});function Aoe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Poe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function QL(e){let t=S.useRef(e);return wa(()=>{t.current=e}),t}var wa=typeof window>"u"?S.useEffect:S.useLayoutEffect;function hl(e){let t=S.useRef();return t.current===void 0&&(t.current=e()),t}function gd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function ba(e){let t=hk(),n=()=>e(t.snapshot());return xoe.useSyncExternalStore(t.subscribe,n,n)}function JL(e,t,n,r=[]){let i=S.useRef(),o=tf();return wa(()=>{var s;let a=(()=>{var c;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():i.current}})(),u=r.map(c=>c.trim());o.value(e,a,u),(s=t.current)==null||s.setAttribute(oa,a),i.current=a}),i}var Roe=()=>{let[e,t]=S.useState(),n=hl(()=>new Map);return wa(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function Moe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ym({asChild:e,children:t},n){return e&&S.isValidElement(t)?S.cloneElement(Moe(t),{ref:t.ref},n(t.props.children)):n(t)}var joe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const eF=S.forwardRef(({className:e,...t},n)=>y.jsx(vr,{ref:n,className:Te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));eF.displayName=vr.displayName;const tF=S.forwardRef(({className:e,...t},n)=>y.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[y.jsx(lV,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),y.jsx(vr.Input,{ref:n,className:Te("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));tF.displayName=vr.Input.displayName;const nF=S.forwardRef(({className:e,...t},n)=>y.jsx(vr.List,{ref:n,className:Te("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));nF.displayName=vr.List.displayName;const Doe=S.forwardRef((e,t)=>y.jsx(vr.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Doe.displayName=vr.Empty.displayName;const rF=S.forwardRef(({className:e,...t},n)=>y.jsx(vr.Group,{ref:n,className:Te("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));rF.displayName=vr.Group.displayName;const Ooe=S.forwardRef(({className:e,...t},n)=>y.jsx(vr.Separator,{ref:n,className:Te("-mx-1 h-px bg-border",e),...t}));Ooe.displayName=vr.Separator.displayName;const z0=S.forwardRef(({className:e,...t},n)=>y.jsx(vr.Item,{ref:n,className:Te("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));z0.displayName=vr.Item.displayName;var pk="Popover",[iF,qxe]=ni(pk,[mu]),nf=mu(),[Ioe,Ls]=iF(pk),oF=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,a=nf(t),u=S.useRef(null),[c,f]=S.useState(!1),[h=!1,p]=Po({prop:r,defaultProp:i,onChange:o});return y.jsx($m,{...a,children:y.jsx(Ioe,{scope:t,contentId:En(),triggerRef:u,open:h,onOpenChange:p,onOpenToggle:S.useCallback(()=>p(m=>!m),[p]),hasCustomAnchor:c,onCustomAnchorAdd:S.useCallback(()=>f(!0),[]),onCustomAnchorRemove:S.useCallback(()=>f(!1),[]),modal:s,children:n})})};oF.displayName=pk;var sF="PopoverAnchor",Loe=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ls(sF,n),o=nf(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return S.useEffect(()=>(s(),()=>a()),[s,a]),y.jsx(zm,{...o,...r,ref:t})});Loe.displayName=sF;var aF="PopoverTrigger",lF=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ls(aF,n),o=nf(n),s=ht(t,i.triggerRef),a=y.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hF(i.open),...r,ref:s,onClick:Re(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:y.jsx(zm,{asChild:!0,...o,children:a})});lF.displayName=aF;var mk="PopoverPortal",[Foe,$oe]=iF(mk,{forceMount:void 0}),uF=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Ls(mk,t);return y.jsx(Foe,{scope:t,forceMount:n,children:y.jsx(lr,{present:n||o.open,children:y.jsx(Yd,{asChild:!0,container:i,children:r})})})};uF.displayName=mk;var Yl="PopoverContent",cF=S.forwardRef((e,t)=>{const n=$oe(Yl,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Ls(Yl,e.__scopePopover);return y.jsx(lr,{present:r||o.open,children:o.modal?y.jsx(zoe,{...i,ref:t}):y.jsx(Boe,{...i,ref:t})})});cF.displayName=Yl;var zoe=S.forwardRef((e,t)=>{const n=Ls(Yl,e.__scopePopover),r=S.useRef(null),i=ht(t,r),o=S.useRef(!1);return S.useEffect(()=>{const s=r.current;if(s)return Om(s)},[]),y.jsx(qd,{as:qi,allowPinchZoom:!0,children:y.jsx(dF,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,c=a.button===2||u;o.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Re(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Boe=S.forwardRef((e,t)=>{const n=Ls(Yl,e.__scopePopover),r=S.useRef(!1),i=S.useRef(!1);return y.jsx(dF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),dF=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:f,...h}=e,p=Ls(Yl,n),m=nf(n);return jm(),y.jsx(Hd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:y.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:y.jsx(H1,{"data-state":hF(p.open),role:"dialog",id:p.contentId,...m,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),fF="PopoverClose",Voe=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ls(fF,n);return y.jsx(He.button,{type:"button",...r,ref:t,onClick:Re(e.onClick,()=>i.onOpenChange(!1))})});Voe.displayName=fF;var Woe="PopoverArrow",Uoe=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=nf(n);return y.jsx(Y1,{...i,...r,ref:t})});Uoe.displayName=Woe;function hF(e){return e?"open":"closed"}var Hoe=oF,Yoe=lF,qoe=uF,pF=cF;const mF=Hoe,gF=Yoe,gk=S.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>y.jsx(qoe,{children:y.jsx(pF,{ref:i,align:t,sideOffset:n,className:Te("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));gk.displayName=pF.displayName;function LT({name:e,control:t,options:n=[],handleFieldChange:r,placeholder:i}){const[o,s]=S.useState(!1),[a,u]=S.useState("");return y.jsx(gu,{name:e,control:t,render:({field:c})=>{const f=c.value||[],h=m=>{const x=f.filter(v=>v!==m);c.onChange(x),r==null||r({key:e,value:x})},p=m=>{if(!m)return;const x=[...f,m];c.onChange(x),r==null||r({key:e,value:x}),u(""),s(!1)};return y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(m=>y.jsxs(aoe,{className:"flex items-center gap-1",children:[m,y.jsx(Mt,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",onClick:()=>h(m),children:y.jsx(Ca,{className:"h-3 w-3"})})]},m))}),y.jsxs(mF,{open:o,onOpenChange:s,children:[y.jsx(gF,{asChild:!0,children:y.jsxs(Mt,{variant:"outline",size:"sm",className:"w-full justify-start",children:[y.jsx(Wc,{className:"mr-2 h-4 w-4"}),i||"Add item"]})}),y.jsx(gk,{className:"p-0",align:"start",children:y.jsxs(eF,{children:[y.jsx(tF,{placeholder:"Enter value...",value:a,onValueChange:u}),y.jsx(nF,{children:y.jsxs(rF,{children:[n.filter(m=>!f.includes(m.value)).map(m=>y.jsx(z0,{onSelect:()=>p(m.value),children:m.label},m.value)),a&&y.jsxs(z0,{onSelect:()=>p(a),children:['Create "',a,'"']})]})})]})})]})]})}})}const yF=6048e5,Goe=864e5,FT=Symbol.for("constructDateFrom");function Cn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&FT in e?e[FT](t):e instanceof Date?new e.constructor(t):new Date(t)}function Pt(e,t){return Cn(t||e,e)}function xF(e,t,n){const r=Pt(e,n==null?void 0:n.in);return isNaN(t)?Cn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function vF(e,t,n){const r=Pt(e,n==null?void 0:n.in);if(isNaN(t))return Cn(e,NaN);if(!t)return r;const i=r.getDate(),o=Cn(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const s=o.getDate();return i>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let Zoe={};function rf(){return Zoe}function ql(e,t){var a,u,c,f;const n=rf(),r=(t==null?void 0:t.weekStartsOn)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=Pt(e,t==null?void 0:t.in),o=i.getDay(),s=(o<r?7:0)+o-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function yd(e,t){return ql(e,{...t,weekStartsOn:1})}function wF(e,t){const n=Pt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Cn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=yd(i),s=Cn(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=yd(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function $T(e){const t=Pt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function yu(e,...t){const n=Cn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function xd(e,t){const n=Pt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function bF(e,t,n){const[r,i]=yu(n==null?void 0:n.in,e,t),o=xd(r),s=xd(i),a=+o-$T(o),u=+s-$T(s);return Math.round((a-u)/Goe)}function Koe(e,t){const n=wF(e,t),r=Cn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),yd(r)}function Xoe(e,t,n){return xF(e,t*7,n)}function Qoe(e,t,n){return vF(e,t*12,n)}function Joe(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Cn.bind(null,i));const o=Pt(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),Cn(r,n||NaN)}function ese(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Cn.bind(null,i));const o=Pt(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),Cn(r,n||NaN)}function tse(e,t,n){const[r,i]=yu(n==null?void 0:n.in,e,t);return+xd(r)==+xd(i)}function kF(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function SF(e){return!(!kF(e)&&typeof e!="number"||isNaN(+Pt(e)))}function nse(e,t,n){const[r,i]=yu(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),s=r.getMonth()-i.getMonth();return o*12+s}function rse(e,t){const n=Pt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ise(e,t){const[n,r]=yu(e,t.start,t.end);return{start:n,end:r}}function ose(e,t){const{start:n,end:r}=ise(t==null?void 0:t.in,e);let i=+n>+r;const o=i?+n:+r,s=i?r:n;s.setHours(0,0,0,0),s.setDate(1);let a=1;const u=[];for(;+s<=o;)u.push(Cn(n,s)),s.setMonth(s.getMonth()+a);return i?u.reverse():u}function sse(e,t){const n=Pt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function ase(e,t){const n=Pt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function EF(e,t){const n=Pt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function CF(e,t){var a,u,c,f;const n=rf(),r=(t==null?void 0:t.weekStartsOn)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=Pt(e,t==null?void 0:t.in),o=i.getDay(),s=(o<r?-7:0)+6-(o-r);return i.setDate(i.getDate()+s),i.setHours(23,59,59,999),i}function lse(e,t){return CF(e,{...t,weekStartsOn:1})}const use={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},cse=(e,t,n)=>{let r;const i=use[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ev(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const dse={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fse={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hse={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pse={date:Ev({formats:dse,defaultWidth:"full"}),time:Ev({formats:fse,defaultWidth:"full"}),dateTime:Ev({formats:hse,defaultWidth:"full"})},mse={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gse=(e,t,n,r)=>mse[e];function hc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const yse={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xse={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vse={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wse={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bse={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kse={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Sse=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ese={ordinalNumber:Sse,era:hc({values:yse,defaultWidth:"wide"}),quarter:hc({values:xse,defaultWidth:"wide",argumentCallback:e=>e-1}),month:hc({values:vse,defaultWidth:"wide"}),day:hc({values:wse,defaultWidth:"wide"}),dayPeriod:hc({values:bse,defaultWidth:"wide",formattingValues:kse,defaultFormattingWidth:"wide"})};function pc(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?_se(a,h=>h.test(s)):Cse(a,h=>h.test(s));let c;c=e.valueCallback?e.valueCallback(u):u,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(s.length);return{value:c,rest:f}}}function Cse(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _se(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Nse(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(i.length);return{value:s,rest:a}}}const Tse=/^(\d+)(th|st|nd|rd)?/i,Ase=/\d+/i,Pse={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Rse={any:[/^b/i,/^(a|c)/i]},Mse={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jse={any:[/1/i,/2/i,/3/i,/4/i]},Dse={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ose={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ise={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Lse={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Fse={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$se={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},zse={ordinalNumber:Nse({matchPattern:Tse,parsePattern:Ase,valueCallback:e=>parseInt(e,10)}),era:pc({matchPatterns:Pse,defaultMatchWidth:"wide",parsePatterns:Rse,defaultParseWidth:"any"}),quarter:pc({matchPatterns:Mse,defaultMatchWidth:"wide",parsePatterns:jse,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pc({matchPatterns:Dse,defaultMatchWidth:"wide",parsePatterns:Ose,defaultParseWidth:"any"}),day:pc({matchPatterns:Ise,defaultMatchWidth:"wide",parsePatterns:Lse,defaultParseWidth:"any"}),dayPeriod:pc({matchPatterns:Fse,defaultMatchWidth:"any",parsePatterns:$se,defaultParseWidth:"any"})},yk={code:"en-US",formatDistance:cse,formatLong:pse,formatRelative:gse,localize:Ese,match:zse,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Bse(e,t){const n=Pt(e,t==null?void 0:t.in);return bF(n,EF(n))+1}function _F(e,t){const n=Pt(e,t==null?void 0:t.in),r=+yd(n)-+Koe(n);return Math.round(r/yF)+1}function NF(e,t){var f,h,p,m;const n=Pt(e,t==null?void 0:t.in),r=n.getFullYear(),i=rf(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,s=Cn((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const a=ql(s,t),u=Cn((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const c=ql(u,t);return+n>=+a?r+1:+n>=+c?r:r-1}function Vse(e,t){var a,u,c,f;const n=rf(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=NF(e,t),o=Cn((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ql(o,t)}function TF(e,t){const n=Pt(e,t==null?void 0:t.in),r=+ql(n,t)-+Vse(n,t);return Math.round(r/yF)+1}function At(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return At(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):At(n+1,2)},d(e,t){return At(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return At(e.getHours()%12||12,t.length)},H(e,t){return At(e.getHours(),t.length)},m(e,t){return At(e.getMinutes(),t.length)},s(e,t){return At(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return At(i,t.length)}},cl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return fs.y(e,t)},Y:function(e,t,n,r){const i=NF(e,r),o=i>0?i:1-i;if(t==="YY"){const s=o%100;return At(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):At(o,t.length)},R:function(e,t){const n=wF(e);return At(n,t.length)},u:function(e,t){const n=e.getFullYear();return At(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return At(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return At(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return At(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=TF(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):At(i,t.length)},I:function(e,t,n){const r=_F(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):At(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fs.d(e,t)},D:function(e,t,n){const r=Bse(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):At(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return At(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return At(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return At(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=cl.noon:r===0?i=cl.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=cl.evening:r>=12?i=cl.afternoon:r>=4?i=cl.morning:i=cl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fs.s(e,t)},S:function(e,t){return fs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return VT(r);case"XXXX":case"XX":return ra(r);case"XXXXX":case"XXX":default:return ra(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return VT(r);case"xxxx":case"xx":return ra(r);case"xxxxx":case"xxx":default:return ra(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+BT(r,":");case"OOOO":default:return"GMT"+ra(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+BT(r,":");case"zzzz":default:return"GMT"+ra(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return At(r,t.length)},T:function(e,t,n){return At(+e,t.length)}};function BT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+At(o,2)}function VT(e,t){return e%60===0?(e>0?"-":"+")+At(Math.abs(e)/60,2):ra(e,t)}function ra(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=At(Math.trunc(r/60),2),o=At(r%60,2);return n+i+t+o}const WT=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},AF=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Wse=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return WT(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",WT(r,t)).replace("{{time}}",AF(i,t))},Use={p:AF,P:Wse},Hse=/^D+$/,Yse=/^Y+$/,qse=["D","DD","YY","YYYY"];function Gse(e){return Hse.test(e)}function Zse(e){return Yse.test(e)}function Kse(e,t,n){const r=Xse(e,t,n);if(console.warn(r),qse.includes(e))throw new RangeError(r)}function Xse(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qse=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jse=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eae=/^'([^]*?)'?$/,tae=/''/g,nae=/[a-zA-Z]/;function Lc(e,t,n){var f,h,p,m,x,v,k,b;const r=rf(),i=(n==null?void 0:n.locale)??r.locale??yk,o=(n==null?void 0:n.firstWeekContainsDate)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((v=(x=n==null?void 0:n.locale)==null?void 0:x.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((b=(k=r.locale)==null?void 0:k.options)==null?void 0:b.weekStartsOn)??0,a=Pt(e,n==null?void 0:n.in);if(!SF(a))throw new RangeError("Invalid time value");let u=t.match(Jse).map(E=>{const C=E[0];if(C==="p"||C==="P"){const N=Use[C];return N(E,i.formatLong)}return E}).join("").match(Qse).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const C=E[0];if(C==="'")return{isToken:!1,value:rae(E)};if(zT[C])return{isToken:!0,value:E};if(C.match(nae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:E}});i.localize.preprocessor&&(u=i.localize.preprocessor(a,u));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:i};return u.map(E=>{if(!E.isToken)return E.value;const C=E.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Zse(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Gse(C))&&Kse(C,t,String(e));const N=zT[C[0]];return N(a,C,i.localize,c)}).join("")}function rae(e){const t=e.match(eae);return t?t[1].replace(tae,"'"):e}function iae(e,t){const n=Pt(e,t==null?void 0:t.in),r=n.getFullYear(),i=n.getMonth(),o=Cn(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function oae(e,t){return Pt(e,t==null?void 0:t.in).getMonth()}function sae(e,t){return Pt(e,t==null?void 0:t.in).getFullYear()}function aae(e,t){return+Pt(e)>+Pt(t)}function lae(e,t){return+Pt(e)<+Pt(t)}function uae(e,t,n){const[r,i]=yu(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function cae(e,t,n){const[r,i]=yu(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()}function dae(e,t,n){const r=Pt(e,n==null?void 0:n.in),i=r.getFullYear(),o=r.getDate(),s=Cn(e,0);s.setFullYear(i,t,15),s.setHours(0,0,0,0);const a=iae(s);return r.setMonth(t,Math.min(o,a)),r}function fae(e,t,n){const r=Pt(e,n==null?void 0:n.in);return isNaN(+r)?Cn(e,NaN):(r.setFullYear(t),r)}function hae(e,t,n){var r=this,i=S.useRef(null),o=S.useRef(0),s=S.useRef(null),a=S.useRef([]),u=S.useRef(),c=S.useRef(),f=S.useRef(e),h=S.useRef(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var x=!!(n=n||{}).leading,v=!("trailing"in n)||!!n.trailing,k="maxWait"in n,b="debounceOnServer"in n&&!!n.debounceOnServer,E=k?Math.max(+n.maxWait||0,t):null;S.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var C=S.useMemo(function(){var N=function(M){var z=a.current,F=u.current;return a.current=u.current=null,o.current=M,c.current=f.current.apply(F,z)},P=function(M,z){m&&cancelAnimationFrame(s.current),s.current=m?requestAnimationFrame(M):setTimeout(M,z)},T=function(M){if(!h.current)return!1;var z=M-i.current;return!i.current||z>=t||z<0||k&&M-o.current>=E},j=function(M){return s.current=null,v&&a.current?N(M):(a.current=u.current=null,c.current)},R=function M(){var z=Date.now();if(T(z))return j(z);if(h.current){var F=t-(z-i.current),Y=k?Math.min(F,E-(z-o.current)):F;P(M,Y)}},I=function(){if(p||b){var M=Date.now(),z=T(M);if(a.current=[].slice.call(arguments),u.current=r,i.current=M,z){if(!s.current&&h.current)return o.current=i.current,P(R,t),x?N(i.current):c.current;if(k)return P(R,t),N(i.current)}return s.current||P(R,t),c.current}};return I.cancel=function(){s.current&&(m?cancelAnimationFrame(s.current):clearTimeout(s.current)),o.current=0,a.current=i.current=u.current=s.current=null},I.isPending=function(){return!!s.current},I.flush=function(){return s.current?j(Date.now()):c.current},I},[x,k,t,E,v,m,p,b]);return C}var Xe;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Xe||(Xe={}));var Lt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Lt||(Lt={}));var xi;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(xi||(xi={}));const Cv={},Ec={};function Fc(e,t){try{const r=(Cv[e]||(Cv[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in Ec?Ec[r]:UT(r,r.split(":"))}catch{if(e in Ec)return Ec[e];const n=e==null?void 0:e.match(pae);return n?UT(e,n.slice(1)):NaN}}const pae=/([+-]\d\d):?(\d\d)?/;function UT(e,t){const n=+t[0],r=+(t[1]||0);return Ec[e]=n>0?n*60+r:n*60-r}class zi extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Fc(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),PF(this),B0(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new zi(...n,t):new zi(Date.now(),t)}withTimeZone(t){return new zi(+this,t)}getTimezoneOffset(){return-Fc(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),B0(this),+this}[Symbol.for("constructDateFrom")](t){return new zi(+new Date(t),this.timeZone)}}const HT=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!HT.test(e))return;const t=e.replace(HT,"$1UTC");zi.prototype[t]&&(e.startsWith("get")?zi.prototype[e]=function(){return this.internal[t]()}:(zi.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),mae(this),+this},zi.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),B0(this),+this}))});function B0(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function mae(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),PF(e)}function PF(e){const t=Fc(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),o=r-i,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const u=Fc(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-u,h=u!==t,p=f-a;if(h&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const m=Fc(e.timeZone,e),x=u-m;x&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+x),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x))}}class la extends zi{static tz(t,...n){return n.length?new la(...n,t):new la(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),i=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,i]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${i}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,i]=this.tzComponents();return`${t} GMT${n}${r}${i} (${gae(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),i=String(Math.abs(t)%60).padStart(2,"0");return[n,r,i]}withTimeZone(t){return new la(+this,t)}[Symbol.for("constructDateFrom")](t){return new la(+new Date(t),this.timeZone)}}function gae(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}const YT=5,yae=4;function xae(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),o=t.addDays(i,YT*7-1);return t.getMonth(e)===t.getMonth(o)?YT:yae}function RF(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function vae(e,t){const n=RF(e,t),r=xae(e,t);return t.addDays(n,r*7-1)}class $o{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?la.tz(this.options.timeZone):new this.Date},this.newDate=(r,i,o)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,i,o):this.options.timeZone?new la(r,i,o,this.options.timeZone):new Date(r,i,o)},this.addDays=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.addDays)==null?void 0:s.call(o,r,i))??xF(r,i)},this.addMonths=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.addMonths)==null?void 0:s.call(o,r,i))??vF(r,i)},this.addWeeks=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.addWeeks)==null?void 0:s.call(o,r,i))??Xoe(r,i)},this.addYears=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.addYears)==null?void 0:s.call(o,r,i))??Qoe(r,i)},this.differenceInCalendarDays=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.differenceInCalendarDays)==null?void 0:s.call(o,r,i))??bF(r,i)},this.differenceInCalendarMonths=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.differenceInCalendarMonths)==null?void 0:s.call(o,r,i))??nse(r,i)},this.eachMonthOfInterval=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.eachMonthOfInterval)==null?void 0:o.call(i,r))??ose(r)},this.endOfBroadcastWeek=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.endOfBroadcastWeek)==null?void 0:s.call(o,r,i))??vae(r,this)},this.endOfISOWeek=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.endOfISOWeek)==null?void 0:o.call(i,r))??lse(r)},this.endOfMonth=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.endOfMonth)==null?void 0:o.call(i,r))??rse(r)},this.endOfWeek=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.endOfWeek)==null?void 0:s.call(o,r,i??this.options))??CF(r,i??this.options)},this.endOfYear=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.endOfYear)==null?void 0:o.call(i,r))??ase(r)},this.format=(r,i,o)=>{var a,u;const s=((u=(a=this.overrides)==null?void 0:a.format)==null?void 0:u.call(a,r,i,o??this.options))??Lc(r,i,o??this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.getISOWeek)==null?void 0:o.call(i,r))??_F(r)},this.getMonth=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.getMonth)==null?void 0:o.call(i,r))??oae(r)},this.getYear=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.getYear)==null?void 0:o.call(i,r))??sae(r)},this.getWeek=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.getWeek)==null?void 0:s.call(o,r,i??this.options))??TF(r,i??this.options)},this.isAfter=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.isAfter)==null?void 0:s.call(o,r,i))??aae(r,i)},this.isBefore=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.isBefore)==null?void 0:s.call(o,r,i))??lae(r,i)},this.isDate=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.isDate)==null?void 0:o.call(i,r))??kF(r)},this.isSameDay=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.isSameDay)==null?void 0:s.call(o,r,i))??tse(r,i)},this.isSameMonth=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.isSameMonth)==null?void 0:s.call(o,r,i))??uae(r,i)},this.isSameYear=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.isSameYear)==null?void 0:s.call(o,r,i))??cae(r,i)},this.max=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.max)==null?void 0:o.call(i,r))??Joe(r)},this.min=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.min)==null?void 0:o.call(i,r))??ese(r)},this.setMonth=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.setMonth)==null?void 0:s.call(o,r,i))??dae(r,i)},this.setYear=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.setYear)==null?void 0:s.call(o,r,i))??fae(r,i)},this.startOfBroadcastWeek=(r,i)=>{var o,s;return((s=(o=this.overrides)==null?void 0:o.startOfBroadcastWeek)==null?void 0:s.call(o,r,i??this))??RF(r,i??this)},this.startOfDay=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.startOfDay)==null?void 0:o.call(i,r))??xd(r)},this.startOfISOWeek=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.startOfISOWeek)==null?void 0:o.call(i,r))??yd(r)},this.startOfMonth=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.startOfMonth)==null?void 0:o.call(i,r))??sse(r)},this.startOfWeek=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.startOfWeek)==null?void 0:o.call(i,r))??ql(r,this.options)},this.startOfYear=r=>{var i,o;return((o=(i=this.overrides)==null?void 0:i.startOfYear)==null?void 0:o.call(i,r))??EF(r)},this.options={locale:yk,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let i=0;i<10;i++)r[i.toString()]=n.format(i);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const zo=new $o;function wae(e,t,n={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[o])=>(n[o]?i.push(n[o]):t[Lt[o]]?i.push(t[Lt[o]]):t[xi[o]]&&i.push(t[xi[o]]),i),[t[Xe.Day]])}function bae(e){return ne.createElement("button",{...e})}function kae(e){return ne.createElement("span",{...e})}function Sae(e){const{size:t=24,orientation:n="left",className:r}=e;return ne.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&ne.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&ne.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&ne.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&ne.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function Eae(e){const{day:t,modifiers:n,...r}=e;return ne.createElement("td",{...r})}function Cae(e){const{day:t,modifiers:n,...r}=e,i=ne.useRef(null);return ne.useEffect(()=>{var o;n.focused&&((o=i.current)==null||o.focus())},[n.focused]),ne.createElement("button",{ref:i,...r})}function _ae(e){const{options:t,className:n,components:r,classNames:i,...o}=e,s=[i[Xe.Dropdown],n].join(" "),a=t==null?void 0:t.find(({value:u})=>u===o.value);return ne.createElement("span",{"data-disabled":o.disabled,className:i[Xe.DropdownRoot]},ne.createElement(r.Select,{className:s,...o},t==null?void 0:t.map(({value:u,label:c,disabled:f})=>ne.createElement(r.Option,{key:u,value:u,disabled:f},c))),ne.createElement("span",{className:i[Xe.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,ne.createElement(r.Chevron,{orientation:"down",size:18,className:i[Xe.Chevron]})))}function Nae(e){return ne.createElement("div",{...e})}function Tae(e){return ne.createElement("div",{...e})}function Aae(e){const{calendarMonth:t,displayIndex:n,...r}=e;return ne.createElement("div",{...r},e.children)}function Pae(e){const{calendarMonth:t,displayIndex:n,...r}=e;return ne.createElement("div",{...r})}function Rae(e){return ne.createElement("table",{...e})}function Mae(e){return ne.createElement("div",{...e})}const MF=S.createContext(void 0);function of(){const e=S.useContext(MF);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function jae(e){const{components:t}=of();return ne.createElement(t.Dropdown,{...e})}function Dae(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...o}=e,{components:s,classNames:a,labels:{labelPrevious:u,labelNext:c}}=of();return ne.createElement("nav",{...o},ne.createElement(s.PreviousMonthButton,{type:"button",className:a[Xe.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:r?void 0:!0,"aria-label":u(r),onClick:e.onPreviousClick},ne.createElement(s.Chevron,{disabled:r?void 0:!0,className:a[Xe.Chevron],orientation:"left"})),ne.createElement(s.NextMonthButton,{type:"button",className:a[Xe.NextMonthButton],tabIndex:i?void 0:-1,disabled:i?void 0:!0,"aria-label":c(i),onClick:e.onNextClick},ne.createElement(s.Chevron,{disabled:i?void 0:!0,orientation:"right",className:a[Xe.Chevron]})))}function Oae(e){const{components:t}=of();return ne.createElement(t.Button,{...e})}function Iae(e){return ne.createElement("option",{...e})}function Lae(e){const{components:t}=of();return ne.createElement(t.Button,{...e})}function Fae(e){return ne.createElement("div",{...e})}function $ae(e){return ne.createElement("select",{...e})}function zae(e){const{week:t,...n}=e;return ne.createElement("tr",{...n})}function Bae(e){return ne.createElement("th",{...e})}function Vae(e){return ne.createElement("thead",{"aria-hidden":!0},ne.createElement("tr",{...e}))}function Wae(e){const{week:t,...n}=e;return ne.createElement("th",{...n})}function Uae(e){return ne.createElement("th",{...e})}function Hae(e){return ne.createElement("tbody",{...e})}function Yae(e){const{components:t}=of();return ne.createElement(t.Dropdown,{...e})}const qae=Object.freeze(Object.defineProperty({__proto__:null,Button:bae,CaptionLabel:kae,Chevron:Sae,Day:Eae,DayButton:Cae,Dropdown:_ae,DropdownNav:Nae,Footer:Tae,Month:Aae,MonthCaption:Pae,MonthGrid:Rae,Months:Mae,MonthsDropdown:jae,Nav:Dae,NextMonthButton:Oae,Option:Iae,PreviousMonthButton:Lae,Root:Fae,Select:$ae,Week:zae,WeekNumber:Wae,WeekNumberHeader:Uae,Weekday:Bae,Weekdays:Vae,Weeks:Hae,YearsDropdown:Yae},Symbol.toStringTag,{value:"Module"}));function Gae(e){return{...qae,...e}}function Zae(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Kae(){const e={};for(const t in Xe)e[Xe[t]]=`rdp-${Xe[t]}`;for(const t in Lt)e[Lt[t]]=`rdp-${Lt[t]}`;for(const t in xi)e[xi[t]]=`rdp-${xi[t]}`;return e}function jF(e,t,n){return(n??new $o(t)).format(e,"LLLL y")}const Xae=jF;function Qae(e,t,n){return(n??new $o(t)).format(e,"d")}function Jae(e,t=zo){return t.format(e,"LLLL")}function ele(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function tle(){return""}function nle(e,t,n){return(n??new $o(t)).format(e,"cccccc")}function DF(e,t=zo){return t.format(e,"yyyy")}const rle=DF,ile=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:jF,formatDay:Qae,formatMonthCaption:Xae,formatMonthDropdown:Jae,formatWeekNumber:ele,formatWeekNumberHeader:tle,formatWeekdayName:nle,formatYearCaption:rle,formatYearDropdown:DF},Symbol.toStringTag,{value:"Module"}));function ole(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ile,...e}}function sle(e,t,n,r,i){const{startOfMonth:o,startOfYear:s,endOfYear:a,eachMonthOfInterval:u,getMonth:c}=i;return u({start:s(e),end:a(e)}).map(p=>{const m=r.formatMonthDropdown(p,i),x=c(p),v=t&&p<o(t)||n&&p>o(n)||!1;return{value:x,label:m,disabled:v}})}function ale(e,t={},n={}){let r={...t==null?void 0:t[Xe.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...n==null?void 0:n[i]}}),r}function lle(e,t,n){const r=e.today(),i=t?e.startOfISOWeek(r):e.startOfWeek(r),o=[];for(let s=0;s<7;s++){const a=e.addDays(i,s);o.push(a)}return o}function ule(e,t,n,r){if(!e||!t)return;const{startOfYear:i,endOfYear:o,addYears:s,getYear:a,isBefore:u,isSameYear:c}=r,f=i(e),h=o(t),p=[];let m=f;for(;u(m,h)||c(m,h);)p.push(m),m=s(m,1);return p.map(x=>{const v=n.formatYearDropdown(x,r);return{value:a(x),label:v,disabled:!1}})}function OF(e,t,n){return(n??new $o(t)).format(e,"LLLL y")}const cle=OF;function dle(e,t,n,r){let i=(r??new $o(n)).format(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i}function IF(e,t,n,r){let i=(r??new $o(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const fle=IF;function hle(){return""}function ple(e){return"Choose the Month"}function mle(e){return"Go to the Next Month"}function gle(e){return"Go to the Previous Month"}function yle(e,t,n){return(n??new $o(t)).format(e,"cccc")}function xle(e,t){return`Week ${e}`}function vle(e){return"Week Number"}function wle(e){return"Choose the Year"}const ble=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:cle,labelDay:fle,labelDayButton:IF,labelGrid:OF,labelGridcell:dle,labelMonthDropdown:ple,labelNav:hle,labelNext:mle,labelPrevious:gle,labelWeekNumber:xle,labelWeekNumberHeader:vle,labelWeekday:yle,labelYearDropdown:wle},Symbol.toStringTag,{value:"Module"}));function kle(e,t,n,r){const i=e[0],o=e[e.length-1],{ISOWeek:s,fixedWeeks:a,broadcastCalendar:u}=n??{},{addDays:c,differenceInCalendarDays:f,differenceInCalendarMonths:h,endOfBroadcastWeek:p,endOfISOWeek:m,endOfMonth:x,endOfWeek:v,isAfter:k,startOfBroadcastWeek:b,startOfISOWeek:E,startOfWeek:C}=r,N=u?b(i,r):s?E(i):C(i),P=u?p(o,r):s?m(x(o)):v(x(o)),T=f(P,N),j=h(o,i)+1,R=[];for(let z=0;z<=T;z++){const F=c(N,z);if(t&&k(F,t))break;R.push(F)}const M=(u?35:42)*j;if(a&&R.length<M){const z=M-R.length;for(let F=0;F<z;F++){const Y=c(R[R.length-1],1);R.push(Y)}}return R}function Sle(e){const t=[];return e.reduce((n,r)=>{const i=[],o=r.weeks.reduce((s,a)=>[...s,...a.days],i);return[...n,...o]},t)}function Ele(e,t,n,r){const{numberOfMonths:i=1}=n,o=[];for(let s=0;s<i;s++){const a=r.addMonths(e,s);if(t&&a>t)break;o.push(a)}return o}function qT(e,t){const{month:n,defaultMonth:r,today:i=t.today(),numberOfMonths:o=1,endMonth:s,startMonth:a}=e;let u=n||r||i;const{differenceInCalendarMonths:c,addMonths:f,startOfMonth:h}=t;if(s&&c(s,u)<0){const p=-1*(o-1);u=f(s,p)}return a&&c(u,a)<0&&(u=a),h(u)}class LF{constructor(t,n,r=zo){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Cle{constructor(t,n){this.date=t,this.weeks=n}}class _le{constructor(t,n){this.days=n,this.weekNumber=t}}function Nle(e,t,n,r){const{addDays:i,endOfBroadcastWeek:o,endOfISOWeek:s,endOfMonth:a,endOfWeek:u,getISOWeek:c,getWeek:f,startOfBroadcastWeek:h,startOfISOWeek:p,startOfWeek:m}=r,x=e.reduce((v,k)=>{const b=n.broadcastCalendar?h(k,r):n.ISOWeek?p(k):m(k),E=n.broadcastCalendar?o(k,r):n.ISOWeek?s(a(k)):u(a(k)),C=t.filter(j=>j>=b&&j<=E),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<N){const j=t.filter(R=>{const I=N-C.length;return R>E&&R<=i(E,I)});C.push(...j)}const P=C.reduce((j,R)=>{const I=n.ISOWeek?c(R):f(R),M=j.find(F=>F.weekNumber===I),z=new LF(R,k,r);return M?M.days.push(z):j.push(new _le(I,[z])),j},[]),T=new Cle(k,P);return v.push(T),v},[]);return n.reverseMonths?x.reverse():x}function Tle(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:o,startOfMonth:s,endOfMonth:a,addYears:u,endOfYear:c,newDate:f,today:h}=t,{fromYear:p,toYear:m,fromMonth:x,toMonth:v}=e;!n&&x&&(n=x),!n&&p&&(n=t.newDate(p,0,1)),!r&&v&&(r=v),!r&&m&&(r=f(m,11,31));const k=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=f(p,0,1):!n&&k&&(n=i(u(e.today??h(),-100))),r?r=a(r):m?r=f(m,11,31):!r&&k&&(r=c(e.today??h())),[n&&o(n),r&&o(r)]}function Ale(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o=1}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:u}=r,c=i?o:1,f=s(e);if(!t)return a(f,c);if(!(u(t,e)<o))return a(f,c)}function Ple(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:u}=r,c=i?o??1:1,f=s(e);if(!t)return a(f,-c);if(!(u(f,t)<=0))return a(f,-c)}function Rle(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function qm(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function Mle(e,t){const[n,r]=Tle(e,t),{startOfMonth:i,endOfMonth:o}=t,s=qT(e,t),[a,u]=qm(s,e.month?s:void 0);S.useEffect(()=>{const T=qT(e,t);u(T)},[e.timeZone]);const c=Ele(a,r,e,t),f=kle(c,e.endMonth?o(e.endMonth):void 0,e,t),h=Nle(c,f,e,t),p=Rle(h),m=Sle(h),x=Ple(a,n,e,t),v=Ale(a,r,e,t),{disableNavigation:k,onMonthChange:b}=e,E=T=>p.some(j=>j.days.some(R=>R.isEqualTo(T))),C=T=>{if(k)return;let j=i(T);n&&j<i(n)&&(j=i(n)),r&&j>i(r)&&(j=i(r)),u(j),b==null||b(j)};return{months:h,weeks:p,days:m,navStart:n,navEnd:r,previousMonth:x,nextMonth:v,goToMonth:C,goToDay:T=>{E(T)||C(T.date)}}}function jle(e,t,n,r){let i,o=0,s=!1;for(;o<e.length&&!s;){const a=e[o],u=t(a);!u[Lt.disabled]&&!u[Lt.hidden]&&!u[Lt.outside]&&(u[Lt.focused]||r!=null&&r.isEqualTo(a)||n(a.date)||u[Lt.today])&&(i=a,s=!0),o++}return i||(i=e.find(a=>{const u=t(a);return!u[Lt.disabled]&&!u[Lt.hidden]&&!u[Lt.outside]})),i}function vo(e,t,n=!1,r=zo){let{from:i,to:o}=e;const{differenceInCalendarDays:s,isSameDay:a}=r;return i&&o?(s(o,i)<0&&([i,o]=[o,i]),s(t,i)>=(n?1:0)&&s(o,t)>=(n?1:0)):!n&&o?a(o,t):!n&&i?a(i,t):!1}function FF(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function xk(e){return!!(e&&typeof e=="object"&&"from"in e)}function $F(e){return!!(e&&typeof e=="object"&&"after"in e)}function zF(e){return!!(e&&typeof e=="object"&&"before"in e)}function BF(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function VF(e,t){return Array.isArray(e)&&e.every(t.isDate)}function wo(e,t,n=zo){const r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:o,isAfter:s}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return i(e,a);if(VF(a,n))return a.includes(e);if(xk(a))return vo(a,e,!1,n);if(BF(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(FF(a)){const u=o(a.before,e),c=o(a.after,e),f=u>0,h=c<0;return s(a.before,a.after)?h&&f:f||h}return $F(a)?o(e,a.after)>0:zF(a)?o(a.before,e)>0:typeof a=="function"?a(e):!1})}function Dle(e,t,n,r,i,o,s){const{ISOWeek:a,broadcastCalendar:u}=o,{addDays:c,addMonths:f,addWeeks:h,addYears:p,endOfBroadcastWeek:m,endOfISOWeek:x,endOfWeek:v,max:k,min:b,startOfBroadcastWeek:E,startOfISOWeek:C,startOfWeek:N}=s;let T={day:c,week:h,month:f,year:p,startOfWeek:j=>u?E(j,s):a?C(j):N(j),endOfWeek:j=>u?m(j,s):a?x(j):v(j)}[e](n,t==="after"?1:-1);return t==="before"&&r?T=k([r,T]):t==="after"&&i&&(T=b([i,T])),T}function WF(e,t,n,r,i,o,s,a=0){if(a>365)return;const u=Dle(e,t,n.date,r,i,o,s),c=!!(o.disabled&&wo(u,o.disabled,s)),f=!!(o.hidden&&wo(u,o.hidden,s)),h=u,p=new LF(u,h,s);return!c&&!f?p:WF(e,t,p,r,i,o,s,a+1)}function Ole(e,t,n,r,i){const{autoFocus:o}=e,[s,a]=S.useState(),u=jle(t.days,n,r||(()=>!1),s),[c,f]=S.useState(o?u:void 0);return{isFocusTarget:v=>!!(u!=null&&u.isEqualTo(v)),setFocused:f,focused:c,blur:()=>{a(c),f(void 0)},moveFocus:(v,k)=>{if(!c)return;const b=WF(v,k,c,t.navStart,t.navEnd,e,i);b&&(t.goToDay(b),f(b))}}}function Ile(e,t,n){const{disabled:r,hidden:i,modifiers:o,showOutsideDays:s,broadcastCalendar:a,today:u}=t,{isSameDay:c,isSameMonth:f,startOfMonth:h,isBefore:p,endOfMonth:m,isAfter:x}=n,v=t.startMonth&&h(t.startMonth),k=t.endMonth&&m(t.endMonth),b={[Lt.focused]:[],[Lt.outside]:[],[Lt.disabled]:[],[Lt.hidden]:[],[Lt.today]:[]},E={};for(const C of e){const{date:N,displayMonth:P}=C,T=!!(P&&!f(N,P)),j=!!(v&&p(N,v)),R=!!(k&&x(N,k)),I=!!(r&&wo(N,r,n)),M=!!(i&&wo(N,i,n))||j||R||!a&&!s&&T||a&&s===!1&&T,z=c(N,u??n.today());T&&b.outside.push(C),I&&b.disabled.push(C),M&&b.hidden.push(C),z&&b.today.push(C),o&&Object.keys(o).forEach(F=>{const Y=o==null?void 0:o[F];Y&&wo(N,Y,n)&&(E[F]?E[F].push(C):E[F]=[C])})}return C=>{const N={[Lt.focused]:!1,[Lt.disabled]:!1,[Lt.hidden]:!1,[Lt.outside]:!1,[Lt.today]:!1},P={};for(const T in b){const j=b[T];N[T]=j.some(R=>R===C)}for(const T in E)P[T]=E[T].some(j=>j===C);return{...N,...P}}}function Lle(e,t){const{selected:n,required:r,onSelect:i}=e,[o,s]=qm(n,i?n:void 0),a=i?n:o,{isSameDay:u}=t,c=m=>(a==null?void 0:a.some(x=>u(x,m)))??!1,{min:f,max:h}=e;return{selected:a,select:(m,x,v)=>{let k=[...a??[]];if(c(m)){if((a==null?void 0:a.length)===f||r&&(a==null?void 0:a.length)===1)return;k=a==null?void 0:a.filter(b=>!u(b,m))}else(a==null?void 0:a.length)===h?k=[m]:k=[...k,m];return i||s(k),i==null||i(k,m,x,v),k},isSelected:c}}function Fle(e,t,n=0,r=0,i=!1,o=zo){const{from:s,to:a}=t||{},{isSameDay:u,isAfter:c,isBefore:f}=o;let h;if(!s&&!a)h={from:e,to:n>0?void 0:e};else if(s&&!a)u(s,e)?i?h={from:s,to:void 0}:h=void 0:f(e,s)?h={from:e,to:s}:h={from:s,to:e};else if(s&&a)if(u(s,e)&&u(a,e))i?h={from:s,to:a}:h=void 0;else if(u(s,e))h={from:s,to:n>0?void 0:e};else if(u(a,e))h={from:e,to:n>0?void 0:e};else if(f(e,s))h={from:e,to:a};else if(c(e,s))h={from:s,to:e};else if(c(e,a))h={from:s,to:e};else throw new Error("Invalid range");if(h!=null&&h.from&&(h!=null&&h.to)){const p=o.differenceInCalendarDays(h.to,h.from);r>0&&p>r?h={from:e,to:void 0}:n>1&&p<n&&(h={from:e,to:void 0})}return h}function $le(e,t,n=zo){const r=Array.isArray(t)?t:[t];let i=e.from;const o=n.differenceInCalendarDays(e.to,e.from),s=Math.min(o,6);for(let a=0;a<=s;a++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function GT(e,t,n=zo){return vo(e,t.from,!1,n)||vo(e,t.to,!1,n)||vo(t,e.from,!1,n)||vo(t,e.to,!1,n)}function zle(e,t,n=zo){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?vo(e,a,!1,n):VF(a,n)?a.some(u=>vo(e,u,!1,n)):xk(a)?a.from&&a.to?GT(e,{from:a.from,to:a.to},n):!1:BF(a)?$le(e,a.dayOfWeek,n):FF(a)?n.isAfter(a.before,a.after)?GT(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):wo(e.from,a,n)||wo(e.to,a,n):$F(a)||zF(a)?wo(e.from,a,n)||wo(e.to,a,n):!1))return!0;const s=r.filter(a=>typeof a=="function");if(s.length){let a=e.from;const u=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=u;c++){if(s.some(f=>f(a)))return!0;a=n.addDays(a,1)}}return!1}function Ble(e,t){const{disabled:n,excludeDisabled:r,selected:i,required:o,onSelect:s}=e,[a,u]=qm(i,s?i:void 0),c=s?i:a;return{selected:c,select:(p,m,x)=>{const{min:v,max:k}=e,b=p?Fle(p,c,v,k,o,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&zle({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),s||u(b),s==null||s(b,p,m,x),b},isSelected:p=>c&&vo(c,p,!1,t)}}function Vle(e,t){const{selected:n,required:r,onSelect:i}=e,[o,s]=qm(n,i?n:void 0),a=i?n:o,{isSameDay:u}=t;return{selected:a,select:(h,p,m)=>{let x=h;return!r&&a&&a&&u(h,a)&&(x=void 0),i||s(x),i==null||i(x,h,p,m),x},isSelected:h=>a?u(a,h):!1}}function Wle(e,t){const n=Vle(e,t),r=Lle(e,t),i=Ble(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}function Ule(e){const{components:t,formatters:n,labels:r,dateLib:i,locale:o,classNames:s}=S.useMemo(()=>{const Ke={...yk,...e.locale};return{dateLib:new $o({locale:Ke,weekStartsOn:e.broadcastCalendar?1:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens,timeZone:e.timeZone,numerals:e.numerals},e.dateLib),components:Gae(e.components),formatters:ole(e.formatters),labels:{...ble,...e.labels},locale:Ke,classNames:{...Kae(),...e.classNames}}},[e.locale,e.broadcastCalendar,e.weekStartsOn,e.firstWeekContainsDate,e.useAdditionalWeekYearTokens,e.useAdditionalDayOfYearTokens,e.timeZone,e.numerals,e.dateLib,e.components,e.formatters,e.labels,e.classNames]),{captionLayout:a,mode:u,onDayBlur:c,onDayClick:f,onDayFocus:h,onDayKeyDown:p,onDayMouseEnter:m,onDayMouseLeave:x,onNextClick:v,onPrevClick:k,showWeekNumber:b,styles:E}=e,{formatCaption:C,formatDay:N,formatMonthDropdown:P,formatWeekNumber:T,formatWeekNumberHeader:j,formatWeekdayName:R,formatYearDropdown:I}=n,M=Mle(e,i),{days:z,months:F,navStart:Y,navEnd:O,previousMonth:q,nextMonth:W,goToMonth:Z}=M,U=Ile(z,e,i),{isSelected:B,select:L,selected:H}=Wle(e,i)??{},{blur:V,focused:D,isFocusTarget:G,moveFocus:K,setFocused:J}=Ole(e,M,U,B??(()=>!1),i),{labelDayButton:ee,labelGridcell:ie,labelGrid:ce,labelMonthDropdown:he,labelNav:Ee,labelWeekday:fe,labelWeekNumber:xe,labelWeekNumberHeader:Me,labelYearDropdown:Ve}=r,ot=S.useMemo(()=>lle(i,e.ISOWeek),[i,e.ISOWeek]),_t=u!==void 0||f!==void 0,Q=S.useCallback(()=>{q&&(Z(q),k==null||k(q))},[q,Z,k]),oe=S.useCallback(()=>{W&&(Z(W),v==null||v(W))},[Z,W,v]),ue=S.useCallback((Ke,st)=>it=>{it.preventDefault(),it.stopPropagation(),J(Ke),L==null||L(Ke.date,st,it),f==null||f(Ke.date,st,it)},[L,f,J]),Se=S.useCallback((Ke,st)=>it=>{J(Ke),h==null||h(Ke.date,st,it)},[h,J]),we=S.useCallback((Ke,st)=>it=>{V(),c==null||c(Ke.date,st,it)},[V,c]),ge=S.useCallback((Ke,st)=>it=>{const Ut={ArrowLeft:["day",e.dir==="rtl"?"after":"before"],ArrowRight:["day",e.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[it.shiftKey?"year":"month","before"],PageDown:[it.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ut[it.key]){it.preventDefault(),it.stopPropagation();const[pt,gn]=Ut[it.key];K(pt,gn)}p==null||p(Ke.date,st,it)},[K,p,e.dir]),Ae=S.useCallback((Ke,st)=>it=>{m==null||m(Ke.date,st,it)},[m]),Fe=S.useCallback((Ke,st)=>it=>{x==null||x(Ke.date,st,it)},[x]),se=S.useCallback(Ke=>st=>{const it=Number(st.target.value),Ut=i.setMonth(i.startOfMonth(Ke),it);Z(Ut)},[i,Z]),pe=S.useCallback(Ke=>st=>{const it=Number(st.target.value),Ut=i.setYear(i.startOfMonth(Ke),it);Z(Ut)},[i,Z]),{className:Oe,style:et}=S.useMemo(()=>({className:[s[Xe.Root],e.className].filter(Boolean).join(" "),style:{...E==null?void 0:E[Xe.Root],...e.style}}),[s,e.className,e.style,E]),rt=Zae(e),Rt={dayPickerProps:e,selected:H,select:L,isSelected:B,months:F,nextMonth:W,previousMonth:q,goToMonth:Z,getModifiers:U,components:t,classNames:s,styles:E,labels:r,formatters:n};return ne.createElement(MF.Provider,{value:Rt},ne.createElement(t.Root,{className:Oe,style:et,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],...rt},ne.createElement(t.Months,{className:s[Xe.Months],style:E==null?void 0:E[Xe.Months]},!e.hideNavigation&&ne.createElement(t.Nav,{className:s[Xe.Nav],style:E==null?void 0:E[Xe.Nav],"aria-label":Ee(),onPreviousClick:Q,onNextClick:oe,previousMonth:q,nextMonth:W}),F.map((Ke,st)=>{const it=sle(Ke.date,Y,O,n,i),Ut=ule(Y,O,n,i);return ne.createElement(t.Month,{className:s[Xe.Month],style:E==null?void 0:E[Xe.Month],key:st,displayIndex:st,calendarMonth:Ke},ne.createElement(t.MonthCaption,{className:s[Xe.MonthCaption],style:E==null?void 0:E[Xe.MonthCaption],calendarMonth:Ke,displayIndex:st},a!=null&&a.startsWith("dropdown")?ne.createElement(t.DropdownNav,{className:s[Xe.Dropdowns],style:E==null?void 0:E[Xe.Dropdowns]},a==="dropdown"||a==="dropdown-months"?ne.createElement(t.MonthsDropdown,{className:s[Xe.MonthsDropdown],"aria-label":he(),classNames:s,components:t,disabled:!!e.disableNavigation,onChange:se(Ke.date),options:it,style:E==null?void 0:E[Xe.Dropdown],value:i.getMonth(Ke.date)}):ne.createElement("span",{role:"status","aria-live":"polite"},P(Ke.date,i)),a==="dropdown"||a==="dropdown-years"?ne.createElement(t.YearsDropdown,{className:s[Xe.YearsDropdown],"aria-label":Ve(i.options),classNames:s,components:t,disabled:!!e.disableNavigation,onChange:pe(Ke.date),options:Ut,style:E==null?void 0:E[Xe.Dropdown],value:i.getYear(Ke.date)}):ne.createElement("span",{role:"status","aria-live":"polite"},I(Ke.date,i))):ne.createElement(t.CaptionLabel,{className:s[Xe.CaptionLabel],role:"status","aria-live":"polite"},C(Ke.date,i.options,i))),ne.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ce(Ke.date,i.options,i)||void 0,className:s[Xe.MonthGrid],style:E==null?void 0:E[Xe.MonthGrid]},!e.hideWeekdays&&ne.createElement(t.Weekdays,{className:s[Xe.Weekdays],style:E==null?void 0:E[Xe.Weekdays]},b&&ne.createElement(t.WeekNumberHeader,{"aria-label":Me(i.options),className:s[Xe.WeekNumberHeader],style:E==null?void 0:E[Xe.WeekNumberHeader],scope:"col"},j()),ot.map((pt,gn)=>ne.createElement(t.Weekday,{"aria-label":fe(pt,i.options,i),className:s[Xe.Weekday],key:gn,style:E==null?void 0:E[Xe.Weekday],scope:"col"},R(pt,i.options,i)))),ne.createElement(t.Weeks,{className:s[Xe.Weeks],style:E==null?void 0:E[Xe.Weeks]},Ke.weeks.map((pt,gn)=>ne.createElement(t.Week,{className:s[Xe.Week],key:pt.weekNumber,style:E==null?void 0:E[Xe.Week],week:pt},b&&ne.createElement(t.WeekNumber,{week:pt,style:E==null?void 0:E[Xe.WeekNumber],"aria-label":xe(pt.weekNumber,{locale:o}),className:s[Xe.WeekNumber],scope:"row",role:"rowheader"},T(pt.weekNumber)),pt.days.map(yt=>{const{date:yn}=yt,dt=U(yt);if(dt[Lt.focused]=!dt.hidden&&!!(D!=null&&D.isEqualTo(yt)),dt[xi.selected]=!dt.disabled&&((B==null?void 0:B(yn))||dt.selected),xk(H)){const{from:oi,to:Ye}=H;dt[xi.range_start]=!!(oi&&Ye&&i.isSameDay(yn,oi)),dt[xi.range_end]=!!(oi&&Ye&&i.isSameDay(yn,Ye)),dt[xi.range_middle]=vo(H,yn,!0,i)}const Fr=ale(dt,E,e.modifiersStyles),ur=wae(dt,s,e.modifiersClassNames),Xn=!_t&&!dt.hidden?ie(yn,dt,i.options,i):void 0;return ne.createElement(t.Day,{key:`${i.format(yn,"yyyy-MM-dd")}_${i.format(yt.displayMonth,"yyyy-MM")}`,day:yt,modifiers:dt,className:ur.join(" "),style:Fr,role:"gridcell","aria-selected":dt.selected||void 0,"aria-label":Xn,"data-day":i.format(yn,"yyyy-MM-dd"),"data-month":yt.outside?i.format(yn,"yyyy-MM"):void 0,"data-selected":dt.selected||void 0,"data-disabled":dt.disabled||void 0,"data-hidden":dt.hidden||void 0,"data-outside":yt.outside||void 0,"data-focused":dt.focused||void 0,"data-today":dt.today||void 0},!dt.hidden&&_t?ne.createElement(t.DayButton,{className:s[Xe.DayButton],style:E==null?void 0:E[Xe.DayButton],type:"button",day:yt,modifiers:dt,disabled:dt.disabled||void 0,tabIndex:G(yt)?0:-1,"aria-label":ee(yn,dt,i.options,i),onClick:ue(yt,dt),onBlur:we(yt,dt),onFocus:Se(yt,dt),onKeyDown:ge(yt,dt),onMouseEnter:Ae(yt,dt),onMouseLeave:Fe(yt,dt)},N(yn,i.options,i)):!dt.hidden&&N(yt.date,i.options,i))}))))))})),e.footer&&ne.createElement(t.Footer,{className:s[Xe.Footer],style:E==null?void 0:E[Xe.Footer],role:"status","aria-live":"polite"},e.footer)))}function UF({className:e,classNames:t,showOutsideDays:n=!0,...r}){return y.jsx(Ule,{showOutsideDays:n,className:Te("p-3",e),classNames:{months:"flex flex-col space-y-4 sm:space-y-0",month:"space-y-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm text-text font-medium",nav:"space-x-1 flex items-center",button_previous:Te(El({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","absolute left-1 top-[12px] z-10"),button_next:Te(El({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","absolute right-1 top-[12px] z-10"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:Te(El({variant:"ghost"}),"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md","h-8 w-8 p-0 hover:bg-lightGray-7/50 font-normal aria-selected:opacity-100"),range_start:"day-range-start",range_end:"day-range-end",selected:"!bg-primary !text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-lightGray-7/50 text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:i})=>y.jsx(gR,{className:Te("h-4 w-4",{"rotate-180":i==="up","rotate-90":i==="left","-rotate-90":i==="right"})})},...r})}UF.displayName="Calendar";const Hle=lu("flex w-full text-mastra-el-6 rounded-sm border bg-transparent shadow-sm focus-visible:ring-ring transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-mastra-border-1 border-border-1 placeholder:text-muted-foreground",filled:"bg-inputFill border-border-1 placeholder:text-muted-foreground",unstyled:"border-0 bg-transparent placeholder:text-muted-foreground focus-visible:ring-transparent focus-visible:outline-none"},customSize:{default:"px-[13px] text-[calc(13_/_16_*_1rem)] h-[34px]",sm:"h-[30px] px-[13px] text-xs",lg:"h-10 px-[17px] rounded-md text-[calc(13_/_16_*_1rem)]"}},defaultVariants:{variant:"default",customSize:"default"}}),sf=S.forwardRef(({className:e,customSize:t,testId:n,variant:r,type:i,...o},s)=>y.jsx("input",{type:i,className:Te(e,Hle({variant:r,customSize:t,className:e})),"data-testid":n,ref:s,...o}));sf.displayName="Input";const Yle=({value:e,setValue:t,children:n,className:r,placeholder:i,...o})=>{const[s,a]=S.useState(!1);return y.jsxs(mF,{open:s,onOpenChange:a,children:[y.jsx(gF,{asChild:!0,children:n||y.jsx(HF,{value:e,placeholder:i,className:r,"data-testid":"datepicker-button"})}),y.jsx(gk,{className:"backdrop-blur-4xl w-auto p-0",align:"start","data-testid":"datepicker-calendar",children:y.jsx(qle,{value:e,setValue:u=>t(u?new Date(`${u}z`):null),clearable:o.clearable,setOpenPopover:a,...o})})]})},qle=({value:e,setValue:t,setOpenPopover:n,clearable:r,placeholder:i,className:o,...s})=>{const[a,u]=S.useState(e?Lc(e,"PP"):""),[c,f]=S.useState(e?new Date(e):void 0),h=hae(v=>{SF(v)&&(f(v),t==null||t(v),n==null||n(!1))},2e3),p=v=>{u(v.currentTarget.value);const k=new Date(v.target.value);h(k)},m=v=>{f(v),t==null||t(v),n==null||n(!1),u(v?Lc(v,"PP"):"")},x=v=>{f(v),u(v?Lc(v,"PP"):"")};return y.jsxs("div",{"aria-label":"Choose date",className:"relative mt-2 flex flex-col gap-2",onKeyDown:v=>{v.stopPropagation(),v.key==="Escape"&&(n==null||n(!1))},children:[y.jsx("div",{className:"w-full px-3",children:y.jsx(sf,{type:"date",value:a,onChange:p,placeholder:i,className:o})}),y.jsx(UF,{mode:"single",month:c,selected:c,onMonthChange:x,onSelect:m,...s}),y.jsx("div",{className:"px-3 pb-2",children:r&&y.jsx(Mt,{variant:"outline",tabIndex:0,className:"w-full !opacity-50 duration-200 hover:!opacity-100",onClick:()=>{t(null),f(void 0),u(""),n==null||n(!1)},children:"Clear"})})]})},HF=S.forwardRef(({value:e,placeholder:t,className:n,...r},i)=>y.jsxs(Mt,{ref:i,variant:"outline",className:Te("bg-neutral-825 border-neutral-775 w-full justify-start whitespace-nowrap rounded-md border px-2 py-0 text-left flex items-center gap-1",n),...r,children:[y.jsx(gR,{className:"h-4 w-4"}),e?y.jsx("span",{className:"text-white",children:Lc(e,"PPP")}):y.jsx("span",{className:"text-gray",children:t??"Pick a date"})]}));HF.displayName="DefaultButton";function Gle({name:e,control:t,handleFieldChange:n}){return y.jsx(gu,{name:e,control:t,render:({field:r})=>y.jsx(Yle,{value:r.value,setValue:i=>{r.onChange(i),n==null||n({key:e,value:i})}})})}var Zle="VisuallyHidden",YF=S.forwardRef((e,t)=>y.jsx(He.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));YF.displayName=Zle;var Kle=[" ","Enter","ArrowUp","ArrowDown"],Xle=[" ","Enter"],af="Select",[Gm,Zm,Qle]=N1(af),[xu,Gxe]=ni(af,[Qle,mu]),Km=mu(),[Jle,Fs]=xu(af),[eue,tue]=xu(af),qF=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:u,dir:c,name:f,autoComplete:h,disabled:p,required:m,form:x}=e,v=Km(t),[k,b]=S.useState(null),[E,C]=S.useState(null),[N,P]=S.useState(!1),T=Od(c),[j=!1,R]=Po({prop:r,defaultProp:i,onChange:o}),[I,M]=Po({prop:s,defaultProp:a,onChange:u}),z=S.useRef(null),F=k?x||!!k.closest("form"):!0,[Y,O]=S.useState(new Set),q=Array.from(Y).map(W=>W.props.value).join(";");return y.jsx($m,{...v,children:y.jsxs(Jle,{required:m,scope:t,trigger:k,onTriggerChange:b,valueNode:E,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:P,contentId:En(),value:I,onValueChange:M,open:j,onOpenChange:R,dir:T,triggerPointerDownPosRef:z,disabled:p,children:[y.jsx(Gm.Provider,{scope:t,children:y.jsx(eue,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(W=>{O(Z=>new Set(Z).add(W))},[]),onNativeOptionRemove:S.useCallback(W=>{O(Z=>{const U=new Set(Z);return U.delete(W),U})},[]),children:n})}),F?y.jsxs(p4,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:h,value:I,onChange:W=>M(W.target.value),disabled:p,form:x,children:[I===void 0?y.jsx("option",{value:""}):null,Array.from(Y)]},q):null]})})};qF.displayName=af;var GF="SelectTrigger",ZF=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Km(n),s=Fs(GF,n),a=s.disabled||r,u=ht(t,s.onTriggerChange),c=Zm(n),f=S.useRef("touch"),[h,p,m]=m4(v=>{const k=c().filter(C=>!C.disabled),b=k.find(C=>C.value===s.value),E=g4(k,v,b);E!==void 0&&s.onValueChange(E.value)}),x=v=>{a||(s.onOpenChange(!0),m()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return y.jsx(zm,{asChild:!0,...o,children:y.jsx(He.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":h4(s.value)?"":void 0,...i,ref:u,onClick:Re(i.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&x(v)}),onPointerDown:Re(i.onPointerDown,v=>{f.current=v.pointerType;const k=v.target;k.hasPointerCapture(v.pointerId)&&k.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(x(v),v.preventDefault())}),onKeyDown:Re(i.onKeyDown,v=>{const k=h.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(k&&v.key===" ")&&Kle.includes(v.key)&&(x(),v.preventDefault())})})})});ZF.displayName=GF;var KF="SelectValue",XF=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...a}=e,u=Fs(KF,n),{onValueNodeHasChildrenChange:c}=u,f=o!==void 0,h=ht(t,u.onValueNodeChange);return qn(()=>{c(f)},[c,f]),y.jsx(He.span,{...a,ref:h,style:{pointerEvents:"none"},children:h4(u.value)?y.jsx(y.Fragment,{children:s}):o})});XF.displayName=KF;var nue="SelectIcon",QF=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return y.jsx(He.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});QF.displayName=nue;var rue="SelectPortal",JF=e=>y.jsx(Yd,{asChild:!0,...e});JF.displayName=rue;var ka="SelectContent",e4=S.forwardRef((e,t)=>{const n=Fs(ka,e.__scopeSelect),[r,i]=S.useState();if(qn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?su.createPortal(y.jsx(t4,{scope:e.__scopeSelect,children:y.jsx(Gm.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),o):null}return y.jsx(n4,{...e,ref:t})});e4.displayName=ka;var pi=10,[t4,$s]=xu(ka),iue="SelectContentImpl",n4=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:u,align:c,alignOffset:f,arrowPadding:h,collisionBoundary:p,collisionPadding:m,sticky:x,hideWhenDetached:v,avoidCollisions:k,...b}=e,E=Fs(ka,n),[C,N]=S.useState(null),[P,T]=S.useState(null),j=ht(t,ee=>N(ee)),[R,I]=S.useState(null),[M,z]=S.useState(null),F=Zm(n),[Y,O]=S.useState(!1),q=S.useRef(!1);S.useEffect(()=>{if(C)return Om(C)},[C]),jm();const W=S.useCallback(ee=>{const[ie,...ce]=F().map(fe=>fe.ref.current),[he]=ce.slice(-1),Ee=document.activeElement;for(const fe of ee)if(fe===Ee||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===ie&&P&&(P.scrollTop=0),fe===he&&P&&(P.scrollTop=P.scrollHeight),fe==null||fe.focus(),document.activeElement!==Ee))return},[F,P]),Z=S.useCallback(()=>W([R,C]),[W,R,C]);S.useEffect(()=>{Y&&Z()},[Y,Z]);const{onOpenChange:U,triggerPointerDownPosRef:B}=E;S.useEffect(()=>{if(C){let ee={x:0,y:0};const ie=he=>{var Ee,fe;ee={x:Math.abs(Math.round(he.pageX)-(((Ee=B.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(he.pageY)-(((fe=B.current)==null?void 0:fe.y)??0))}},ce=he=>{ee.x<=10&&ee.y<=10?he.preventDefault():C.contains(he.target)||U(!1),document.removeEventListener("pointermove",ie),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",ce,{capture:!0})}}},[C,U,B]),S.useEffect(()=>{const ee=()=>U(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[U]);const[L,H]=m4(ee=>{const ie=F().filter(Ee=>!Ee.disabled),ce=ie.find(Ee=>Ee.ref.current===document.activeElement),he=g4(ie,ee,ce);he&&setTimeout(()=>he.ref.current.focus())}),V=S.useCallback((ee,ie,ce)=>{const he=!q.current&&!ce;(E.value!==void 0&&E.value===ie||he)&&(I(ee),he&&(q.current=!0))},[E.value]),D=S.useCallback(()=>C==null?void 0:C.focus(),[C]),G=S.useCallback((ee,ie,ce)=>{const he=!q.current&&!ce;(E.value!==void 0&&E.value===ie||he)&&z(ee)},[E.value]),K=r==="popper"?V0:r4,J=K===V0?{side:a,sideOffset:u,align:c,alignOffset:f,arrowPadding:h,collisionBoundary:p,collisionPadding:m,sticky:x,hideWhenDetached:v,avoidCollisions:k}:{};return y.jsx(t4,{scope:n,content:C,viewport:P,onViewportChange:T,itemRefCallback:V,selectedItem:R,onItemLeave:D,itemTextRefCallback:G,focusSelectedItem:Z,selectedItemText:M,position:r,isPositioned:Y,searchRef:L,children:y.jsx(qd,{as:qi,allowPinchZoom:!0,children:y.jsx(Hd,{asChild:!0,trapped:E.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:Re(i,ee=>{var ie;(ie=E.trigger)==null||ie.focus({preventScroll:!0}),ee.preventDefault()}),children:y.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:y.jsx(K,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:ee=>ee.preventDefault(),...b,...J,onPlaced:()=>O(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Re(b.onKeyDown,ee=>{const ie=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ie&&ee.key.length===1&&H(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let he=F().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const Ee=ee.target,fe=he.indexOf(Ee);he=he.slice(fe+1)}setTimeout(()=>W(he)),ee.preventDefault()}})})})})})})});n4.displayName=iue;var oue="SelectItemAlignedPosition",r4=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Fs(ka,n),s=$s(ka,n),[a,u]=S.useState(null),[c,f]=S.useState(null),h=ht(t,j=>f(j)),p=Zm(n),m=S.useRef(!1),x=S.useRef(!0),{viewport:v,selectedItem:k,selectedItemText:b,focusSelectedItem:E}=s,C=S.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&v&&k&&b){const j=o.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),M=b.getBoundingClientRect();if(o.dir!=="rtl"){const Ee=M.left-R.left,fe=I.left-Ee,xe=j.left-fe,Me=j.width+xe,Ve=Math.max(Me,R.width),ot=window.innerWidth-pi,_t=Lw(fe,[pi,Math.max(pi,ot-Ve)]);a.style.minWidth=Me+"px",a.style.left=_t+"px"}else{const Ee=R.right-M.right,fe=window.innerWidth-I.right-Ee,xe=window.innerWidth-j.right-fe,Me=j.width+xe,Ve=Math.max(Me,R.width),ot=window.innerWidth-pi,_t=Lw(fe,[pi,Math.max(pi,ot-Ve)]);a.style.minWidth=Me+"px",a.style.right=_t+"px"}const z=p(),F=window.innerHeight-pi*2,Y=v.scrollHeight,O=window.getComputedStyle(c),q=parseInt(O.borderTopWidth,10),W=parseInt(O.paddingTop,10),Z=parseInt(O.borderBottomWidth,10),U=parseInt(O.paddingBottom,10),B=q+W+Y+U+Z,L=Math.min(k.offsetHeight*5,B),H=window.getComputedStyle(v),V=parseInt(H.paddingTop,10),D=parseInt(H.paddingBottom,10),G=j.top+j.height/2-pi,K=F-G,J=k.offsetHeight/2,ee=k.offsetTop+J,ie=q+W+ee,ce=B-ie;if(ie<=G){const Ee=z.length>0&&k===z[z.length-1].ref.current;a.style.bottom="0px";const fe=c.clientHeight-v.offsetTop-v.offsetHeight,xe=Math.max(K,J+(Ee?D:0)+fe+Z),Me=ie+xe;a.style.height=Me+"px"}else{const Ee=z.length>0&&k===z[0].ref.current;a.style.top="0px";const xe=Math.max(G,q+v.offsetTop+(Ee?V:0)+J)+ce;a.style.height=xe+"px",v.scrollTop=ie-G+v.offsetTop}a.style.margin=`${pi}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,a,c,v,k,b,o.dir,r]);qn(()=>C(),[C]);const[N,P]=S.useState();qn(()=>{c&&P(window.getComputedStyle(c).zIndex)},[c]);const T=S.useCallback(j=>{j&&x.current===!0&&(C(),E==null||E(),x.current=!1)},[C,E]);return y.jsx(aue,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:y.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:y.jsx(He.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});r4.displayName=oue;var sue="SelectPopperPosition",V0=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=pi,...o}=e,s=Km(n);return y.jsx(H1,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});V0.displayName=sue;var[aue,vk]=xu(ka,{}),W0="SelectViewport",i4=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=$s(W0,n),s=vk(W0,n),a=ht(t,o.onViewportChange),u=S.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),y.jsx(Gm.Slot,{scope:n,children:y.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Re(i.onScroll,c=>{const f=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&h){const m=Math.abs(u.current-f.scrollTop);if(m>0){const x=window.innerHeight-pi*2,v=parseFloat(h.style.minHeight),k=parseFloat(h.style.height),b=Math.max(v,k);if(b<x){const E=b+m,C=Math.min(x,E),N=E-C;h.style.height=C+"px",h.style.bottom==="0px"&&(f.scrollTop=N>0?N:0,h.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});i4.displayName=W0;var o4="SelectGroup",[lue,uue]=xu(o4),cue=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=En();return y.jsx(lue,{scope:n,id:i,children:y.jsx(He.div,{role:"group","aria-labelledby":i,...r,ref:t})})});cue.displayName=o4;var s4="SelectLabel",due=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=uue(s4,n);return y.jsx(He.div,{id:i.id,...r,ref:t})});due.displayName=s4;var Yp="SelectItem",[fue,a4]=xu(Yp),l4=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=Fs(Yp,n),u=$s(Yp,n),c=a.value===r,[f,h]=S.useState(o??""),[p,m]=S.useState(!1),x=ht(t,E=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,E,r,i)}),v=En(),k=S.useRef("touch"),b=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(fue,{scope:n,value:r,disabled:i,textId:v,isSelected:c,onItemTextChange:S.useCallback(E=>{h(C=>C||((E==null?void 0:E.textContent)??"").trim())},[]),children:y.jsx(Gm.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:y.jsx(He.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:x,onFocus:Re(s.onFocus,()=>m(!0)),onBlur:Re(s.onBlur,()=>m(!1)),onClick:Re(s.onClick,()=>{k.current!=="mouse"&&b()}),onPointerUp:Re(s.onPointerUp,()=>{k.current==="mouse"&&b()}),onPointerDown:Re(s.onPointerDown,E=>{k.current=E.pointerType}),onPointerMove:Re(s.onPointerMove,E=>{var C;k.current=E.pointerType,i?(C=u.onItemLeave)==null||C.call(u):k.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Re(s.onPointerLeave,E=>{var C;E.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:Re(s.onKeyDown,E=>{var N;((N=u.searchRef)==null?void 0:N.current)!==""&&E.key===" "||(Xle.includes(E.key)&&b(),E.key===" "&&E.preventDefault())})})})})});l4.displayName=Yp;var Cc="SelectItemText",u4=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=Fs(Cc,n),a=$s(Cc,n),u=a4(Cc,n),c=tue(Cc,n),[f,h]=S.useState(null),p=ht(t,b=>h(b),u.onItemTextChange,b=>{var E;return(E=a.itemTextRefCallback)==null?void 0:E.call(a,b,u.value,u.disabled)}),m=f==null?void 0:f.textContent,x=S.useMemo(()=>y.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:k}=c;return qn(()=>(v(x),()=>k(x)),[v,k,x]),y.jsxs(y.Fragment,{children:[y.jsx(He.span,{id:u.textId,...o,ref:p}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?su.createPortal(o.children,s.valueNode):null]})});u4.displayName=Cc;var c4="SelectItemIndicator",d4=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a4(c4,n).isSelected?y.jsx(He.span,{"aria-hidden":!0,...r,ref:t}):null});d4.displayName=c4;var U0="SelectScrollUpButton",hue=S.forwardRef((e,t)=>{const n=$s(U0,e.__scopeSelect),r=vk(U0,e.__scopeSelect),[i,o]=S.useState(!1),s=ht(t,r.onScrollButtonChange);return qn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=u.scrollTop>0;o(c)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?y.jsx(f4,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});hue.displayName=U0;var H0="SelectScrollDownButton",pue=S.forwardRef((e,t)=>{const n=$s(H0,e.__scopeSelect),r=vk(H0,e.__scopeSelect),[i,o]=S.useState(!1),s=ht(t,r.onScrollButtonChange);return qn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<c;o(f)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?y.jsx(f4,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});pue.displayName=H0;var f4=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=$s("SelectScrollButton",n),s=S.useRef(null),a=Zm(n),u=S.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return S.useEffect(()=>()=>u(),[u]),qn(()=>{var f;const c=a().find(h=>h.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),y.jsx(He.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Re(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Re(i.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Re(i.onPointerLeave,()=>{u()})})}),mue="SelectSeparator",gue=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(He.div,{"aria-hidden":!0,...r,ref:t})});gue.displayName=mue;var Y0="SelectArrow",yue=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Km(n),o=Fs(Y0,n),s=$s(Y0,n);return o.open&&s.position==="popper"?y.jsx(Y1,{...i,...r,ref:t}):null});yue.displayName=Y0;function h4(e){return e===""||e===void 0}var p4=S.forwardRef((e,t)=>{const{value:n,...r}=e,i=S.useRef(null),o=ht(t,i),s=$L(n);return S.useEffect(()=>{const a=i.current,u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==n&&f){const h=new Event("change",{bubbles:!0});f.call(a,n),a.dispatchEvent(h)}},[s,n]),y.jsx(YF,{asChild:!0,children:y.jsx("select",{...r,ref:o,defaultValue:n})})});p4.displayName="BubbleSelect";function m4(e){const t=hn(e),n=S.useRef(""),r=S.useRef(0),i=S.useCallback(s=>{const a=n.current+s;t(a),function u(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(a)},[t]),o=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function g4(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=xue(e,Math.max(o,0));i.length===1&&(s=s.filter(c=>c!==n));const u=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function xue(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vue=qF,y4=ZF,wue=XF,bue=QF,kue=JF,x4=e4,Sue=i4,v4=l4,Eue=u4,Cue=d4;const _ue=vue,Nue=wue,w4=S.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(y4,{ref:r,className:Te("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,y.jsx(bue,{asChild:!0,children:y.jsx(um,{className:"h-4 w-4 opacity-50"})})]}));w4.displayName=y4.displayName;const b4=S.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>y.jsx(kue,{children:y.jsx(x4,{ref:i,className:Te("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:y.jsx(Sue,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));b4.displayName=x4.displayName;const k4=S.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(v4,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[y.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(Cue,{children:y.jsx(yb,{className:"h-4 w-4"})})}),y.jsx(Eue,{children:t})]}));k4.displayName=v4.displayName;function _v({name:e,control:t,options:n,handleFieldChange:r}){return y.jsx(gu,{name:e,control:t,render:({field:i})=>y.jsxs(_ue,{value:i.value,onValueChange:o=>{i.onChange(o),r==null||r({key:e,value:o})},children:[y.jsx(w4,{children:y.jsx(Nue,{placeholder:"Select an option"})}),y.jsx(b4,{children:n.map(o=>y.jsx(k4,{value:o.value,children:o.label},o.value))})]})})}const S4=S.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{className:Te("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));S4.displayName="Textarea";function Tue({name:e,control:t,handleFieldChange:n,isMultiline:r,placeholder:i}){const o=r?S4:sf;return y.jsx(gu,{name:e,control:t,render:({field:s})=>y.jsx(o,{...s,className:"w-full",placeholder:i,onChange:a=>{s.onChange(a),n==null||n({key:e,value:a.target.value})}})})}const qp=(e,t=" ")=>e.split(t).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ");var Aue="Label",E4=S.forwardRef((e,t)=>y.jsx(He.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));E4.displayName=Aue;var C4=E4;const Pue=lu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Xm=S.forwardRef(({className:e,...t},n)=>y.jsx(C4,{ref:n,className:Te(Pue(),e),...t}));Xm.displayName=C4.displayName;const Rue=lu("block",{variants:{variant:{primary:"text-text",secondary:"text-text-dim"},size:{default:"text-base",xs:"text-xs",sm:"text-sm",md:"text-md",lg:"text-lg",xl:"text-xl","2xl":"text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"default",weight:"normal"}}),an=({className:e,weight:t,variant:n,as:r="span",size:i,...o})=>y.jsx(r,{className:Te(Rue({size:i,variant:n,weight:t,className:e})),...o}),Mue=(e,t)=>(typeof t=="string"&&(t=t==null?void 0:t.split(".")),t==null?void 0:t.reduce((n,r)=>n&&n[r]!==void 0?n[r]:void 0,e)),jue=(e,t=[],n)=>{let r={};function i(o,s){for(const[a,u]of Object.entries(o)){let c=[...s,a];u&&u.constructor===Object?(t!=null&&t.length?t.every(h=>Object.keys(u).includes(h)):!1)?r={...r,[c.join(".")]:u}:i(u,c):r={...r,[c.join(".")]:u}}}return i(e,[]),r};var er=(e=>(e.STRING="STRING",e.NUMBER="NUMBER",e.DATE="DATE",e.ENUM="ENUM",e.ARRAY="ARRAY",e.BOOLEAN="BOOLEAN",e.RECORD="RECORD",e.OBJECT="OBJECT",e.UNION="UNION",e.CREATABLE="CREATABLE",e.SELECT="SELECT",e.MULTI_SELECT="MULTI_SELECT",e))(er||{});function Gl({schema:e,isOptional:t=!1}){return e instanceof Yt.ZodObject?{type:"OBJECT",isOptional:t}:e instanceof Yt.ZodString?e instanceof Yt.ZodString&&e._def.checks.some(n=>n.kind==="datetime")?{type:"DATE",isOptional:t}:{type:"STRING",isOptional:t}:e instanceof jo?{type:"NUMBER",isOptional:t}:e instanceof Vl?{type:"BOOLEAN",isOptional:t}:e instanceof Ps?{type:"DATE",isOptional:t}:e instanceof Ul?{type:"ENUM",isOptional:t,options:[{label:e.value,value:e.value}]}:e instanceof Xi?{type:"ENUM",isOptional:t,options:e.options.map(n=>({label:n,value:n}))}:e instanceof Or?{type:"ARRAY",isOptional:t,options:e.element instanceof Xi?e.element.options.map(n=>({label:n,value:n})):[]}:e instanceof Yt.ZodOptional||e instanceof Yt.ZodDefault?Gl({schema:e._def.innerType,isOptional:!0}):e instanceof Yt.ZodEffects?Gl({schema:e._def.schema,isOptional:t}):e instanceof Yt.ZodRecord?{type:"RECORD",isOptional:t,innerSchema:e._def.valueType}:{type:"STRING",isOptional:t}}function Due({schema:e,errors:t,renderFieldMap:n,schemaField:r,renderLabel:i,control:o,variables:s,onFieldChange:a,schemaOptions:u,values:c,isOptional:f=!1,isNullable:h=!1}){var k,b;const p=Gl({schema:e,isOptional:f}),m=u!=null&&u.parentField?Mue(c,u==null?void 0:u.parentField):"";if(u!=null&&u.parentField&&!m)return null;if(!n)return;const x=jue(t,["message","type"]),v=u!=null&&u.parentField?(k=u==null?void 0:u.options)==null?void 0:k[m]:(u==null?void 0:u.options)||p.options;return y.jsxs("div",{className:"flex flex-col gap-1 mt-3 w-full",children:[i?i({isOptional:!!p.isOptional,schemaField:r}):y.jsxs(Xm,{className:"flex gap-0.5 capitalize",htmlFor:r,"aria-required":!p.isOptional,children:[!(p!=null&&p.isOptional)&&y.jsx("span",{className:"text-red-500",children:"*"}),y.jsx(an,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:qp(r.split(".").pop()||"")})]}),n[p.type]({name:r,options:v,control:o,variables:s,innerSchema:p.innerSchema,handleFieldChange:a,isNullable:h}),x!=null&&x[r]?y.jsx(an,{size:"xs",className:"text-red-500",children:(b=x[r])==null?void 0:b.message}):null]},r)}function _4({renderDynamicForm:e,schema:t,handleFieldChange:n,control:r,formValues:i,errors:o,parentField:s,action:a,isOptional:u=!1,isNullable:c=!1,depth:f}){const h=Gl({schema:t,isOptional:u});if(t instanceof xa){const p=t.options;return y.jsxs("div",{children:[y.jsxs(Xm,{className:"flex gap-0.5 capitalize mb-2",htmlFor:s,"aria-required":!h.isOptional,children:[!(h!=null&&h.isOptional)&&y.jsx("span",{className:"text-red-500",children:"*"}),y.jsx(an,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:qp(s)})]}),y.jsx("div",{className:"flex flex-col gap-4",children:p.map((m,x)=>y.jsxs(S.Fragment,{children:[x>=1&&y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 text-center",size:"xs",children:"or"}),y.jsx("div",{className:"ring-1 ring-white/10 p-2 rounded-md relative",children:e({schema:m,handleFieldChange:n,control:r,formValues:i,errors:o,parentField:s,action:a,isOptional:u,isNullable:c,depth:f})})]},x))})]})}return null}function N4({renderDynamicForm:e,schema:t,handleFieldChange:n,control:r,formValues:i,errors:o,parentField:s,action:a,isArray:u=!1,isOptional:c=!1,depth:f}){const h=Gl({schema:t,isOptional:c}),{fields:p,append:m,remove:x}=uk({control:r,name:s});function v(){m({})}return y.jsxs("div",{children:[y.jsxs(Xm,{className:"flex gap-0.5 capitalize mb-2",htmlFor:s,"aria-required":!h.isOptional,children:[!(h!=null&&h.isOptional)&&y.jsx("span",{className:"text-red-500",children:"*"}),y.jsx(an,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:qp(s)})]}),u?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex flex-col gap-4",children:p.map((k,b)=>y.jsxs("div",{className:"ring-1 ring-white/10 p-2 rounded-md relative",children:[y.jsx(Mt,{type:"button",variant:"ghost",size:"icon",onClick:()=>x(b),className:"absolute top-0 right-0",children:y.jsx(Ca,{className:"text-icon h-3.5 w-3.5"})}),e({schema:t instanceof Or?t.element:t,handleFieldChange:n,control:r,formValues:i,errors:o,parentField:`${s}.${b}`,action:a,isOptional:c,depth:f})]},k.id))}),y.jsx("div",{className:"flex flex-col gap-4",children:y.jsxs(Mt,{type:"button",variant:"outline",className:"w-full text-xs h-9",onClick:v,children:["Add ",qp(s.split(".").pop()||"")]})})]}):y.jsx("div",{className:"ring-1 ring-white/10 p-2 rounded-md relative",children:e({schema:t,handleFieldChange:n,control:r,formValues:i,errors:o,parentField:s,action:a,isOptional:c,depth:f})})]})}function Oue({name:e,control:t,handleFieldChange:n}){return y.jsx(gu,{name:e,control:t,render:({field:r})=>y.jsx(sf,{...r,type:"number",onChange:i=>{const o=i.target.value===""?void 0:Number(i.target.value);r.onChange(o),n==null||n({key:e,value:o})}})})}function Iue({name:e,control:t,renderField:n}){const{fields:r,append:i,remove:o}=uk({control:t,name:e});return y.jsxs("div",{className:"space-y-3",children:[r.map((s,a)=>y.jsxs("div",{className:"relative space-y-2 rounded-lg border p-4",children:[y.jsx(Mt,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2",onClick:()=>o(a),children:y.jsx(Ca,{className:"h-4 w-4"})}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(sf,{placeholder:"Key",...t.register(`${e}.${a}.key`)}),n({fieldName:`${e}.${a}.value`,index:a})]})]},s.id)),y.jsxs(Mt,{type:"button",variant:"outline",size:"sm",className:"w-full",onClick:()=>i({key:"",value:""}),children:[y.jsx(Wc,{className:"mr-2 h-4 w-4"}),"Add Key-Value Pair"]})]})}function lp(){return{[er.STRING]:e=>{const{options:t,...n}=e;return t!=null&&t.length?y.jsx(_v,{...n,options:t}):y.jsx(Tue,{...n})},[er.NUMBER]:e=>y.jsx(Oue,{...e}),[er.BOOLEAN]:e=>y.jsx(ooe,{...e}),[er.DATE]:e=>y.jsx(Gle,{...e}),[er.ENUM]:e=>{const{options:t=[]}=e;return y.jsx(_v,{...e,options:t})},[er.ARRAY]:e=>{const t=({fieldName:n,index:r})=>lp()[er.STRING]({...e,name:n});return y.jsx(FL,{...e,renderField:t})},[er.RECORD]:e=>{const t=({fieldName:n,index:r})=>lp()[er.STRING]({...e,name:n});return y.jsx(Iue,{...e,renderField:t})},[er.OBJECT]:e=>{const{innerSchema:t,name:n,control:r,handleFieldChange:i}=e;return t?y.jsx(N4,{schema:t,control:r,parentField:n,handleFieldChange:(o,s)=>i({key:o,value:s}),formValues:{},errors:{},renderDynamicForm:o=>Gp({...o,handleFieldChange:i})}):null},[er.UNION]:e=>{const{innerSchema:t,name:n,control:r,handleFieldChange:i}=e;return!t||!(t instanceof xa)?null:y.jsx(_4,{schema:t,control:r,parentField:n,handleFieldChange:(o,s)=>i({key:o,value:s}),renderDynamicForm:o=>{const s=Gl({schema:o.schema});return lp()[s.type]({...e,...o,control:r,handleFieldChange:i})},formValues:{},errors:{}})},[er.CREATABLE]:e=>y.jsx(LT,{...e}),[er.SELECT]:e=>{const{options:t=[]}=e;return y.jsx(_v,{...e,options:t})},[er.MULTI_SELECT]:e=>y.jsx(LT,{...e})}}function Lue(e){return(t,n)=>e({key:t,value:n})}function Gp({schema:e,parentField:t,control:n,formValues:r,errors:i,handleFieldChange:o,isOptional:s=!1,isNullable:a=!1,depth:u=0}){return u>10?(console.warn("Maximum schema resolution depth reached. Possible circular reference."),null):e instanceof Yt.ZodObject?Object.entries(e.shape).map(([c,f])=>{const h=t?`${t}.${c}`:c;return $c({schema:f,parentField:h,control:n,formValues:r,errors:i,handleFieldChange:o,isOptional:s,isNullable:a})}):$c({schema:e,parentField:t,control:n,formValues:r,errors:i,handleFieldChange:o,isOptional:s,isNullable:a})}function $c({schema:e,parentField:t,control:n,formValues:r,errors:i,handleFieldChange:o,isOptional:s=!1,isNullable:a=!1}){if(e instanceof Yt.ZodDefault)return null;if(e instanceof Yt.ZodOptional)return $c({schema:e._def.innerType,parentField:t,control:n,formValues:r,errors:i,handleFieldChange:o,isOptional:!0,isNullable:a});if(e instanceof Yt.ZodObject)return y.jsx("div",{className:"flex flex-col gap-8 py-8 w-full",children:y.jsx(N4,{schema:e,control:n,parentField:t,handleFieldChange:(u,c)=>o({key:u,value:c}),formValues:r,errors:i,isOptional:s,renderDynamicForm:u=>Gp({...u,handleFieldChange:o})})},t);if(e instanceof Yt.ZodUnion){if(e.options.some(u=>u instanceof Yt.ZodNull)){const u=e.options.find(c=>!(c instanceof Yt.ZodNull));return $c({schema:Yt.optional(u),parentField:t,control:n,formValues:r,errors:i,handleFieldChange:o,isNullable:!0})}return y.jsx(_4,{schema:e,control:n,parentField:t,handleFieldChange:Lue(o),formValues:r,errors:i,isOptional:s,isNullable:a,renderDynamicForm:u=>Gp({...u,handleFieldChange:c=>o(c)})})}return e instanceof Yt.ZodArray?y.jsx("div",{className:"flex w-full flex-col gap-8 py-8",children:y.jsx(FL,{control:n,name:t,renderField:u=>{const c=e.element,f=`${t}[${u.index}]`;return $c({schema:c,parentField:f,control:n,formValues:r,errors:i,handleFieldChange:o})}})},t):y.jsx("div",{className:"w-full",children:Due({schema:e,schemaField:t,control:n,values:r,errors:i,renderFieldMap:lp(),onFieldChange:o})},t)}function wk({schema:e,onSubmit:t,isSubmitLoading:n,submitButtonLabel:r="Submit"}){var b,E,C;const i=(b=e==null?void 0:e._def)==null?void 0:b.typeName,o=(E=e==null?void 0:e._def)==null?void 0:E.options,s=(C=e==null?void 0:e._def)==null?void 0:C.discriminator,a=i!=="ZodObject"?Yt.object({items:e}):e,u=qie({resolver:i==="ZodDiscriminatedUnion"?Jie(a,s):Xie(a)}),{control:c,handleSubmit:f,watch:h}=u,p=u.watch(),m=s?h(s):void 0,x=i==="ZodDiscriminatedUnion"?(o==null?void 0:o.find(N=>{var P,T,j;return((j=(T=(P=N==null?void 0:N.shape)==null?void 0:P[s])==null?void 0:T._def)==null?void 0:j.value)===m}))||Yt.object({[s]:Yt.string()}):a;function v({key:N,value:P}){u.setValue(N,P)}const k=N=>t(i!=="ZodObject"?N.items:N);return y.jsx(Rn,{className:"h-full w-full",children:y.jsxs("form",{onSubmit:f(k),className:"flex flex-col gap-4 p-4 w-full",children:[Gp({schema:x,parentField:"",control:c,formValues:p,errors:u.formState.errors,handleFieldChange:v}),y.jsx(Mt,{disabled:n,type:"submit",children:n?y.jsx(yR,{className:"h-4 w-4 animate-spin"}):r})]})})}var Fue=Object.create,Qm=Object.defineProperty,$ue=Object.defineProperties,zue=Object.getOwnPropertyDescriptor,Bue=Object.getOwnPropertyDescriptors,T4=Object.getOwnPropertyNames,Zp=Object.getOwnPropertySymbols,Vue=Object.getPrototypeOf,bk=Object.prototype.hasOwnProperty,A4=Object.prototype.propertyIsEnumerable,ZT=(e,t,n)=>t in e?Qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hi=(e,t)=>{for(var n in t||(t={}))bk.call(t,n)&&ZT(e,n,t[n]);if(Zp)for(var n of Zp(t))A4.call(t,n)&&ZT(e,n,t[n]);return e},Jm=(e,t)=>$ue(e,Bue(t)),P4=(e,t)=>{var n={};for(var r in e)bk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zp)for(var r of Zp(e))t.indexOf(r)<0&&A4.call(e,r)&&(n[r]=e[r]);return n},Wue=(e,t)=>function(){return t||(0,e[T4(e)[0]])((t={exports:{}}).exports,t),t.exports},Uue=(e,t)=>{for(var n in t)Qm(e,n,{get:t[n],enumerable:!0})},Hue=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of T4(t))!bk.call(e,i)&&i!==n&&Qm(e,i,{get:()=>t[i],enumerable:!(r=zue(t,i))||r.enumerable});return e},Yue=(e,t,n)=>(n=e!=null?Fue(Vue(e)):{},Hue(!e||!e.__esModule?Qm(n,"default",{value:e,enumerable:!0}):n,e)),que=Wue({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,o={},s={util:{encode:function x(v){return v instanceof a?new a(v.type,x(v.content),v.alias):Array.isArray(v)?v.map(x):v.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(x){return Object.prototype.toString.call(x).slice(8,-1)},objId:function(x){return x.__id||Object.defineProperty(x,"__id",{value:++i}),x.__id},clone:function x(v,k){k=k||{};var b,E;switch(s.util.type(v)){case"Object":if(E=s.util.objId(v),k[E])return k[E];b={},k[E]=b;for(var C in v)v.hasOwnProperty(C)&&(b[C]=x(v[C],k));return b;case"Array":return E=s.util.objId(v),k[E]?k[E]:(b=[],k[E]=b,v.forEach(function(N,P){b[P]=x(N,k)}),b);default:return v}},getLanguage:function(x){for(;x;){var v=r.exec(x.className);if(v)return v[1].toLowerCase();x=x.parentElement}return"none"},setLanguage:function(x,v){x.className=x.className.replace(RegExp(r,"gi"),""),x.classList.add("language-"+v)},isActive:function(x,v,k){for(var b="no-"+v;x;){var E=x.classList;if(E.contains(v))return!0;if(E.contains(b))return!1;x=x.parentElement}return!!k}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(x,v){var k=s.util.clone(s.languages[x]);for(var b in v)k[b]=v[b];return k},insertBefore:function(x,v,k,b){b=b||s.languages;var E=b[x],C={};for(var N in E)if(E.hasOwnProperty(N)){if(N==v)for(var P in k)k.hasOwnProperty(P)&&(C[P]=k[P]);k.hasOwnProperty(N)||(C[N]=E[N])}var T=b[x];return b[x]=C,s.languages.DFS(s.languages,function(j,R){R===T&&j!=x&&(this[j]=C)}),C},DFS:function x(v,k,b,E){E=E||{};var C=s.util.objId;for(var N in v)if(v.hasOwnProperty(N)){k.call(v,N,v[N],b||N);var P=v[N],T=s.util.type(P);T==="Object"&&!E[C(P)]?(E[C(P)]=!0,x(P,k,null,E)):T==="Array"&&!E[C(P)]&&(E[C(P)]=!0,x(P,k,N,E))}}},plugins:{},highlight:function(x,v,k){var b={code:x,grammar:v,language:k};if(s.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=s.tokenize(b.code,b.grammar),s.hooks.run("after-tokenize",b),a.stringify(s.util.encode(b.tokens),b.language)},tokenize:function(x,v){var k=v.rest;if(k){for(var b in k)v[b]=k[b];delete v.rest}var E=new f;return h(E,E.head,x),c(x,E,v,E.head,0),m(E)},hooks:{all:{},add:function(x,v){var k=s.hooks.all;k[x]=k[x]||[],k[x].push(v)},run:function(x,v){var k=s.hooks.all[x];if(!(!k||!k.length))for(var b=0,E;E=k[b++];)E(v)}},Token:a};function a(x,v,k,b){this.type=x,this.content=v,this.alias=k,this.length=(b||"").length|0}a.stringify=function x(v,k){if(typeof v=="string")return v;if(Array.isArray(v)){var b="";return v.forEach(function(T){b+=x(T,k)}),b}var E={type:v.type,content:x(v.content,k),tag:"span",classes:["token",v.type],attributes:{},language:k},C=v.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(E.classes,C):E.classes.push(C)),s.hooks.run("wrap",E);var N="";for(var P in E.attributes)N+=" "+P+'="'+(E.attributes[P]||"").replace(/"/g,""")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+N+">"+E.content+"</"+E.tag+">"};function u(x,v,k,b){x.lastIndex=v;var E=x.exec(k);if(E&&b&&E[1]){var C=E[1].length;E.index+=C,E[0]=E[0].slice(C)}return E}function c(x,v,k,b,E,C){for(var N in k)if(!(!k.hasOwnProperty(N)||!k[N])){var P=k[N];P=Array.isArray(P)?P:[P];for(var T=0;T<P.length;++T){if(C&&C.cause==N+","+T)return;var j=P[T],R=j.inside,I=!!j.lookbehind,M=!!j.greedy,z=j.alias;if(M&&!j.pattern.global){var F=j.pattern.toString().match(/[imsuy]*$/)[0];j.pattern=RegExp(j.pattern.source,F+"g")}for(var Y=j.pattern||j,O=b.next,q=E;O!==v.tail&&!(C&&q>=C.reach);q+=O.value.length,O=O.next){var W=O.value;if(v.length>x.length)return;if(!(W instanceof a)){var Z=1,U;if(M){if(U=u(Y,q,x,I),!U||U.index>=x.length)break;var V=U.index,B=U.index+U[0].length,L=q;for(L+=O.value.length;V>=L;)O=O.next,L+=O.value.length;if(L-=O.value.length,q=L,O.value instanceof a)continue;for(var H=O;H!==v.tail&&(L<B||typeof H.value=="string");H=H.next)Z++,L+=H.value.length;Z--,W=x.slice(q,L),U.index-=q}else if(U=u(Y,0,W,I),!U)continue;var V=U.index,D=U[0],G=W.slice(0,V),K=W.slice(V+D.length),J=q+W.length;C&&J>C.reach&&(C.reach=J);var ee=O.prev;G&&(ee=h(v,ee,G),q+=G.length),p(v,ee,Z);var ie=new a(N,R?s.tokenize(D,R):D,z,D);if(O=h(v,ee,ie),K&&h(v,O,K),Z>1){var ce={cause:N+","+T,reach:J};c(x,v,k,O.prev,q,ce),C&&ce.reach>C.reach&&(C.reach=ce.reach)}}}}}}function f(){var x={value:null,prev:null,next:null},v={value:null,prev:x,next:null};x.next=v,this.head=x,this.tail=v,this.length=0}function h(x,v,k){var b=v.next,E={value:k,prev:v,next:b};return v.next=E,b.prev=E,x.length++,E}function p(x,v,k){for(var b=v.next,E=0;E<k&&b!==x.tail;E++)b=b.next;v.next=b,b.prev=v,x.length-=E}function m(x){for(var v=[],k=x.head.next;k!==x.tail;)v.push(k.value),k=k.next;return v}return s}();t.exports=n,n.default=n}}),me=Yue(que());me.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},me.languages.markup.tag.inside["attr-value"].inside.entity=me.languages.markup.entity,me.languages.markup.doctype.inside["internal-subset"].inside=me.languages.markup,me.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(me.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:me.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:me.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},me.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(me.languages.markup.tag,"addAttribute",{value:function(e,t){me.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:me.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),me.languages.html=me.languages.markup,me.languages.mathml=me.languages.markup,me.languages.svg=me.languages.markup,me.languages.xml=me.languages.extend("markup",{}),me.languages.ssml=me.languages.xml,me.languages.atom=me.languages.xml,me.languages.rss=me.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(me),me.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},me.languages.javascript=me.languages.extend("clike",{"class-name":[me.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),me.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,me.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:me.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:me.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:me.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:me.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:me.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),me.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:me.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),me.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),me.languages.markup&&(me.languages.markup.tag.addInlined("script","javascript"),me.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),me.languages.js=me.languages.javascript,me.languages.actionscript=me.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),me.languages.actionscript["class-name"].alias="function",delete me.languages.actionscript.parameter,delete me.languages.actionscript["literal-property"],me.languages.markup&&me.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:me.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(me),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var o=function(h){h.inside||(h.inside={}),h.inside.rest=r},s="doc-comment";if(a=e.languages[i]){var a,u=a[s];if((u=u||(a=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[s])instanceof RegExp&&(u=a[s]={pattern:u}),Array.isArray(u))for(var c=0,f=u.length;c<f;c++)u[c]instanceof RegExp&&(u[c]={pattern:u[c]}),o(u[c]);else o(u)}})}}),t.addSupport(["java","javascript","php"],t)}(me),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(me),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(me),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(a,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return a});return RegExp(c,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(me),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,s=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(e.languages.markdown[c].inside.content.inside[f]=e.languages.markdown[f])})}),e.hooks.add("after-tokenize",function(c){c.language!=="markdown"&&c.language!=="md"||function f(h){if(h&&typeof h!="string")for(var p=0,m=h.length;p<m;p++){var x,v=h[p];v.type!=="code"?f(v.content):(x=v.content[1],v=v.content[3],x&&v&&x.type==="code-language"&&v.type==="code-block"&&typeof x.content=="string"&&(x=x.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),x="language-"+(x=(/[a-z][\w-]*/i.exec(x)||[""])[0].toLowerCase()),v.alias?typeof v.alias=="string"?v.alias=[v.alias,x]:v.alias.push(x):v.alias=[x]))}}(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",h=0,p=c.classes.length;h<p;h++){var m=c.classes[h],m=/language-(.+)/.exec(m);if(m){f=m[1];break}}var x,v=e.languages[f];v?c.content=e.highlight(function(k){return k=k.replace(s,""),k=k.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(b,E){var C;return(E=E.toLowerCase())[0]==="#"?(C=E[1]==="x"?parseInt(E.slice(2),16):Number(E.slice(1)),u(C)):a[E]||b})}(c.content),v,f):f&&f!=="none"&&e.plugins.autoloader&&(x="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),c.attributes.id=x,e.plugins.autoloader.loadLanguages(f,function(){var k=document.getElementById(x);k&&(k.innerHTML=e.highlight(k.textContent,e.languages[f],f))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),a={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(me),me.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:me.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},me.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(x){return typeof x!="string"&&x.type!=="comment"&&x.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(h(["definition-mutation","punctuation"])&&f(1).content==="("){n+=2;var o=p(/^\($/,/^\)$/);if(o===-1)continue;for(;n<o;n++){var s=f(0);s.type==="variable"&&(m(s,"variable-input"),i.push(s.content))}n=o+1}if(h(["punctuation","property-query"])&&f(0).content==="{"&&(n++,m(f(0),"property-mutation"),0<i.length)){var a=p(/^\{$/,/^\}$/);if(a!==-1)for(var u=n;u<a;u++){var c=t[u];c.type==="variable"&&0<=i.indexOf(c.content)&&m(c,"variable-input")}}}}function f(x){return t[n+x]}function h(x,v){v=v||0;for(var k=0;k<x.length;k++){var b=f(k+v);if(!b||b.type!==x[k])return}return 1}function p(x,v){for(var k=1,b=n;b<t.length;b++){var E=t[b],C=E.content;if(E.type==="punctuation"&&typeof C=="string"){if(x.test(C))k++;else if(v.test(C)&&--k===0)return b}}return-1}function m(x,v){var k=x.alias;k?Array.isArray(k)||(x.alias=k=[k]):x.alias=k=[],k.push(v)}}),me.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],o=r.pattern.source;function s(h,p){if(e.languages[h])return{pattern:RegExp("((?:"+p+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function a(h,p,m){return h={code:h,grammar:p,language:m},e.hooks.run("before-tokenize",h),h.tokens=e.tokenize(h.code,h.grammar),e.hooks.run("after-tokenize",h),h.tokens}function u(h,p,m){var k=e.tokenize(h,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),x=0,v={},k=a(k.map(function(E){if(typeof E=="string")return E;for(var C,N,E=E.content;h.indexOf((N=x++,C="___"+m.toUpperCase()+"_"+N+"___"))!==-1;);return v[C]=E,C}).join(""),p,m),b=Object.keys(v);return x=0,function E(C){for(var N=0;N<C.length;N++){if(x>=b.length)return;var P,T,j,R,I,M,z,F=C[N];typeof F=="string"||typeof F.content=="string"?(P=b[x],(z=(M=typeof F=="string"?F:F.content).indexOf(P))!==-1&&(++x,T=M.substring(0,z),I=v[P],j=void 0,(R={})["interpolation-punctuation"]=i,(R=e.tokenize(I,R)).length===3&&((j=[1,1]).push.apply(j,a(R[1],e.languages.javascript,"javascript")),R.splice.apply(R,j)),j=new e.Token("interpolation",R,r.alias,I),R=M.substring(z+P.length),I=[],T&&I.push(T),I.push(j),R&&(E(M=[R]),I.push.apply(I,M)),typeof F=="string"?(C.splice.apply(C,[N,1].concat(I)),N+=I.length-1):F.content=I)):(z=F.content,Array.isArray(z)?E(z):E([z]))}}(k),new e.Token(m,k,"language-"+m,h)}e.languages.javascript["template-string"]=[s("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),s("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),s("svg",/\bsvg/.source),s("markdown",/\b(?:markdown|md)/.source),s("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),s("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(h){return typeof h=="string"?h:Array.isArray(h)?h.map(f).join(""):f(h.content)}e.hooks.add("after-tokenize",function(h){h.language in c&&function p(m){for(var x=0,v=m.length;x<v;x++){var k,b,E,C=m[x];typeof C!="string"&&(k=C.content,Array.isArray(k)?C.type==="template-string"?(C=k[1],k.length===3&&typeof C!="string"&&C.type==="embedded-code"&&(b=f(C),C=C.alias,C=Array.isArray(C)?C[0]:C,E=e.languages[C])&&(k[1]=u(b,E,C))):p(k):typeof k!="string"&&p([k]))}}(h.tokens)})}(me),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(me),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(me),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(me),me.languages.n4js=me.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),me.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),me.languages.n4jsd=me.languages.n4js,function(e){function t(s,a){return RegExp(s.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),a)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var o=n[r],i=e.languages.javascript[o],o=(i=e.util.type(i)==="RegExp"?e.languages.javascript[o]={pattern:i}:i).inside||{};(i.inside=o)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(me),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(u,c){return u=u.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(u,c)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function s(u){for(var c=[],f=0;f<u.length;f++){var h=u[f],p=!1;typeof h!="string"&&(h.type==="tag"&&h.content[0]&&h.content[0].type==="tag"?h.content[0].content[0].content==="</"?0<c.length&&c[c.length-1].tagName===a(h.content[0].content[1])&&c.pop():h.content[h.content.length-1].content!=="/>"&&c.push({tagName:a(h.content[0].content[1]),openedBraces:0}):0<c.length&&h.type==="punctuation"&&h.content==="{"?c[c.length-1].openedBraces++:0<c.length&&0<c[c.length-1].openedBraces&&h.type==="punctuation"&&h.content==="}"?c[c.length-1].openedBraces--:p=!0),(p||typeof h=="string")&&0<c.length&&c[c.length-1].openedBraces===0&&(p=a(h),f<u.length-1&&(typeof u[f+1]=="string"||u[f+1].type==="plain-text")&&(p+=a(u[f+1]),u.splice(f+1,1)),0<f&&(typeof u[f-1]=="string"||u[f-1].type==="plain-text")&&(p=a(u[f-1])+p,u.splice(f-1,1),f--),u[f]=new e.Token("plain-text",p,null,p)),h.content&&typeof h.content!="string"&&s(h.content)}}var a=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(a).join(""):""};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||s(u.tokens)})}(me),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(me),me.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},me.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=me.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(me),me.languages.c=me.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),me.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),me.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},me.languages.c.string],char:me.languages.c.char,comment:me.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:me.languages.c}}}}),me.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete me.languages.c.boolean,me.languages.objectivec=me.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete me.languages.objectivec["class-name"],me.languages.objc=me.languages.objectivec,me.languages.reason=me.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),me.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete me.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(me),me.languages.go=me.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),me.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete me.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(me),me.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},me.languages.python["string-interpolation"].inside.interpolation.inside.rest=me.languages.python,me.languages.py=me.languages.python,me.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},me.languages.webmanifest=me.languages.json;var R4={};Uue(R4,{dracula:()=>Zue,duotoneDark:()=>Xue,duotoneLight:()=>Jue,github:()=>tce,gruvboxMaterialDark:()=>Pce,gruvboxMaterialLight:()=>Mce,jettwaveDark:()=>kce,jettwaveLight:()=>Ece,nightOwl:()=>rce,nightOwlLight:()=>oce,oceanicNext:()=>ace,okaidia:()=>uce,oneDark:()=>_ce,oneLight:()=>Tce,palenight:()=>dce,shadesOfPurple:()=>hce,synthwave84:()=>mce,ultramin:()=>yce,vsDark:()=>M4,vsLight:()=>wce});var Gue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},Zue=Gue,Kue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},Xue=Kue,Que={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},Jue=Que,ece={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},tce=ece,nce={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},rce=nce,ice={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},oce=ice,_r={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",punctuation:"#5FB3B3",tag:"#fc929e",function:"#79b6f2",className:"#FAC863",method:"#6699CC",operator:"#fc929e"},sce={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:_r.keyword}},{types:["attr-value"],style:{color:_r.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:_r.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:_r.primitive}},{types:["boolean"],style:{color:_r.boolean}},{types:["tag"],style:{color:_r.tag}},{types:["string"],style:{color:_r.string}},{types:["punctuation"],style:{color:_r.string}},{types:["selector","char","builtin","inserted"],style:{color:_r.char}},{types:["function"],style:{color:_r.function}},{types:["operator","entity","url","variable"],style:{color:_r.variable}},{types:["keyword"],style:{color:_r.keyword}},{types:["atrule","class-name"],style:{color:_r.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},ace=sce,lce={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},uce=lce,cce={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},dce=cce,fce={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},hce=fce,pce={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},mce=pce,gce={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},yce=gce,xce={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},M4=xce,vce={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},wce=vce,bce={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},kce=bce,Sce={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Ece=Sce,Cce={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},_ce=Cce,Nce={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Tce=Nce,Ace={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Pce=Ace,Rce={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Mce=Rce,jce=e=>S.useCallback(t=>{var n=t,{className:r,style:i,line:o}=n,s=P4(n,["className","style","line"]);const a=Jm(Hi({},s),{className:cm("token-line",r)});return typeof e=="object"&&"plain"in e&&(a.style=e.plain),typeof i=="object"&&(a.style=Hi(Hi({},a.style||{}),i)),a},[e]),Dce=e=>{const t=S.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return S.useCallback(n=>{var r=n,{token:i,className:o,style:s}=r,a=P4(r,["token","className","style"]);const u=Jm(Hi({},a),{className:cm("token",...i.types,o),children:i.content,style:t(i)});return s!=null&&(u.style=Hi(Hi({},u.style||{}),s)),u},[t])},Oce=/\r\n|\r|\n/,KT=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
374
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
375
|
+
`,e[0].empty=!0)},XT=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Ice=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let o=0,s=0,a=[];const u=[a];for(;s>-1;){for(;(o=r[s]++)<i[s];){let c,f=t[s];const p=n[s][o];if(typeof p=="string"?(f=s>0?f:["plain"],c=p):(f=XT(f,p.type),p.alias&&(f=XT(f,p.alias)),c=p.content),typeof c!="string"){s++,t.push(f),n.push(c),r.push(0),i.push(c.length);continue}const m=c.split(Oce),x=m.length;a.push({types:f,content:m[0]});for(let v=1;v<x;v++)KT(a),u.push(a=[]),a.push({types:f,content:m[v]})}s--,t.pop(),n.pop(),r.pop(),i.pop()}return KT(a),u},QT=Ice,Lce=({prism:e,code:t,grammar:n,language:r})=>S.useMemo(()=>{if(n==null)return QT([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),QT(i.tokens)},[t,n,r,e]),Fce=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,o)=>{const{languages:s,style:a}=o;return s&&!s.includes(t)||o.types.forEach(u=>{const c=Hi(Hi({},i[u]),a);i[u]=c}),i},{});return r.root=n,r.plain=Jm(Hi({},n),{backgroundColor:void 0}),r},$ce=Fce,zce=({children:e,language:t,code:n,theme:r,prism:i})=>{const o=t.toLowerCase(),s=$ce(r,o),a=jce(s),u=Dce(s),c=i.languages[o],f=Lce({prism:i,language:o,code:n,grammar:c});return e({tokens:f,className:`prism-code language-${o}`,style:s!=null?s.root:{},getLineProps:a,getTokenProps:u})},Bce=e=>S.createElement(zce,Jm(Hi({},e),{prism:e.prism||me,theme:e.theme||M4,code:e.code,language:e.language}));/*! Bundled license information:
|
|
376
|
+
|
|
377
|
+
prismjs/prism.js:
|
|
378
|
+
(**
|
|
379
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
380
|
+
*
|
|
381
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
382
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
383
|
+
* @namespace
|
|
384
|
+
* @public
|
|
385
|
+
*)
|
|
386
|
+
*/const Vce=(e,t)=>t.some(n=>{if(typeof n=="number")return e===n;const[r,i]=n.split(":").map(o=>parseInt(o));return r<=e&&e<=i}),Wce=(e,t,n)=>n.some(([r,[i,o]])=>r===e&&i<=t&&t<=o),Uce=(e,t)=>e.split(new RegExp(`(${t.map(([n])=>n).join("|")})`)).filter(Boolean),Hce=e=>e.map(t=>{t=t.startsWith("/")?t:"/"+t;const[,n,r="0:Infinity"]=t.split("/"),[i,o=i]=r.split(":").map(s=>Number(s));return[n,[i,o]]}),j4=(e,t)=>()=>{const n=S.useContext(e);if(n===void 0)throw new Error(t);return n},eg=e=>Object.assign(S.forwardRef(e),{displayName:e.displayName??e.name}),D4=S.createContext(void 0),O4=S.createContext(void 0),I4=j4(D4,'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'),kk=j4(O4,'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'),xo=({code:e,words:t=[],lines:n=[],children:r,...i})=>{const o=S.useMemo(()=>Hce(t),[t]);return y.jsx(D4.Provider,{value:{code:e.trim(),words:o,lines:n,...i},children:r})},Yce=({as:e,children:t,...n},r)=>{const{lines:i,words:o,...s}=I4(),a=e??"pre";return y.jsx(Bce,{...s,children:u=>y.jsx(a,{...n,ref:r,children:u.tokens.map((c,f)=>{const h=f+1,p=Vce(h,i);return y.jsx(O4.Provider,{value:{highlight:u,line:c,lineNumber:h},children:typeof t=="function"?t({isLineHighlighted:p,lineNumber:h},f):t},f)})})})},qce=({as:e,children:t,className:n,...r},i)=>{const{highlight:o,line:s}=kk(),{getLineProps:a}=o,u=e??"div";return y.jsx(u,{...a({line:s,className:n}),...r,ref:i,children:t})},Gce=({as:e,children:t=({children:o})=>y.jsx("span",{children:o}),className:n,...r},i)=>{const{words:o}=I4(),{line:s,highlight:a,lineNumber:u}=kk(),{getTokenProps:c}=a,f=e??"span";return y.jsx(ne.Fragment,{children:s.map((h,p)=>{const{children:m,...x}=c({token:h,className:n}),v=o.length?Uce(m,o):[m];return y.jsx(ne.Fragment,{children:v.map((k,b)=>y.jsx(f,{...x,...r,ref:i,children:t({children:k,isTokenHighlighted:Wce(k,u,o)})},b))},p)})})},Zce=({as:e,...t},n)=>{const{lineNumber:r}=kk(),i=e??"span";return y.jsx(i,{...t,ref:n,children:r})};xo.Code=eg(Yce);xo.LineContent=eg(qce);xo.Token=eg(Gce);xo.LineNumber=eg(Zce);function Kp({code:e="",language:t="ts",filename:n,className:r}){return y.jsxs(xo,{code:e,language:t,theme:R4.oneDark,children:[n?y.jsx("div",{className:"absolute w-full px-6 py-2 pl-4 text-sm rounded bg-mastra-bg-2 text-mastra-el-6/50",children:n}):null,y.jsx(xo.Code,{className:Te("bg-transparent h-full p-6 rounded-xl whitespace-pre-wrap",n?"pt-10":"",r),children:y.jsx("div",{className:"table-row",children:y.jsxs("div",{className:"flex items-center",children:[y.jsx(xo.LineNumber,{className:"table-cell pr-4 text-sm text-right select-none text-gray-500/50"}),y.jsx(xo.LineContent,{className:"flex",children:y.jsx(xo.Token,{className:"font-mono text-sm mastra-token"})})]})})})]})}const Kce=()=>{const[e,t]=S.useState(!1);return{executeTool:async({agentId:r,toolId:i,input:o})=>{try{t(!0);const s=await fetch(`/api/agents/${r}/tools/${i}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:o})});if(!s.ok)throw new Error(`Error executing tool: ${s.statusText}`);return await s.json()}catch(s){throw console.error("Error executing tool:",s),s}finally{t(!1)}},isExecutingTool:e}},Xce=()=>{const{toolId:e,agentId:t}=Rd(),{executeTool:n,isExecutingTool:r}=Kce(),[i,o]=S.useState(null),{agent:s,isLoading:a}=Dd(t),u=Object.values((s==null?void 0:s.tools)??{}).find(p=>p.id===e),c=async p=>{if(!s||!u)return;const m=await n({agentId:t,toolId:u.id,input:p});o(m)};if(a)return y.jsxs("div",{className:"flex flex-col h-full w-full bg-mastra-bg-1",children:[y.jsx(sr,{title:"Loading..."}),y.jsxs("div",{className:"w-full h-full grid grid-cols-[300px_1fr] p-2 gap-2",children:[y.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Input"}),y.jsx(We,{className:"h-[200px] w-full"})]}),y.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),y.jsx(We,{className:"h-[200px] w-full"})]})]})]});if(!s||!u)return null;const f=u!=null&&u.inputSchema?ck(nk(rk(u==null?void 0:u.inputSchema))):Yt.object({}),h=[{label:"Agents",href:"/agents"},{label:t,href:`/agents/${t}`},{label:e,href:`/agents/${t}/tools/${e}`,isCurrent:!0}];return y.jsxs("div",{className:"flex flex-col h-full w-full bg-mastra-bg-1",children:[y.jsx(sr,{title:y.jsx(Wd,{items:h})}),y.jsxs("div",{className:"w-full h-full grid grid-cols-[1fr_2fr] p-2 gap-2",children:[y.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Input"}),y.jsx("div",{className:"w-full h-[calc(100vh-126px)] ",children:y.jsx(wk,{isSubmitLoading:r,schema:f,onSubmit:p=>{c(p)}})})]}),y.jsxs("div",{className:"flex relative group flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),y.jsx("div",{className:"flex flex-col gap-2",children:y.jsx(Hc,{classname:"absolute z-40 top-4 right-4 w-8 h-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity duration-150 ease-in-out",content:JSON.stringify(i??{},null,2)})}),y.jsx(Rn,{className:"h-[calc(100vh-120px)] w-full",children:y.jsx(Kp,{code:JSON.stringify(i??{},null,2),language:"json"})})]})]})]})},Qce=()=>{const[e,t]=S.useState(!1);return{executeTool:async({toolId:r,input:i})=>{try{t(!0);const o=await fetch(`/api/tools/${r}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:i})});if(!o.ok){const s=await o.json();throw nn.error((s==null?void 0:s.error)||"Error executing dev tool"),new Error(`Error executing dev tool: ${(s==null?void 0:s.error)||o.statusText}`)}return await o.json()}catch(o){throw console.error("Error executing dev tool:",o),o}finally{t(!1)}},isExecuting:e}},Jce=()=>{const{toolId:e}=Rd(),{executeTool:t,isExecuting:n}=Qce(),[r,i]=S.useState(null),{tool:o,isLoading:s}=N6(e),a=async f=>{if(!o)return;const h=await t({toolId:o.id,input:f});i(h)};if(s)return y.jsxs("div",{className:"flex flex-col h-full w-full bg-mastra-bg-1",children:[y.jsx(sr,{title:"Loading..."}),y.jsxs("div",{className:"w-full h-full grid grid-cols-[300px_1fr] p-2 gap-2",children:[y.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Input"}),y.jsx(We,{className:"h-[200px] w-full"})]}),y.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),y.jsx(We,{className:"h-[200px] w-full"})]})]})]});if(!o)return null;const u=o!=null&&o.inputSchema?ck(nk(rk(o==null?void 0:o.inputSchema))):Yt.object({}),c=[{label:"Tools",href:"/tools"},{label:e,href:`/tools/all/${o.id}`,isCurrent:!0}];return y.jsxs("div",{className:"flex flex-col h-full w-full bg-mastra-bg-1",children:[y.jsx(sr,{title:y.jsx(Wd,{items:c})}),y.jsxs("div",{className:"w-full h-full grid grid-cols-[300px_1fr] p-2 gap-2",children:[y.jsxs("div",{className:" flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Input"}),y.jsx("div",{className:"w-full h-[calc(100vh-126px)]",children:y.jsx(wk,{isSubmitLoading:n,schema:u,onSubmit:f=>{a(f)},submitButtonLabel:"Run"})})]}),y.jsxs("div",{className:"flex relative group flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),y.jsx("div",{className:"flex flex-col gap-2",children:y.jsx(Hc,{classname:"absolute z-40 top-4 right-4 w-8 h-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity duration-150 ease-in-out",content:JSON.stringify(r??{},null,2)})}),y.jsx(Rn,{className:"h-[calc(100vh-120px)] w-full ",children:y.jsx(Kp,{code:JSON.stringify(r??{},null,2),language:"json"})})]})]})]})},ede=()=>{const[e,t]=S.useState({}),[n,r]=S.useState(!0);return S.useEffect(()=>{(async()=>{r(!0);try{const o=await fetch("/api/workflows");if(!o.ok){const a=await o.json();t({}),console.error("Error fetching workflows",a),nn.error((a==null?void 0:a.error)||"Error fetching workflows");return}const s=await o.json();t(s)}catch(o){t({}),console.error("Error fetching workflows",o),nn.error("Error fetching workflows")}finally{r(!1)}})()},[]),{workflows:e,isLoading:n}},L4=e=>{const[t,n]=S.useState(null),[r,i]=S.useState(!0);return S.useEffect(()=>{(async()=>{i(!0);try{if(!e){n(null),i(!1);return}const s=await fetch(`/api/workflows/${e}`);if(!s.ok){const u=await s.json();n(null),console.error("Error fetching workflow",u),nn.error((u==null?void 0:u.error)||"Error fetching workflow");return}const a=await s.json();n(a)}catch(s){n(null),console.error("Error fetching workflow",s),nn.error("Error fetching workflow")}finally{i(!1)}})()},[e]),{workflow:t,isLoading:r}},tde=()=>{const[e,t]=S.useState(!1);return{executeWorkflow:async({workflowId:r,input:i})=>{try{t(!0);const o=await fetch(`/api/workflows/${r}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i||{})});if(!o.ok){const s=await o.json();nn.error((s==null?void 0:s.error)||"Error executing workflow");return}return await o.json()}catch(o){throw console.error("Error executing workflow:",o),o}finally{t(!1)}},isExecutingWorkflow:e}};function nde(){const{workflows:e,isLoading:t}=ede(),n=js();return y.jsxs("div",{className:"flex flex-col h-full relative overflow-hidden",children:[y.jsx(sr,{title:"Workflows"}),y.jsx("main",{className:"flex-1 relative overflow-hidden",children:y.jsx(Rn,{className:"rounded-lg h-full",children:y.jsxs(pm,{children:[y.jsx(mm,{className:"bg-[#171717] sticky top-0 z-10",children:y.jsxs(Qr,{className:"border-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(rr,{className:"w-[50px]"}),y.jsx(rr,{className:"text-mastra-el-3 w-1/2",children:"Name"}),y.jsx(rr,{className:"text-mastra-el-3",children:"Action"})]})}),y.jsx(gm,{className:"border-b border-gray-6",children:t?y.jsxs(Qr,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-8"})}),y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-full"})}),y.jsx(mt,{children:y.jsx(We,{className:"h-8 w-full"})})]}):Object.entries(e).map(([r,i])=>y.jsxs(Qr,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[y.jsx(mt,{children:y.jsx("div",{className:"h-8 w-full flex items-center justify-center",children:y.jsx(jw,{className:"h-4 w-4 text-mastra-el-5"})})}),y.jsx(mt,{className:"font-medium truncate max-w-[500px] text-mastra-el-5",children:i.name}),y.jsx(mt,{className:"text-mastra-el-5 text-sm",children:y.jsx("span",{onClick:()=>{n(`/workflows/${r}`)},className:"hover:no-underline",children:y.jsxs(Mt,{size:"sm",variant:"outline",children:[y.jsx(jw,{className:"h-4 w-4 text-inherit"}),"View Workflow"]})})})]},r))})]})})})]})}function mn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=mn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var rde={value:()=>{}};function tg(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new up(n)}function up(e){this._=e}function ide(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}up.prototype=tg.prototype={constructor:up,on:function(e,t){var n=this._,r=ide(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=ode(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=JT(n[i],e.name,t);else if(t==null)for(i in n)n[i]=JT(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new up(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function ode(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function JT(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=rde,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var q0="http://www.w3.org/1999/xhtml";const eA={svg:"http://www.w3.org/2000/svg",xhtml:q0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ng(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),eA.hasOwnProperty(t)?{space:eA[t],local:e}:e}function sde(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===q0&&t.documentElement.namespaceURI===q0?t.createElement(e):t.createElementNS(n,e)}}function ade(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function F4(e){var t=ng(e);return(t.local?ade:sde)(t)}function lde(){}function Sk(e){return e==null?lde:function(){return this.querySelector(e)}}function ude(e){typeof e!="function"&&(e=Sk(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=new Array(s),u,c,f=0;f<s;++f)(u=o[f])&&(c=e.call(u,u.__data__,f,o))&&("__data__"in u&&(c.__data__=u.__data__),a[f]=c);return new Lr(r,this._parents)}function cde(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function dde(){return[]}function $4(e){return e==null?dde:function(){return this.querySelectorAll(e)}}function fde(e){return function(){return cde(e.apply(this,arguments))}}function hde(e){typeof e=="function"?e=fde(e):e=$4(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],a=s.length,u,c=0;c<a;++c)(u=s[c])&&(r.push(e.call(u,u.__data__,c,s)),i.push(u));return new Lr(r,i)}function z4(e){return function(){return this.matches(e)}}function B4(e){return function(t){return t.matches(e)}}var pde=Array.prototype.find;function mde(e){return function(){return pde.call(this.children,e)}}function gde(){return this.firstElementChild}function yde(e){return this.select(e==null?gde:mde(typeof e=="function"?e:B4(e)))}var xde=Array.prototype.filter;function vde(){return Array.from(this.children)}function wde(e){return function(){return xde.call(this.children,e)}}function bde(e){return this.selectAll(e==null?vde:wde(typeof e=="function"?e:B4(e)))}function kde(e){typeof e!="function"&&(e=z4(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=[],u,c=0;c<s;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Lr(r,this._parents)}function V4(e){return new Array(e.length)}function Sde(){return new Lr(this._enter||this._groups.map(V4),this._parents)}function Xp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Xp.prototype={constructor:Xp,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ede(e){return function(){return e}}function Cde(e,t,n,r,i,o){for(var s=0,a,u=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Xp(e,o[s]);for(;s<u;++s)(a=t[s])&&(i[s]=a)}function _de(e,t,n,r,i,o,s){var a,u,c=new Map,f=t.length,h=o.length,p=new Array(f),m;for(a=0;a<f;++a)(u=t[a])&&(p[a]=m=s.call(u,u.__data__,a,t)+"",c.has(m)?i[a]=u:c.set(m,u));for(a=0;a<h;++a)m=s.call(e,o[a],a,o)+"",(u=c.get(m))?(r[a]=u,u.__data__=o[a],c.delete(m)):n[a]=new Xp(e,o[a]);for(a=0;a<f;++a)(u=t[a])&&c.get(p[a])===u&&(i[a]=u)}function Nde(e){return e.__data__}function Tde(e,t){if(!arguments.length)return Array.from(this,Nde);var n=t?_de:Cde,r=this._parents,i=this._groups;typeof e!="function"&&(e=Ede(e));for(var o=i.length,s=new Array(o),a=new Array(o),u=new Array(o),c=0;c<o;++c){var f=r[c],h=i[c],p=h.length,m=Ade(e.call(f,f&&f.__data__,c,r)),x=m.length,v=a[c]=new Array(x),k=s[c]=new Array(x),b=u[c]=new Array(p);n(f,h,v,k,b,m,t);for(var E=0,C=0,N,P;E<x;++E)if(N=v[E]){for(E>=C&&(C=E+1);!(P=k[C])&&++C<x;);N._next=P||null}}return s=new Lr(s,r),s._enter=a,s._exit=u,s}function Ade(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pde(){return new Lr(this._exit||this._groups.map(V4),this._parents)}function Rde(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Mde(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),u=0;u<s;++u)for(var c=n[u],f=r[u],h=c.length,p=a[u]=new Array(h),m,x=0;x<h;++x)(m=c[x]||f[x])&&(p[x]=m);for(;u<i;++u)a[u]=n[u];return new Lr(a,this._parents)}function jde(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Dde(e){e||(e=Ode);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,u=i[o]=new Array(a),c,f=0;f<a;++f)(c=s[f])&&(u[f]=c);u.sort(t)}return new Lr(i,this._parents).order()}function Ode(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ide(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Lde(){return Array.from(this)}function Fde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function $de(){let e=0;for(const t of this)++e;return e}function zde(){return!this.node()}function Bde(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this}function Vde(e){return function(){this.removeAttribute(e)}}function Wde(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ude(e,t){return function(){this.setAttribute(e,t)}}function Hde(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Yde(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qde(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Gde(e,t){var n=ng(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Wde:Vde:typeof t=="function"?n.local?qde:Yde:n.local?Hde:Ude)(n,t))}function W4(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Zde(e){return function(){this.style.removeProperty(e)}}function Kde(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Xde(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Qde(e,t,n){return arguments.length>1?this.each((t==null?Zde:typeof t=="function"?Xde:Kde)(e,t,n??"")):Zl(this.node(),e)}function Zl(e,t){return e.style.getPropertyValue(t)||W4(e).getComputedStyle(e,null).getPropertyValue(t)}function Jde(e){return function(){delete this[e]}}function efe(e,t){return function(){this[e]=t}}function tfe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function nfe(e,t){return arguments.length>1?this.each((t==null?Jde:typeof t=="function"?tfe:efe)(e,t)):this.node()[e]}function U4(e){return e.trim().split(/^|\s+/)}function Ek(e){return e.classList||new H4(e)}function H4(e){this._node=e,this._names=U4(e.getAttribute("class")||"")}H4.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Y4(e,t){for(var n=Ek(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function q4(e,t){for(var n=Ek(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function rfe(e){return function(){Y4(this,e)}}function ife(e){return function(){q4(this,e)}}function ofe(e,t){return function(){(t.apply(this,arguments)?Y4:q4)(this,e)}}function sfe(e,t){var n=U4(e+"");if(arguments.length<2){for(var r=Ek(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ofe:t?rfe:ife)(n,t))}function afe(){this.textContent=""}function lfe(e){return function(){this.textContent=e}}function ufe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function cfe(e){return arguments.length?this.each(e==null?afe:(typeof e=="function"?ufe:lfe)(e)):this.node().textContent}function dfe(){this.innerHTML=""}function ffe(e){return function(){this.innerHTML=e}}function hfe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function pfe(e){return arguments.length?this.each(e==null?dfe:(typeof e=="function"?hfe:ffe)(e)):this.node().innerHTML}function mfe(){this.nextSibling&&this.parentNode.appendChild(this)}function gfe(){return this.each(mfe)}function yfe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xfe(){return this.each(yfe)}function vfe(e){var t=typeof e=="function"?e:F4(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wfe(){return null}function bfe(e,t){var n=typeof e=="function"?e:F4(e),r=t==null?wfe:typeof t=="function"?t:Sk(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function kfe(){var e=this.parentNode;e&&e.removeChild(this)}function Sfe(){return this.each(kfe)}function Efe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Cfe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _fe(e){return this.select(e?Cfe:Efe)}function Nfe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Tfe(e){return function(t){e.call(this,t,this.__data__)}}function Afe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Pfe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function Rfe(e,t,n){return function(){var r=this.__on,i,o=Tfe(t);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Mfe(e,t,n){var r=Afe(e+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,c=a.length,f;u<c;++u)for(i=0,f=a[u];i<o;++i)if((s=r[i]).type===f.type&&s.name===f.name)return f.value}return}for(a=t?Rfe:Pfe,i=0;i<o;++i)this.each(a(r[i],t,n));return this}function G4(e,t,n){var r=W4(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function jfe(e,t){return function(){return G4(this,e,t)}}function Dfe(e,t){return function(){return G4(this,e,t.apply(this,arguments))}}function Ofe(e,t){return this.each((typeof t=="function"?Dfe:jfe)(e,t))}function*Ife(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var Z4=[null];function Lr(e,t){this._groups=e,this._parents=t}function lf(){return new Lr([[document.documentElement]],Z4)}function Lfe(){return this}Lr.prototype=lf.prototype={constructor:Lr,select:ude,selectAll:hde,selectChild:yde,selectChildren:bde,filter:kde,data:Tde,enter:Sde,exit:Pde,join:Rde,merge:Mde,selection:Lfe,order:jde,sort:Dde,call:Ide,nodes:Lde,node:Fde,size:$de,empty:zde,each:Bde,attr:Gde,style:Qde,property:nfe,classed:sfe,text:cfe,html:pfe,raise:gfe,lower:xfe,append:vfe,insert:bfe,remove:Sfe,clone:_fe,datum:Nfe,on:Mfe,dispatch:Ofe,[Symbol.iterator]:Ife};function Pr(e){return typeof e=="string"?new Lr([[document.querySelector(e)]],[document.documentElement]):new Lr([[e]],Z4)}function Ffe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function mi(e,t){if(e=Ffe(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const $fe={passive:!1},vd={capture:!0,passive:!1};function Nv(e){e.stopImmediatePropagation()}function Rl(e){e.preventDefault(),e.stopImmediatePropagation()}function K4(e){var t=e.document.documentElement,n=Pr(e).on("dragstart.drag",Rl,vd);"onselectstart"in t?n.on("selectstart.drag",Rl,vd):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function X4(e,t){var n=e.document.documentElement,r=Pr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Rl,vd),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Bh=e=>()=>e;function G0(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:u,dy:c,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:f}})}G0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zfe(e){return!e.ctrlKey&&!e.button}function Bfe(){return this.parentNode}function Vfe(e,t){return t??{x:e.x,y:e.y}}function Wfe(){return navigator.maxTouchPoints||"ontouchstart"in this}function Q4(){var e=zfe,t=Bfe,n=Vfe,r=Wfe,i={},o=tg("start","drag","end"),s=0,a,u,c,f,h=0;function p(N){N.on("mousedown.drag",m).filter(r).on("touchstart.drag",k).on("touchmove.drag",b,$fe).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(N,P){if(!(f||!e.call(this,N,P))){var T=C(this,t.call(this,N,P),N,P,"mouse");T&&(Pr(N.view).on("mousemove.drag",x,vd).on("mouseup.drag",v,vd),K4(N.view),Nv(N),c=!1,a=N.clientX,u=N.clientY,T("start",N))}}function x(N){if(Rl(N),!c){var P=N.clientX-a,T=N.clientY-u;c=P*P+T*T>h}i.mouse("drag",N)}function v(N){Pr(N.view).on("mousemove.drag mouseup.drag",null),X4(N.view,c),Rl(N),i.mouse("end",N)}function k(N,P){if(e.call(this,N,P)){var T=N.changedTouches,j=t.call(this,N,P),R=T.length,I,M;for(I=0;I<R;++I)(M=C(this,j,N,P,T[I].identifier,T[I]))&&(Nv(N),M("start",N,T[I]))}}function b(N){var P=N.changedTouches,T=P.length,j,R;for(j=0;j<T;++j)(R=i[P[j].identifier])&&(Rl(N),R("drag",N,P[j]))}function E(N){var P=N.changedTouches,T=P.length,j,R;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),j=0;j<T;++j)(R=i[P[j].identifier])&&(Nv(N),R("end",N,P[j]))}function C(N,P,T,j,R,I){var M=o.copy(),z=mi(I||T,P),F,Y,O;if((O=n.call(N,new G0("beforestart",{sourceEvent:T,target:p,identifier:R,active:s,x:z[0],y:z[1],dx:0,dy:0,dispatch:M}),j))!=null)return F=O.x-z[0]||0,Y=O.y-z[1]||0,function q(W,Z,U){var B=z,L;switch(W){case"start":i[R]=q,L=s++;break;case"end":delete i[R],--s;case"drag":z=mi(U||Z,P),L=s;break}M.call(W,N,new G0(W,{sourceEvent:Z,subject:O,target:p,identifier:R,active:L,x:z[0]+F,y:z[1]+Y,dx:z[0]-B[0],dy:z[1]-B[1],dispatch:M}),j)}}return p.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Bh(!!N),p):e},p.container=function(N){return arguments.length?(t=typeof N=="function"?N:Bh(N),p):t},p.subject=function(N){return arguments.length?(n=typeof N=="function"?N:Bh(N),p):n},p.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:Bh(!!N),p):r},p.on=function(){var N=o.on.apply(o,arguments);return N===o?p:N},p.clickDistance=function(N){return arguments.length?(h=(N=+N)*N,p):Math.sqrt(h)},p}function Ck(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function J4(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function uf(){}var wd=.7,Qp=1/wd,Ml="\\s*([+-]?\\d+)\\s*",bd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ufe=/^#([0-9a-f]{3,8})$/,Hfe=new RegExp(`^rgb\\(${Ml},${Ml},${Ml}\\)$`),Yfe=new RegExp(`^rgb\\(${Yi},${Yi},${Yi}\\)$`),qfe=new RegExp(`^rgba\\(${Ml},${Ml},${Ml},${bd}\\)$`),Gfe=new RegExp(`^rgba\\(${Yi},${Yi},${Yi},${bd}\\)$`),Zfe=new RegExp(`^hsl\\(${bd},${Yi},${Yi}\\)$`),Kfe=new RegExp(`^hsla\\(${bd},${Yi},${Yi},${bd}\\)$`),tA={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ck(uf,kd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nA,formatHex:nA,formatHex8:Xfe,formatHsl:Qfe,formatRgb:rA,toString:rA});function nA(){return this.rgb().formatHex()}function Xfe(){return this.rgb().formatHex8()}function Qfe(){return e5(this).formatHsl()}function rA(){return this.rgb().formatRgb()}function kd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ufe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?iA(t):n===3?new xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Vh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Vh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Hfe.exec(e))?new xr(t[1],t[2],t[3],1):(t=Yfe.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qfe.exec(e))?Vh(t[1],t[2],t[3],t[4]):(t=Gfe.exec(e))?Vh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zfe.exec(e))?aA(t[1],t[2]/100,t[3]/100,1):(t=Kfe.exec(e))?aA(t[1],t[2]/100,t[3]/100,t[4]):tA.hasOwnProperty(e)?iA(tA[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function iA(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Vh(e,t,n,r){return r<=0&&(e=t=n=NaN),new xr(e,t,n,r)}function Jfe(e){return e instanceof uf||(e=kd(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function Z0(e,t,n,r){return arguments.length===1?Jfe(e):new xr(e,t,n,r??1)}function xr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ck(xr,Z0,J4(uf,{brighter(e){return e=e==null?Qp:Math.pow(Qp,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wd:Math.pow(wd,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(fa(this.r),fa(this.g),fa(this.b),Jp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oA,formatHex:oA,formatHex8:ehe,formatRgb:sA,toString:sA}));function oA(){return`#${ua(this.r)}${ua(this.g)}${ua(this.b)}`}function ehe(){return`#${ua(this.r)}${ua(this.g)}${ua(this.b)}${ua((isNaN(this.opacity)?1:this.opacity)*255)}`}function sA(){const e=Jp(this.opacity);return`${e===1?"rgb(":"rgba("}${fa(this.r)}, ${fa(this.g)}, ${fa(this.b)}${e===1?")":`, ${e})`}`}function Jp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ua(e){return e=fa(e),(e<16?"0":"")+e.toString(16)}function aA(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gi(e,t,n,r)}function e5(e){if(e instanceof gi)return new gi(e.h,e.s,e.l,e.opacity);if(e instanceof uf||(e=kd(e)),!e)return new gi;if(e instanceof gi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new gi(s,a,u,e.opacity)}function the(e,t,n,r){return arguments.length===1?e5(e):new gi(e,t,n,r??1)}function gi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ck(gi,the,J4(uf,{brighter(e){return e=e==null?Qp:Math.pow(Qp,e),new gi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wd:Math.pow(wd,e),new gi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xr(Tv(e>=240?e-240:e+120,i,r),Tv(e,i,r),Tv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new gi(lA(this.h),Wh(this.s),Wh(this.l),Jp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Jp(this.opacity);return`${e===1?"hsl(":"hsla("}${lA(this.h)}, ${Wh(this.s)*100}%, ${Wh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function lA(e){return e=(e||0)%360,e<0?e+360:e}function Wh(e){return Math.max(0,Math.min(1,e||0))}function Tv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const t5=e=>()=>e;function nhe(e,t){return function(n){return e+n*t}}function rhe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ihe(e){return(e=+e)==1?n5:function(t,n){return n-t?rhe(t,n,e):t5(isNaN(t)?n:t)}}function n5(e,t){var n=t-e;return n?nhe(e,n):t5(isNaN(e)?t:e)}const uA=function e(t){var n=ihe(t);function r(i,o){var s=n((i=Z0(i)).r,(o=Z0(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),c=n5(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=a(f),i.b=u(f),i.opacity=c(f),i+""}}return r.gamma=e,r}(1);function ys(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var K0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Av=new RegExp(K0.source,"g");function ohe(e){return function(){return e}}function she(e){return function(t){return e(t)+""}}function ahe(e,t){var n=K0.lastIndex=Av.lastIndex=0,r,i,o,s=-1,a=[],u=[];for(e=e+"",t=t+"";(r=K0.exec(e))&&(i=Av.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:ys(r,i)})),n=Av.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?u[0]?she(u[0].x):ohe(t):(t=u.length,function(c){for(var f=0,h;f<t;++f)a[(h=u[f]).i]=h.x(c);return a.join("")})}var cA=180/Math.PI,X0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function r5(e,t,n,r,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*cA,skewX:Math.atan(u)*cA,scaleX:s,scaleY:a}}var Uh;function lhe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?X0:r5(t.a,t.b,t.c,t.d,t.e,t.f)}function uhe(e){return e==null||(Uh||(Uh=document.createElementNS("http://www.w3.org/2000/svg","g")),Uh.setAttribute("transform",e),!(e=Uh.transform.baseVal.consolidate()))?X0:(e=e.matrix,r5(e.a,e.b,e.c,e.d,e.e,e.f))}function i5(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,f,h,p,m,x){if(c!==h||f!==p){var v=m.push("translate(",null,t,null,n);x.push({i:v-4,x:ys(c,h)},{i:v-2,x:ys(f,p)})}else(h||p)&&m.push("translate("+h+t+p+n)}function s(c,f,h,p){c!==f?(c-f>180?f+=360:f-c>180&&(c+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ys(c,f)})):f&&h.push(i(h)+"rotate("+f+r)}function a(c,f,h,p){c!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ys(c,f)}):f&&h.push(i(h)+"skewX("+f+r)}function u(c,f,h,p,m,x){if(c!==h||f!==p){var v=m.push(i(m)+"scale(",null,",",null,")");x.push({i:v-4,x:ys(c,h)},{i:v-2,x:ys(f,p)})}else(h!==1||p!==1)&&m.push(i(m)+"scale("+h+","+p+")")}return function(c,f){var h=[],p=[];return c=e(c),f=e(f),o(c.translateX,c.translateY,f.translateX,f.translateY,h,p),s(c.rotate,f.rotate,h,p),a(c.skewX,f.skewX,h,p),u(c.scaleX,c.scaleY,f.scaleX,f.scaleY,h,p),c=f=null,function(m){for(var x=-1,v=p.length,k;++x<v;)h[(k=p[x]).i]=k.x(m);return h.join("")}}}var che=i5(lhe,"px, ","px)","deg)"),dhe=i5(uhe,", ",")",")"),fhe=1e-12;function dA(e){return((e=Math.exp(e))+1/e)/2}function hhe(e){return((e=Math.exp(e))-1/e)/2}function phe(e){return((e=Math.exp(2*e))-1)/(e+1)}const mhe=function e(t,n,r){function i(o,s){var a=o[0],u=o[1],c=o[2],f=s[0],h=s[1],p=s[2],m=f-a,x=h-u,v=m*m+x*x,k,b;if(v<fhe)b=Math.log(p/c)/t,k=function(j){return[a+j*m,u+j*x,c*Math.exp(t*j*b)]};else{var E=Math.sqrt(v),C=(p*p-c*c+r*v)/(2*c*n*E),N=(p*p-c*c-r*v)/(2*p*n*E),P=Math.log(Math.sqrt(C*C+1)-C),T=Math.log(Math.sqrt(N*N+1)-N);b=(T-P)/t,k=function(j){var R=j*b,I=dA(P),M=c/(n*E)*(I*phe(t*R+P)-hhe(P));return[a+M*m,u+M*x,c*I/dA(t*R+P)]}}return k.duration=b*1e3*t/Math.SQRT2,k}return i.rho=function(o){var s=Math.max(.001,+o),a=s*s,u=a*a;return e(s,a,u)},i}(Math.SQRT2,2,4);var Kl=0,_c=0,mc=0,o5=1e3,em,Nc,tm=0,Sa=0,rg=0,Sd=typeof performance=="object"&&performance.now?performance:Date,s5=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _k(){return Sa||(s5(ghe),Sa=Sd.now()+rg)}function ghe(){Sa=0}function nm(){this._call=this._time=this._next=null}nm.prototype=a5.prototype={constructor:nm,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_k():+n)+(t==null?0:+t),!this._next&&Nc!==this&&(Nc?Nc._next=this:em=this,Nc=this),this._call=e,this._time=n,Q0()},stop:function(){this._call&&(this._call=null,this._time=1/0,Q0())}};function a5(e,t,n){var r=new nm;return r.restart(e,t,n),r}function yhe(){_k(),++Kl;for(var e=em,t;e;)(t=Sa-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kl}function fA(){Sa=(tm=Sd.now())+rg,Kl=_c=0;try{yhe()}finally{Kl=0,vhe(),Sa=0}}function xhe(){var e=Sd.now(),t=e-tm;t>o5&&(rg-=t,tm=e)}function vhe(){for(var e,t=em,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:em=n);Nc=e,Q0(r)}function Q0(e){if(!Kl){_c&&(_c=clearTimeout(_c));var t=e-Sa;t>24?(e<1/0&&(_c=setTimeout(fA,e-Sd.now()-rg)),mc&&(mc=clearInterval(mc))):(mc||(tm=Sd.now(),mc=setInterval(xhe,o5)),Kl=1,s5(fA))}}function hA(e,t,n){var r=new nm;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var whe=tg("start","end","cancel","interrupt"),bhe=[],l5=0,pA=1,J0=2,cp=3,mA=4,eb=5,dp=6;function ig(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;khe(e,n,{name:t,index:r,group:i,on:whe,tween:bhe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:l5})}function Nk(e,t){var n=Ti(e,t);if(n.state>l5)throw new Error("too late; already scheduled");return n}function to(e,t){var n=Ti(e,t);if(n.state>cp)throw new Error("too late; already running");return n}function Ti(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function khe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=a5(o,0,n.time);function o(c){n.state=pA,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var f,h,p,m;if(n.state!==pA)return u();for(f in r)if(m=r[f],m.name===n.name){if(m.state===cp)return hA(s);m.state===mA?(m.state=dp,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[f]):+f<t&&(m.state=dp,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete r[f])}if(hA(function(){n.state===cp&&(n.state=mA,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=J0,n.on.call("start",e,e.__data__,n.index,n.group),n.state===J0){for(n.state=cp,i=new Array(p=n.tween.length),f=0,h=-1;f<p;++f)(m=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=m);i.length=h+1}}function a(c){for(var f=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=eb,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);n.state===eb&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=dp,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function fp(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>J0&&r.state<eb,r.state=dp,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function She(e){return this.each(function(){fp(this,e)})}function Ehe(e,t){var n,r;return function(){var i=to(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function Che(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=to(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:t,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===t){i[u]=a;break}u===c&&i.push(a)}o.tween=i}}function _he(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Ti(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?Ehe:Che)(n,e,t))}function Tk(e,t,n){var r=e._id;return e.each(function(){var i=to(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ti(i,r).value[t]}}function u5(e,t){var n;return(typeof t=="number"?ys:t instanceof kd?uA:(n=kd(t))?(t=n,uA):ahe)(e,t)}function Nhe(e){return function(){this.removeAttribute(e)}}function The(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ahe(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function Phe(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function Rhe(e,t,n){var r,i,o;return function(){var s,a=n(this),u;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=a+"",s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a)))}}function Mhe(e,t,n){var r,i,o;return function(){var s,a=n(this),u;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=a+"",s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a)))}}function jhe(e,t){var n=ng(e),r=n==="transform"?dhe:u5;return this.attrTween(e,typeof t=="function"?(n.local?Mhe:Rhe)(n,r,Tk(this,"attr."+e,t)):t==null?(n.local?The:Nhe)(n):(n.local?Phe:Ahe)(n,r,t))}function Dhe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ohe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ihe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Ohe(e,o)),n}return i._value=t,i}function Lhe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Dhe(e,o)),n}return i._value=t,i}function Fhe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=ng(e);return this.tween(n,(r.local?Ihe:Lhe)(r,t))}function $he(e,t){return function(){Nk(this,e).delay=+t.apply(this,arguments)}}function zhe(e,t){return t=+t,function(){Nk(this,e).delay=t}}function Bhe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?$he:zhe)(t,e)):Ti(this.node(),t).delay}function Vhe(e,t){return function(){to(this,e).duration=+t.apply(this,arguments)}}function Whe(e,t){return t=+t,function(){to(this,e).duration=t}}function Uhe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Vhe:Whe)(t,e)):Ti(this.node(),t).duration}function Hhe(e,t){if(typeof t!="function")throw new Error;return function(){to(this,e).ease=t}}function Yhe(e){var t=this._id;return arguments.length?this.each(Hhe(t,e)):Ti(this.node(),t).ease}function qhe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;to(this,e).ease=n}}function Ghe(e){if(typeof e!="function")throw new Error;return this.each(qhe(this._id,e))}function Zhe(e){typeof e!="function"&&(e=z4(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=[],u,c=0;c<s;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Oo(r,this._parents,this._name,this._id)}function Khe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var u=t[a],c=n[a],f=u.length,h=s[a]=new Array(f),p,m=0;m<f;++m)(p=u[m]||c[m])&&(h[m]=p);for(;a<r;++a)s[a]=t[a];return new Oo(s,this._parents,this._name,this._id)}function Xhe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Qhe(e,t,n){var r,i,o=Xhe(t)?Nk:to;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}function Jhe(e,t){var n=this._id;return arguments.length<2?Ti(this.node(),n).on.on(e):this.each(Qhe(n,e,t))}function epe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function tpe(){return this.on("end.remove",epe(this._id))}function npe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sk(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],u=a.length,c=o[s]=new Array(u),f,h,p=0;p<u;++p)(f=a[p])&&(h=e.call(f,f.__data__,p,a))&&("__data__"in f&&(h.__data__=f.__data__),c[p]=h,ig(c[p],t,n,p,c,Ti(f,n)));return new Oo(o,this._parents,t,n)}function rpe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=$4(e));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var u=r[a],c=u.length,f,h=0;h<c;++h)if(f=u[h]){for(var p=e.call(f,f.__data__,h,u),m,x=Ti(f,n),v=0,k=p.length;v<k;++v)(m=p[v])&&ig(m,t,n,v,p,x);o.push(p),s.push(f)}return new Oo(o,s,t,n)}var ipe=lf.prototype.constructor;function ope(){return new ipe(this._groups,this._parents)}function spe(e,t){var n,r,i;return function(){var o=Zl(this,e),s=(this.style.removeProperty(e),Zl(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function c5(e){return function(){this.style.removeProperty(e)}}function ape(e,t,n){var r,i=n+"",o;return function(){var s=Zl(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function lpe(e,t,n){var r,i,o;return function(){var s=Zl(this,e),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(e),Zl(this,e))),s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}function upe(e,t){var n,r,i,o="style."+t,s="end."+o,a;return function(){var u=to(this,e),c=u.on,f=u.value[o]==null?a||(a=c5(t)):void 0;(c!==n||i!==f)&&(r=(n=c).copy()).on(s,i=f),u.on=r}}function cpe(e,t,n){var r=(e+="")=="transform"?che:u5;return t==null?this.styleTween(e,spe(e,r)).on("end.style."+e,c5(e)):typeof t=="function"?this.styleTween(e,lpe(e,r,Tk(this,"style."+e,t))).each(upe(this._id,e)):this.styleTween(e,ape(e,r,t),n).on("end.style."+e,null)}function dpe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fpe(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&dpe(e,s,n)),r}return o._value=t,o}function hpe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,fpe(e,t,n??""))}function ppe(e){return function(){this.textContent=e}}function mpe(e){return function(){var t=e(this);this.textContent=t??""}}function gpe(e){return this.tween("text",typeof e=="function"?mpe(Tk(this,"text",e)):ppe(e==null?"":e+""))}function ype(e){return function(t){this.textContent=e.call(this,t)}}function xpe(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ype(i)),t}return r._value=e,r}function vpe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,xpe(e))}function wpe(){for(var e=this._name,t=this._id,n=d5(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,u,c=0;c<a;++c)if(u=s[c]){var f=Ti(u,t);ig(u,e,n,c,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Oo(r,this._parents,e,n)}function bpe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},u={value:function(){--i===0&&o()}};n.each(function(){var c=to(this,r),f=c.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),c.on=t}),i===0&&o()})}var kpe=0;function Oo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function d5(){return++kpe}var po=lf.prototype;Oo.prototype={constructor:Oo,select:npe,selectAll:rpe,selectChild:po.selectChild,selectChildren:po.selectChildren,filter:Zhe,merge:Khe,selection:ope,transition:wpe,call:po.call,nodes:po.nodes,node:po.node,size:po.size,empty:po.empty,each:po.each,on:Jhe,attr:jhe,attrTween:Fhe,style:cpe,styleTween:hpe,text:gpe,textTween:vpe,remove:tpe,tween:_he,delay:Bhe,duration:Uhe,ease:Yhe,easeVarying:Ghe,end:bpe,[Symbol.iterator]:po[Symbol.iterator]};function Spe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Epe={time:null,delay:0,duration:250,ease:Spe};function Cpe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function _pe(e){var t,n;e instanceof Oo?(t=e._id,e=e._name):(t=d5(),(n=Epe).time=_k(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,u,c=0;c<a;++c)(u=s[c])&&ig(u,e,t,c,s,n||Cpe(u,t));return new Oo(r,this._parents,e,t)}lf.prototype.interrupt=She;lf.prototype.transition=_pe;const Hh=e=>()=>e;function Npe(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function bo(e,t,n){this.k=e,this.x=t,this.y=n}bo.prototype={constructor:bo,scale:function(e){return e===1?this:new bo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new bo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var og=new bo(1,0,0);f5.prototype=bo.prototype;function f5(e){for(;!e.__zoom;)if(!(e=e.parentNode))return og;return e.__zoom}function Pv(e){e.stopImmediatePropagation()}function gc(e){e.preventDefault(),e.stopImmediatePropagation()}function Tpe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ape(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function gA(){return this.__zoom||og}function Ppe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Rpe(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mpe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function h5(){var e=Tpe,t=Ape,n=Mpe,r=Ppe,i=Rpe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,u=mhe,c=tg("start","zoom","end"),f,h,p,m=500,x=150,v=0,k=10;function b(O){O.property("__zoom",gA).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",M).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(O,q,W,Z){var U=O.selection?O.selection():O;U.property("__zoom",gA),O!==U?P(O,q,W,Z):U.interrupt().each(function(){T(this,arguments).event(Z).start().zoom(null,typeof q=="function"?q.apply(this,arguments):q).end()})},b.scaleBy=function(O,q,W,Z){b.scaleTo(O,function(){var U=this.__zoom.k,B=typeof q=="function"?q.apply(this,arguments):q;return U*B},W,Z)},b.scaleTo=function(O,q,W,Z){b.transform(O,function(){var U=t.apply(this,arguments),B=this.__zoom,L=W==null?N(U):typeof W=="function"?W.apply(this,arguments):W,H=B.invert(L),V=typeof q=="function"?q.apply(this,arguments):q;return n(C(E(B,V),L,H),U,s)},W,Z)},b.translateBy=function(O,q,W,Z){b.transform(O,function(){return n(this.__zoom.translate(typeof q=="function"?q.apply(this,arguments):q,typeof W=="function"?W.apply(this,arguments):W),t.apply(this,arguments),s)},null,Z)},b.translateTo=function(O,q,W,Z,U){b.transform(O,function(){var B=t.apply(this,arguments),L=this.__zoom,H=Z==null?N(B):typeof Z=="function"?Z.apply(this,arguments):Z;return n(og.translate(H[0],H[1]).scale(L.k).translate(typeof q=="function"?-q.apply(this,arguments):-q,typeof W=="function"?-W.apply(this,arguments):-W),B,s)},Z,U)};function E(O,q){return q=Math.max(o[0],Math.min(o[1],q)),q===O.k?O:new bo(q,O.x,O.y)}function C(O,q,W){var Z=q[0]-W[0]*O.k,U=q[1]-W[1]*O.k;return Z===O.x&&U===O.y?O:new bo(O.k,Z,U)}function N(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function P(O,q,W,Z){O.on("start.zoom",function(){T(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(Z).end()}).tween("zoom",function(){var U=this,B=arguments,L=T(U,B).event(Z),H=t.apply(U,B),V=W==null?N(H):typeof W=="function"?W.apply(U,B):W,D=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),G=U.__zoom,K=typeof q=="function"?q.apply(U,B):q,J=u(G.invert(V).concat(D/G.k),K.invert(V).concat(D/K.k));return function(ee){if(ee===1)ee=K;else{var ie=J(ee),ce=D/ie[2];ee=new bo(ce,V[0]-ie[0]*ce,V[1]-ie[1]*ce)}L.zoom(null,ee)}})}function T(O,q,W){return!W&&O.__zooming||new j(O,q)}function j(O,q){this.that=O,this.args=q,this.active=0,this.sourceEvent=null,this.extent=t.apply(O,q),this.taps=0}j.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,q){return this.mouse&&O!=="mouse"&&(this.mouse[1]=q.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=q.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=q.invert(this.touch1[0])),this.that.__zoom=q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var q=Pr(this.that).datum();c.call(O,this.that,new Npe(O,{sourceEvent:this.sourceEvent,target:b,type:O,transform:this.that.__zoom,dispatch:c}),q)}};function R(O,...q){if(!e.apply(this,arguments))return;var W=T(this,q).event(O),Z=this.__zoom,U=Math.max(o[0],Math.min(o[1],Z.k*Math.pow(2,r.apply(this,arguments)))),B=mi(O);if(W.wheel)(W.mouse[0][0]!==B[0]||W.mouse[0][1]!==B[1])&&(W.mouse[1]=Z.invert(W.mouse[0]=B)),clearTimeout(W.wheel);else{if(Z.k===U)return;W.mouse=[B,Z.invert(B)],fp(this),W.start()}gc(O),W.wheel=setTimeout(L,x),W.zoom("mouse",n(C(E(Z,U),W.mouse[0],W.mouse[1]),W.extent,s));function L(){W.wheel=null,W.end()}}function I(O,...q){if(p||!e.apply(this,arguments))return;var W=O.currentTarget,Z=T(this,q,!0).event(O),U=Pr(O.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",D,!0),B=mi(O,W),L=O.clientX,H=O.clientY;K4(O.view),Pv(O),Z.mouse=[B,this.__zoom.invert(B)],fp(this),Z.start();function V(G){if(gc(G),!Z.moved){var K=G.clientX-L,J=G.clientY-H;Z.moved=K*K+J*J>v}Z.event(G).zoom("mouse",n(C(Z.that.__zoom,Z.mouse[0]=mi(G,W),Z.mouse[1]),Z.extent,s))}function D(G){U.on("mousemove.zoom mouseup.zoom",null),X4(G.view,Z.moved),gc(G),Z.event(G).end()}}function M(O,...q){if(e.apply(this,arguments)){var W=this.__zoom,Z=mi(O.changedTouches?O.changedTouches[0]:O,this),U=W.invert(Z),B=W.k*(O.shiftKey?.5:2),L=n(C(E(W,B),Z,U),t.apply(this,q),s);gc(O),a>0?Pr(this).transition().duration(a).call(P,L,Z,O):Pr(this).call(b.transform,L,Z,O)}}function z(O,...q){if(e.apply(this,arguments)){var W=O.touches,Z=W.length,U=T(this,q,O.changedTouches.length===Z).event(O),B,L,H,V;for(Pv(O),L=0;L<Z;++L)H=W[L],V=mi(H,this),V=[V,this.__zoom.invert(V),H.identifier],U.touch0?!U.touch1&&U.touch0[2]!==V[2]&&(U.touch1=V,U.taps=0):(U.touch0=V,B=!0,U.taps=1+!!f);f&&(f=clearTimeout(f)),B&&(U.taps<2&&(h=V[0],f=setTimeout(function(){f=null},m)),fp(this),U.start())}}function F(O,...q){if(this.__zooming){var W=T(this,q).event(O),Z=O.changedTouches,U=Z.length,B,L,H,V;for(gc(O),B=0;B<U;++B)L=Z[B],H=mi(L,this),W.touch0&&W.touch0[2]===L.identifier?W.touch0[0]=H:W.touch1&&W.touch1[2]===L.identifier&&(W.touch1[0]=H);if(L=W.that.__zoom,W.touch1){var D=W.touch0[0],G=W.touch0[1],K=W.touch1[0],J=W.touch1[1],ee=(ee=K[0]-D[0])*ee+(ee=K[1]-D[1])*ee,ie=(ie=J[0]-G[0])*ie+(ie=J[1]-G[1])*ie;L=E(L,Math.sqrt(ee/ie)),H=[(D[0]+K[0])/2,(D[1]+K[1])/2],V=[(G[0]+J[0])/2,(G[1]+J[1])/2]}else if(W.touch0)H=W.touch0[0],V=W.touch0[1];else return;W.zoom("touch",n(C(L,H,V),W.extent,s))}}function Y(O,...q){if(this.__zooming){var W=T(this,q).event(O),Z=O.changedTouches,U=Z.length,B,L;for(Pv(O),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),B=0;B<U;++B)L=Z[B],W.touch0&&W.touch0[2]===L.identifier?delete W.touch0:W.touch1&&W.touch1[2]===L.identifier&&delete W.touch1;if(W.touch1&&!W.touch0&&(W.touch0=W.touch1,delete W.touch1),W.touch0)W.touch0[1]=this.__zoom.invert(W.touch0[0]);else if(W.end(),W.taps===2&&(L=mi(L,this),Math.hypot(h[0]-L[0],h[1]-L[1])<k)){var H=Pr(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return b.wheelDelta=function(O){return arguments.length?(r=typeof O=="function"?O:Hh(+O),b):r},b.filter=function(O){return arguments.length?(e=typeof O=="function"?O:Hh(!!O),b):e},b.touchable=function(O){return arguments.length?(i=typeof O=="function"?O:Hh(!!O),b):i},b.extent=function(O){return arguments.length?(t=typeof O=="function"?O:Hh([[+O[0][0],+O[0][1]],[+O[1][0],+O[1][1]]]),b):t},b.scaleExtent=function(O){return arguments.length?(o[0]=+O[0],o[1]=+O[1],b):[o[0],o[1]]},b.translateExtent=function(O){return arguments.length?(s[0][0]=+O[0][0],s[1][0]=+O[1][0],s[0][1]=+O[0][1],s[1][1]=+O[1][1],b):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},b.constrain=function(O){return arguments.length?(n=O,b):n},b.duration=function(O){return arguments.length?(a=+O,b):a},b.interpolate=function(O){return arguments.length?(u=O,b):u},b.on=function(){var O=c.on.apply(c,arguments);return O===c?b:O},b.clickDistance=function(O){return arguments.length?(v=(O=+O)*O,b):Math.sqrt(v)},b.tapDistance=function(O){return arguments.length?(k=+O,b):k},b}const Bo={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID."},Ed=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],p5=["Enter"," ","Escape"];var Xl;(function(e){e.Strict="strict",e.Loose="loose"})(Xl||(Xl={}));var ha;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ha||(ha={}));var Cd;(function(e){e.Partial="partial",e.Full="full"})(Cd||(Cd={}));const m5={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var vs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(vs||(vs={}));var _d;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(_d||(_d={}));var Ue;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ue||(Ue={}));const yA={[Ue.Left]:Ue.Right,[Ue.Right]:Ue.Left,[Ue.Top]:Ue.Bottom,[Ue.Bottom]:Ue.Top};function g5(e){return e===null?null:e?"valid":"invalid"}const y5=e=>"id"in e&&"source"in e&&"target"in e,jpe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Ak=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),cf=(e,t=[0,0])=>{const{width:n,height:r}=Vo(e),i=e.origin??t,o=n*i[0],s=r*i[1];return{x:e.position.x-o,y:e.position.y-s}},Dpe=(e,t={nodeOrigin:[0,0],nodeLookup:void 0})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let s=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(s=o?t.nodeLookup.get(i):Ak(i)?i:t.nodeLookup.get(i.id));const a=s?rm(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return sg(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ag(n)},df=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const i=rm(r);n=sg(n,i)}}),ag(n)},x5=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1)=>{const a={...ff(t,[n,r,i]),width:t.width/i,height:t.height/i},u=[];for(const c of e.values()){const{measured:f,selectable:h=!0,hidden:p=!1}=c;if(s&&!h||p)continue;const m=f.width??c.width??c.initialWidth??null,x=f.height??c.height??c.initialHeight??null,v=Nd(a,Jl(c)),k=(m??0)*(x??0),b=o&&v>0;(!c.internals.handleBounds||b||v>=k||c.dragging)&&u.push(c)}return u},Ope=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function tb(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function nb({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},s){if(e.size===0)return Promise.resolve(!1);const a=df(e),u=Pk(a,t,n,(s==null?void 0:s.minZoom)??i,(s==null?void 0:s.maxZoom)??o,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration}),Promise.resolve(!0)}function v5({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const s=n.get(e),a=s.parentId?n.get(s.parentId):void 0,{x:u,y:c}=a?a.internals.positionAbsolute:{x:0,y:0},f=s.origin??r;let h=i;if(s.extent==="parent"&&!s.expandParent)if(!a)o==null||o("005",Bo.error005());else{const m=a.measured.width,x=a.measured.height;m&&x&&(h=[[u,c],[u+m,c+x]])}else a&&eu(s.extent)&&(h=[[s.extent[0][0]+u,s.extent[0][1]+c],[s.extent[1][0]+u,s.extent[1][1]+c]]);const p=eu(h)?Ea(t,h,s.measured):t;return{position:{x:p.x-u+s.measured.width*f[0],y:p.y-c+s.measured.height*f[1]},positionAbsolute:p}}async function Ipe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(p=>p.id)),s=[];for(const p of n){if(p.deletable===!1)continue;const m=o.has(p.id),x=!m&&p.parentId&&s.find(v=>v.id===p.parentId);(m||x)&&s.push(p)}const a=new Set(t.map(p=>p.id)),u=r.filter(p=>p.deletable!==!1),f=Ope(s,u);for(const p of u)a.has(p.id)&&!f.find(x=>x.id===p.id)&&f.push(p);if(!i)return{edges:f,nodes:s};const h=await i({nodes:s,edges:f});return typeof h=="boolean"?h?{edges:f,nodes:s}:{edges:[],nodes:[]}:h}const Ql=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ea=(e={x:0,y:0},t,n)=>({x:Ql(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Ql(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function w5(e,t,n){const{width:r,height:i}=Vo(n),{x:o,y:s}=n.internals.positionAbsolute;return Ea(e,[[o,s],[o+r,s+i]],t)}const xA=(e,t,n)=>e<t?Ql(Math.abs(e-t),1,t)/t:e>n?-Ql(Math.abs(e-n),1,t)/t:0,b5=(e,t,n=15,r=40)=>{const i=xA(e.x,r,t.width-r)*n,o=xA(e.y,r,t.height-r)*n;return[i,o]},sg=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),rb=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ag=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Jl=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=Ak(e)?e.internals.positionAbsolute:cf(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},rm=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=Ak(e)?e.internals.positionAbsolute:cf(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},k5=(e,t)=>ag(sg(rb(e),rb(t))),Nd=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},vA=e=>vi(e.width)&&vi(e.height)&&vi(e.x)&&vi(e.y),vi=e=>!isNaN(e)&&isFinite(e),Lpe=(e,t)=>{},lg=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ff=({x:e,y:t},[n,r,i],o=!1,s=[1,1])=>{const a={x:(e-n)/i,y:(t-r)/i};return o?lg(a,s):a},S5=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),Pk=(e,t,n,r,i,o)=>{const s=t/(e.width*(1+o)),a=n/(e.height*(1+o)),u=Math.min(s,a),c=Ql(u,r,i),f=e.x+e.width/2,h=e.y+e.height/2,p=t/2-f*c,m=n/2-h*c;return{x:p,y:m,zoom:c}},im=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function eu(e){return e!==void 0&&e!=="parent"}function Vo(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function E5(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function C5(e,t={width:0,height:0},n,r,i){const o={...e},s=r.get(n);if(s){const a=s.origin||i;o.x+=s.internals.positionAbsolute.x-(t.width??0)*a[0],o.y+=s.internals.positionAbsolute.y-(t.height??0)*a[1]}return o}function wA(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function zc(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:s}=No(e),a=ff({x:o-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)},r),{x:u,y:c}=n?lg(a,t):a;return{xSnapped:u,ySnapped:c,...a}}const ug=e=>({width:e.offsetWidth,height:e.offsetHeight}),_5=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Fpe=["INPUT","SELECT","TEXTAREA"];function ib(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Fpe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const N5=e=>"clientX"in e,No=(e,t)=>{var o,s;const n=N5(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},bA=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...ug(s)}})};function T5({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:a}){const u=e*.125+i*.375+s*.375+n*.125,c=t*.125+o*.375+a*.375+r*.125,f=Math.abs(u-e),h=Math.abs(c-t);return[u,c,f,h]}function Yh(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function kA({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Ue.Left:return[t-Yh(t-r,o),n];case Ue.Right:return[t+Yh(r-t,o),n];case Ue.Top:return[t,n-Yh(n-i,o)];case Ue.Bottom:return[t,n+Yh(i-n,o)]}}function A5({sourceX:e,sourceY:t,sourcePosition:n=Ue.Bottom,targetX:r,targetY:i,targetPosition:o=Ue.Top,curvature:s=.25}){const[a,u]=kA({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[c,f]=kA({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[h,p,m,x]=T5({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:a,sourceControlY:u,targetControlX:c,targetControlY:f});return[`M${e},${t} C${a},${u} ${c},${f} ${r},${i}`,h,p,m,x]}function P5({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[o,a,i,s]}function $pe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1}){if(!i)return r;const o=n||t.selected||e.selected,s=Math.max(e.internals.z||0,t.internals.z||0,1e3);return r+(o?s:0)}function zpe({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=sg(rm(e),rm(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const s={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Nd(s,ag(o))>0}const Bpe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Vpe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Wpe=(e,t)=>{if(!e.source||!e.target)return t;let n;return y5(e)?n={...e}:n={...e,id:Bpe(e)},Vpe(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function R5({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,a]=P5({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,a]}const SA={[Ue.Left]:{x:-1,y:0},[Ue.Right]:{x:1,y:0},[Ue.Top]:{x:0,y:-1},[Ue.Bottom]:{x:0,y:1}},Upe=({source:e,sourcePosition:t=Ue.Bottom,target:n})=>t===Ue.Left||t===Ue.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},EA=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Hpe({source:e,sourcePosition:t=Ue.Bottom,target:n,targetPosition:r=Ue.Top,center:i,offset:o}){const s=SA[t],a=SA[r],u={x:e.x+s.x*o,y:e.y+s.y*o},c={x:n.x+a.x*o,y:n.y+a.y*o},f=Upe({source:u,sourcePosition:t,target:c}),h=f.x!==0?"x":"y",p=f[h];let m=[],x,v;const k={x:0,y:0},b={x:0,y:0},[E,C,N,P]=P5({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[h]*a[h]===-1){x=i.x??E,v=i.y??C;const j=[{x,y:u.y},{x,y:c.y}],R=[{x:u.x,y:v},{x:c.x,y:v}];s[h]===p?m=h==="x"?j:R:m=h==="x"?R:j}else{const j=[{x:u.x,y:c.y}],R=[{x:c.x,y:u.y}];if(h==="x"?m=s.x===p?R:j:m=s.y===p?j:R,t===r){const Y=Math.abs(e[h]-n[h]);if(Y<=o){const O=Math.min(o-1,o-Y);s[h]===p?k[h]=(u[h]>e[h]?-1:1)*O:b[h]=(c[h]>n[h]?-1:1)*O}}if(t!==r){const Y=h==="x"?"y":"x",O=s[h]===a[Y],q=u[Y]>c[Y],W=u[Y]<c[Y];(s[h]===1&&(!O&&q||O&&W)||s[h]!==1&&(!O&&W||O&&q))&&(m=h==="x"?j:R)}const I={x:u.x+k.x,y:u.y+k.y},M={x:c.x+b.x,y:c.y+b.y},z=Math.max(Math.abs(I.x-m[0].x),Math.abs(M.x-m[0].x)),F=Math.max(Math.abs(I.y-m[0].y),Math.abs(M.y-m[0].y));z>=F?(x=(I.x+M.x)/2,v=m[0].y):(x=m[0].x,v=(I.y+M.y)/2)}return[[e,{x:u.x+k.x,y:u.y+k.y},...m,{x:c.x+b.x,y:c.y+b.y},n],x,v,N,P]}function Ype(e,t,n,r){const i=Math.min(EA(e,t)/2,EA(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const c=e.x<n.x?-1:1,f=e.y<n.y?1:-1;return`L ${o+i*c},${s}Q ${o},${s} ${o},${s+i*f}`}const a=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${o},${s+i*u}Q ${o},${s} ${o+i*a},${s}`}function ob({sourceX:e,sourceY:t,sourcePosition:n=Ue.Bottom,targetX:r,targetY:i,targetPosition:o=Ue.Top,borderRadius:s=5,centerX:a,centerY:u,offset:c=20}){const[f,h,p,m,x]=Hpe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:a,y:u},offset:c});return[f.reduce((k,b,E)=>{let C="";return E>0&&E<f.length-1?C=Ype(f[E-1],b,f[E+1],s):C=`${E===0?"M":"L"}${b.x} ${b.y}`,k+=C,k},""),h,p,m,x]}function CA(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qpe(e){var h;const{sourceNode:t,targetNode:n}=e;if(!CA(t)||!CA(n))return null;const r=t.internals.handleBounds||_A(t.handles),i=n.internals.handleBounds||_A(n.handles),o=NA((r==null?void 0:r.source)??[],e.sourceHandle),s=NA(e.connectionMode===Xl.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!s)return(h=e.onError)==null||h.call(e,"008",Bo.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(o==null?void 0:o.position)||Ue.Bottom,u=(s==null?void 0:s.position)||Ue.Top,c=Td(t,o,a),f=Td(n,s,u);return{sourceX:c.x,sourceY:c.y,targetX:f.x,targetY:f.y,sourcePosition:a,targetPosition:u}}function _A(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Td(e,t,n=Ue.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:a}=t??Vo(e);if(r)return{x:i+s/2,y:o+a/2};switch((t==null?void 0:t.position)??n){case Ue.Top:return{x:i+s/2,y:o};case Ue.Right:return{x:i+s,y:o+a/2};case Ue.Bottom:return{x:i+s/2,y:o+a};case Ue.Left:return{x:i,y:o+a/2}}}function NA(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function sb(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Gpe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((s,a)=>([a.markerStart||r,a.markerEnd||i].forEach(u=>{if(u&&typeof u=="object"){const c=sb(u,t);o.has(c)||(s.push({id:c,color:u.color||n,...u}),o.add(c))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const Rk={nodeOrigin:[0,0],nodeExtent:Ed,elevateNodesOnSelect:!0,defaults:{}},Zpe={...Rk,checkEquality:!0};function Mk(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Kpe(e,t,n){const r=Mk(Rk,n);for(const i of e.values())if(i.parentId)jk(i,e,t,r);else{const o=cf(i,r.nodeOrigin),s=eu(i.extent)?i.extent:r.nodeExtent,a=Ea(o,s,Vo(i));i.internals.positionAbsolute=a}}function ab(e,t,n,r){var a,u;const i=Mk(Zpe,r),o=new Map(t),s=i!=null&&i.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const c of e){let f=o.get(c.id);if(i.checkEquality&&c===(f==null?void 0:f.internals.userNode))t.set(c.id,f);else{const h=cf(c,i.nodeOrigin),p=eu(c.extent)?c.extent:i.nodeExtent,m=Ea(h,p,Vo(c));f={...i.defaults,...c,measured:{width:(a=c.measured)==null?void 0:a.width,height:(u=c.measured)==null?void 0:u.height},internals:{positionAbsolute:m,handleBounds:c.measured?f==null?void 0:f.internals.handleBounds:void 0,z:M5(c,s),userNode:c}},t.set(c.id,f)}c.parentId&&jk(f,t,n,r)}}function Xpe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function jk(e,t,n,r){const{elevateNodesOnSelect:i,nodeOrigin:o,nodeExtent:s}=Mk(Rk,r),a=e.parentId,u=t.get(a);if(!u){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Xpe(e,n);const c=i?1e3:0,{x:f,y:h,z:p}=Qpe(e,u,o,s,c),{positionAbsolute:m}=e.internals,x=f!==m.x||h!==m.y;(x||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:f,y:h}:m,z:p}})}function M5(e,t){return(vi(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function Qpe(e,t,n,r,i){const{x:o,y:s}=t.internals.positionAbsolute,a=Vo(e),u=cf(e,n),c=eu(e.extent)?Ea(u,e.extent,a):u;let f=Ea({x:o+c.x,y:s+c.y},r,a);e.extent==="parent"&&(f=w5(f,a,t));const h=M5(e,i),p=t.internals.z??0;return{x:f.x,y:f.y,z:p>h?p:h}}function Dk(e,t,n,r=[0,0]){var s;const i=[],o=new Map;for(const a of e){const u=t.get(a.parentId);if(!u)continue;const c=((s=o.get(a.parentId))==null?void 0:s.expandedRect)??Jl(u),f=k5(c,a.rect);o.set(a.parentId,{expandedRect:f,parent:u})}return o.size>0&&o.forEach(({expandedRect:a,parent:u},c)=>{var C;const f=u.internals.positionAbsolute,h=Vo(u),p=u.origin??r,m=a.x<f.x?Math.round(Math.abs(f.x-a.x)):0,x=a.y<f.y?Math.round(Math.abs(f.y-a.y)):0,v=Math.max(h.width,Math.round(a.width)),k=Math.max(h.height,Math.round(a.height)),b=(v-h.width)*p[0],E=(k-h.height)*p[1];(m>0||x>0||b||E)&&(i.push({id:c,type:"position",position:{x:u.position.x-m+b,y:u.position.y-x+E}}),(C=n.get(c))==null||C.forEach(N=>{e.some(P=>P.id===N.id)||i.push({id:N.id,type:"position",position:{x:N.position.x+m,y:N.position.y+x}})})),(h.width<a.width||h.height<a.height||m||x)&&i.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:v+(m?p[0]*m-b:0),height:k+(x?p[1]*x-E:0)}})}),i}function Jpe(e,t,n,r,i,o){const s=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!s)return{changes:[],updatedInternals:a};const u=[],c=window.getComputedStyle(s),{m22:f}=new window.DOMMatrixReadOnly(c.transform),h=[];for(const p of e.values()){const m=t.get(p.id);if(!m)continue;if(m.hidden){t.set(m.id,{...m,internals:{...m.internals,handleBounds:void 0}}),a=!0;continue}const x=ug(p.nodeElement),v=m.measured.width!==x.width||m.measured.height!==x.height;if(!!(x.width&&x.height&&(v||!m.internals.handleBounds||p.force))){const b=p.nodeElement.getBoundingClientRect(),E=eu(m.extent)?m.extent:o;let{positionAbsolute:C}=m.internals;m.parentId&&m.extent==="parent"?C=w5(C,x,t.get(m.parentId)):E&&(C=Ea(C,E,x));const N={...m,measured:x,internals:{...m.internals,positionAbsolute:C,handleBounds:{source:bA("source",p.nodeElement,b,f,m.id),target:bA("target",p.nodeElement,b,f,m.id)}}};t.set(m.id,N),m.parentId&&jk(N,t,n,{nodeOrigin:i}),a=!0,v&&(u.push({id:m.id,type:"dimensions",dimensions:x}),m.expandParent&&m.parentId&&h.push({id:m.id,parentId:m.parentId,rect:Jl(N,i)}))}}if(h.length>0){const p=Dk(h,t,n,i);u.push(...p)}return{changes:u,updatedInternals:a}}async function eme({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}function TA(e,t,n,r,i,o){let s=i;const a=r.get(s)||new Map;r.set(s,a.set(n,t)),s=`${i}-${e}`;const u=r.get(s)||new Map;if(r.set(s,u.set(n,t)),o){s=`${i}-${e}-${o}`;const c=r.get(s)||new Map;r.set(s,c.set(n,t))}}function j5(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:s=null,targetHandle:a=null}=r,u={edgeId:r.id,source:i,target:o,sourceHandle:s,targetHandle:a},c=`${i}-${s}--${o}-${a}`,f=`${o}-${a}--${i}-${s}`;TA("source",u,f,e,i,s),TA("target",u,c,e,o,a),t.set(r.id,r)}}function D5(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:D5(n,t):!1}function AA(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function tme(e,t,n,r){const i=new Map;for(const[o,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!D5(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const a=e.get(o);a&&i.set(o,{id:o,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return i}function Rv({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,a,u;const i=[];for(const[c,f]of t){const h=(s=n.get(c))==null?void 0:s.internals.userNode;h&&i.push({...h,position:f.position,dragging:r})}if(!e)return[i[0],i];const o=(a=n.get(e))==null?void 0:a.internals.userNode;return[o?{...o,position:((u=t.get(e))==null?void 0:u.position)||o.position,dragging:r}:i[0],i]}function nme({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},s=0,a=new Map,u=!1,c={x:0,y:0},f=null,h=!1,p=null,m=!1;function x({noDragClassName:k,handleSelector:b,domNode:E,isSelectable:C,nodeId:N,nodeClickDistance:P=0}){p=Pr(E);function T({x:M,y:z},F){const{nodeLookup:Y,nodeExtent:O,snapGrid:q,snapToGrid:W,nodeOrigin:Z,onNodeDrag:U,onSelectionDrag:B,onError:L,updateNodePositions:H}=t();o={x:M,y:z};let V=!1,D={x:0,y:0,x2:0,y2:0};if(a.size>1&&O){const G=df(a);D=rb(G)}for(const[G,K]of a){if(!Y.has(G))continue;let J={x:M-K.distance.x,y:z-K.distance.y};W&&(J=lg(J,q));let ee=[[O[0][0],O[0][1]],[O[1][0],O[1][1]]];if(a.size>1&&O&&!K.extent){const{positionAbsolute:he}=K.internals,Ee=he.x-D.x+O[0][0],fe=he.x+K.measured.width-D.x2+O[1][0],xe=he.y-D.y+O[0][1],Me=he.y+K.measured.height-D.y2+O[1][1];ee=[[Ee,xe],[fe,Me]]}const{position:ie,positionAbsolute:ce}=v5({nodeId:G,nextPosition:J,nodeLookup:Y,nodeExtent:ee,nodeOrigin:Z,onError:L});V=V||K.position.x!==ie.x||K.position.y!==ie.y,K.position=ie,K.internals.positionAbsolute=ce}if(V&&(H(a,!0),F&&(r||U||!N&&B))){const[G,K]=Rv({nodeId:N,dragItems:a,nodeLookup:Y});r==null||r(F,a,G,K),U==null||U(F,G,K),N||B==null||B(F,K)}}async function j(){if(!f)return;const{transform:M,panBy:z,autoPanSpeed:F}=t(),[Y,O]=b5(c,f,F);(Y!==0||O!==0)&&(o.x=(o.x??0)-Y/M[2],o.y=(o.y??0)-O/M[2],await z({x:Y,y:O})&&T(o,null)),s=requestAnimationFrame(j)}function R(M){var V;const{nodeLookup:z,multiSelectionActive:F,nodesDraggable:Y,transform:O,snapGrid:q,snapToGrid:W,selectNodesOnDrag:Z,onNodeDragStart:U,onSelectionDragStart:B,unselectNodesAndEdges:L}=t();h=!0,(!Z||!C)&&!F&&N&&((V=z.get(N))!=null&&V.selected||L()),C&&Z&&N&&(e==null||e(N));const H=zc(M.sourceEvent,{transform:O,snapGrid:q,snapToGrid:W,containerBounds:f});if(o=H,a=tme(z,Y,H,N),a.size>0&&(n||U||!N&&B)){const[D,G]=Rv({nodeId:N,dragItems:a,nodeLookup:z});n==null||n(M.sourceEvent,a,D,G),U==null||U(M.sourceEvent,D,G),N||B==null||B(M.sourceEvent,G)}}const I=Q4().clickDistance(P).on("start",M=>{const{domNode:z,nodeDragThreshold:F,transform:Y,snapGrid:O,snapToGrid:q}=t();f=(z==null?void 0:z.getBoundingClientRect())||null,m=!1,F===0&&R(M),o=zc(M.sourceEvent,{transform:Y,snapGrid:O,snapToGrid:q,containerBounds:f}),c=No(M.sourceEvent,f)}).on("drag",M=>{const{autoPanOnNodeDrag:z,transform:F,snapGrid:Y,snapToGrid:O,nodeDragThreshold:q,nodeLookup:W}=t(),Z=zc(M.sourceEvent,{transform:F,snapGrid:Y,snapToGrid:O,containerBounds:f});if((M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1||N&&!W.has(N))&&(m=!0),!m){if(!u&&z&&h&&(u=!0,j()),!h){const U=Z.xSnapped-(o.x??0),B=Z.ySnapped-(o.y??0);Math.sqrt(U*U+B*B)>q&&R(M)}(o.x!==Z.xSnapped||o.y!==Z.ySnapped)&&a&&h&&(c=No(M.sourceEvent,f),T(Z,M.sourceEvent))}}).on("end",M=>{if(!(!h||m)&&(u=!1,h=!1,cancelAnimationFrame(s),a.size>0)){const{nodeLookup:z,updateNodePositions:F,onNodeDragStop:Y,onSelectionDragStop:O}=t();if(F(a,!1),i||Y||!N&&O){const[q,W]=Rv({nodeId:N,dragItems:a,nodeLookup:z,dragging:!1});i==null||i(M.sourceEvent,a,q,W),Y==null||Y(M.sourceEvent,q,W),N||O==null||O(M.sourceEvent,W)}}}).filter(M=>{const z=M.target;return!M.button&&(!k||!AA(z,`.${k}`,E))&&(!b||AA(z,b,E))});p.call(I)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function rme(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Nd(i,Jl(o))>0&&r.push(o);return r}const ime=250;function ome(e,t,n,r){var a,u;let i=[],o=1/0;const s=rme(e,n,t+ime);for(const c of s){const f=[...((a=c.internals.handleBounds)==null?void 0:a.source)??[],...((u=c.internals.handleBounds)==null?void 0:u.target)??[]];for(const h of f){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:p,y:m}=Td(c,h,h.position,!0),x=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));x>t||(x<o?(i=[{...h,x:p,y:m}],o=x):x===o&&i.push({...h,x:p,y:m}))}}if(!i.length)return null;if(i.length>1){const c=r.type==="source"?"target":"source";return i.find(f=>f.type===c)??i[0]}return i[0]}function O5(e,t,n,r,i,o=!1){var c,f,h;const s=r.get(e);if(!s)return null;const a=i==="strict"?(c=s.internals.handleBounds)==null?void 0:c[t]:[...((f=s.internals.handleBounds)==null?void 0:f.source)??[],...((h=s.internals.handleBounds)==null?void 0:h.target)??[]],u=(n?a==null?void 0:a.find(p=>p.id===n):a==null?void 0:a[0])??null;return u&&o?{...u,...Td(s,u,u.position,!0)}:u}function I5(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function sme(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const L5=()=>!0;function ame(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:s,domNode:a,nodeLookup:u,lib:c,autoPanOnConnect:f,flowId:h,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:v,onConnectEnd:k,isValidConnection:b=L5,onReconnectEnd:E,updateConnection:C,getTransform:N,getFromHandle:P,autoPanSpeed:T}){const j=_5(e.target);let R=0,I;const{x:M,y:z}=No(e),F=j==null?void 0:j.elementFromPoint(M,z),Y=I5(o,F),O=a==null?void 0:a.getBoundingClientRect();if(!O||!Y)return;const q=O5(i,Y,r,u,t);if(!q)return;let W=No(e,O),Z=!1,U=null,B=!1,L=null;function H(){if(!f||!O)return;const[ce,he]=b5(W,O,T);p({x:ce,y:he}),R=requestAnimationFrame(H)}const V={...q,nodeId:i,type:Y,position:q.position},D=u.get(i),K={inProgress:!0,isValid:null,from:Td(D,V,Ue.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:D,to:W,toHandle:null,toPosition:yA[V.position],toNode:null};C(K);let J=K;x==null||x(e,{nodeId:i,handleId:r,handleType:Y});function ee(ce){if(!P()||!V){ie(ce);return}const he=N();W=No(ce,O),I=ome(ff(W,he,!1,[1,1]),n,u,V),Z||(H(),Z=!0);const Ee=F5(ce,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:s?"target":"source",isValidConnection:b,doc:j,lib:c,flowId:h,nodeLookup:u});L=Ee.handleDomNode,U=Ee.connection,B=sme(!!I,Ee.isValid);const fe={...J,isValid:B,to:I&&B?S5({x:I.x,y:I.y},he):W,toHandle:Ee.toHandle,toPosition:B&&Ee.toHandle?Ee.toHandle.position:yA[V.position],toNode:Ee.toHandle?u.get(Ee.toHandle.nodeId):null};B&&I&&J.toHandle&&fe.toHandle&&J.toHandle.type===fe.toHandle.type&&J.toHandle.nodeId===fe.toHandle.nodeId&&J.toHandle.id===fe.toHandle.id&&J.to.x===fe.to.x&&J.to.y===fe.to.y||(C(fe),J=fe)}function ie(ce){(I||L)&&U&&B&&(v==null||v(U));const{inProgress:he,...Ee}=J,fe={...Ee,toPosition:J.toHandle?J.toPosition:null};k==null||k(ce,fe),o&&(E==null||E(ce,fe)),m(),cancelAnimationFrame(R),Z=!1,B=!1,U=null,L=null,j.removeEventListener("mousemove",ee),j.removeEventListener("mouseup",ie),j.removeEventListener("touchmove",ee),j.removeEventListener("touchend",ie)}j.addEventListener("mousemove",ee),j.addEventListener("mouseup",ie),j.addEventListener("touchmove",ee),j.addEventListener("touchend",ie)}function F5(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:s,lib:a,flowId:u,isValidConnection:c=L5,nodeLookup:f}){const h=o==="target",p=t?s.querySelector(`.${a}-flow__handle[data-id="${u}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:m,y:x}=No(e),v=s.elementFromPoint(m,x),k=v!=null&&v.classList.contains(`${a}-flow__handle`)?v:p,b={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const E=I5(void 0,k),C=k.getAttribute("data-nodeid"),N=k.getAttribute("data-handleid"),P=k.classList.contains("connectable"),T=k.classList.contains("connectableend");if(!C||!E)return b;const j={source:h?C:r,sourceHandle:h?N:i,target:h?r:C,targetHandle:h?i:N};b.connection=j;const I=P&&T&&(n===Xl.Strict?h&&E==="source"||!h&&E==="target":C!==r||N!==i);b.isValid=I&&c(j),b.toHandle=O5(C,E,N,f,n,!1)}return b}const lb={onPointerDown:ame,isValid:F5};function lme({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Pr(e);function o({translateExtent:a,width:u,height:c,zoomStep:f=10,pannable:h=!0,zoomable:p=!0,inversePan:m=!1}){const x=C=>{const N=n();if(C.sourceEvent.type!=="wheel"||!t)return;const P=-C.sourceEvent.deltaY*(C.sourceEvent.deltaMode===1?.05:C.sourceEvent.deltaMode?1:.002)*f,T=N[2]*Math.pow(2,P);t.scaleTo(T)};let v=[0,0];const k=C=>{(C.sourceEvent.type==="mousedown"||C.sourceEvent.type==="touchstart")&&(v=[C.sourceEvent.clientX??C.sourceEvent.touches[0].clientX,C.sourceEvent.clientY??C.sourceEvent.touches[0].clientY])},b=C=>{const N=n();if(C.sourceEvent.type!=="mousemove"&&C.sourceEvent.type!=="touchmove"||!t)return;const P=[C.sourceEvent.clientX??C.sourceEvent.touches[0].clientX,C.sourceEvent.clientY??C.sourceEvent.touches[0].clientY],T=[P[0]-v[0],P[1]-v[1]];v=P;const j=r()*Math.max(N[2],Math.log(N[2]))*(m?-1:1),R={x:N[0]-T[0]*j,y:N[1]-T[1]*j},I=[[0,0],[u,c]];t.setViewportConstrained({x:R.x,y:R.y,zoom:N[2]},I,a)},E=h5().on("start",k).on("zoom",h?b:null).on("zoom.wheel",p?x:null);i.call(E,{})}function s(){i.on("zoom",null)}return{update:o,destroy:s,pointer:mi}}const ume=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,cg=e=>({x:e.x,y:e.y,zoom:e.k}),Mv=({x:e,y:t,zoom:n})=>og.translate(e,t).scale(n),bl=(e,t)=>e.target.closest(`.${t}`),$5=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),jv=(e,t=0,n=()=>{})=>{const r=typeof t=="number"&&t>0;return r||n(),r?e.transition().duration(t).on("end",n):e},z5=e=>{const t=e.ctrlKey&&im()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function cme({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:u,onPanZoomEnd:c}){return f=>{if(bl(f,t))return!1;f.preventDefault(),f.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(f.ctrlKey&&s){const k=mi(f),b=z5(f),E=h*Math.pow(2,b);r.scaleTo(n,E,k,f);return}const p=f.deltaMode===1?20:1;let m=i===ha.Vertical?0:f.deltaX*p,x=i===ha.Horizontal?0:f.deltaY*p;!im()&&f.shiftKey&&i!==ha.Vertical&&(m=f.deltaY*p,x=0),r.translateBy(n,-(m/h)*o,-(x/h)*o,{internal:!0});const v=cg(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a==null||a(f,v)),e.isPanScrolling&&(u==null||u(f,v),e.panScrollTimeout=setTimeout(()=>{c==null||c(f,v),e.isPanScrolling=!1},150))}}function dme({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){if(!t&&r.type==="wheel"&&!r.ctrlKey||bl(r,e))return null;r.preventDefault(),n.call(this,r,i)}}function fme({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,s,a;if((o=r.sourceEvent)!=null&&o.internal)return;const i=cg(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function hme({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var s,a;e.usedRightMouseButton=!!(n&&$5(t,e.mouseButton??0)),(s=o.sourceEvent)!=null&&s.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((a=o.sourceEvent)!=null&&a.internal)&&(i==null||i(o.sourceEvent,cg(o.transform)))}}function pme({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return s=>{var a;if(!((a=s.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,o&&$5(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&o(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),i&&ume(e.prevViewport,s.transform))){const u=cg(s.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(s.sourceEvent,u)},n?150:0)}}}function mme({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:a,noPanClassName:u,lib:c}){return f=>{var x;const h=e||t,p=n&&f.ctrlKey;if(f.button===1&&f.type==="mousedown"&&(bl(f,`${c}-flow__node`)||bl(f,`${c}-flow__edge`)))return!0;if(!r&&!h&&!i&&!o&&!n||s||bl(f,a)&&f.type==="wheel"||bl(f,u)&&(f.type!=="wheel"||i&&f.type==="wheel"&&!e)||!n&&f.ctrlKey&&f.type==="wheel")return!1;if(!n&&f.type==="touchstart"&&((x=f.touches)==null?void 0:x.length)>1)return f.preventDefault(),!1;if(!h&&!i&&!p&&f.type==="wheel"||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const m=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||f.type==="wheel")&&m}}function gme({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:i,viewport:o,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:u,onDraggingChange:c}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),p=h5().clickDistance(!vi(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(i),m=Pr(e).call(p);C({x:o.x,y:o.y,zoom:Ql(o.zoom,t,n)},[[0,0],[h.width,h.height]],i);const x=m.on("wheel.zoom"),v=m.on("dblclick.zoom");p.wheelDelta(z5);function k(F,Y){return m?new Promise(O=>{p==null||p.transform(jv(m,Y==null?void 0:Y.duration,()=>O(!0)),F)}):Promise.resolve(!1)}function b({noWheelClassName:F,noPanClassName:Y,onPaneContextMenu:O,userSelectionActive:q,panOnScroll:W,panOnDrag:Z,panOnScrollMode:U,panOnScrollSpeed:B,preventScrolling:L,zoomOnPinch:H,zoomOnScroll:V,zoomOnDoubleClick:D,zoomActivationKeyPressed:G,lib:K,onTransformChange:J}){q&&!f.isZoomingOrPanning&&E();const ie=W&&!G&&!q?cme({zoomPanValues:f,noWheelClassName:F,d3Selection:m,d3Zoom:p,panOnScrollMode:U,panOnScrollSpeed:B,zoomOnPinch:H,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:u}):dme({noWheelClassName:F,preventScrolling:L,d3ZoomHandler:x});if(m.on("wheel.zoom",ie,{passive:!1}),!q){const he=fme({zoomPanValues:f,onDraggingChange:c,onPanZoomStart:a});p.on("start",he);const Ee=hme({zoomPanValues:f,panOnDrag:Z,onPaneContextMenu:!!O,onPanZoom:s,onTransformChange:J});p.on("zoom",Ee);const fe=pme({zoomPanValues:f,panOnDrag:Z,panOnScroll:W,onPaneContextMenu:O,onPanZoomEnd:u,onDraggingChange:c});p.on("end",fe)}const ce=mme({zoomActivationKeyPressed:G,panOnDrag:Z,zoomOnScroll:V,panOnScroll:W,zoomOnDoubleClick:D,zoomOnPinch:H,userSelectionActive:q,noPanClassName:Y,noWheelClassName:F,lib:K});p.filter(ce),D?m.on("dblclick.zoom",v):m.on("dblclick.zoom",null)}function E(){p.on("zoom",null)}async function C(F,Y,O){const q=Mv(F),W=p==null?void 0:p.constrain()(q,Y,O);return W&&await k(W),new Promise(Z=>Z(W))}async function N(F,Y){const O=Mv(F);return await k(O,Y),new Promise(q=>q(O))}function P(F){if(m){const Y=Mv(F),O=m.property("__zoom");(O.k!==F.zoom||O.x!==F.x||O.y!==F.y)&&(p==null||p.transform(m,Y,null,{sync:!0}))}}function T(){const F=m?f5(m.node()):{x:0,y:0,k:1};return{x:F.x,y:F.y,zoom:F.k}}function j(F,Y){return m?new Promise(O=>{p==null||p.scaleTo(jv(m,Y==null?void 0:Y.duration,()=>O(!0)),F)}):Promise.resolve(!1)}function R(F,Y){return m?new Promise(O=>{p==null||p.scaleBy(jv(m,Y==null?void 0:Y.duration,()=>O(!0)),F)}):Promise.resolve(!1)}function I(F){p==null||p.scaleExtent(F)}function M(F){p==null||p.translateExtent(F)}function z(F){const Y=!vi(F)||F<0?0:F;p==null||p.clickDistance(Y)}return{update:b,destroy:E,setViewport:N,setViewportConstrained:C,getViewport:T,scaleTo:j,scaleBy:R,setScaleExtent:I,setTranslateExtent:M,syncViewport:P,setClickDistance:z}}var Bc;(function(e){e.Line="line",e.Handle="handle"})(Bc||(Bc={}));function yme({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const s=e-t,a=n-r,u=[s>0?1:s<0?-1:0,a>0?1:a<0?-1:0];return s&&i&&(u[0]=u[0]*-1),a&&o&&(u[1]=u[1]*-1),u}function xme(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function hs(e,t){return Math.max(0,t-e)}function ps(e,t){return Math.max(0,e-t)}function qh(e,t,n){return Math.max(0,t-e,e-n)}function PA(e,t){return e?!t:t}function vme(e,t,n,r,i,o,s,a){let{affectsX:u,affectsY:c}=t;const{isHorizontal:f,isVertical:h}=t,p=f&&h,{xSnapped:m,ySnapped:x}=n,{minWidth:v,maxWidth:k,minHeight:b,maxHeight:E}=r,{x:C,y:N,width:P,height:T,aspectRatio:j}=e;let R=Math.floor(f?m-e.pointerX:0),I=Math.floor(h?x-e.pointerY:0);const M=P+(u?-R:R),z=T+(c?-I:I),F=-o[0]*P,Y=-o[1]*T;let O=qh(M,v,k),q=qh(z,b,E);if(s){let U=0,B=0;u&&R<0?U=hs(C+R+F,s[0][0]):!u&&R>0&&(U=ps(C+M+F,s[1][0])),c&&I<0?B=hs(N+I+Y,s[0][1]):!c&&I>0&&(B=ps(N+z+Y,s[1][1])),O=Math.max(O,U),q=Math.max(q,B)}if(a){let U=0,B=0;u&&R>0?U=ps(C+R,a[0][0]):!u&&R<0&&(U=hs(C+M,a[1][0])),c&&I>0?B=ps(N+I,a[0][1]):!c&&I<0&&(B=hs(N+z,a[1][1])),O=Math.max(O,U),q=Math.max(q,B)}if(i){if(f){const U=qh(M/j,b,E)*j;if(O=Math.max(O,U),s){let B=0;!u&&!c||u&&!c&&p?B=ps(N+Y+M/j,s[1][1])*j:B=hs(N+Y+(u?R:-R)/j,s[0][1])*j,O=Math.max(O,B)}if(a){let B=0;!u&&!c||u&&!c&&p?B=hs(N+M/j,a[1][1])*j:B=ps(N+(u?R:-R)/j,a[0][1])*j,O=Math.max(O,B)}}if(h){const U=qh(z*j,v,k)/j;if(q=Math.max(q,U),s){let B=0;!u&&!c||c&&!u&&p?B=ps(C+z*j+F,s[1][0])/j:B=hs(C+(c?I:-I)*j+F,s[0][0])/j,q=Math.max(q,B)}if(a){let B=0;!u&&!c||c&&!u&&p?B=hs(C+z*j,a[1][0])/j:B=ps(C+(c?I:-I)*j,a[0][0])/j,q=Math.max(q,B)}}}I=I+(I<0?q:-q),R=R+(R<0?O:-O),i&&(p?M>z*j?I=(PA(u,c)?-R:R)/j:R=(PA(u,c)?-I:I)*j:f?(I=R/j,c=u):(R=I*j,u=c));const W=u?C+R:C,Z=c?N+I:N;return{width:P+(u?-R:R),height:T+(c?-I:I),x:o[0]*R*(u?-1:1)+W,y:o[1]*I*(c?-1:1)+Z}}const B5={width:0,height:0,x:0,y:0},wme={...B5,pointerX:0,pointerY:0,aspectRatio:1};function bme(e){return[[0,0],[e.measured.width,e.measured.height]]}function kme(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,s=e.measured.height??0,a=n[0]*o,u=n[1]*s;return[[r-a,i-u],[r+o-a,i+s-u]]}function Sme({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=Pr(e);function s({controlPosition:u,boundaries:c,keepAspectRatio:f,onResizeStart:h,onResize:p,onResizeEnd:m,shouldResize:x}){let v={...B5},k={...wme};const b=xme(u);let E,C=null,N=[],P,T,j;const R=Q4().on("start",I=>{const{nodeLookup:M,transform:z,snapGrid:F,snapToGrid:Y,nodeOrigin:O,paneDomNode:q}=n();if(E=M.get(t),!E)return;C=(q==null?void 0:q.getBoundingClientRect())??null;const{xSnapped:W,ySnapped:Z}=zc(I.sourceEvent,{transform:z,snapGrid:F,snapToGrid:Y,containerBounds:C});v={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},k={...v,pointerX:W,pointerY:Z,aspectRatio:v.width/v.height},P=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(P=M.get(E.parentId),T=P&&E.extent==="parent"?bme(P):void 0),N=[],j=void 0;for(const[U,B]of M)if(B.parentId===t&&(N.push({id:U,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const L=kme(B,E,B.origin??O);j?j=[[Math.min(L[0][0],j[0][0]),Math.min(L[0][1],j[0][1])],[Math.max(L[1][0],j[1][0]),Math.max(L[1][1],j[1][1])]]:j=L}h==null||h(I,{...v})}).on("drag",I=>{const{transform:M,snapGrid:z,snapToGrid:F,nodeOrigin:Y}=n(),O=zc(I.sourceEvent,{transform:M,snapGrid:z,snapToGrid:F,containerBounds:C}),q=[];if(!E)return;const{x:W,y:Z,width:U,height:B}=v,L={},H=E.origin??Y,{width:V,height:D,x:G,y:K}=vme(k,b,O,c,f,H,T,j),J=V!==U,ee=D!==B,ie=G!==W&&J,ce=K!==Z&ⅇif(!ie&&!ce&&!J&&!ee)return;if((ie||ce||H[0]===1||H[1]===1)&&(L.x=ie?G:v.x,L.y=ce?K:v.y,v.x=L.x,v.y=L.y,N.length>0)){const xe=G-W,Me=K-Z;for(const Ve of N)Ve.position={x:Ve.position.x-xe+H[0]*(V-U),y:Ve.position.y-Me+H[1]*(D-B)},q.push(Ve)}if((J||ee)&&(L.width=J?V:v.width,L.height=ee?D:v.height,v.width=L.width,v.height=L.height),P&&E.expandParent){const xe=H[0]*(L.width??0);L.x&&L.x<xe&&(v.x=xe,k.x=k.x-(L.x-xe));const Me=H[1]*(L.height??0);L.y&&L.y<Me&&(v.y=Me,k.y=k.y-(L.y-Me))}const he=yme({width:v.width,prevWidth:U,height:v.height,prevHeight:B,affectsX:b.affectsX,affectsY:b.affectsY}),Ee={...v,direction:he};(x==null?void 0:x(I,Ee))!==!1&&(p==null||p(I,Ee),r(L,q))}).on("end",I=>{m==null||m(I,{...v}),i==null||i()});o.call(R)}function a(){o.on(".drag",null)}return{update:s,destroy:a}}var Dv={exports:{}},Ov={};/**
|
|
387
|
+
* @license React
|
|
388
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
389
|
+
*
|
|
390
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
391
|
+
*
|
|
392
|
+
* This source code is licensed under the MIT license found in the
|
|
393
|
+
* LICENSE file in the root directory of this source tree.
|
|
394
|
+
*/var RA;function Eme(){if(RA)return Ov;RA=1;var e=nu(),t=qL();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,u=e.useDebugValue;return Ov.useSyncExternalStoreWithSelector=function(c,f,h,p,m){var x=o(null);if(x.current===null){var v={hasValue:!1,value:null};x.current=v}else v=x.current;x=a(function(){function b(T){if(!E){if(E=!0,C=T,T=p(T),m!==void 0&&v.hasValue){var j=v.value;if(m(j,T))return N=j}return N=T}if(j=N,r(C,T))return j;var R=p(T);return m!==void 0&&m(j,R)?(C=T,j):(C=T,N=R)}var E=!1,C,N,P=h===void 0?null:h;return[function(){return b(f())},P===null?void 0:function(){return b(P())}]},[f,h,p,m]);var k=i(c,x[0],x[1]);return s(function(){v.hasValue=!0,v.value=k},[k]),u(k),k},Ov}var MA;function Cme(){return MA||(MA=1,Dv.exports=Eme()),Dv.exports}var _me=Cme();const Nme=tu(_me),jA=e=>{let t;const n=new Set,r=(f,h)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const m=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,m))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{n.clear()}},c=t=e(r,i,u);return u},Tme=e=>e?jA(e):jA,{useDebugValue:Ame}=ne,{useSyncExternalStoreWithSelector:Pme}=Nme,Rme=e=>e;function V5(e,t=Rme,n){const r=Pme(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ame(r),r}const DA=(e,t)=>{const n=Tme(e),r=(i,o=t)=>V5(n,i,o);return Object.assign(r,n),r},Mme=(e,t)=>e?DA(e,t):DA;function rn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const dg=S.createContext(null),jme=dg.Provider,W5=Bo.error001();function kt(e,t){const n=S.useContext(dg);if(n===null)throw new Error(W5);return V5(n,e,t)}function Gt(){const e=S.useContext(dg);if(e===null)throw new Error(W5);return S.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const OA={display:"none"},Dme={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},U5="react-flow__node-desc",H5="react-flow__edge-desc",Ome="react-flow__aria-live",Ime=e=>e.ariaLiveMessage;function Lme({rfId:e}){const t=kt(Ime);return y.jsx("div",{id:`${Ome}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Dme,children:t})}function Fme({rfId:e,disableKeyboardA11y:t}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{id:`${U5}-${e}`,style:OA,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),y.jsx("div",{id:`${H5}-${e}`,style:OA,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&y.jsx(Lme,{rfId:e})]})}const $me=e=>e.userSelectionActive?"none":"all",Ok=S.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const s=kt($me),a=`${e}`.split("-");return y.jsx("div",{className:mn(["react-flow__panel",n,...a]),style:{...r,pointerEvents:s},ref:o,...i,children:t})});function zme({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:y.jsx(Ok,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:y.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Bme=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Gh=e=>e.id;function Vme(e,t){return rn(e.selectedNodes.map(Gh),t.selectedNodes.map(Gh))&&rn(e.selectedEdges.map(Gh),t.selectedEdges.map(Gh))}function Wme({onSelectionChange:e}){const t=Gt(),{selectedNodes:n,selectedEdges:r}=kt(Bme,Vme);return S.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const Ume=e=>!!e.onSelectionChangeHandlers;function Hme({onSelectionChange:e}){const t=kt(Ume);return e||t?y.jsx(Wme,{onSelectionChange:e}):null}const Y5=[0,0],Yme={x:0,y:0,zoom:1},qme=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance"],IA=[...qme,"rfId"],Gme=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),LA={translateExtent:Ed,nodeOrigin:Y5,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Zme(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:s,reset:a,setDefaultNodesAndEdges:u,setPaneClickDistance:c}=kt(Gme,rn),f=Gt();S.useEffect(()=>(u(e.defaultNodes,e.defaultEdges),()=>{h.current=LA,a()}),[]);const h=S.useRef(LA);return S.useEffect(()=>{for(const p of IA){const m=e[p],x=h.current[p];m!==x&&(typeof e[p]>"u"||(p==="nodes"?t(m):p==="edges"?n(m):p==="minZoom"?r(m):p==="maxZoom"?i(m):p==="translateExtent"?o(m):p==="nodeExtent"?s(m):p==="paneClickDistance"?c(m):p==="fitView"?f.setState({fitViewOnInit:m}):p==="fitViewOptions"?f.setState({fitViewOnInitOptions:m}):f.setState({[p]:m})))}h.current=e},IA.map(p=>e[p])),null}function FA(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Kme(e){var r;const[t,n]=S.useState(e==="system"?null:e);return S.useEffect(()=>{if(e!=="system"){n(e);return}const i=FA(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=FA())!=null&&r.matches?"dark":"light"}const $A=typeof document<"u"?document:null;function Ad(e=null,t={target:$A,actInsideInputWithModifier:!0}){const[n,r]=S.useState(!1),i=S.useRef(!1),o=S.useRef(new Set([])),[s,a]=S.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
|
|
395
|
+
`).replace(`
|
|
396
|
+
|
|
397
|
+
`,`
|
|
398
|
+
+`).split(`
|
|
399
|
+
`)),f=c.reduce((h,p)=>h.concat(...p),[]);return[c,f]}return[[],[]]},[e]);return S.useEffect(()=>{const u=(t==null?void 0:t.target)||$A;if(e!==null){const c=p=>{if(i.current=p.ctrlKey||p.metaKey||p.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&ib(p))return!1;const x=BA(p.code,a);o.current.add(p[x]),zA(s,o.current,!1)&&(p.preventDefault(),r(!0))},f=p=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&ib(p))return!1;const x=BA(p.code,a);zA(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(p[x]),p.key==="Meta"&&o.current.clear(),i.current=!1},h=()=>{o.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",c),u==null||u.addEventListener("keyup",f),window.addEventListener("blur",h),window.addEventListener("contextmenu",h),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",f),window.removeEventListener("blur",h),window.removeEventListener("contextmenu",h)}}},[e,r]),n}function zA(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function BA(e,t){return t.includes(e)?"code":"key"}const Xme=()=>{const e=Gt();return S.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>{const{nodeLookup:n,minZoom:r,maxZoom:i,panZoom:o,domNode:s}=e.getState();if(!o||!s)return Promise.resolve(!1);const a=tb(n,t),{width:u,height:c}=ug(s);return nb({nodes:a,width:u,height:c,minZoom:r,maxZoom:i,panZoom:o},t)},setCenter:async(t,n,r)=>{const{width:i,height:o,maxZoom:s,panZoom:a}=e.getState(),u=typeof(r==null?void 0:r.zoom)<"u"?r.zoom:s,c=i/2-t*u,f=o/2-n*u;return a?(await a.setViewport({x:c,y:f,zoom:u},{duration:r==null?void 0:r.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:s,panZoom:a}=e.getState(),u=Pk(t,r,i,o,s,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(u,{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={snapToGrid:!0})=>{const{transform:r,snapGrid:i,domNode:o}=e.getState();if(!o)return t;const{x:s,y:a}=o.getBoundingClientRect(),u={x:t.x-s,y:t.y-a};return ff(u,r,n.snapToGrid,i)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),s=S5(t,n);return{x:s.x+i,y:s.y+o}}}),[])};function q5(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const s=r.get(o.id);s?s.push(o):r.set(o.id,[o])}for(const o of t){const s=r.get(o.id);if(!s){n.push(o);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const a={...o};for(const u of s)Qme(u,a);n.push(a)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function Qme(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function G5(e,t){return q5(e,t)}function Z5(e,t){return q5(e,t)}function ia(e,t){return{id:e,type:"select",selected:t}}function kl(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const s=t.has(i);!(o.selected===void 0&&!s)&&o.selected!==s&&(n&&(o.selected=s),r.push(ia(o.id,s)))}return r}function VA({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,s]of e.entries()){const a=t.get(s.id),u=((i=a==null?void 0:a.internals)==null?void 0:i.userNode)??a;u!==void 0&&u!==s&&n.push({id:s.id,item:s,type:"replace"}),u===void 0&&n.push({item:s,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function WA(e){return{id:e.id,type:"remove"}}const UA=e=>jpe(e),Jme=e=>y5(e);function K5(e){return S.forwardRef(e)}const ege=typeof window<"u"?S.useLayoutEffect:S.useEffect;function HA(e){const[t,n]=S.useState(BigInt(0)),[r]=S.useState(()=>tge(()=>n(i=>i+BigInt(1))));return ege(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function tge(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const X5=S.createContext(null);function nge({children:e}){const t=Gt(),n=S.useCallback(a=>{const{nodes:u=[],setNodes:c,hasDefaultNodes:f,onNodesChange:h,nodeLookup:p}=t.getState();let m=u;for(const x of a)m=typeof x=="function"?x(m):x;f?c(m):h&&h(VA({items:m,lookup:p}))},[]),r=HA(n),i=S.useCallback(a=>{const{edges:u=[],setEdges:c,hasDefaultEdges:f,onEdgesChange:h,edgeLookup:p}=t.getState();let m=u;for(const x of a)m=typeof x=="function"?x(m):x;f?c(m):h&&h(VA({items:m,lookup:p}))},[]),o=HA(i),s=S.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return y.jsx(X5.Provider,{value:s,children:e})}function rge(){const e=S.useContext(X5);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const ige=e=>!!e.panZoom;function Ik(){const e=Xme(),t=Gt(),n=rge(),r=kt(ige),i=S.useMemo(()=>{const o=h=>t.getState().nodeLookup.get(h),s=h=>{n.nodeQueue.push(h)},a=h=>{n.edgeQueue.push(h)},u=h=>{var b,E;const{nodeLookup:p,nodeOrigin:m}=t.getState(),x=UA(h)?h:p.get(h.id),v=x.parentId?C5(x.position,x.measured,x.parentId,p,m):x.position,k={...x,position:v,width:((b=x.measured)==null?void 0:b.width)??x.width,height:((E=x.measured)==null?void 0:E.height)??x.height};return Jl(k)},c=(h,p,m={replace:!1})=>{s(x=>x.map(v=>{if(v.id===h){const k=typeof p=="function"?p(v):p;return m.replace&&UA(k)?k:{...v,...k}}return v}))},f=(h,p,m={replace:!1})=>{a(x=>x.map(v=>{if(v.id===h){const k=typeof p=="function"?p(v):p;return m.replace&&Jme(k)?k:{...v,...k}}return v}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var p;return(p=o(h))==null?void 0:p.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(p=>({...p}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:s,setEdges:a,addNodes:h=>{const p=Array.isArray(h)?h:[h];n.nodeQueue.push(m=>[...m,...p])},addEdges:h=>{const p=Array.isArray(h)?h:[h];n.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:h=[],edges:p=[],transform:m}=t.getState(),[x,v,k]=m;return{nodes:h.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x,y:v,zoom:k}}},deleteElements:async({nodes:h=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:v,onEdgesDelete:k,triggerNodeChanges:b,triggerEdgeChanges:E,onDelete:C,onBeforeDelete:N}=t.getState(),{nodes:P,edges:T}=await Ipe({nodesToRemove:h,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:N}),j=T.length>0,R=P.length>0;if(j){const I=T.map(WA);k==null||k(T),E(I)}if(R){const I=P.map(WA);v==null||v(P),b(I)}return(R||j)&&(C==null||C({nodes:P,edges:T})),{deletedNodes:P,deletedEdges:T}},getIntersectingNodes:(h,p=!0,m)=>{const x=vA(h),v=x?h:u(h),k=m!==void 0;return v?(m||t.getState().nodes).filter(b=>{const E=t.getState().nodeLookup.get(b.id);if(E&&!x&&(b.id===h.id||!E.internals.positionAbsolute))return!1;const C=Jl(k?b:E),N=Nd(C,v);return p&&N>0||N>=v.width*v.height}):[]},isNodeIntersecting:(h,p,m=!0)=>{const v=vA(h)?h:u(h);if(!v)return!1;const k=Nd(v,p);return m&&k>0||k>=v.width*v.height},updateNode:c,updateNodeData:(h,p,m={replace:!1})=>{c(h,x=>{const v=typeof p=="function"?p(x):p;return m.replace?{...x,data:v}:{...x,data:{...x.data,...v}}},m)},updateEdge:f,updateEdgeData:(h,p,m={replace:!1})=>{f(h,x=>{const v=typeof p=="function"?p(x):p;return m.replace?{...x,data:v}:{...x,data:{...x.data,...v}}},m)},getNodesBounds:h=>{const{nodeLookup:p,nodeOrigin:m}=t.getState();return Dpe(h,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:h,id:p,nodeId:m})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${m}-${h}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:h,handleId:p,nodeId:m})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${m}${h?p?`-${h}-${p}`:`-${h}`:""}`))==null?void 0:x.values())??[])}}},[]);return S.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const YA=e=>e.selected,oge={actInsideInputWithModifier:!1},sge=typeof window<"u"?window:void 0;function age({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Gt(),{deleteElements:r}=Ik(),i=Ad(e,oge),o=Ad(t,{target:sge});S.useEffect(()=>{if(i){const{edges:s,nodes:a}=n.getState();r({nodes:a.filter(YA),edges:s.filter(YA)}),n.setState({nodesSelectionActive:!1})}},[i]),S.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function lge(e){const t=Gt();S.useEffect(()=>{const n=()=>{var i,o;if(!e.current)return!1;const r=ug(e.current);(r.height===0||r.width===0)&&((o=(i=t.getState()).onError)==null||o.call(i,"004",Bo.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const fg={position:"absolute",width:"100%",height:"100%",top:0,left:0},uge=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function cge({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=ha.Free,zoomOnDoubleClick:s=!0,panOnDrag:a=!0,defaultViewport:u,translateExtent:c,minZoom:f,maxZoom:h,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:v,noPanClassName:k,onViewportChange:b,isControlledViewport:E,paneClickDistance:C}){const N=Gt(),P=S.useRef(null),{userSelectionActive:T,lib:j}=kt(uge,rn),R=Ad(p),I=S.useRef();lge(P);const M=S.useCallback(z=>{b==null||b({x:z[0],y:z[1],zoom:z[2]}),E||N.setState({transform:z})},[b,E]);return S.useEffect(()=>{if(P.current){I.current=gme({domNode:P.current,minZoom:f,maxZoom:h,translateExtent:c,viewport:u,paneClickDistance:C,onDraggingChange:O=>N.setState({paneDragging:O}),onPanZoomStart:(O,q)=>{const{onViewportChangeStart:W,onMoveStart:Z}=N.getState();Z==null||Z(O,q),W==null||W(q)},onPanZoom:(O,q)=>{const{onViewportChange:W,onMove:Z}=N.getState();Z==null||Z(O,q),W==null||W(q)},onPanZoomEnd:(O,q)=>{const{onViewportChangeEnd:W,onMoveEnd:Z}=N.getState();Z==null||Z(O,q),W==null||W(q)}});const{x:z,y:F,zoom:Y}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[z,F,Y],domNode:P.current.closest(".react-flow")}),()=>{var O;(O=I.current)==null||O.destroy()}}},[]),S.useEffect(()=>{var z;(z=I.current)==null||z.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:a,zoomActivationKeyPressed:R,preventScrolling:m,noPanClassName:k,userSelectionActive:T,noWheelClassName:v,lib:j,onTransformChange:M})},[e,t,n,r,i,o,s,a,R,m,k,T,v,j,M]),y.jsx("div",{className:"react-flow__renderer",ref:P,style:fg,children:x})}const dge=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function fge(){const{userSelectionActive:e,userSelectionRect:t}=kt(dge,rn);return e&&t?y.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Iv=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},hge=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging});function pge({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Cd.Full,panOnDrag:r,selectionOnDrag:i,onSelectionStart:o,onSelectionEnd:s,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:f,onPaneMouseMove:h,onPaneMouseLeave:p,children:m}){const x=Gt(),{userSelectionActive:v,elementsSelectable:k,dragging:b}=kt(hge,rn),E=k&&(e||v),C=S.useRef(null),N=S.useRef(),P=S.useRef(new Set),T=S.useRef(new Set),j=S.useRef(!1),R=S.useRef(!1),I=W=>{if(j.current){j.current=!1;return}a==null||a(W),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},M=W=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){W.preventDefault();return}u==null||u(W)},z=c?W=>c(W):void 0,F=W=>{var H,V;const{resetSelectedElements:Z,domNode:U}=x.getState();if(N.current=U==null?void 0:U.getBoundingClientRect(),!k||!e||W.button!==0||W.target!==C.current||!N.current)return;(V=(H=W.target)==null?void 0:H.setPointerCapture)==null||V.call(H,W.pointerId),R.current=!0,j.current=!1;const{x:B,y:L}=No(W.nativeEvent,N.current);Z(),x.setState({userSelectionRect:{width:0,height:0,startX:B,startY:L,x:B,y:L}}),o==null||o(W)},Y=W=>{const{userSelectionRect:Z,transform:U,nodeLookup:B,edgeLookup:L,connectionLookup:H,triggerNodeChanges:V,triggerEdgeChanges:D,defaultEdgeOptions:G}=x.getState();if(!N.current||!Z)return;j.current=!0;const{x:K,y:J}=No(W.nativeEvent,N.current),{startX:ee,startY:ie}=Z,ce={startX:ee,startY:ie,x:K<ee?K:ee,y:J<ie?J:ie,width:Math.abs(K-ee),height:Math.abs(J-ie)},he=P.current,Ee=T.current;P.current=new Set(x5(B,ce,U,n===Cd.Partial,!0).map(xe=>xe.id)),T.current=new Set;const fe=(G==null?void 0:G.selectable)??!0;for(const xe of P.current){const Me=H.get(xe);if(Me)for(const{edgeId:Ve}of Me.values()){const ot=L.get(Ve);ot&&(ot.selectable??fe)&&T.current.add(Ve)}}if(!wA(he,P.current)){const xe=kl(B,P.current,!0);V(xe)}if(!wA(Ee,T.current)){const xe=kl(L,T.current);D(xe)}x.setState({userSelectionRect:ce,userSelectionActive:!0,nodesSelectionActive:!1})},O=W=>{var U,B;if(W.button!==0||!R.current)return;(B=(U=W.target)==null?void 0:U.releasePointerCapture)==null||B.call(U,W.pointerId);const{userSelectionRect:Z}=x.getState();!v&&Z&&W.target===C.current&&(I==null||I(W)),x.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:P.current.size>0}),s==null||s(W),(t||i)&&(j.current=!1),R.current=!1},q=r===!0||Array.isArray(r)&&r.includes(0);return y.jsxs("div",{className:mn(["react-flow__pane",{draggable:q,dragging:b,selection:e}]),onClick:E?void 0:Iv(I,C),onContextMenu:Iv(M,C),onWheel:Iv(z,C),onPointerEnter:E?void 0:f,onPointerDown:E?F:h,onPointerMove:E?Y:h,onPointerUp:E?O:void 0,onPointerLeave:p,ref:C,style:fg,children:[m,y.jsx(fge,{})]})}function ub({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:a,onError:u}=t.getState(),c=a.get(e);if(!c){u==null||u("012",Bo.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&s)&&(o({nodes:[c],edges:[]}),requestAnimationFrame(()=>{var f;return(f=r==null?void 0:r.current)==null?void 0:f.blur()})):i([e])}function Q5({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:s}){const a=Gt(),[u,c]=S.useState(!1),f=S.useRef();return S.useEffect(()=>{f.current=nme({getStoreItems:()=>a.getState(),onNodeMouseDown:h=>{ub({id:h,store:a,nodeRef:e})},onDragStart:()=>{c(!0)},onDragStop:()=>{c(!1)}})},[]),S.useEffect(()=>{var h,p;if(t)(h=f.current)==null||h.destroy();else if(e.current)return(p=f.current)==null||p.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:s}),()=>{var m;(m=f.current)==null||m.destroy()}},[n,r,t,o,e,i]),u}const mge=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function J5(){const e=Gt();return S.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:s,onError:a,updateNodePositions:u,nodeLookup:c,nodeOrigin:f}=e.getState(),h=new Map,p=mge(s),m=i?o[0]:5,x=i?o[1]:5,v=n.direction.x*m*n.factor,k=n.direction.y*x*n.factor;for(const[,b]of c){if(!p(b))continue;let E={x:b.internals.positionAbsolute.x+v,y:b.internals.positionAbsolute.y+k};i&&(E=lg(E,o));const{position:C,positionAbsolute:N}=v5({nodeId:b.id,nextPosition:E,nodeLookup:c,nodeExtent:r,nodeOrigin:f,onError:a});b.position=C,b.internals.positionAbsolute=N,h.set(b.id,b)}u(h)},[])}const Lk=S.createContext(null),gge=Lk.Provider;Lk.Consumer;const e3=()=>S.useContext(Lk),yge=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),xge=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:s}=r,{fromHandle:a,toHandle:u,isValid:c}=s,f=(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:f,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===Xl.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,valid:f&&c}};function vge({type:e="source",position:t=Ue.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:a,children:u,className:c,onMouseDown:f,onTouchStart:h,...p},m){var O,q;const x=s||null,v=e==="target",k=Gt(),b=e3(),{connectOnClick:E,noPanClassName:C,rfId:N}=kt(yge,rn),{connectingFrom:P,connectingTo:T,clickConnecting:j,isPossibleEndHandle:R,connectionInProcess:I,valid:M}=kt(xge(b,x,e),rn);b||(q=(O=k.getState()).onError)==null||q.call(O,"010",Bo.error010());const z=W=>{const{defaultEdgeOptions:Z,onConnect:U,hasDefaultEdges:B}=k.getState(),L={...Z,...W};if(B){const{edges:H,setEdges:V}=k.getState();V(Wpe(L,H))}U==null||U(L),a==null||a(L)},F=W=>{if(!b)return;const Z=N5(W.nativeEvent);if(i&&(Z&&W.button===0||!Z)){const U=k.getState();lb.onPointerDown(W.nativeEvent,{autoPanOnConnect:U.autoPanOnConnect,connectionMode:U.connectionMode,connectionRadius:U.connectionRadius,domNode:U.domNode,nodeLookup:U.nodeLookup,lib:U.lib,isTarget:v,handleId:x,nodeId:b,flowId:U.rfId,panBy:U.panBy,cancelConnection:U.cancelConnection,onConnectStart:U.onConnectStart,onConnectEnd:U.onConnectEnd,updateConnection:U.updateConnection,onConnect:z,isValidConnection:n||U.isValidConnection,getTransform:()=>k.getState().transform,getFromHandle:()=>k.getState().connection.fromHandle,autoPanSpeed:U.autoPanSpeed})}Z?f==null||f(W):h==null||h(W)},Y=W=>{const{onClickConnectStart:Z,onClickConnectEnd:U,connectionClickStartHandle:B,connectionMode:L,isValidConnection:H,lib:V,rfId:D,nodeLookup:G,connection:K}=k.getState();if(!b||!B&&!i)return;if(!B){Z==null||Z(W.nativeEvent,{nodeId:b,handleId:x,handleType:e}),k.setState({connectionClickStartHandle:{nodeId:b,type:e,id:x}});return}const J=_5(W.target),ee=n||H,{connection:ie,isValid:ce}=lb.isValid(W.nativeEvent,{handle:{nodeId:b,id:x,type:e},connectionMode:L,fromNodeId:B.nodeId,fromHandleId:B.id||null,fromType:B.type,isValidConnection:ee,flowId:D,doc:J,lib:V,nodeLookup:G});ce&&ie&&z(ie);const he=structuredClone(K);delete he.inProgress,he.toPosition=he.toHandle?he.toHandle.position:null,U==null||U(W,he),k.setState({connectionClickStartHandle:null})};return y.jsx("div",{"data-handleid":x,"data-nodeid":b,"data-handlepos":t,"data-id":`${N}-${b}-${x}-${e}`,className:mn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",C,c,{source:!v,target:v,connectable:r,connectablestart:i,connectableend:o,clickconnecting:j,connectingfrom:P,connectingto:T,valid:M,connectionindicator:r&&(!I||R)&&(I?o:i)}]),onMouseDown:F,onTouchStart:F,onClick:E?Y:void 0,ref:m,...p,children:u})}const Ms=S.memo(K5(vge));function wge({data:e,isConnectable:t,sourcePosition:n=Ue.Bottom}){return y.jsxs(y.Fragment,{children:[e==null?void 0:e.label,y.jsx(Ms,{type:"source",position:n,isConnectable:t})]})}function bge({data:e,isConnectable:t,targetPosition:n=Ue.Top,sourcePosition:r=Ue.Bottom}){return y.jsxs(y.Fragment,{children:[y.jsx(Ms,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,y.jsx(Ms,{type:"source",position:r,isConnectable:t})]})}function kge(){return null}function Sge({data:e,isConnectable:t,targetPosition:n=Ue.Top}){return y.jsxs(y.Fragment,{children:[y.jsx(Ms,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const om={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},qA={input:wge,default:bge,output:Sge,group:kge};function Ege(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const Cge=e=>{const{width:t,height:n,x:r,y:i}=df(e.nodeLookup,{filter:o=>!!o.selected});return{width:vi(t)?t:null,height:vi(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function _ge({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Gt(),{width:i,height:o,transformString:s,userSelectionActive:a}=kt(Cge,rn),u=J5(),c=S.useRef(null);if(S.useEffect(()=>{var p;n||(p=c.current)==null||p.focus({preventScroll:!0})},[n]),Q5({nodeRef:c}),a||!i||!o)return null;const f=e?p=>{const m=r.getState().nodes.filter(x=>x.selected);e(p,m)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(om,p.key)&&(p.preventDefault(),u({direction:om[p.key],factor:p.shiftKey?4:1}))};return y.jsx("div",{className:mn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:y.jsx("div",{ref:c,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:o}})})}const GA=typeof window<"u"?window:void 0,Nge=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function t3({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,paneClickDistance:a,deleteKeyCode:u,selectionKeyCode:c,selectionOnDrag:f,selectionMode:h,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:v,zoomActivationKeyCode:k,elementsSelectable:b,zoomOnScroll:E,zoomOnPinch:C,panOnScroll:N,panOnScrollSpeed:P,panOnScrollMode:T,zoomOnDoubleClick:j,panOnDrag:R,defaultViewport:I,translateExtent:M,minZoom:z,maxZoom:F,preventScrolling:Y,onSelectionContextMenu:O,noWheelClassName:q,noPanClassName:W,disableKeyboardA11y:Z,onViewportChange:U,isControlledViewport:B}){const{nodesSelectionActive:L,userSelectionActive:H}=kt(Nge),V=Ad(c,{target:GA}),D=Ad(v,{target:GA}),G=D||R,K=D||N,J=f&&G!==!0,ee=V||H||J;return age({deleteKeyCode:u,multiSelectionKeyCode:x}),y.jsx(cge,{onPaneContextMenu:o,elementsSelectable:b,zoomOnScroll:E,zoomOnPinch:C,panOnScroll:K,panOnScrollSpeed:P,panOnScrollMode:T,zoomOnDoubleClick:j,panOnDrag:!V&&G,defaultViewport:I,translateExtent:M,minZoom:z,maxZoom:F,zoomActivationKeyCode:k,preventScrolling:Y,noWheelClassName:q,noPanClassName:W,onViewportChange:U,isControlledViewport:B,paneClickDistance:a,children:y.jsxs(pge,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:G,isSelecting:!!ee,selectionMode:h,selectionKeyPressed:V,selectionOnDrag:J,children:[e,L&&y.jsx(_ge,{onSelectionContextMenu:O,noPanClassName:W,disableKeyboardA11y:Z})]})})}t3.displayName="FlowRenderer";const Tge=S.memo(t3),Age=e=>t=>e?x5(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Pge(e){return kt(S.useCallback(Age(e),[e]),rn)}const Rge=e=>e.updateNodeInternals;function Mge(){const e=kt(Rge),[t]=S.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return S.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function jge({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Gt(),o=S.useRef(null),s=S.useRef(null),a=S.useRef(e.sourcePosition),u=S.useRef(e.targetPosition),c=S.useRef(t),f=n&&!!e.internals.handleBounds;return S.useEffect(()=>{o.current&&!e.hidden&&(!f||s.current!==o.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(o.current),s.current=o.current)},[f,e.hidden]),S.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),S.useEffect(()=>{if(o.current){const h=c.current!==t,p=a.current!==e.sourcePosition,m=u.current!==e.targetPosition;(h||p||m)&&(c.current=t,a.current=e.sourcePosition,u.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function Dge({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:s,nodesDraggable:a,elementsSelectable:u,nodesConnectable:c,nodesFocusable:f,resizeObserver:h,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:v,nodeTypes:k,nodeExtent:b,nodeClickDistance:E,onError:C}){const{node:N,internals:P,isParent:T}=kt(ie=>{const ce=ie.nodeLookup.get(e),he=ie.parentLookup.has(e);return{node:ce,internals:ce.internals,isParent:he}},rn);let j=N.type||"default",R=(k==null?void 0:k[j])||qA[j];R===void 0&&(C==null||C("003",Bo.error003(j)),j="default",R=qA.default);const I=!!(N.draggable||a&&typeof N.draggable>"u"),M=!!(N.selectable||u&&typeof N.selectable>"u"),z=!!(N.connectable||c&&typeof N.connectable>"u"),F=!!(N.focusable||f&&typeof N.focusable>"u"),Y=Gt(),O=E5(N),q=jge({node:N,nodeType:j,hasDimensions:O,resizeObserver:h}),W=Q5({nodeRef:q,disabled:N.hidden||!I,noDragClassName:p,handleSelector:N.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:E}),Z=J5();if(N.hidden)return null;const U=Vo(N),B=Ege(N),L=M||I||t||n||r||i,H=n?ie=>n(ie,{...P.userNode}):void 0,V=r?ie=>r(ie,{...P.userNode}):void 0,D=i?ie=>i(ie,{...P.userNode}):void 0,G=o?ie=>o(ie,{...P.userNode}):void 0,K=s?ie=>s(ie,{...P.userNode}):void 0,J=ie=>{const{selectNodesOnDrag:ce,nodeDragThreshold:he}=Y.getState();M&&(!ce||!I||he>0)&&ub({id:e,store:Y,nodeRef:q}),t&&t(ie,{...P.userNode})},ee=ie=>{if(!(ib(ie.nativeEvent)||x))if(p5.includes(ie.key)&&M){const ce=ie.key==="Escape";ub({id:e,store:Y,unselect:ce,nodeRef:q})}else I&&N.selected&&Object.prototype.hasOwnProperty.call(om,ie.key)&&(ie.preventDefault(),Y.setState({ariaLiveMessage:`Moved selected node ${ie.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~P.positionAbsolute.x}, y: ${~~P.positionAbsolute.y}`}),Z({direction:om[ie.key],factor:ie.shiftKey?4:1}))};return y.jsx("div",{className:mn(["react-flow__node",`react-flow__node-${j}`,{[m]:I},N.className,{selected:N.selected,selectable:M,parent:T,draggable:I,dragging:W}]),ref:q,style:{zIndex:P.z,transform:`translate(${P.positionAbsolute.x}px,${P.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:O?"visible":"hidden",...N.style,...B},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:H,onMouseMove:V,onMouseLeave:D,onContextMenu:G,onClick:J,onDoubleClick:K,onKeyDown:F?ee:void 0,tabIndex:F?0:void 0,role:F?"button":void 0,"aria-describedby":x?void 0:`${U5}-${v}`,"aria-label":N.ariaLabel,children:y.jsx(gge,{value:e,children:y.jsx(R,{id:e,data:N.data,type:j,positionAbsoluteX:P.positionAbsolute.x,positionAbsoluteY:P.positionAbsolute.y,selected:N.selected??!1,selectable:M,draggable:I,deletable:N.deletable??!0,isConnectable:z,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:W,dragHandle:N.dragHandle,zIndex:P.z,parentId:N.parentId,...U})})})}const Oge=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function n3(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=kt(Oge,rn),s=Pge(e.onlyRenderVisibleElements),a=Mge();return y.jsx("div",{className:"react-flow__nodes",style:fg,children:s.map(u=>y.jsx(Dge,{id:u,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:o},u))})}n3.displayName="NodeRenderer";const Ige=S.memo(n3);function Lge(e){return kt(S.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),s=n.nodeLookup.get(i.target);o&&s&&zpe({sourceNode:o,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),rn)}const Fge=({color:e="none",strokeWidth:t=1})=>y.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),$ge=({color:e="none",strokeWidth:t=1})=>y.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),ZA={[_d.Arrow]:Fge,[_d.ArrowClosed]:$ge};function zge(e){const t=Gt();return S.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(ZA,e)?ZA[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",Bo.error009(e)),null)},[e])}const Bge=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const u=zge(t);return u?y.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:a,refX:"0",refY:"0",children:y.jsx(u,{color:n,strokeWidth:s})}):null},r3=({defaultColor:e,rfId:t})=>{const n=kt(o=>o.edges),r=kt(o=>o.defaultEdgeOptions),i=S.useMemo(()=>Gpe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?y.jsx("svg",{className:"react-flow__marker",children:y.jsx("defs",{children:i.map(o=>y.jsx(Bge,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};r3.displayName="MarkerDefinitions";var Vge=S.memo(r3);function i3({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:u,className:c,...f}){const[h,p]=S.useState({x:1,y:0,width:0,height:0}),m=mn(["react-flow__edge-textwrapper",c]),x=S.useRef(null);return S.useEffect(()=>{if(x.current){const v=x.current.getBBox();p({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),typeof n>"u"||!n?null:y.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:m,visibility:h.width?"visible":"hidden",...f,children:[i&&y.jsx("rect",{width:h.width+2*s[0],x:-s[0],y:-s[1],height:h.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:a,ry:a}),y.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:x,style:r,children:n}),u]})}i3.displayName="EdgeText";const Wge=S.memo(i3);function hg({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,interactionWidth:c=20,...f}){return y.jsxs(y.Fragment,{children:[y.jsx("path",{...f,d:e,fill:"none",className:mn(["react-flow__edge-path",f.className])}),c&&y.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:c,className:"react-flow__edge-interaction"}),r&&vi(t)&&vi(n)?y.jsx(Wge,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u}):null]})}function KA({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ue.Left||e===Ue.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function o3({sourceX:e,sourceY:t,sourcePosition:n=Ue.Bottom,targetX:r,targetY:i,targetPosition:o=Ue.Top}){const[s,a]=KA({pos:n,x1:e,y1:t,x2:r,y2:i}),[u,c]=KA({pos:o,x1:r,y1:i,x2:e,y2:t}),[f,h,p,m]=T5({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${a} ${u},${c} ${r},${i}`,f,h,p,m]}function s3(e){return S.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=Ue.Bottom,targetPosition:a=Ue.Top,label:u,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:v,markerStart:k,interactionWidth:b})=>{const[E,C,N]=o3({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:a}),P=e.isInternal?void 0:t;return y.jsx(hg,{id:P,path:E,labelX:C,labelY:N,label:u,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:v,markerStart:k,interactionWidth:b})})}const Uge=s3({isInternal:!1}),a3=s3({isInternal:!0});Uge.displayName="SimpleBezierEdge";a3.displayName="SimpleBezierEdgeInternal";function l3(e){return S.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:p,sourcePosition:m=Ue.Bottom,targetPosition:x=Ue.Top,markerEnd:v,markerStart:k,pathOptions:b,interactionWidth:E})=>{const[C,N,P]=ob({sourceX:n,sourceY:r,sourcePosition:m,targetX:i,targetY:o,targetPosition:x,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset}),T=e.isInternal?void 0:t;return y.jsx(hg,{id:T,path:C,labelX:N,labelY:P,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:p,markerEnd:v,markerStart:k,interactionWidth:E})})}const u3=l3({isInternal:!1}),c3=l3({isInternal:!0});u3.displayName="SmoothStepEdge";c3.displayName="SmoothStepEdgeInternal";function d3(e){return S.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return y.jsx(u3,{...n,id:r,pathOptions:S.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const Hge=d3({isInternal:!1}),f3=d3({isInternal:!0});Hge.displayName="StepEdge";f3.displayName="StepEdgeInternal";function h3(e){return S.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:p,markerEnd:m,markerStart:x,interactionWidth:v})=>{const[k,b,E]=R5({sourceX:n,sourceY:r,targetX:i,targetY:o}),C=e.isInternal?void 0:t;return y.jsx(hg,{id:C,path:k,labelX:b,labelY:E,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:p,markerEnd:m,markerStart:x,interactionWidth:v})})}const Yge=h3({isInternal:!1}),p3=h3({isInternal:!0});Yge.displayName="StraightEdge";p3.displayName="StraightEdgeInternal";function m3(e){return S.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=Ue.Bottom,targetPosition:a=Ue.Top,label:u,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:v,markerStart:k,pathOptions:b,interactionWidth:E})=>{const[C,N,P]=A5({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:a,curvature:b==null?void 0:b.curvature}),T=e.isInternal?void 0:t;return y.jsx(hg,{id:T,path:C,labelX:N,labelY:P,label:u,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:v,markerStart:k,interactionWidth:E})})}const qge=m3({isInternal:!1}),g3=m3({isInternal:!0});qge.displayName="BezierEdge";g3.displayName="BezierEdgeInternal";const XA={default:g3,straight:p3,step:f3,smoothstep:c3,simplebezier:a3},QA={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Gge=(e,t,n)=>n===Ue.Left?e-t:n===Ue.Right?e+t:e,Zge=(e,t,n)=>n===Ue.Top?e-t:n===Ue.Bottom?e+t:e,JA="react-flow__edgeupdater";function eP({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:a}){return y.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:mn([JA,`${JA}-${a}`]),cx:Gge(t,r,e),cy:Zge(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Kge({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:s,sourcePosition:a,targetPosition:u,onReconnect:c,onReconnectStart:f,onReconnectEnd:h,setReconnecting:p,setUpdateHover:m}){const x=Gt(),v=(N,P)=>{if(N.button!==0)return;const{autoPanOnConnect:T,domNode:j,isValidConnection:R,connectionMode:I,connectionRadius:M,lib:z,onConnectStart:F,onConnectEnd:Y,cancelConnection:O,nodeLookup:q,rfId:W,panBy:Z,updateConnection:U}=x.getState(),B=P.type==="target";p(!0),f==null||f(N,n,P.type);const L=(V,D)=>{p(!1),h==null||h(V,n,P.type,D)},H=V=>c==null?void 0:c(n,V);lb.onPointerDown(N.nativeEvent,{autoPanOnConnect:T,connectionMode:I,connectionRadius:M,domNode:j,handleId:P.id,nodeId:P.nodeId,nodeLookup:q,isTarget:B,edgeUpdaterType:P.type,lib:z,flowId:W,cancelConnection:O,panBy:Z,isValidConnection:R,onConnect:H,onConnectStart:F,onConnectEnd:Y,onReconnectEnd:L,updateConnection:U,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle})},k=N=>v(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),b=N=>v(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),E=()=>m(!0),C=()=>m(!1);return y.jsxs(y.Fragment,{children:[(e===!0||e==="source")&&y.jsx(eP,{position:a,centerX:r,centerY:i,radius:t,onMouseDown:k,onMouseEnter:E,onMouseOut:C,type:"source"}),(e===!0||e==="target")&&y.jsx(eP,{position:u,centerX:o,centerY:s,radius:t,onMouseDown:b,onMouseEnter:E,onMouseOut:C,type:"target"})]})}function Xge({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:s,onMouseEnter:a,onMouseMove:u,onMouseLeave:c,reconnectRadius:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:v,noPanClassName:k,onError:b,disableKeyboardA11y:E}){let C=kt(fe=>fe.edgeLookup.get(e));const N=kt(fe=>fe.defaultEdgeOptions);C=N?{...N,...C}:C;let P=C.type||"default",T=(v==null?void 0:v[P])||XA[P];T===void 0&&(b==null||b("011",Bo.error011(P)),P="default",T=XA.default);const j=!!(C.focusable||t&&typeof C.focusable>"u"),R=typeof h<"u"&&(C.reconnectable||n&&typeof C.reconnectable>"u"),I=!!(C.selectable||r&&typeof C.selectable>"u"),M=S.useRef(null),[z,F]=S.useState(!1),[Y,O]=S.useState(!1),q=Gt(),{zIndex:W,sourceX:Z,sourceY:U,targetX:B,targetY:L,sourcePosition:H,targetPosition:V}=kt(S.useCallback(fe=>{const xe=fe.nodeLookup.get(C.source),Me=fe.nodeLookup.get(C.target);if(!xe||!Me)return{zIndex:C.zIndex,...QA};const Ve=qpe({id:e,sourceNode:xe,targetNode:Me,sourceHandle:C.sourceHandle||null,targetHandle:C.targetHandle||null,connectionMode:fe.connectionMode,onError:b});return{zIndex:$pe({selected:C.selected,zIndex:C.zIndex,sourceNode:xe,targetNode:Me,elevateOnSelect:fe.elevateEdgesOnSelect}),...Ve||QA}},[C.source,C.target,C.sourceHandle,C.targetHandle,C.selected,C.zIndex]),rn),D=S.useMemo(()=>C.markerStart?`url('#${sb(C.markerStart,x)}')`:void 0,[C.markerStart,x]),G=S.useMemo(()=>C.markerEnd?`url('#${sb(C.markerEnd,x)}')`:void 0,[C.markerEnd,x]);if(C.hidden||Z===null||U===null||B===null||L===null)return null;const K=fe=>{var ot;const{addSelectedEdges:xe,unselectNodesAndEdges:Me,multiSelectionActive:Ve}=q.getState();I&&(q.setState({nodesSelectionActive:!1}),C.selected&&Ve?(Me({nodes:[],edges:[C]}),(ot=M.current)==null||ot.blur()):xe([e])),i&&i(fe,C)},J=o?fe=>{o(fe,{...C})}:void 0,ee=s?fe=>{s(fe,{...C})}:void 0,ie=a?fe=>{a(fe,{...C})}:void 0,ce=u?fe=>{u(fe,{...C})}:void 0,he=c?fe=>{c(fe,{...C})}:void 0,Ee=fe=>{var xe;if(!E&&p5.includes(fe.key)&&I){const{unselectNodesAndEdges:Me,addSelectedEdges:Ve}=q.getState();fe.key==="Escape"?((xe=M.current)==null||xe.blur(),Me({edges:[C]})):Ve([e])}};return y.jsx("svg",{style:{zIndex:W},children:y.jsxs("g",{className:mn(["react-flow__edge",`react-flow__edge-${P}`,C.className,k,{selected:C.selected,animated:C.animated,inactive:!I&&!i,updating:z,selectable:I}]),onClick:K,onDoubleClick:J,onContextMenu:ee,onMouseEnter:ie,onMouseMove:ce,onMouseLeave:he,onKeyDown:j?Ee:void 0,tabIndex:j?0:void 0,role:j?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":C.ariaLabel===null?void 0:C.ariaLabel||`Edge from ${C.source} to ${C.target}`,"aria-describedby":j?`${H5}-${x}`:void 0,ref:M,children:[!Y&&y.jsx(T,{id:e,source:C.source,target:C.target,type:C.type,selected:C.selected,animated:C.animated,selectable:I,deletable:C.deletable??!0,label:C.label,labelStyle:C.labelStyle,labelShowBg:C.labelShowBg,labelBgStyle:C.labelBgStyle,labelBgPadding:C.labelBgPadding,labelBgBorderRadius:C.labelBgBorderRadius,sourceX:Z,sourceY:U,targetX:B,targetY:L,sourcePosition:H,targetPosition:V,data:C.data,style:C.style,sourceHandleId:C.sourceHandle,targetHandleId:C.targetHandle,markerStart:D,markerEnd:G,pathOptions:"pathOptions"in C?C.pathOptions:void 0,interactionWidth:C.interactionWidth}),R&&y.jsx(Kge,{edge:C,isReconnectable:R,reconnectRadius:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:U,targetX:B,targetY:L,sourcePosition:H,targetPosition:V,setUpdateHover:F,setReconnecting:O})]})})}const Qge=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function y3({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:s,onEdgeMouseEnter:a,onEdgeMouseMove:u,onEdgeMouseLeave:c,onEdgeClick:f,reconnectRadius:h,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:v}){const{edgesFocusable:k,edgesReconnectable:b,elementsSelectable:E,onError:C}=kt(Qge,rn),N=Lge(t);return y.jsxs("div",{className:"react-flow__edges",children:[y.jsx(Vge,{defaultColor:e,rfId:n}),N.map(P=>y.jsx(Xge,{id:P,edgesFocusable:k,edgesReconnectable:b,elementsSelectable:E,noPanClassName:i,onReconnect:o,onContextMenu:s,onMouseEnter:a,onMouseMove:u,onMouseLeave:c,onClick:f,reconnectRadius:h,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:n,onError:C,edgeTypes:r,disableKeyboardA11y:v},P))]})}y3.displayName="EdgeRenderer";const Jge=S.memo(y3),eye=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function tye({children:e}){const t=kt(eye);return y.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function nye(e){const t=Ik(),n=S.useRef(!1);S.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const rye=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function iye(e){const t=kt(rye),n=Gt();return S.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function oye(e){return e.connection.inProgress?{...e.connection,to:ff(e.connection.to,e.transform)}:{...e.connection}}function sye(e){return oye}function aye(e){const t=sye();return kt(t,rn)}const lye=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function uye({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:s,isValid:a,inProgress:u}=kt(lye,rn);return!(o&&i&&u)?null:y.jsx("svg",{style:e,width:o,height:s,className:"react-flow__connectionline react-flow__container",children:y.jsx("g",{className:mn(["react-flow__connection",g5(a)]),children:y.jsx(x3,{style:t,type:n,CustomComponent:r,isValid:a})})})}const x3=({style:e,type:t=vs.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:s,fromHandle:a,fromPosition:u,to:c,toNode:f,toHandle:h,toPosition:p}=aye();if(!i)return;if(n)return y.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:a,fromX:o.x,fromY:o.y,toX:c.x,toY:c.y,fromPosition:u,toPosition:p,connectionStatus:g5(r),toNode:f,toHandle:h});let m="";const x={sourceX:o.x,sourceY:o.y,sourcePosition:u,targetX:c.x,targetY:c.y,targetPosition:p};switch(t){case vs.Bezier:[m]=A5(x);break;case vs.SimpleBezier:[m]=o3(x);break;case vs.Step:[m]=ob({...x,borderRadius:0});break;case vs.SmoothStep:[m]=ob(x);break;default:[m]=R5(x)}return y.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};x3.displayName="ConnectionLine";const cye={};function tP(e=cye){S.useRef(e),Gt(),S.useEffect(()=>{},[e])}function dye(){Gt(),S.useRef(!1),S.useEffect(()=>{},[])}function v3({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:u,onNodeMouseLeave:c,onNodeContextMenu:f,onSelectionContextMenu:h,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:v,connectionLineComponent:k,connectionLineContainerStyle:b,selectionKeyCode:E,selectionOnDrag:C,selectionMode:N,multiSelectionKeyCode:P,panActivationKeyCode:T,zoomActivationKeyCode:j,deleteKeyCode:R,onlyRenderVisibleElements:I,elementsSelectable:M,defaultViewport:z,translateExtent:F,minZoom:Y,maxZoom:O,preventScrolling:q,defaultMarkerColor:W,zoomOnScroll:Z,zoomOnPinch:U,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:H,zoomOnDoubleClick:V,panOnDrag:D,onPaneClick:G,onPaneMouseEnter:K,onPaneMouseMove:J,onPaneMouseLeave:ee,onPaneScroll:ie,onPaneContextMenu:ce,paneClickDistance:he,nodeClickDistance:Ee,onEdgeContextMenu:fe,onEdgeMouseEnter:xe,onEdgeMouseMove:Me,onEdgeMouseLeave:Ve,reconnectRadius:ot,onReconnect:_t,onReconnectStart:Q,onReconnectEnd:oe,noDragClassName:ue,noWheelClassName:Se,noPanClassName:we,disableKeyboardA11y:ge,nodeExtent:Ae,rfId:Fe,viewport:se,onViewportChange:pe}){return tP(e),tP(t),dye(),nye(n),iye(se),y.jsx(Tge,{onPaneClick:G,onPaneMouseEnter:K,onPaneMouseMove:J,onPaneMouseLeave:ee,onPaneContextMenu:ce,onPaneScroll:ie,paneClickDistance:he,deleteKeyCode:R,selectionKeyCode:E,selectionOnDrag:C,selectionMode:N,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:P,panActivationKeyCode:T,zoomActivationKeyCode:j,elementsSelectable:M,zoomOnScroll:Z,zoomOnPinch:U,zoomOnDoubleClick:V,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:H,panOnDrag:D,defaultViewport:z,translateExtent:F,minZoom:Y,maxZoom:O,onSelectionContextMenu:h,preventScrolling:q,noDragClassName:ue,noWheelClassName:Se,noPanClassName:we,disableKeyboardA11y:ge,onViewportChange:pe,isControlledViewport:!!se,children:y.jsxs(tye,{children:[y.jsx(Jge,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:s,onReconnect:_t,onReconnectStart:Q,onReconnectEnd:oe,onlyRenderVisibleElements:I,onEdgeContextMenu:fe,onEdgeMouseEnter:xe,onEdgeMouseMove:Me,onEdgeMouseLeave:Ve,reconnectRadius:ot,defaultMarkerColor:W,noPanClassName:we,disableKeyboardA11y:ge,rfId:Fe}),y.jsx(uye,{style:v,type:x,component:k,containerStyle:b}),y.jsx("div",{className:"react-flow__edgelabel-renderer"}),y.jsx(Ige,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:a,onNodeMouseMove:u,onNodeMouseLeave:c,onNodeContextMenu:f,nodeClickDistance:Ee,onlyRenderVisibleElements:I,noPanClassName:we,noDragClassName:ue,disableKeyboardA11y:ge,nodeExtent:Ae,rfId:Fe}),y.jsx("div",{className:"react-flow__viewport-portal"})]})})}v3.displayName="GraphView";const fye=S.memo(v3),nP=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,nodeOrigin:a,nodeExtent:u}={})=>{const c=new Map,f=new Map,h=new Map,p=new Map,m=r??t??[],x=n??e??[],v=a??[0,0],k=u??Ed;j5(h,p,m),ab(x,c,f,{nodeOrigin:v,nodeExtent:k,elevateNodesOnSelect:!1});let b=[0,0,1];if(s&&i&&o){const E=df(c,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:C,y:N,zoom:P}=Pk(E,i,o,.5,2,.1);b=[C,N,P]}return{rfId:"1",width:0,height:0,transform:b,nodes:x,nodeLookup:c,parentLookup:f,edges:m,edgeLookup:p,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:Ed,nodeExtent:k,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Xl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:v,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,fitViewOnInit:!1,fitViewDone:!1,fitViewOnInitOptions:void 0,selectNodesOnDrag:!0,multiSelectionActive:!1,connection:{...m5},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:Lpe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},hye=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,nodeOrigin:a,nodeExtent:u})=>Mme((c,f)=>({...nP({nodes:e,edges:t,width:i,height:o,fitView:s,nodeOrigin:a,nodeExtent:u,defaultNodes:n,defaultEdges:r}),setNodes:h=>{const{nodeLookup:p,parentLookup:m,nodeOrigin:x,elevateNodesOnSelect:v}=f();ab(h,p,m,{nodeOrigin:x,nodeExtent:u,elevateNodesOnSelect:v,checkEquality:!0}),c({nodes:h})},setEdges:h=>{const{connectionLookup:p,edgeLookup:m}=f();j5(p,m,h),c({edges:h})},setDefaultNodesAndEdges:(h,p)=>{if(h){const{setNodes:m}=f();m(h),c({hasDefaultNodes:!0})}if(p){const{setEdges:m}=f();m(p),c({hasDefaultEdges:!0})}},updateNodeInternals:(h,p={triggerFitView:!0})=>{const{triggerNodeChanges:m,nodeLookup:x,parentLookup:v,fitViewOnInit:k,fitViewDone:b,fitViewOnInitOptions:E,domNode:C,nodeOrigin:N,nodeExtent:P,debug:T,fitViewSync:j}=f(),{changes:R,updatedInternals:I}=Jpe(h,x,v,C,N,P);if(I){if(Kpe(x,v,{nodeOrigin:N,nodeExtent:P}),p.triggerFitView){let M=b;!b&&k&&(M=j({...E,nodes:E==null?void 0:E.nodes})),c({fitViewDone:M})}else c({});(R==null?void 0:R.length)>0&&(T&&console.log("React Flow: trigger node changes",R),m==null||m(R))}},updateNodePositions:(h,p=!1)=>{const m=[],x=[];for(const[v,k]of h){const b=!!(k!=null&&k.expandParent&&(k!=null&&k.parentId)&&(k!=null&&k.position)),E={id:v,type:"position",position:b?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:p};b&&m.push({id:v,parentId:k.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width,height:k.measured.height}}),x.push(E)}if(m.length>0){const{nodeLookup:v,parentLookup:k,nodeOrigin:b}=f(),E=Dk(m,v,k,b);x.push(...E)}f().triggerNodeChanges(x)},triggerNodeChanges:h=>{const{onNodesChange:p,setNodes:m,nodes:x,hasDefaultNodes:v,debug:k}=f();if(h!=null&&h.length){if(v){const b=G5(h,x);m(b)}k&&console.log("React Flow: trigger node changes",h),p==null||p(h)}},triggerEdgeChanges:h=>{const{onEdgesChange:p,setEdges:m,edges:x,hasDefaultEdges:v,debug:k}=f();if(h!=null&&h.length){if(v){const b=Z5(h,x);m(b)}k&&console.log("React Flow: trigger edge changes",h),p==null||p(h)}},addSelectedNodes:h=>{const{multiSelectionActive:p,edgeLookup:m,nodeLookup:x,triggerNodeChanges:v,triggerEdgeChanges:k}=f();if(p){const b=h.map(E=>ia(E,!0));v(b);return}v(kl(x,new Set([...h]),!0)),k(kl(m))},addSelectedEdges:h=>{const{multiSelectionActive:p,edgeLookup:m,nodeLookup:x,triggerNodeChanges:v,triggerEdgeChanges:k}=f();if(p){const b=h.map(E=>ia(E,!0));k(b);return}k(kl(m,new Set([...h]))),v(kl(x,new Set,!0))},unselectNodesAndEdges:({nodes:h,edges:p}={})=>{const{edges:m,nodes:x,nodeLookup:v,triggerNodeChanges:k,triggerEdgeChanges:b}=f(),E=h||x,C=p||m,N=E.map(T=>{const j=v.get(T.id);return j&&(j.selected=!1),ia(T.id,!1)}),P=C.map(T=>ia(T.id,!1));k(N),b(P)},setMinZoom:h=>{const{panZoom:p,maxZoom:m}=f();p==null||p.setScaleExtent([h,m]),c({minZoom:h})},setMaxZoom:h=>{const{panZoom:p,minZoom:m}=f();p==null||p.setScaleExtent([m,h]),c({maxZoom:h})},setTranslateExtent:h=>{var p;(p=f().panZoom)==null||p.setTranslateExtent(h),c({translateExtent:h})},setPaneClickDistance:h=>{var p;(p=f().panZoom)==null||p.setClickDistance(h)},resetSelectedElements:()=>{const{edges:h,nodes:p,triggerNodeChanges:m,triggerEdgeChanges:x}=f(),v=p.reduce((b,E)=>E.selected?[...b,ia(E.id,!1)]:b,[]),k=h.reduce((b,E)=>E.selected?[...b,ia(E.id,!1)]:b,[]);m(v),x(k)},setNodeExtent:h=>{const{nodes:p,nodeLookup:m,parentLookup:x,nodeOrigin:v,elevateNodesOnSelect:k,nodeExtent:b}=f();h[0][0]===b[0][0]&&h[0][1]===b[0][1]&&h[1][0]===b[1][0]&&h[1][1]===b[1][1]||(ab(p,m,x,{nodeOrigin:v,nodeExtent:h,elevateNodesOnSelect:k,checkEquality:!1}),c({nodeExtent:h}))},panBy:h=>{const{transform:p,width:m,height:x,panZoom:v,translateExtent:k}=f();return eme({delta:h,panZoom:v,transform:p,translateExtent:k,width:m,height:x})},fitView:h=>{const{panZoom:p,width:m,height:x,minZoom:v,maxZoom:k,nodeLookup:b}=f();if(!p)return Promise.resolve(!1);const E=tb(b,h);return nb({nodes:E,width:m,height:x,panZoom:p,minZoom:v,maxZoom:k},h)},fitViewSync:h=>{const{panZoom:p,width:m,height:x,minZoom:v,maxZoom:k,nodeLookup:b}=f();if(!p)return!1;const E=tb(b,h);return nb({nodes:E,width:m,height:x,panZoom:p,minZoom:v,maxZoom:k},h),E.size>0},cancelConnection:()=>{c({connection:{...m5}})},updateConnection:h=>{c({connection:h})},reset:()=>c({...nP()})}),Object.is);function pye({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,fitView:s,nodeOrigin:a,nodeExtent:u,children:c}){const[f]=S.useState(()=>hye({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,nodeOrigin:a,nodeExtent:u}));return y.jsx(jme,{value:f,children:y.jsx(nge,{children:c})})}function mye({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:s,fitView:a,nodeOrigin:u,nodeExtent:c}){return S.useContext(dg)?y.jsx(y.Fragment,{children:e}):y.jsx(pye,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:s,fitView:a,nodeOrigin:u,nodeExtent:c,children:e})}const gye={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function yye({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:s,onNodeClick:a,onEdgeClick:u,onInit:c,onMove:f,onMoveStart:h,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:v,onClickConnectStart:k,onClickConnectEnd:b,onNodeMouseEnter:E,onNodeMouseMove:C,onNodeMouseLeave:N,onNodeContextMenu:P,onNodeDoubleClick:T,onNodeDragStart:j,onNodeDrag:R,onNodeDragStop:I,onNodesDelete:M,onEdgesDelete:z,onDelete:F,onSelectionChange:Y,onSelectionDragStart:O,onSelectionDrag:q,onSelectionDragStop:W,onSelectionContextMenu:Z,onSelectionStart:U,onSelectionEnd:B,onBeforeDelete:L,connectionMode:H,connectionLineType:V=vs.Bezier,connectionLineStyle:D,connectionLineComponent:G,connectionLineContainerStyle:K,deleteKeyCode:J="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:ie=!1,selectionMode:ce=Cd.Full,panActivationKeyCode:he="Space",multiSelectionKeyCode:Ee=im()?"Meta":"Control",zoomActivationKeyCode:fe=im()?"Meta":"Control",snapToGrid:xe,snapGrid:Me,onlyRenderVisibleElements:Ve=!1,selectNodesOnDrag:ot,nodesDraggable:_t,nodesConnectable:Q,nodesFocusable:oe,nodeOrigin:ue=Y5,edgesFocusable:Se,edgesReconnectable:we,elementsSelectable:ge=!0,defaultViewport:Ae=Yme,minZoom:Fe=.5,maxZoom:se=2,translateExtent:pe=Ed,preventScrolling:Oe=!0,nodeExtent:et,defaultMarkerColor:rt="#b1b1b7",zoomOnScroll:Rt=!0,zoomOnPinch:Ke=!0,panOnScroll:st=!1,panOnScrollSpeed:it=.5,panOnScrollMode:Ut=ha.Free,zoomOnDoubleClick:pt=!0,panOnDrag:gn=!0,onPaneClick:yt,onPaneMouseEnter:yn,onPaneMouseMove:dt,onPaneMouseLeave:Fr,onPaneScroll:ur,onPaneContextMenu:Xn,paneClickDistance:oi=0,nodeClickDistance:Ye=0,children:wt,onReconnect:Nt,onReconnectStart:jn,onReconnectEnd:Fn,onEdgeContextMenu:$n,onEdgeDoubleClick:wr,onEdgeMouseEnter:xn,onEdgeMouseMove:$r,onEdgeMouseLeave:zs,reconnectRadius:Aa=10,onNodesChange:Pa,onEdgesChange:vu,noDragClassName:pg="nodrag",noWheelClassName:mg="nowheel",noPanClassName:hf="nopan",fitView:Ai,fitViewOptions:pf,connectOnClick:mf,attributionPosition:gg,proOptions:gf,defaultEdgeOptions:yf,elevateNodesOnSelect:xf,elevateEdgesOnSelect:vf,disableKeyboardA11y:wf=!1,autoPanOnConnect:yg,autoPanOnNodeDrag:Zt,autoPanSpeed:xg,connectionRadius:wu,isValidConnection:bf,onError:Ra,style:vg,id:bu,nodeDragThreshold:Ma,viewport:zr,onViewportChange:wg,width:br,height:bg,colorMode:kg="light",debug:Sg,...ja},Da){const no=bu||"1",Oa=Kme(kg);return y.jsx("div",{"data-testid":"rf__wrapper",...ja,style:{...vg,...gye},ref:Da,className:mn(["react-flow",i,Oa]),id:bu,children:y.jsxs(mye,{nodes:e,edges:t,width:br,height:bg,fitView:Ai,nodeOrigin:ue,nodeExtent:et,children:[y.jsx(fye,{onInit:c,onNodeClick:a,onEdgeClick:u,onNodeMouseEnter:E,onNodeMouseMove:C,onNodeMouseLeave:N,onNodeContextMenu:P,onNodeDoubleClick:T,nodeTypes:o,edgeTypes:s,connectionLineType:V,connectionLineStyle:D,connectionLineComponent:G,connectionLineContainerStyle:K,selectionKeyCode:ee,selectionOnDrag:ie,selectionMode:ce,deleteKeyCode:J,multiSelectionKeyCode:Ee,panActivationKeyCode:he,zoomActivationKeyCode:fe,onlyRenderVisibleElements:Ve,defaultViewport:Ae,translateExtent:pe,minZoom:Fe,maxZoom:se,preventScrolling:Oe,zoomOnScroll:Rt,zoomOnPinch:Ke,zoomOnDoubleClick:pt,panOnScroll:st,panOnScrollSpeed:it,panOnScrollMode:Ut,panOnDrag:gn,onPaneClick:yt,onPaneMouseEnter:yn,onPaneMouseMove:dt,onPaneMouseLeave:Fr,onPaneScroll:ur,onPaneContextMenu:Xn,paneClickDistance:oi,nodeClickDistance:Ye,onSelectionContextMenu:Z,onSelectionStart:U,onSelectionEnd:B,onReconnect:Nt,onReconnectStart:jn,onReconnectEnd:Fn,onEdgeContextMenu:$n,onEdgeDoubleClick:wr,onEdgeMouseEnter:xn,onEdgeMouseMove:$r,onEdgeMouseLeave:zs,reconnectRadius:Aa,defaultMarkerColor:rt,noDragClassName:pg,noWheelClassName:mg,noPanClassName:hf,rfId:no,disableKeyboardA11y:wf,nodeExtent:et,viewport:zr,onViewportChange:wg}),y.jsx(Zme,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:v,onClickConnectStart:k,onClickConnectEnd:b,nodesDraggable:_t,nodesConnectable:Q,nodesFocusable:oe,edgesFocusable:Se,edgesReconnectable:we,elementsSelectable:ge,elevateNodesOnSelect:xf,elevateEdgesOnSelect:vf,minZoom:Fe,maxZoom:se,nodeExtent:et,onNodesChange:Pa,onEdgesChange:vu,snapToGrid:xe,snapGrid:Me,connectionMode:H,translateExtent:pe,connectOnClick:mf,defaultEdgeOptions:yf,fitView:Ai,fitViewOptions:pf,onNodesDelete:M,onEdgesDelete:z,onDelete:F,onNodeDragStart:j,onNodeDrag:R,onNodeDragStop:I,onSelectionDrag:q,onSelectionDragStart:O,onSelectionDragStop:W,onMove:f,onMoveStart:h,onMoveEnd:p,noPanClassName:hf,nodeOrigin:ue,rfId:no,autoPanOnConnect:yg,autoPanOnNodeDrag:Zt,autoPanSpeed:xg,onError:Ra,connectionRadius:wu,isValidConnection:bf,selectNodesOnDrag:ot,nodeDragThreshold:Ma,onBeforeDelete:L,paneClickDistance:oi,debug:Sg}),y.jsx(Hme,{onSelectionChange:Y}),wt,y.jsx(zme,{proOptions:gf,position:gg}),y.jsx(Fme,{rfId:no,disableKeyboardA11y:wf})]})})}var xye=K5(yye);function vye(e){const[t,n]=S.useState(e),r=S.useCallback(i=>n(o=>G5(i,o)),[]);return[t,n,r]}function wye(e){const[t,n]=S.useState(e),r=S.useCallback(i=>n(o=>Z5(i,o)),[]);return[t,n,r]}function bye({dimensions:e,lineWidth:t,variant:n,className:r}){return y.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:mn(["react-flow__background-pattern",n,r])})}function kye({radius:e,className:t}){return y.jsx("circle",{cx:e,cy:e,r:e,className:mn(["react-flow__background-pattern","dots",t])})}var To;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(To||(To={}));const Sye={[To.Dots]:1,[To.Lines]:1,[To.Cross]:6},Eye=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function w3({id:e,variant:t=To.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:s,bgColor:a,style:u,className:c,patternClassName:f}){const h=S.useRef(null),{transform:p,patternId:m}=kt(Eye,rn),x=r||Sye[t],v=t===To.Dots,k=t===To.Cross,b=Array.isArray(n)?n:[n,n],E=[b[0]*p[2]||1,b[1]*p[2]||1],C=x*p[2],N=Array.isArray(o)?o:[o,o],P=k?[C,C]:E,T=[N[0]*p[2]||1+P[0]/2,N[1]*p[2]||1+P[1]/2],j=`${m}${e||""}`;return y.jsxs("svg",{className:mn(["react-flow__background",c]),style:{...u,...fg,"--xy-background-color-props":a,"--xy-background-pattern-color-props":s},ref:h,"data-testid":"rf__background",children:[y.jsx("pattern",{id:j,x:p[0]%E[0],y:p[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:v?y.jsx(kye,{radius:C/2,className:f}):y.jsx(bye,{dimensions:P,lineWidth:i,variant:t,className:f})}),y.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}w3.displayName="Background";const Cye=S.memo(w3);function _ye(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Nye(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Tye(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Aye(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Pye(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Zh({children:e,className:t,...n}){return y.jsx("button",{type:"button",className:mn(["react-flow__controls-button",t]),...n,children:e})}const Rye=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function b3({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:s,onFitView:a,onInteractiveChange:u,className:c,children:f,position:h="bottom-left",orientation:p="vertical","aria-label":m="React Flow controls"}){const x=Gt(),{isInteractive:v,minZoomReached:k,maxZoomReached:b}=kt(Rye,rn),{zoomIn:E,zoomOut:C,fitView:N}=Ik(),P=()=>{E(),o==null||o()},T=()=>{C(),s==null||s()},j=()=>{N(i),a==null||a()},R=()=>{x.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),u==null||u(!v)},I=p==="horizontal"?"horizontal":"vertical";return y.jsxs(Ok,{className:mn(["react-flow__controls",I,c]),position:h,style:e,"data-testid":"rf__controls","aria-label":m,children:[t&&y.jsxs(y.Fragment,{children:[y.jsx(Zh,{onClick:P,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:b,children:y.jsx(_ye,{})}),y.jsx(Zh,{onClick:T,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:k,children:y.jsx(Nye,{})})]}),n&&y.jsx(Zh,{className:"react-flow__controls-fitview",onClick:j,title:"fit view","aria-label":"fit view",children:y.jsx(Tye,{})}),r&&y.jsx(Zh,{className:"react-flow__controls-interactive",onClick:R,title:"toggle interactivity","aria-label":"toggle interactivity",children:v?y.jsx(Pye,{}):y.jsx(Aye,{})}),f]})}b3.displayName="Controls";const Mye=S.memo(b3);function jye({id:e,x:t,y:n,width:r,height:i,style:o,color:s,strokeColor:a,strokeWidth:u,className:c,borderRadius:f,shapeRendering:h,selected:p,onClick:m}){const{background:x,backgroundColor:v}=o||{},k=s||x||v;return y.jsx("rect",{className:mn(["react-flow__minimap-node",{selected:p},c]),x:t,y:n,rx:f,ry:f,width:r,height:i,style:{fill:k,stroke:a,strokeWidth:u},shapeRendering:h,onClick:m?b=>m(b,e):void 0})}const Dye=S.memo(jye),Oye=e=>e.nodes.map(t=>t.id),Lv=e=>e instanceof Function?e:()=>e;function Iye({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=Dye,onClick:s}){const a=kt(Oye,rn),u=Lv(t),c=Lv(e),f=Lv(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return y.jsx(y.Fragment,{children:a.map(p=>y.jsx(Fye,{id:p,nodeColorFunc:u,nodeStrokeColorFunc:c,nodeClassNameFunc:f,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:s,shapeRendering:h},p))})}function Lye({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:s,NodeComponent:a,onClick:u}){const{node:c,x:f,y:h,width:p,height:m}=kt(x=>{const v=x.nodeLookup.get(e),{x:k,y:b}=v.internals.positionAbsolute,{width:E,height:C}=Vo(v);return{node:v,x:k,y:b,width:E,height:C}},rn);return!c||c.hidden||!E5(c)?null:y.jsx(a,{x:f,y:h,width:p,height:m,style:c.style,selected:!!c.selected,className:r(c),color:t(c),borderRadius:i,strokeColor:n(c),strokeWidth:o,shapeRendering:s,onClick:u,id:c.id})}const Fye=S.memo(Lye);var $ye=S.memo(Iye);const zye=200,Bye=150,Vye=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?k5(df(e.nodeLookup),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},Wye="react-flow__minimap-desc";function k3({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:a,bgColor:u,maskColor:c,maskStrokeColor:f,maskStrokeWidth:h,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:v=!1,zoomable:k=!1,ariaLabel:b="React Flow mini map",inversePan:E,zoomStep:C=10,offsetScale:N=5}){const P=Gt(),T=S.useRef(null),{boundingRect:j,viewBB:R,rfId:I,panZoom:M,translateExtent:z,flowWidth:F,flowHeight:Y}=kt(Vye,rn),O=(e==null?void 0:e.width)??zye,q=(e==null?void 0:e.height)??Bye,W=j.width/O,Z=j.height/q,U=Math.max(W,Z),B=U*O,L=U*q,H=N*U,V=j.x-(B-j.width)/2-H,D=j.y-(L-j.height)/2-H,G=B+H*2,K=L+H*2,J=`${Wye}-${I}`,ee=S.useRef(0),ie=S.useRef();ee.current=U,S.useEffect(()=>{if(T.current&&M)return ie.current=lme({domNode:T.current,panZoom:M,getTransform:()=>P.getState().transform,getViewScale:()=>ee.current}),()=>{var Ee;(Ee=ie.current)==null||Ee.destroy()}},[M]),S.useEffect(()=>{var Ee;(Ee=ie.current)==null||Ee.update({translateExtent:z,width:F,height:Y,inversePan:E,pannable:v,zoomStep:C,zoomable:k})},[v,k,E,C,z,F,Y]);const ce=m?Ee=>{var Me;const[fe,xe]=((Me=ie.current)==null?void 0:Me.pointer(Ee))||[0,0];m(Ee,{x:fe,y:xe})}:void 0,he=x?S.useCallback((Ee,fe)=>{const xe=P.getState().nodeLookup.get(fe);x(Ee,xe)},[]):void 0;return y.jsx(Ok,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*U:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="string"?s:void 0},className:mn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:y.jsxs("svg",{width:O,height:q,viewBox:`${V} ${D} ${G} ${K}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:T,onClick:ce,children:[b&&y.jsx("title",{id:J,children:b}),y.jsx($ye,{onClick:he,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:a}),y.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-H},${D-H}h${G+H*2}v${K+H*2}h${-G-H*2}z
|
|
400
|
+
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}k3.displayName="MiniMap";const Uye=S.memo(k3);function Hye({nodeId:e,position:t,variant:n=Bc.Handle,className:r,style:i={},children:o,color:s,minWidth:a=10,minHeight:u=10,maxWidth:c=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:h=!1,shouldResize:p,onResizeStart:m,onResize:x,onResizeEnd:v}){const k=e3(),b=typeof e=="string"?e:k,E=Gt(),C=S.useRef(null),N=n===Bc.Line?"right":"bottom-right",P=t??N,T=S.useRef(null);S.useEffect(()=>{if(!(!C.current||!b))return T.current||(T.current=Sme({domNode:C.current,nodeId:b,getStoreItems:()=>{const{nodeLookup:M,transform:z,snapGrid:F,snapToGrid:Y,nodeOrigin:O,domNode:q}=E.getState();return{nodeLookup:M,transform:z,snapGrid:F,snapToGrid:Y,nodeOrigin:O,paneDomNode:q}},onChange:(M,z)=>{const{triggerNodeChanges:F,nodeLookup:Y,parentLookup:O,nodeOrigin:q}=E.getState(),W=[],Z={x:M.x,y:M.y},U=Y.get(b);if(U&&U.expandParent&&U.parentId){const B=U.origin??q,L=M.width??U.measured.width,H=M.height??U.measured.height,V={id:U.id,parentId:U.parentId,rect:{width:L,height:H,...C5({x:M.x??U.position.x,y:M.y??U.position.y},{width:L,height:H},U.parentId,Y,B)}},D=Dk([V],Y,O,q);W.push(...D),Z.x=M.x?Math.max(B[0]*L,M.x):void 0,Z.y=M.y?Math.max(B[1]*H,M.y):void 0}if(Z.x!==void 0&&Z.y!==void 0){const B={id:b,type:"position",position:{...Z}};W.push(B)}if(M.width!==void 0&&M.height!==void 0){const B={id:b,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:M.width,height:M.height}};W.push(B)}for(const B of z){const L={...B,type:"position"};W.push(L)}F(W)},onEnd:()=>{const M={id:b,type:"dimensions",resizing:!1};E.getState().triggerNodeChanges([M])}})),T.current.update({controlPosition:P,boundaries:{minWidth:a,minHeight:u,maxWidth:c,maxHeight:f},keepAspectRatio:h,onResizeStart:m,onResize:x,onResizeEnd:v,shouldResize:p}),()=>{var M;(M=T.current)==null||M.destroy()}},[P,a,u,c,f,h,m,x,v,p]);const j=P.split("-"),R=n===Bc.Line?"borderColor":"backgroundColor",I=s?{...i,[R]:s}:i;return y.jsx("div",{className:mn(["react-flow__resize-control","nodrag",...j,n,r]),ref:C,style:I,children:o})}S.memo(Hye);var Fv,rP;function Fk(){if(rP)return Fv;rP=1;var e="\0",t="\0",n="";class r{constructor(f){cn(this,"_isDirected",!0);cn(this,"_isMultigraph",!1);cn(this,"_isCompound",!1);cn(this,"_label");cn(this,"_defaultNodeLabelFn",()=>{});cn(this,"_defaultEdgeLabelFn",()=>{});cn(this,"_nodes",{});cn(this,"_in",{});cn(this,"_preds",{});cn(this,"_out",{});cn(this,"_sucs",{});cn(this,"_edgeObjs",{});cn(this,"_edgeLabels",{});cn(this,"_nodeCount",0);cn(this,"_edgeCount",0);cn(this,"_parent");cn(this,"_children");f&&(this._isDirected=Object.hasOwn(f,"directed")?f.directed:!0,this._isMultigraph=Object.hasOwn(f,"multigraph")?f.multigraph:!1,this._isCompound=Object.hasOwn(f,"compound")?f.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(f){return this._label=f,this}graph(){return this._label}setDefaultNodeLabel(f){return this._defaultNodeLabelFn=f,typeof f!="function"&&(this._defaultNodeLabelFn=()=>f),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var f=this;return this.nodes().filter(h=>Object.keys(f._in[h]).length===0)}sinks(){var f=this;return this.nodes().filter(h=>Object.keys(f._out[h]).length===0)}setNodes(f,h){var p=arguments,m=this;return f.forEach(function(x){p.length>1?m.setNode(x,h):m.setNode(x)}),this}setNode(f,h){return Object.hasOwn(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=h),this):(this._nodes[f]=arguments.length>1?h:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=t,this._children[f]={},this._children[t][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)}node(f){return this._nodes[f]}hasNode(f){return Object.hasOwn(this._nodes,f)}removeNode(f){var h=this;if(Object.hasOwn(this._nodes,f)){var p=m=>h.removeEdge(h._edgeObjs[m]);delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],this.children(f).forEach(function(m){h.setParent(m)}),delete this._children[f]),Object.keys(this._in[f]).forEach(p),delete this._in[f],delete this._preds[f],Object.keys(this._out[f]).forEach(p),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this}setParent(f,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h===void 0)h=t;else{h+="";for(var p=h;p!==void 0;p=this.parent(p))if(p===f)throw new Error("Setting "+h+" as parent of "+f+" would create a cycle");this.setNode(h)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=h,this._children[h][f]=!0,this}_removeFromParentsChildList(f){delete this._children[this._parent[f]][f]}parent(f){if(this._isCompound){var h=this._parent[f];if(h!==t)return h}}children(f=t){if(this._isCompound){var h=this._children[f];if(h)return Object.keys(h)}else{if(f===t)return this.nodes();if(this.hasNode(f))return[]}}predecessors(f){var h=this._preds[f];if(h)return Object.keys(h)}successors(f){var h=this._sucs[f];if(h)return Object.keys(h)}neighbors(f){var h=this.predecessors(f);if(h){const m=new Set(h);for(var p of this.successors(f))m.add(p);return Array.from(m.values())}}isLeaf(f){var h;return this.isDirected()?h=this.successors(f):h=this.neighbors(f),h.length===0}filterNodes(f){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;Object.entries(this._nodes).forEach(function([v,k]){f(v)&&h.setNode(v,k)}),Object.values(this._edgeObjs).forEach(function(v){h.hasNode(v.v)&&h.hasNode(v.w)&&h.setEdge(v,p.edge(v))});var m={};function x(v){var k=p.parent(v);return k===void 0||h.hasNode(k)?(m[v]=k,k):k in m?m[k]:x(k)}return this._isCompound&&h.nodes().forEach(v=>h.setParent(v,x(v))),h}setDefaultEdgeLabel(f){return this._defaultEdgeLabelFn=f,typeof f!="function"&&(this._defaultEdgeLabelFn=()=>f),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(f,h){var p=this,m=arguments;return f.reduce(function(x,v){return m.length>1?p.setEdge(x,v,h):p.setEdge(x,v),v}),this}setEdge(){var f,h,p,m,x=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(f=v.v,h=v.w,p=v.name,arguments.length===2&&(m=arguments[1],x=!0)):(f=v,h=arguments[1],p=arguments[3],arguments.length>2&&(m=arguments[2],x=!0)),f=""+f,h=""+h,p!==void 0&&(p=""+p);var k=s(this._isDirected,f,h,p);if(Object.hasOwn(this._edgeLabels,k))return x&&(this._edgeLabels[k]=m),this;if(p!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(h),this._edgeLabels[k]=x?m:this._defaultEdgeLabelFn(f,h,p);var b=a(this._isDirected,f,h,p);return f=b.v,h=b.w,Object.freeze(b),this._edgeObjs[k]=b,i(this._preds[h],f),i(this._sucs[f],h),this._in[h][k]=b,this._out[f][k]=b,this._edgeCount++,this}edge(f,h,p){var m=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,f,h,p);return this._edgeLabels[m]}edgeAsObj(){const f=this.edge(...arguments);return typeof f!="object"?{label:f}:f}hasEdge(f,h,p){var m=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,f,h,p);return Object.hasOwn(this._edgeLabels,m)}removeEdge(f,h,p){var m=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,f,h,p),x=this._edgeObjs[m];return x&&(f=x.v,h=x.w,delete this._edgeLabels[m],delete this._edgeObjs[m],o(this._preds[h],f),o(this._sucs[f],h),delete this._in[h][m],delete this._out[f][m],this._edgeCount--),this}inEdges(f,h){var p=this._in[f];if(p){var m=Object.values(p);return h?m.filter(x=>x.v===h):m}}outEdges(f,h){var p=this._out[f];if(p){var m=Object.values(p);return h?m.filter(x=>x.w===h):m}}nodeEdges(f,h){var p=this.inEdges(f,h);if(p)return p.concat(this.outEdges(f,h))}}function i(c,f){c[f]?c[f]++:c[f]=1}function o(c,f){--c[f]||delete c[f]}function s(c,f,h,p){var m=""+f,x=""+h;if(!c&&m>x){var v=m;m=x,x=v}return m+n+x+n+(p===void 0?e:p)}function a(c,f,h,p){var m=""+f,x=""+h;if(!c&&m>x){var v=m;m=x,x=v}var k={v:m,w:x};return p&&(k.name=p),k}function u(c,f){return s(c,f.v,f.w,f.name)}return Fv=r,Fv}var $v,iP;function Yye(){return iP||(iP=1,$v="2.2.4"),$v}var zv,oP;function qye(){return oP||(oP=1,zv={Graph:Fk(),version:Yye()}),zv}var Bv,sP;function Gye(){if(sP)return Bv;sP=1;var e=Fk();Bv={write:t,read:i};function t(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:n(o),edges:r(o)};return o.graph()!==void 0&&(s.value=structuredClone(o.graph())),s}function n(o){return o.nodes().map(function(s){var a=o.node(s),u=o.parent(s),c={v:s};return a!==void 0&&(c.value=a),u!==void 0&&(c.parent=u),c})}function r(o){return o.edges().map(function(s){var a=o.edge(s),u={v:s.v,w:s.w};return s.name!==void 0&&(u.name=s.name),a!==void 0&&(u.value=a),u})}function i(o){var s=new e(o.options).setGraph(o.value);return o.nodes.forEach(function(a){s.setNode(a.v,a.value),a.parent&&s.setParent(a.v,a.parent)}),o.edges.forEach(function(a){s.setEdge({v:a.v,w:a.w,name:a.name},a.value)}),s}return Bv}var Vv,aP;function Zye(){if(aP)return Vv;aP=1,Vv=e;function e(t){var n={},r=[],i;function o(s){Object.hasOwn(n,s)||(n[s]=!0,i.push(s),t.successors(s).forEach(o),t.predecessors(s).forEach(o))}return t.nodes().forEach(function(s){i=[],o(s),i.length&&r.push(i)}),r}return Vv}var Wv,lP;function S3(){if(lP)return Wv;lP=1;class e{constructor(){cn(this,"_arr",[]);cn(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var i=this._keyIndices;if(n=String(n),!Object.hasOwn(i,n)){var o=this._arr,s=o.length;return i[n]=s,o.push({key:n,priority:r}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)}_heapify(n){var r=this._arr,i=2*n,o=i+1,s=n;i<r.length&&(s=r[i].priority<r[s].priority?i:s,o<r.length&&(s=r[o].priority<r[s].priority?o:s),s!==n&&(this._swap(n,s),this._heapify(s)))}_decrease(n){for(var r=this._arr,i=r[n].priority,o;n!==0&&(o=n>>1,!(r[o].priority<i));)this._swap(n,o),n=o}_swap(n,r){var i=this._arr,o=this._keyIndices,s=i[n],a=i[r];i[n]=a,i[r]=s,o[a.key]=n,o[s.key]=r}}return Wv=e,Wv}var Uv,uP;function E3(){if(uP)return Uv;uP=1;var e=S3();Uv=n;var t=()=>1;function n(i,o,s,a){return r(i,String(o),s||t,a||function(u){return i.outEdges(u)})}function r(i,o,s,a){var u={},c=new e,f,h,p=function(m){var x=m.v!==f?m.v:m.w,v=u[x],k=s(m),b=h.distance+k;if(k<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+k);b<v.distance&&(v.distance=b,v.predecessor=f,c.decrease(x,b))};for(i.nodes().forEach(function(m){var x=m===o?0:Number.POSITIVE_INFINITY;u[m]={distance:x},c.add(m,x)});c.size()>0&&(f=c.removeMin(),h=u[f],h.distance!==Number.POSITIVE_INFINITY);)a(f).forEach(p);return u}return Uv}var Hv,cP;function Kye(){if(cP)return Hv;cP=1;var e=E3();Hv=t;function t(n,r,i){return n.nodes().reduce(function(o,s){return o[s]=e(n,s,r,i),o},{})}return Hv}var Yv,dP;function C3(){if(dP)return Yv;dP=1,Yv=e;function e(t){var n=0,r=[],i={},o=[];function s(a){var u=i[a]={onStack:!0,lowlink:n,index:n++};if(r.push(a),t.successors(a).forEach(function(h){Object.hasOwn(i,h)?i[h].onStack&&(u.lowlink=Math.min(u.lowlink,i[h].index)):(s(h),u.lowlink=Math.min(u.lowlink,i[h].lowlink))}),u.lowlink===u.index){var c=[],f;do f=r.pop(),i[f].onStack=!1,c.push(f);while(a!==f);o.push(c)}}return t.nodes().forEach(function(a){Object.hasOwn(i,a)||s(a)}),o}return Yv}var qv,fP;function Xye(){if(fP)return qv;fP=1;var e=C3();qv=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return qv}var Gv,hP;function Qye(){if(hP)return Gv;hP=1,Gv=t;var e=()=>1;function t(r,i,o){return n(r,i||e,o||function(s){return r.outEdges(s)})}function n(r,i,o){var s={},a=r.nodes();return a.forEach(function(u){s[u]={},s[u][u]={distance:0},a.forEach(function(c){u!==c&&(s[u][c]={distance:Number.POSITIVE_INFINITY})}),o(u).forEach(function(c){var f=c.v===u?c.w:c.v,h=i(c);s[u][f]={distance:h,predecessor:u}})}),a.forEach(function(u){var c=s[u];a.forEach(function(f){var h=s[f];a.forEach(function(p){var m=h[u],x=c[p],v=h[p],k=m.distance+x.distance;k<v.distance&&(v.distance=k,v.predecessor=x.predecessor)})})}),s}return Gv}var Zv,pP;function _3(){if(pP)return Zv;pP=1;function e(n){var r={},i={},o=[];function s(a){if(Object.hasOwn(i,a))throw new t;Object.hasOwn(r,a)||(i[a]=!0,r[a]=!0,n.predecessors(a).forEach(s),delete i[a],o.push(a))}if(n.sinks().forEach(s),Object.keys(r).length!==n.nodeCount())throw new t;return o}class t extends Error{constructor(){super(...arguments)}}return Zv=e,e.CycleException=t,Zv}var Kv,mP;function Jye(){if(mP)return Kv;mP=1;var e=_3();Kv=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Kv}var Xv,gP;function N3(){if(gP)return Xv;gP=1,Xv=e;function e(i,o,s){Array.isArray(o)||(o=[o]);var a=i.isDirected()?h=>i.successors(h):h=>i.neighbors(h),u=s==="post"?t:n,c=[],f={};return o.forEach(h=>{if(!i.hasNode(h))throw new Error("Graph does not have node: "+h);u(h,a,f,c)}),c}function t(i,o,s,a){for(var u=[[i,!1]];u.length>0;){var c=u.pop();c[1]?a.push(c[0]):Object.hasOwn(s,c[0])||(s[c[0]]=!0,u.push([c[0],!0]),r(o(c[0]),f=>u.push([f,!1])))}}function n(i,o,s,a){for(var u=[i];u.length>0;){var c=u.pop();Object.hasOwn(s,c)||(s[c]=!0,a.push(c),r(o(c),f=>u.push(f)))}}function r(i,o){for(var s=i.length;s--;)o(i[s],s,i);return i}return Xv}var Qv,yP;function exe(){if(yP)return Qv;yP=1;var e=N3();Qv=t;function t(n,r){return e(n,r,"post")}return Qv}var Jv,xP;function txe(){if(xP)return Jv;xP=1;var e=N3();Jv=t;function t(n,r){return e(n,r,"pre")}return Jv}var ew,vP;function nxe(){if(vP)return ew;vP=1;var e=Fk(),t=S3();ew=n;function n(r,i){var o=new e,s={},a=new t,u;function c(h){var p=h.v===u?h.w:h.v,m=a.priority(p);if(m!==void 0){var x=i(h);x<m&&(s[p]=u,a.decrease(p,x))}}if(r.nodeCount()===0)return o;r.nodes().forEach(function(h){a.add(h,Number.POSITIVE_INFINITY),o.setNode(h)}),a.decrease(r.nodes()[0],0);for(var f=!1;a.size()>0;){if(u=a.removeMin(),Object.hasOwn(s,u))o.setEdge(u,s[u]);else{if(f)throw new Error("Input graph is not connected: "+r);f=!0}r.nodeEdges(u).forEach(c)}return o}return ew}var tw,wP;function rxe(){return wP||(wP=1,tw={components:Zye(),dijkstra:E3(),dijkstraAll:Kye(),findCycles:Xye(),floydWarshall:Qye(),isAcyclic:Jye(),postorder:exe(),preorder:txe(),prim:nxe(),tarjan:C3(),topsort:_3()}),tw}var nw,bP;function Ci(){if(bP)return nw;bP=1;var e=qye();return nw={Graph:e.Graph,json:Gye(),alg:rxe(),version:e.version},nw}var rw,kP;function ixe(){if(kP)return rw;kP=1;class e{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,o=i._prev;if(o!==i)return t(o),o}enqueue(i){let o=this._sentinel;i._prev&&i._next&&t(i),i._next=o._next,o._next._prev=i,o._next=i,i._prev=o}toString(){let i=[],o=this._sentinel,s=o._prev;for(;s!==o;)i.push(JSON.stringify(s,n)),s=s._prev;return"["+i.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return rw=e,rw}var iw,SP;function oxe(){if(SP)return iw;SP=1;let e=Ci().Graph,t=ixe();iw=r;let n=()=>1;function r(c,f){if(c.nodeCount()<=1)return[];let h=s(c,f||n);return i(h.graph,h.buckets,h.zeroIdx).flatMap(m=>c.outEdges(m.v,m.w))}function i(c,f,h){let p=[],m=f[f.length-1],x=f[0],v;for(;c.nodeCount();){for(;v=x.dequeue();)o(c,f,h,v);for(;v=m.dequeue();)o(c,f,h,v);if(c.nodeCount()){for(let k=f.length-2;k>0;--k)if(v=f[k].dequeue(),v){p=p.concat(o(c,f,h,v,!0));break}}}return p}function o(c,f,h,p,m){let x=m?[]:void 0;return c.inEdges(p.v).forEach(v=>{let k=c.edge(v),b=c.node(v.v);m&&x.push({v:v.v,w:v.w}),b.out-=k,a(f,h,b)}),c.outEdges(p.v).forEach(v=>{let k=c.edge(v),b=v.w,E=c.node(b);E.in-=k,a(f,h,E)}),c.removeNode(p.v),x}function s(c,f){let h=new e,p=0,m=0;c.nodes().forEach(k=>{h.setNode(k,{v:k,in:0,out:0})}),c.edges().forEach(k=>{let b=h.edge(k.v,k.w)||0,E=f(k),C=b+E;h.setEdge(k.v,k.w,C),m=Math.max(m,h.node(k.v).out+=E),p=Math.max(p,h.node(k.w).in+=E)});let x=u(m+p+3).map(()=>new t),v=p+1;return h.nodes().forEach(k=>{a(x,v,h.node(k))}),{graph:h,buckets:x,zeroIdx:v}}function a(c,f,h){h.out?h.in?c[h.out-h.in+f].enqueue(h):c[c.length-1].enqueue(h):c[0].enqueue(h)}function u(c){const f=[];for(let h=0;h<c;h++)f.push(h);return f}return iw}var ow,EP;function pn(){if(EP)return ow;EP=1;let e=Ci().Graph;ow={addBorderNode:f,addDummyNode:t,applyWithChunking:m,asNonCompoundGraph:r,buildLayerMatrix:a,intersectRect:s,mapValues:T,maxRank:x,normalizeRanks:u,notime:b,partition:v,pick:P,predecessorWeights:o,range:N,removeEmptyRanks:c,simplify:n,successorWeights:i,time:k,uniqueId:C,zipObject:j};function t(R,I,M,z){let F;do F=C(z);while(R.hasNode(F));return M.dummy=I,R.setNode(F,M),F}function n(R){let I=new e().setGraph(R.graph());return R.nodes().forEach(M=>I.setNode(M,R.node(M))),R.edges().forEach(M=>{let z=I.edge(M.v,M.w)||{weight:0,minlen:1},F=R.edge(M);I.setEdge(M.v,M.w,{weight:z.weight+F.weight,minlen:Math.max(z.minlen,F.minlen)})}),I}function r(R){let I=new e({multigraph:R.isMultigraph()}).setGraph(R.graph());return R.nodes().forEach(M=>{R.children(M).length||I.setNode(M,R.node(M))}),R.edges().forEach(M=>{I.setEdge(M,R.edge(M))}),I}function i(R){let I=R.nodes().map(M=>{let z={};return R.outEdges(M).forEach(F=>{z[F.w]=(z[F.w]||0)+R.edge(F).weight}),z});return j(R.nodes(),I)}function o(R){let I=R.nodes().map(M=>{let z={};return R.inEdges(M).forEach(F=>{z[F.v]=(z[F.v]||0)+R.edge(F).weight}),z});return j(R.nodes(),I)}function s(R,I){let M=R.x,z=R.y,F=I.x-M,Y=I.y-z,O=R.width/2,q=R.height/2;if(!F&&!Y)throw new Error("Not possible to find intersection inside of the rectangle");let W,Z;return Math.abs(Y)*O>Math.abs(F)*q?(Y<0&&(q=-q),W=q*F/Y,Z=q):(F<0&&(O=-O),W=O,Z=O*Y/F),{x:M+W,y:z+Z}}function a(R){let I=N(x(R)+1).map(()=>[]);return R.nodes().forEach(M=>{let z=R.node(M),F=z.rank;F!==void 0&&(I[F][z.order]=M)}),I}function u(R){let I=R.nodes().map(z=>{let F=R.node(z).rank;return F===void 0?Number.MAX_VALUE:F}),M=m(Math.min,I);R.nodes().forEach(z=>{let F=R.node(z);Object.hasOwn(F,"rank")&&(F.rank-=M)})}function c(R){let I=R.nodes().map(O=>R.node(O).rank),M=m(Math.min,I),z=[];R.nodes().forEach(O=>{let q=R.node(O).rank-M;z[q]||(z[q]=[]),z[q].push(O)});let F=0,Y=R.graph().nodeRankFactor;Array.from(z).forEach((O,q)=>{O===void 0&&q%Y!==0?--F:O!==void 0&&F&&O.forEach(W=>R.node(W).rank+=F)})}function f(R,I,M,z){let F={width:0,height:0};return arguments.length>=4&&(F.rank=M,F.order=z),t(R,"border",F,I)}function h(R,I=p){const M=[];for(let z=0;z<R.length;z+=I){const F=R.slice(z,z+I);M.push(F)}return M}const p=65535;function m(R,I){if(I.length>p){const M=h(I);return R.apply(null,M.map(z=>R.apply(null,z)))}else return R.apply(null,I)}function x(R){const M=R.nodes().map(z=>{let F=R.node(z).rank;return F===void 0?Number.MIN_VALUE:F});return m(Math.max,M)}function v(R,I){let M={lhs:[],rhs:[]};return R.forEach(z=>{I(z)?M.lhs.push(z):M.rhs.push(z)}),M}function k(R,I){let M=Date.now();try{return I()}finally{console.log(R+" time: "+(Date.now()-M)+"ms")}}function b(R,I){return I()}let E=0;function C(R){var I=++E;return toString(R)+I}function N(R,I,M=1){I==null&&(I=R,R=0);let z=Y=>Y<I;M<0&&(z=Y=>I<Y);const F=[];for(let Y=R;z(Y);Y+=M)F.push(Y);return F}function P(R,I){const M={};for(const z of I)R[z]!==void 0&&(M[z]=R[z]);return M}function T(R,I){let M=I;return typeof I=="string"&&(M=z=>z[I]),Object.entries(R).reduce((z,[F,Y])=>(z[F]=M(Y,F),z),{})}function j(R,I){return R.reduce((M,z,F)=>(M[z]=I[F],M),{})}return ow}var sw,CP;function sxe(){if(CP)return sw;CP=1;let e=oxe(),t=pn().uniqueId;sw={run:n,undo:i};function n(o){(o.graph().acyclicer==="greedy"?e(o,a(o)):r(o)).forEach(u=>{let c=o.edge(u);o.removeEdge(u),c.forwardName=u.name,c.reversed=!0,o.setEdge(u.w,u.v,c,t("rev"))});function a(u){return c=>u.edge(c).weight}}function r(o){let s=[],a={},u={};function c(f){Object.hasOwn(u,f)||(u[f]=!0,a[f]=!0,o.outEdges(f).forEach(h=>{Object.hasOwn(a,h.w)?s.push(h):c(h.w)}),delete a[f])}return o.nodes().forEach(c),s}function i(o){o.edges().forEach(s=>{let a=o.edge(s);if(a.reversed){o.removeEdge(s);let u=a.forwardName;delete a.reversed,delete a.forwardName,o.setEdge(s.w,s.v,a,u)}})}return sw}var aw,_P;function axe(){if(_P)return aw;_P=1;let e=pn();aw={run:t,undo:r};function t(i){i.graph().dummyChains=[],i.edges().forEach(o=>n(i,o))}function n(i,o){let s=o.v,a=i.node(s).rank,u=o.w,c=i.node(u).rank,f=o.name,h=i.edge(o),p=h.labelRank;if(c===a+1)return;i.removeEdge(o);let m,x,v;for(v=0,++a;a<c;++v,++a)h.points=[],x={width:0,height:0,edgeLabel:h,edgeObj:o,rank:a},m=e.addDummyNode(i,"edge",x,"_d"),a===p&&(x.width=h.width,x.height=h.height,x.dummy="edge-label",x.labelpos=h.labelpos),i.setEdge(s,m,{weight:h.weight},f),v===0&&i.graph().dummyChains.push(m),s=m;i.setEdge(s,u,{weight:h.weight},f)}function r(i){i.graph().dummyChains.forEach(o=>{let s=i.node(o),a=s.edgeLabel,u;for(i.setEdge(s.edgeObj,a);s.dummy;)u=i.successors(o)[0],i.removeNode(o),a.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(a.x=s.x,a.y=s.y,a.width=s.width,a.height=s.height),o=u,s=i.node(o)})}return aw}var lw,NP;function sm(){if(NP)return lw;NP=1;const{applyWithChunking:e}=pn();lw={longestPath:t,slack:n};function t(r){var i={};function o(s){var a=r.node(s);if(Object.hasOwn(i,s))return a.rank;i[s]=!0;let u=r.outEdges(s).map(f=>f==null?Number.POSITIVE_INFINITY:o(f.w)-r.edge(f).minlen);var c=e(Math.min,u);return c===Number.POSITIVE_INFINITY&&(c=0),a.rank=c}r.sources().forEach(o)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return lw}var uw,TP;function T3(){if(TP)return uw;TP=1;var e=Ci().Graph,t=sm().slack;uw=n;function n(s){var a=new e({directed:!1}),u=s.nodes()[0],c=s.nodeCount();a.setNode(u,{});for(var f,h;r(a,s)<c;)f=i(a,s),h=a.hasNode(f.v)?t(s,f):-t(s,f),o(a,s,h);return a}function r(s,a){function u(c){a.nodeEdges(c).forEach(f=>{var h=f.v,p=c===h?f.w:h;!s.hasNode(p)&&!t(a,f)&&(s.setNode(p,{}),s.setEdge(c,p,{}),u(p))})}return s.nodes().forEach(u),s.nodeCount()}function i(s,a){return a.edges().reduce((c,f)=>{let h=Number.POSITIVE_INFINITY;return s.hasNode(f.v)!==s.hasNode(f.w)&&(h=t(a,f)),h<c[0]?[h,f]:c},[Number.POSITIVE_INFINITY,null])[1]}function o(s,a,u){s.nodes().forEach(c=>a.node(c).rank+=u)}return uw}var cw,AP;function lxe(){if(AP)return cw;AP=1;var e=T3(),t=sm().slack,n=sm().longestPath,r=Ci().alg.preorder,i=Ci().alg.postorder,o=pn().simplify;cw=s,s.initLowLimValues=f,s.initCutValues=a,s.calcCutValue=c,s.leaveEdge=p,s.enterEdge=m,s.exchangeEdges=x;function s(E){E=o(E),n(E);var C=e(E);f(C),a(C,E);for(var N,P;N=p(C);)P=m(C,E,N),x(C,E,N,P)}function a(E,C){var N=i(E,E.nodes());N=N.slice(0,N.length-1),N.forEach(P=>u(E,C,P))}function u(E,C,N){var P=E.node(N),T=P.parent;E.edge(N,T).cutvalue=c(E,C,N)}function c(E,C,N){var P=E.node(N),T=P.parent,j=!0,R=C.edge(N,T),I=0;return R||(j=!1,R=C.edge(T,N)),I=R.weight,C.nodeEdges(N).forEach(M=>{var z=M.v===N,F=z?M.w:M.v;if(F!==T){var Y=z===j,O=C.edge(M).weight;if(I+=Y?O:-O,k(E,N,F)){var q=E.edge(N,F).cutvalue;I+=Y?-q:q}}}),I}function f(E,C){arguments.length<2&&(C=E.nodes()[0]),h(E,{},1,C)}function h(E,C,N,P,T){var j=N,R=E.node(P);return C[P]=!0,E.neighbors(P).forEach(I=>{Object.hasOwn(C,I)||(N=h(E,C,N,I,P))}),R.low=j,R.lim=N++,T?R.parent=T:delete R.parent,N}function p(E){return E.edges().find(C=>E.edge(C).cutvalue<0)}function m(E,C,N){var P=N.v,T=N.w;C.hasEdge(P,T)||(P=N.w,T=N.v);var j=E.node(P),R=E.node(T),I=j,M=!1;j.lim>R.lim&&(I=R,M=!0);var z=C.edges().filter(F=>M===b(E,E.node(F.v),I)&&M!==b(E,E.node(F.w),I));return z.reduce((F,Y)=>t(C,Y)<t(C,F)?Y:F)}function x(E,C,N,P){var T=N.v,j=N.w;E.removeEdge(T,j),E.setEdge(P.v,P.w,{}),f(E),a(E,C),v(E,C)}function v(E,C){var N=E.nodes().find(T=>!C.node(T).parent),P=r(E,N);P=P.slice(1),P.forEach(T=>{var j=E.node(T).parent,R=C.edge(T,j),I=!1;R||(R=C.edge(j,T),I=!0),C.node(T).rank=C.node(j).rank+(I?R.minlen:-R.minlen)})}function k(E,C,N){return E.hasEdge(C,N)}function b(E,C,N){return N.low<=C.lim&&C.lim<=N.lim}return cw}var dw,PP;function uxe(){if(PP)return dw;PP=1;var e=sm(),t=e.longestPath,n=T3(),r=lxe();dw=i;function i(u){switch(u.graph().ranker){case"network-simplex":a(u);break;case"tight-tree":s(u);break;case"longest-path":o(u);break;default:a(u)}}var o=t;function s(u){t(u),n(u)}function a(u){r(u)}return dw}var fw,RP;function cxe(){if(RP)return fw;RP=1,fw=e;function e(r){let i=n(r);r.graph().dummyChains.forEach(o=>{let s=r.node(o),a=s.edgeObj,u=t(r,i,a.v,a.w),c=u.path,f=u.lca,h=0,p=c[h],m=!0;for(;o!==a.w;){if(s=r.node(o),m){for(;(p=c[h])!==f&&r.node(p).maxRank<s.rank;)h++;p===f&&(m=!1)}if(!m){for(;h<c.length-1&&r.node(p=c[h+1]).minRank<=s.rank;)h++;p=c[h]}r.setParent(o,p),o=r.successors(o)[0]}})}function t(r,i,o,s){let a=[],u=[],c=Math.min(i[o].low,i[s].low),f=Math.max(i[o].lim,i[s].lim),h,p;h=o;do h=r.parent(h),a.push(h);while(h&&(i[h].low>c||f>i[h].lim));for(p=h,h=s;(h=r.parent(h))!==p;)u.push(h);return{path:a.concat(u.reverse()),lca:p}}function n(r){let i={},o=0;function s(a){let u=o;r.children(a).forEach(s),i[a]={low:u,lim:o++}}return r.children().forEach(s),i}return fw}var hw,MP;function dxe(){if(MP)return hw;MP=1;let e=pn();hw={run:t,cleanup:o};function t(s){let a=e.addDummyNode(s,"root",{},"_root"),u=r(s),c=Object.values(u),f=e.applyWithChunking(Math.max,c)-1,h=2*f+1;s.graph().nestingRoot=a,s.edges().forEach(m=>s.edge(m).minlen*=h);let p=i(s)+1;s.children().forEach(m=>n(s,a,h,p,f,u,m)),s.graph().nodeRankFactor=h}function n(s,a,u,c,f,h,p){let m=s.children(p);if(!m.length){p!==a&&s.setEdge(a,p,{weight:0,minlen:u});return}let x=e.addBorderNode(s,"_bt"),v=e.addBorderNode(s,"_bb"),k=s.node(p);s.setParent(x,p),k.borderTop=x,s.setParent(v,p),k.borderBottom=v,m.forEach(b=>{n(s,a,u,c,f,h,b);let E=s.node(b),C=E.borderTop?E.borderTop:b,N=E.borderBottom?E.borderBottom:b,P=E.borderTop?c:2*c,T=C!==N?1:f-h[p]+1;s.setEdge(x,C,{weight:P,minlen:T,nestingEdge:!0}),s.setEdge(N,v,{weight:P,minlen:T,nestingEdge:!0})}),s.parent(p)||s.setEdge(a,x,{weight:0,minlen:f+h[p]})}function r(s){var a={};function u(c,f){var h=s.children(c);h&&h.length&&h.forEach(p=>u(p,f+1)),a[c]=f}return s.children().forEach(c=>u(c,1)),a}function i(s){return s.edges().reduce((a,u)=>a+s.edge(u).weight,0)}function o(s){var a=s.graph();s.removeNode(a.nestingRoot),delete a.nestingRoot,s.edges().forEach(u=>{var c=s.edge(u);c.nestingEdge&&s.removeEdge(u)})}return hw}var pw,jP;function fxe(){if(jP)return pw;jP=1;let e=pn();pw=t;function t(r){function i(o){let s=r.children(o),a=r.node(o);if(s.length&&s.forEach(i),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let u=a.minRank,c=a.maxRank+1;u<c;++u)n(r,"borderLeft","_bl",o,a,u),n(r,"borderRight","_br",o,a,u)}}r.children().forEach(i)}function n(r,i,o,s,a,u){let c={width:0,height:0,rank:u,borderType:i},f=a[i][u-1],h=e.addDummyNode(r,"border",c,o);a[i][u]=h,r.setParent(h,s),f&&r.setEdge(f,h,{weight:1})}return pw}var mw,DP;function hxe(){if(DP)return mw;DP=1,mw={adjust:e,undo:t};function e(u){let c=u.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&n(u)}function t(u){let c=u.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&i(u),(c==="lr"||c==="rl")&&(s(u),n(u))}function n(u){u.nodes().forEach(c=>r(u.node(c))),u.edges().forEach(c=>r(u.edge(c)))}function r(u){let c=u.width;u.width=u.height,u.height=c}function i(u){u.nodes().forEach(c=>o(u.node(c))),u.edges().forEach(c=>{let f=u.edge(c);f.points.forEach(o),Object.hasOwn(f,"y")&&o(f)})}function o(u){u.y=-u.y}function s(u){u.nodes().forEach(c=>a(u.node(c))),u.edges().forEach(c=>{let f=u.edge(c);f.points.forEach(a),Object.hasOwn(f,"x")&&a(f)})}function a(u){let c=u.x;u.x=u.y,u.y=c}return mw}var gw,OP;function pxe(){if(OP)return gw;OP=1;let e=pn();gw=t;function t(n){let r={},i=n.nodes().filter(f=>!n.children(f).length),o=i.map(f=>n.node(f).rank),s=e.applyWithChunking(Math.max,o),a=e.range(s+1).map(()=>[]);function u(f){if(r[f])return;r[f]=!0;let h=n.node(f);a[h.rank].push(f),n.successors(f).forEach(u)}return i.sort((f,h)=>n.node(f).rank-n.node(h).rank).forEach(u),a}return gw}var yw,IP;function mxe(){if(IP)return yw;IP=1;let e=pn().zipObject;yw=t;function t(r,i){let o=0;for(let s=1;s<i.length;++s)o+=n(r,i[s-1],i[s]);return o}function n(r,i,o){let s=e(o,o.map((p,m)=>m)),a=i.flatMap(p=>r.outEdges(p).map(m=>({pos:s[m.w],weight:r.edge(m).weight})).sort((m,x)=>m.pos-x.pos)),u=1;for(;u<o.length;)u<<=1;let c=2*u-1;u-=1;let f=new Array(c).fill(0),h=0;return a.forEach(p=>{let m=p.pos+u;f[m]+=p.weight;let x=0;for(;m>0;)m%2&&(x+=f[m+1]),m=m-1>>1,f[m]+=p.weight;h+=p.weight*x}),h}return yw}var xw,LP;function gxe(){if(LP)return xw;LP=1,xw=e;function e(t,n=[]){return n.map(r=>{let i=t.inEdges(r);if(i.length){let o=i.reduce((s,a)=>{let u=t.edge(a),c=t.node(a.v);return{sum:s.sum+u.weight*c.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:r}})}return xw}var vw,FP;function yxe(){if(FP)return vw;FP=1;let e=pn();vw=t;function t(i,o){let s={};i.forEach((u,c)=>{let f=s[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:c};u.barycenter!==void 0&&(f.barycenter=u.barycenter,f.weight=u.weight)}),o.edges().forEach(u=>{let c=s[u.v],f=s[u.w];c!==void 0&&f!==void 0&&(f.indegree++,c.out.push(s[u.w]))});let a=Object.values(s).filter(u=>!u.indegree);return n(a)}function n(i){let o=[];function s(u){return c=>{c.merged||(c.barycenter===void 0||u.barycenter===void 0||c.barycenter>=u.barycenter)&&r(u,c)}}function a(u){return c=>{c.in.push(u),--c.indegree===0&&i.push(c)}}for(;i.length;){let u=i.pop();o.push(u),u.in.reverse().forEach(s(u)),u.out.forEach(a(u))}return o.filter(u=>!u.merged).map(u=>e.pick(u,["vs","i","barycenter","weight"]))}function r(i,o){let s=0,a=0;i.weight&&(s+=i.barycenter*i.weight,a+=i.weight),o.weight&&(s+=o.barycenter*o.weight,a+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=s/a,i.weight=a,i.i=Math.min(o.i,i.i),o.merged=!0}return vw}var ww,$P;function xxe(){if($P)return ww;$P=1;let e=pn();ww=t;function t(i,o){let s=e.partition(i,x=>Object.hasOwn(x,"barycenter")),a=s.lhs,u=s.rhs.sort((x,v)=>v.i-x.i),c=[],f=0,h=0,p=0;a.sort(r(!!o)),p=n(c,u,p),a.forEach(x=>{p+=x.vs.length,c.push(x.vs),f+=x.barycenter*x.weight,h+=x.weight,p=n(c,u,p)});let m={vs:c.flat(!0)};return h&&(m.barycenter=f/h,m.weight=h),m}function n(i,o,s){let a;for(;o.length&&(a=o[o.length-1]).i<=s;)o.pop(),i.push(a.vs),s++;return s}function r(i){return(o,s)=>o.barycenter<s.barycenter?-1:o.barycenter>s.barycenter?1:i?s.i-o.i:o.i-s.i}return ww}var bw,zP;function vxe(){if(zP)return bw;zP=1;let e=gxe(),t=yxe(),n=xxe();bw=r;function r(s,a,u,c){let f=s.children(a),h=s.node(a),p=h?h.borderLeft:void 0,m=h?h.borderRight:void 0,x={};p&&(f=f.filter(E=>E!==p&&E!==m));let v=e(s,f);v.forEach(E=>{if(s.children(E.v).length){let C=r(s,E.v,u,c);x[E.v]=C,Object.hasOwn(C,"barycenter")&&o(E,C)}});let k=t(v,u);i(k,x);let b=n(k,c);if(p&&(b.vs=[p,b.vs,m].flat(!0),s.predecessors(p).length)){let E=s.node(s.predecessors(p)[0]),C=s.node(s.predecessors(m)[0]);Object.hasOwn(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+E.order+C.order)/(b.weight+2),b.weight+=2}return b}function i(s,a){s.forEach(u=>{u.vs=u.vs.flatMap(c=>a[c]?a[c].vs:c)})}function o(s,a){s.barycenter!==void 0?(s.barycenter=(s.barycenter*s.weight+a.barycenter*a.weight)/(s.weight+a.weight),s.weight+=a.weight):(s.barycenter=a.barycenter,s.weight=a.weight)}return bw}var kw,BP;function wxe(){if(BP)return kw;BP=1;let e=Ci().Graph,t=pn();kw=n;function n(i,o,s){let a=r(i),u=new e({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(c=>i.node(c));return i.nodes().forEach(c=>{let f=i.node(c),h=i.parent(c);(f.rank===o||f.minRank<=o&&o<=f.maxRank)&&(u.setNode(c),u.setParent(c,h||a),i[s](c).forEach(p=>{let m=p.v===c?p.w:p.v,x=u.edge(m,c),v=x!==void 0?x.weight:0;u.setEdge(m,c,{weight:i.edge(p).weight+v})}),Object.hasOwn(f,"minRank")&&u.setNode(c,{borderLeft:f.borderLeft[o],borderRight:f.borderRight[o]}))}),u}function r(i){for(var o;i.hasNode(o=t.uniqueId("_root")););return o}return kw}var Sw,VP;function bxe(){if(VP)return Sw;VP=1,Sw=e;function e(t,n,r){let i={},o;r.forEach(s=>{let a=t.parent(s),u,c;for(;a;){if(u=t.parent(a),u?(c=i[u],i[u]=a):(c=o,o=a),c&&c!==a){n.setEdge(c,a);return}a=u}})}return Sw}var Ew,WP;function kxe(){if(WP)return Ew;WP=1;let e=pxe(),t=mxe(),n=vxe(),r=wxe(),i=bxe(),o=Ci().Graph,s=pn();Ew=a;function a(h,p){if(p&&typeof p.customOrder=="function"){p.customOrder(h,a);return}let m=s.maxRank(h),x=u(h,s.range(1,m+1),"inEdges"),v=u(h,s.range(m-1,-1,-1),"outEdges"),k=e(h);if(f(h,k),p&&p.disableOptimalOrderHeuristic)return;let b=Number.POSITIVE_INFINITY,E;for(let C=0,N=0;N<4;++C,++N){c(C%2?x:v,C%4>=2),k=s.buildLayerMatrix(h);let P=t(h,k);P<b&&(N=0,E=Object.assign({},k),b=P)}f(h,E)}function u(h,p,m){return p.map(function(x){return r(h,x,m)})}function c(h,p){let m=new o;h.forEach(function(x){let v=x.graph().root,k=n(x,v,m,p);k.vs.forEach((b,E)=>x.node(b).order=E),i(x,m,k.vs)})}function f(h,p){Object.values(p).forEach(m=>m.forEach((x,v)=>h.node(x).order=v))}return Ew}var Cw,UP;function Sxe(){if(UP)return Cw;UP=1;let e=Ci().Graph,t=pn();Cw={positionX:m,findType1Conflicts:n,findType2Conflicts:r,addConflict:o,hasConflict:s,verticalAlignment:a,horizontalCompaction:u,alignCoordinates:h,findSmallestWidthAlignment:f,balance:p};function n(k,b){let E={};function C(N,P){let T=0,j=0,R=N.length,I=P[P.length-1];return P.forEach((M,z)=>{let F=i(k,M),Y=F?k.node(F).order:R;(F||M===I)&&(P.slice(j,z+1).forEach(O=>{k.predecessors(O).forEach(q=>{let W=k.node(q),Z=W.order;(Z<T||Y<Z)&&!(W.dummy&&k.node(O).dummy)&&o(E,q,O)})}),j=z+1,T=Y)}),P}return b.length&&b.reduce(C),E}function r(k,b){let E={};function C(P,T,j,R,I){let M;t.range(T,j).forEach(z=>{M=P[z],k.node(M).dummy&&k.predecessors(M).forEach(F=>{let Y=k.node(F);Y.dummy&&(Y.order<R||Y.order>I)&&o(E,F,M)})})}function N(P,T){let j=-1,R,I=0;return T.forEach((M,z)=>{if(k.node(M).dummy==="border"){let F=k.predecessors(M);F.length&&(R=k.node(F[0]).order,C(T,I,z,j,R),I=z,j=R)}C(T,I,T.length,R,P.length)}),T}return b.length&&b.reduce(N),E}function i(k,b){if(k.node(b).dummy)return k.predecessors(b).find(E=>k.node(E).dummy)}function o(k,b,E){if(b>E){let N=b;b=E,E=N}let C=k[b];C||(k[b]=C={}),C[E]=!0}function s(k,b,E){if(b>E){let C=b;b=E,E=C}return!!k[b]&&Object.hasOwn(k[b],E)}function a(k,b,E,C){let N={},P={},T={};return b.forEach(j=>{j.forEach((R,I)=>{N[R]=R,P[R]=R,T[R]=I})}),b.forEach(j=>{let R=-1;j.forEach(I=>{let M=C(I);if(M.length){M=M.sort((F,Y)=>T[F]-T[Y]);let z=(M.length-1)/2;for(let F=Math.floor(z),Y=Math.ceil(z);F<=Y;++F){let O=M[F];P[I]===I&&R<T[O]&&!s(E,I,O)&&(P[O]=I,P[I]=N[I]=N[O],R=T[O])}}})}),{root:N,align:P}}function u(k,b,E,C,N){let P={},T=c(k,b,E,N),j=N?"borderLeft":"borderRight";function R(z,F){let Y=T.nodes(),O=Y.pop(),q={};for(;O;)q[O]?z(O):(q[O]=!0,Y.push(O),Y=Y.concat(F(O))),O=Y.pop()}function I(z){P[z]=T.inEdges(z).reduce((F,Y)=>Math.max(F,P[Y.v]+T.edge(Y)),0)}function M(z){let F=T.outEdges(z).reduce((O,q)=>Math.min(O,P[q.w]-T.edge(q)),Number.POSITIVE_INFINITY),Y=k.node(z);F!==Number.POSITIVE_INFINITY&&Y.borderType!==j&&(P[z]=Math.max(P[z],F))}return R(I,T.predecessors.bind(T)),R(M,T.successors.bind(T)),Object.keys(C).forEach(z=>P[z]=P[E[z]]),P}function c(k,b,E,C){let N=new e,P=k.graph(),T=x(P.nodesep,P.edgesep,C);return b.forEach(j=>{let R;j.forEach(I=>{let M=E[I];if(N.setNode(M),R){var z=E[R],F=N.edge(z,M);N.setEdge(z,M,Math.max(T(k,I,R),F||0))}R=I})}),N}function f(k,b){return Object.values(b).reduce((E,C)=>{let N=Number.NEGATIVE_INFINITY,P=Number.POSITIVE_INFINITY;Object.entries(C).forEach(([j,R])=>{let I=v(k,j)/2;N=Math.max(R+I,N),P=Math.min(R-I,P)});const T=N-P;return T<E[0]&&(E=[T,C]),E},[Number.POSITIVE_INFINITY,null])[1]}function h(k,b){let E=Object.values(b),C=t.applyWithChunking(Math.min,E),N=t.applyWithChunking(Math.max,E);["u","d"].forEach(P=>{["l","r"].forEach(T=>{let j=P+T,R=k[j];if(R===b)return;let I=Object.values(R),M=C-t.applyWithChunking(Math.min,I);T!=="l"&&(M=N-t.applyWithChunking(Math.max,I)),M&&(k[j]=t.mapValues(R,z=>z+M))})})}function p(k,b){return t.mapValues(k.ul,(E,C)=>{if(b)return k[b.toLowerCase()][C];{let N=Object.values(k).map(P=>P[C]).sort((P,T)=>P-T);return(N[1]+N[2])/2}})}function m(k){let b=t.buildLayerMatrix(k),E=Object.assign(n(k,b),r(k,b)),C={},N;["u","d"].forEach(T=>{N=T==="u"?b:Object.values(b).reverse(),["l","r"].forEach(j=>{j==="r"&&(N=N.map(z=>Object.values(z).reverse()));let R=(T==="u"?k.predecessors:k.successors).bind(k),I=a(k,N,E,R),M=u(k,N,I.root,I.align,j==="r");j==="r"&&(M=t.mapValues(M,z=>-z)),C[T+j]=M})});let P=f(k,C);return h(C,P),p(C,k.graph().align)}function x(k,b,E){return(C,N,P)=>{let T=C.node(N),j=C.node(P),R=0,I;if(R+=T.width/2,Object.hasOwn(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":I=-T.width/2;break;case"r":I=T.width/2;break}if(I&&(R+=E?I:-I),I=0,R+=(T.dummy?b:k)/2,R+=(j.dummy?b:k)/2,R+=j.width/2,Object.hasOwn(j,"labelpos"))switch(j.labelpos.toLowerCase()){case"l":I=j.width/2;break;case"r":I=-j.width/2;break}return I&&(R+=E?I:-I),I=0,R}}function v(k,b){return k.node(b).width}return Cw}var _w,HP;function Exe(){if(HP)return _w;HP=1;let e=pn(),t=Sxe().positionX;_w=n;function n(i){i=e.asNonCompoundGraph(i),r(i),Object.entries(t(i)).forEach(([o,s])=>i.node(o).x=s)}function r(i){let o=e.buildLayerMatrix(i),s=i.graph().ranksep,a=0;o.forEach(u=>{const c=u.reduce((f,h)=>{const p=i.node(h).height;return f>p?f:p},0);u.forEach(f=>i.node(f).y=a+c/2),a+=c+s})}return _w}var Nw,YP;function Cxe(){if(YP)return Nw;YP=1;let e=sxe(),t=axe(),n=uxe(),r=pn().normalizeRanks,i=cxe(),o=pn().removeEmptyRanks,s=dxe(),a=fxe(),u=hxe(),c=kxe(),f=Exe(),h=pn(),p=Ci().Graph;Nw=m;function m(D,G){let K=G&&G.debugTiming?h.time:h.notime;K("layout",()=>{let J=K(" buildLayoutGraph",()=>R(D));K(" runLayout",()=>x(J,K,G)),K(" updateInputGraph",()=>v(D,J))})}function x(D,G,K){G(" makeSpaceForEdgeLabels",()=>I(D)),G(" removeSelfEdges",()=>U(D)),G(" acyclic",()=>e.run(D)),G(" nestingGraph.run",()=>s.run(D)),G(" rank",()=>n(h.asNonCompoundGraph(D))),G(" injectEdgeLabelProxies",()=>M(D)),G(" removeEmptyRanks",()=>o(D)),G(" nestingGraph.cleanup",()=>s.cleanup(D)),G(" normalizeRanks",()=>r(D)),G(" assignRankMinMax",()=>z(D)),G(" removeEdgeLabelProxies",()=>F(D)),G(" normalize.run",()=>t.run(D)),G(" parentDummyChains",()=>i(D)),G(" addBorderSegments",()=>a(D)),G(" order",()=>c(D,K)),G(" insertSelfEdges",()=>B(D)),G(" adjustCoordinateSystem",()=>u.adjust(D)),G(" position",()=>f(D)),G(" positionSelfEdges",()=>L(D)),G(" removeBorderNodes",()=>Z(D)),G(" normalize.undo",()=>t.undo(D)),G(" fixupEdgeLabelCoords",()=>q(D)),G(" undoCoordinateSystem",()=>u.undo(D)),G(" translateGraph",()=>Y(D)),G(" assignNodeIntersects",()=>O(D)),G(" reversePoints",()=>W(D)),G(" acyclic.undo",()=>e.undo(D))}function v(D,G){D.nodes().forEach(K=>{let J=D.node(K),ee=G.node(K);J&&(J.x=ee.x,J.y=ee.y,J.rank=ee.rank,G.children(K).length&&(J.width=ee.width,J.height=ee.height))}),D.edges().forEach(K=>{let J=D.edge(K),ee=G.edge(K);J.points=ee.points,Object.hasOwn(ee,"x")&&(J.x=ee.x,J.y=ee.y)}),D.graph().width=G.graph().width,D.graph().height=G.graph().height}let k=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],C=["width","height"],N={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},j=["labelpos"];function R(D){let G=new p({multigraph:!0,compound:!0}),K=V(D.graph());return G.setGraph(Object.assign({},b,H(K,k),h.pick(K,E))),D.nodes().forEach(J=>{let ee=V(D.node(J));const ie=H(ee,C);Object.keys(N).forEach(ce=>{ie[ce]===void 0&&(ie[ce]=N[ce])}),G.setNode(J,ie),G.setParent(J,D.parent(J))}),D.edges().forEach(J=>{let ee=V(D.edge(J));G.setEdge(J,Object.assign({},T,H(ee,P),h.pick(ee,j)))}),G}function I(D){let G=D.graph();G.ranksep/=2,D.edges().forEach(K=>{let J=D.edge(K);J.minlen*=2,J.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?J.width+=J.labeloffset:J.height+=J.labeloffset)})}function M(D){D.edges().forEach(G=>{let K=D.edge(G);if(K.width&&K.height){let J=D.node(G.v),ie={rank:(D.node(G.w).rank-J.rank)/2+J.rank,e:G};h.addDummyNode(D,"edge-proxy",ie,"_ep")}})}function z(D){let G=0;D.nodes().forEach(K=>{let J=D.node(K);J.borderTop&&(J.minRank=D.node(J.borderTop).rank,J.maxRank=D.node(J.borderBottom).rank,G=Math.max(G,J.maxRank))}),D.graph().maxRank=G}function F(D){D.nodes().forEach(G=>{let K=D.node(G);K.dummy==="edge-proxy"&&(D.edge(K.e).labelRank=K.rank,D.removeNode(G))})}function Y(D){let G=Number.POSITIVE_INFINITY,K=0,J=Number.POSITIVE_INFINITY,ee=0,ie=D.graph(),ce=ie.marginx||0,he=ie.marginy||0;function Ee(fe){let xe=fe.x,Me=fe.y,Ve=fe.width,ot=fe.height;G=Math.min(G,xe-Ve/2),K=Math.max(K,xe+Ve/2),J=Math.min(J,Me-ot/2),ee=Math.max(ee,Me+ot/2)}D.nodes().forEach(fe=>Ee(D.node(fe))),D.edges().forEach(fe=>{let xe=D.edge(fe);Object.hasOwn(xe,"x")&&Ee(xe)}),G-=ce,J-=he,D.nodes().forEach(fe=>{let xe=D.node(fe);xe.x-=G,xe.y-=J}),D.edges().forEach(fe=>{let xe=D.edge(fe);xe.points.forEach(Me=>{Me.x-=G,Me.y-=J}),Object.hasOwn(xe,"x")&&(xe.x-=G),Object.hasOwn(xe,"y")&&(xe.y-=J)}),ie.width=K-G+ce,ie.height=ee-J+he}function O(D){D.edges().forEach(G=>{let K=D.edge(G),J=D.node(G.v),ee=D.node(G.w),ie,ce;K.points?(ie=K.points[0],ce=K.points[K.points.length-1]):(K.points=[],ie=ee,ce=J),K.points.unshift(h.intersectRect(J,ie)),K.points.push(h.intersectRect(ee,ce))})}function q(D){D.edges().forEach(G=>{let K=D.edge(G);if(Object.hasOwn(K,"x"))switch((K.labelpos==="l"||K.labelpos==="r")&&(K.width-=K.labeloffset),K.labelpos){case"l":K.x-=K.width/2+K.labeloffset;break;case"r":K.x+=K.width/2+K.labeloffset;break}})}function W(D){D.edges().forEach(G=>{let K=D.edge(G);K.reversed&&K.points.reverse()})}function Z(D){D.nodes().forEach(G=>{if(D.children(G).length){let K=D.node(G),J=D.node(K.borderTop),ee=D.node(K.borderBottom),ie=D.node(K.borderLeft[K.borderLeft.length-1]),ce=D.node(K.borderRight[K.borderRight.length-1]);K.width=Math.abs(ce.x-ie.x),K.height=Math.abs(ee.y-J.y),K.x=ie.x+K.width/2,K.y=J.y+K.height/2}}),D.nodes().forEach(G=>{D.node(G).dummy==="border"&&D.removeNode(G)})}function U(D){D.edges().forEach(G=>{if(G.v===G.w){var K=D.node(G.v);K.selfEdges||(K.selfEdges=[]),K.selfEdges.push({e:G,label:D.edge(G)}),D.removeEdge(G)}})}function B(D){var G=h.buildLayerMatrix(D);G.forEach(K=>{var J=0;K.forEach((ee,ie)=>{var ce=D.node(ee);ce.order=ie+J,(ce.selfEdges||[]).forEach(he=>{h.addDummyNode(D,"selfedge",{width:he.label.width,height:he.label.height,rank:ce.rank,order:ie+ ++J,e:he.e,label:he.label},"_se")}),delete ce.selfEdges})})}function L(D){D.nodes().forEach(G=>{var K=D.node(G);if(K.dummy==="selfedge"){var J=D.node(K.e.v),ee=J.x+J.width/2,ie=J.y,ce=K.x-ee,he=J.height/2;D.setEdge(K.e,K.label),D.removeNode(G),K.label.points=[{x:ee+2*ce/3,y:ie-he},{x:ee+5*ce/6,y:ie-he},{x:ee+ce,y:ie},{x:ee+5*ce/6,y:ie+he},{x:ee+2*ce/3,y:ie+he}],K.label.x=K.x,K.label.y=K.y}})}function H(D,G){return h.mapValues(h.pick(D,G),Number)}function V(D){var G={};return D&&Object.entries(D).forEach(([K,J])=>{typeof K=="string"&&(K=K.toLowerCase()),G[K]=J}),G}return Nw}var Tw,qP;function _xe(){if(qP)return Tw;qP=1;let e=pn(),t=Ci().Graph;Tw={debugOrdering:n};function n(r){let i=e.buildLayerMatrix(r),o=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(s=>{o.setNode(s,{label:s}),o.setParent(s,"layer"+r.node(s).rank)}),r.edges().forEach(s=>o.setEdge(s.v,s.w,{},s.name)),i.forEach((s,a)=>{let u="layer"+a;o.setNode(u,{rank:"same"}),s.reduce((c,f)=>(o.setEdge(c,f,{style:"invis"}),f))}),o}return Tw}var Aw,GP;function Nxe(){return GP||(GP=1,Aw="1.1.4"),Aw}var Pw,ZP;function Txe(){return ZP||(ZP=1,Pw={graphlib:Ci(),layout:Cxe(),debug:_xe(),util:{time:pn().time,notime:pn().notime},version:Nxe()}),Pw}var Axe=Txe();const KP=tu(Axe);function XP(e){let t=[];if(!e)return t;function n(r,i){const o=Object.entries(r).find(([s])=>s.includes("."));if(o){const[s,a]=o,[u,...c]=s.split("."),f={step:{id:u},path:c.join(".")};t.push({ref:f,query:{[a===!0||a===!1?"is":"eq"]:String(a)},conj:i})}if("ref"in r){const{ref:s,query:a}=r;t.push({ref:s,query:a,conj:i})}if("and"in r)for(const s of r.and)n({...s},"and");if("or"in r)for(const s of r.or)n({...s},"or")}return n(e),t}const QP=(e,t)=>{const n=new KP.graphlib.Graph().setDefaultEdgeLabel(()=>({}));return n.setGraph({rankdir:"TB"}),t.forEach(r=>n.setEdge(r.source,r.target)),e.forEach(r=>{var i,o;return n.setNode(r.id,{...r,width:((i=r.measured)==null?void 0:i.width)??274,height:((o=r.measured)==null?void 0:o.height)??100})}),KP.layout(n),{nodes:e.map(r=>{var a,u;const i=n.node(r.id),o=i.x-(((a=r.measured)==null?void 0:a.width)??274)/2,s=i.y-(((u=r.measured)==null?void 0:u.height)??100)/2;return{...r,position:{x:o,y:s}}}),edges:t}},Kh={animated:!0,markerEnd:{type:_d.ArrowClosed,width:20,height:20,color:"#8e8e8e"}},Pxe=({stepGraph:e,stepSubscriberGraph:t})=>{if(!e)return{nodes:[],edges:[]};const{initial:n,...r}=e;if(!n.length)return{nodes:[],edges:[]};let i=[],o=[];for(const[u,c]of n.entries()){const h=c.step.id,p=[c,...(r==null?void 0:r[h])||[]].reduce((k,b,E)=>{var N;const C={...b.step,label:b.step.id,type:"default-node",id:i.some(P=>P.id===b.step.id)?`${b.step.id}-${E}`:b.step.id};if((N=b.config)!=null&&N.when){const P=XP(b.config.when),T={id:crypto.randomUUID(),conditions:P,type:"condition-node"};k.push(T)}return k.push(C),k},[]),m=[...p].map((k,b)=>{const E=t==null?void 0:t[k.id];return{id:k.id,position:{x:u*300,y:b*100},type:k.type,data:{conditions:k.conditions,label:k.label,description:k.description,withoutTopHandle:E!=null&&E[k.id]?!1:b===0,withoutBottomHandle:E?!1:b===p.length-1}}});i=[...i,...m];const v=[...p].slice(0,-1).map((k,b)=>({id:`e${k.id}-${p[b+1].id}`,source:k.id,target:p[b+1].id,...Kh}));o=[...o,...v]}if(!t||!Object.keys(t).length){const{nodes:u,edges:c}=QP(i,o);return{nodes:u,edges:c}}for(const[u,c]of Object.entries(t)){const{initial:f,...h}=c;if(f.length)for(const[p,m]of f.entries()){const v=m.step.id,k=[m,...(h==null?void 0:h[v])||[]].map(I=>I.step),b=[m,...(h==null?void 0:h[v])||[]].reduce((I,M,z)=>{var Y;const F={...M.step,label:M.step.id,type:"default-node",id:i.some(O=>O.id===M.step.id)?`${M.step.id}-${z}`:M.step.id};if((Y=M.config)!=null&&Y.when){const O=XP(M.config.when),q={id:crypto.randomUUID(),conditions:O,type:"condition-node"};I.push(q)}return I.push(F),I},[]),E=[...b].map((I,M)=>{const z=t==null?void 0:t[I.id];return{id:I.id,position:{x:p*300+300,y:M*100+100},type:I.type,data:{conditions:I.conditions,label:I.label,description:I.description,withoutBottomHandle:k.some(({id:F})=>F===I.label&&F!==I.id)||z?!1:M===b.length-1}}});i=[...i,...E];const N=[...b].slice(0,-1).map((I,M)=>({id:`e${I.id}-${b[M+1].id}`,source:I.id,target:b[M+1].id,...Kh})),P=b[0],T=b[b.length-1],j=u===P.id?[]:[{id:`e${u}-${P.id}`,source:u,target:P.id,...Kh}],R=k.some(({id:I})=>I===T.label&&I!==T.id)?[{id:`e${T.id}-${u}`,source:T.id,target:u,...Kh}]:[];o=[...o,...j,...N,...R]}}const{nodes:s,edges:a}=QP(i,o);return{nodes:s,edges:a}};function Rxe({data:e}){const{conditions:t}=e;return y.jsxs("div",{className:Te("bg-mastra-bg-3 rounded-md min-w-[154.23px] max-w-[274px] flex flex-col p-2 gap-2"),children:[y.jsx(Ms,{type:"target",position:Ue.Top,style:{visibility:"hidden"}}),t.map((n,r)=>{var i;return y.jsx(S.Fragment,{children:n.ref.step?y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(an,{size:"xs",weight:"medium",className:"text-mastra-el-3 bg-mastra-bg-11 my-auto block rounded-[0.125rem] px-2 py-1 text-[10px]",children:((i=n.conj)==null?void 0:i.toLocaleUpperCase())||"WHEN"}),y.jsxs(an,{size:"xs",className:" text-mastra-el-3",children:[n.ref.step.id||n.ref.step,"'s ",n.ref.path," ",Object.entries(n.query).map(([o,s])=>y.jsxs("span",{className:"flex items-center gap-0.5",children:[y.jsx(an,{size:"xs",className:"lowercase",children:o}),y.jsx(an,{size:"xs",children:s})]},`${o}-${s}`))]})]}):null},`${n.ref.path}-${r}`)}),y.jsx(Ms,{type:"source",position:Ue.Bottom,style:{visibility:"hidden"}})]})}function Mxe({data:e}){const{label:t,description:n,withoutTopHandle:r,withoutBottomHandle:i}=e;return y.jsxs("div",{className:Te("bg-mastra-bg-8 rounded-md w-[274px]"),children:[!r&&y.jsx(Ms,{type:"target",position:Ue.Top,style:{visibility:"hidden"}}),y.jsx("div",{className:"p-2",children:y.jsxs("div",{className:"text-sm bg-mastra-bg-9 flex items-center gap-[6px] rounded-sm p-2",children:[y.jsx(sV,{className:"text-current w-4 h-4"}),y.jsx(an,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:t})]})}),n&&y.jsx("div",{className:"bg-mastra-bg-4 rounded-b-md p-2 text-[10px] text-left text-mastra-el-4",children:n}),!i&&y.jsx(Ms,{type:"source",position:Ue.Bottom,style:{visibility:"hidden"}})]})}function jxe({workflow:e}){const{nodes:t,edges:n}=Pxe(e),[r,i,o]=vye(t),[s]=wye(n),a={"default-node":Mxe,"condition-node":Rxe};return y.jsx("div",{className:"w-full h-full",children:y.jsxs(xye,{nodes:r,edges:s,nodeTypes:a,onNodesChange:o,fitView:!0,fitViewOptions:{maxZoom:.85},children:[y.jsx(Mye,{}),y.jsx(Uye,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),y.jsx(Cye,{variant:To.Dots,gap:12,size:.5})]})})}function Dxe({workflowId:e}){return y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs w-[400px]",children:y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"GET"}),y.jsx("p",{className:"text-mastra-el-5",children:"/api/workflows"})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"GET"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/workflows/",e]})]}),y.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[y.jsx("p",{className:"text-mastra-el-3",children:"POST"}),y.jsxs("p",{className:"text-mastra-el-5",children:["/api/workflows/",e,"/execute"]})]})]})})}function Oxe({runId:e}){const{logs:t,isLoading:n,refetchLogs:r}=cD(e);return y.jsxs(Rn,{className:"h-[calc(100vh-126px)] px-4 pb-4 text-xs w-[400px]",children:[y.jsx("div",{className:"flex justify-end sticky top-0 bg-mastra-bg-2 py-2",children:y.jsx(Mt,{variant:"outline",onClick:()=>r(e),children:n?y.jsx(jl,{className:"w-4 h-4 animate-spin"}):y.jsx(jl,{className:"w-4 h-4"})})}),y.jsx("div",{className:"space-y-4",children:t.length===0?y.jsxs("p",{className:"text-gray-300/60",children:["No log drains. By default, logs are sent to the console. To configure log drains see"," ",y.jsx("a",{href:"https://mastra.ai/docs/reference/observability/create-logger#upstash-logger-remote-log-drain",target:"_blank",rel:"noopener",className:" hover:text-gray-100 underline",children:"docs."})]}):t.map(i=>{const o=JSON.parse(i.message);return y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex gap-2 items-center",children:[y.jsxs("p",{className:"text-mastra-el-4",children:["[",i.timestamp,"]"]}),y.jsxs("p",{className:"text-mastra-el-5",children:["[",i.level,"]"]})]}),y.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:y.jsx("code",{children:JSON.stringify(o,null,2)})})]},i.timestamp)})})]})}function Ixe({workflowId:e,setRunId:t}){const{isLoading:n,workflow:r}=L4(e),{executeWorkflow:i,isExecutingWorkflow:o}=tde(),[s,a]=S.useState(null),u=r==null?void 0:r.triggerSchema,c=async h=>{if(!r)return;const p=await i({workflowId:e,input:h});a(p),t(p.runId)};if(n)return y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:y.jsx("div",{className:"space-y-4",children:y.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2",children:[y.jsx(We,{className:"h-3"}),y.jsx(We,{className:"h-3"})]})})});if(!r)return null;if(!u)return y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs w-[400px]",children:y.jsxs("div",{className:"space-y-4",children:[y.jsx("div",{className:"space-y-4 px-4",children:y.jsx(Mt,{className:"w-full",disabled:o,onClick:()=>c(null),children:o?y.jsx(yR,{className:"h-4 w-4 animate-spin"}):"Trigger"})}),y.jsxs("div",{children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),y.jsx("div",{className:"flex flex-col gap-2",children:y.jsx(Hc,{classname:"absolute z-40 top-4 right-4 w-8 h-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity duration-150 ease-in-out",content:JSON.stringify(s??{},null,2)})}),y.jsx(Kp,{className:"w-[368px] overflow-x-auto",code:JSON.stringify(s??{},null,2),language:"json"})]})]})});const f=ck(nk(rk(u)));return y.jsx(Rn,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs w-[400px]",children:y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Input"}),y.jsx(wk,{schema:f,isSubmitLoading:o,onSubmit:h=>{c(h)}})]}),y.jsxs("div",{children:[y.jsx(an,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),y.jsx("div",{className:"flex flex-col gap-2",children:y.jsx(Hc,{classname:"absolute z-40 top-4 right-4 w-8 h-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity duration-150 ease-in-out",content:JSON.stringify(s??{},null,2)})}),y.jsx(Kp,{className:"w-[368px] overflow-x-auto",code:JSON.stringify(s??{},null,2),language:"json"})]})]})})}function JP({workflowId:e}){const[t,n]=S.useState("");return y.jsxs(P1,{defaultValue:"run",children:[y.jsxs(Mm,{className:"flex shrink-0 border-b",children:[y.jsx(Co,{value:"run",className:"group",children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Run"})}),y.jsx(Co,{value:"endpoints",className:"group",children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Endpoints"})}),y.jsx(Co,{value:"logs",className:"group",children:y.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Log Drains"})})]}),y.jsx(_o,{value:"run",children:e?y.jsx(Ixe,{workflowId:e,setRunId:n}):null}),y.jsx(_o,{value:"endpoints",children:y.jsx(Dxe,{workflowId:e})}),y.jsx(_o,{value:"logs",children:y.jsx(Oxe,{runId:t})})]})}function Lxe(){const{workflowId:e}=Rd(),{workflow:t,isLoading:n}=L4(e);if(n)return y.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y.jsx(sr,{title:y.jsx(We,{className:"h-6 w-[200px]"})}),y.jsxs("main",{className:"flex-1 relative grid grid-cols-[1fr_400px] divide-x",children:[y.jsx("div",{className:"p-4",children:y.jsx(We,{className:"h-[600px]"})}),y.jsx("div",{className:"flex flex-col",children:y.jsx(JP,{workflowId:e})})]})]});const r=[{label:"Workflows",href:"/workflows"},{label:t==null?void 0:t.name,href:`/workflows/${e}`,isCurrent:!0}];return y.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y.jsx(sr,{title:y.jsx(Wd,{items:r})}),y.jsxs("main",{className:"flex-1 relative grid grid-cols-[1fr_400px] divide-x",children:[y.jsx(jxe,{workflow:t}),y.jsx("div",{className:"flex flex-col",children:y.jsx(JP,{workflowId:e})})]})]})}function Fxe(){return y.jsx(FB,{children:y.jsx(pB,{children:y.jsxs(Gr,{element:y.jsx(C6,{children:y.jsx(fB,{})}),children:[y.jsx(Gr,{path:"/agents",element:y.jsx(e8,{})}),y.jsx(Gr,{path:"/agents/:agentId",element:y.jsx(mT,{})}),y.jsx(Gr,{path:"/agents/:agentId/evals",element:y.jsx(Cne,{})}),y.jsx(Gr,{path:"/agents/:agentId/:threadId",element:y.jsx(mT,{})}),y.jsx(Gr,{path:"/tools",element:y.jsx(T6,{})}),y.jsx(Gr,{path:"/tools/:agentId/:toolId",element:y.jsx(Xce,{})}),y.jsx(Gr,{path:"/tools/all/:toolId",element:y.jsx(Jce,{})}),y.jsx(Gr,{path:"/workflows",element:y.jsx(nde,{})}),y.jsx(Gr,{path:"/workflows/:workflowId",element:y.jsx(Lxe,{})}),y.jsx(Gr,{path:"/",element:y.jsx(dB,{to:"/agents"})})]})})})}wz.createRoot(document.getElementById("root")).render(y.jsx(S.StrictMode,{children:y.jsx(Fxe,{})}));export{DX as _,uH as a,_H as b,LN as c,bH as f,CH as h,c1 as s,pH as w};
|