@hyperflow.fun/ghost 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/index.js +220545 -0
- package/dist/package.json +4 -0
- package/dist/skills/builtin/briefing/SKILL.md +77 -0
- package/dist/skills/builtin/clawhub/SKILL.md +50 -0
- package/dist/skills/builtin/event-judge/SKILL.md +122 -0
- package/dist/skills/builtin/market-intel/SKILL.md +160 -0
- package/dist/skills/builtin/position-monitor/SKILL.md +84 -0
- package/dist/skills/builtin/pre-trade-advisory/SKILL.md +203 -0
- package/dist/skills/builtin/risk-manager/SKILL.md +124 -0
- package/dist/skills/builtin/skill-creator/SKILL.md +68 -0
- package/dist/skills/builtin/skill-creator/references/guide.md +158 -0
- package/dist/skills/builtin/skill-creator/scripts/init_skill.py +378 -0
- package/dist/skills/builtin/skill-creator/scripts/package_skill.py +154 -0
- package/dist/skills/builtin/skill-creator/scripts/quick_validate.py +213 -0
- package/dist/skills/builtin/skills-sh/SKILL.md +56 -0
- package/dist/skills/builtin/technical-analysis/SKILL.md +242 -0
- package/dist/skills/builtin/trade-executor/SKILL.md +179 -0
- package/dist/templates/SOUL.md +73 -0
- package/dist/web/dist/assets/Chart-DwirCj9o.js +1 -0
- package/dist/web/dist/assets/Config-Csnvaqpn.js +1 -0
- package/dist/web/dist/assets/Cost-BSD_2GYX.js +6 -0
- package/dist/web/dist/assets/Cron-BVKdKUFN.js +16 -0
- package/dist/web/dist/assets/Dashboard-Ccr5J95V.js +21 -0
- package/dist/web/dist/assets/Logs-CUgA7IGb.js +21 -0
- package/dist/web/dist/assets/Memory-C_Q_iNlN.js +12 -0
- package/dist/web/dist/assets/SF-Pro-Display-Bold-CkqE-6tD.otf +0 -0
- package/dist/web/dist/assets/SF-Pro-Display-Medium-DSttQARu.otf +0 -0
- package/dist/web/dist/assets/SF-Pro-Display-Regular-DF_3XEGl.otf +0 -0
- package/dist/web/dist/assets/SF-Pro-Display-Semibold-Dg2-djaL.otf +0 -0
- package/dist/web/dist/assets/Sessions-KDhnYDnX.js +11 -0
- package/dist/web/dist/assets/Skills-BK-V7HFa.js +1 -0
- package/dist/web/dist/assets/Tools-a3aqqugu.js +1 -0
- package/dist/web/dist/assets/abap-BdImnpbu.js +1 -0
- package/dist/web/dist/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/web/dist/assets/activity-DsxRdk-G.js +6 -0
- package/dist/web/dist/assets/ada-bCR0ucgS.js +1 -0
- package/dist/web/dist/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/web/dist/assets/angular-html-CU67Zn6k.js +1 -0
- package/dist/web/dist/assets/angular-ts-BwZT4LLn.js +1 -0
- package/dist/web/dist/assets/apache-Pmp26Uib.js +1 -0
- package/dist/web/dist/assets/apex-D8_7TLub.js +1 -0
- package/dist/web/dist/assets/apl-dKokRX4l.js +1 -0
- package/dist/web/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/web/dist/assets/ara-BRHolxvo.js +1 -0
- package/dist/web/dist/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/web/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/web/dist/assets/astro-CbQHKStN.js +1 -0
- package/dist/web/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/web/dist/assets/awk-DMzUqQB5.js +1 -0
- package/dist/web/dist/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/web/dist/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/web/dist/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/web/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/web/dist/assets/bat-BkioyH1T.js +1 -0
- package/dist/web/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/web/dist/assets/berry-uYugtg8r.js +1 -0
- package/dist/web/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/web/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/web/dist/assets/bird2-DPOp833l.js +1 -0
- package/dist/web/dist/assets/blade-D4QpJJKB.js +1 -0
- package/dist/web/dist/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/web/dist/assets/c-BIGW1oBm.js +1 -0
- package/dist/web/dist/assets/c3-eo99z4R2.js +1 -0
- package/dist/web/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/web/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/web/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/web/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/web/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/web/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/web/dist/assets/clarity-D53aC0YG.js +1 -0
- package/dist/web/dist/assets/clock-DCbfDkWu.js +6 -0
- package/dist/web/dist/assets/clojure-P80f7IUj.js +1 -0
- package/dist/web/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/web/dist/assets/cobol-nwyudZeR.js +1 -0
- package/dist/web/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/web/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/web/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/web/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/web/dist/assets/coq-DkFqJrB1.js +1 -0
- package/dist/web/dist/assets/cpp-CofmeUqb.js +1 -0
- package/dist/web/dist/assets/crystal-tKQVLTB8.js +1 -0
- package/dist/web/dist/assets/csharp-COcwbKMJ.js +1 -0
- package/dist/web/dist/assets/css-DPfMkruS.js +1 -0
- package/dist/web/dist/assets/csv-fuZLfV_i.js +1 -0
- package/dist/web/dist/assets/cue-D82EKSYY.js +1 -0
- package/dist/web/dist/assets/cypher-COkxafJQ.js +1 -0
- package/dist/web/dist/assets/d-85-TOEBH.js +1 -0
- package/dist/web/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/web/dist/assets/dart-CF10PKvl.js +1 -0
- package/dist/web/dist/assets/dax-CEL-wOlO.js +1 -0
- package/dist/web/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/web/dist/assets/diff-D97Zzqfu.js +1 -0
- package/dist/web/dist/assets/docker-BcOcwvcX.js +1 -0
- package/dist/web/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/web/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/web/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/web/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/web/dist/assets/edge-BkV0erSs.js +1 -0
- package/dist/web/dist/assets/elixir-CDX3lj18.js +1 -0
- package/dist/web/dist/assets/elm-DbKCFpqz.js +1 -0
- package/dist/web/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/dist/web/dist/assets/erb-B12qg9BL.js +1 -0
- package/dist/web/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/web/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/web/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/web/dist/assets/fennel-BYunw83y.js +1 -0
- package/dist/web/dist/assets/fish-BvzEVeQv.js +1 -0
- package/dist/web/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/web/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/web/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/web/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/web/dist/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/web/dist/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/web/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/web/dist/assets/genie-D0YGMca9.js +1 -0
- package/dist/web/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/web/dist/assets/ghost-symbol-xItVvoCA.svg +5 -0
- package/dist/web/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/web/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/web/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/web/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/web/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/web/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/web/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/web/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/web/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/web/dist/assets/gleam-BspZqrRM.js +1 -0
- package/dist/web/dist/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/dist/web/dist/assets/glimmer-ts-U6CK756n.js +1 -0
- package/dist/web/dist/assets/glsl-DplSGwfg.js +1 -0
- package/dist/web/dist/assets/gn-n2N0HUVH.js +1 -0
- package/dist/web/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/web/dist/assets/go-CxLEBnE3.js +1 -0
- package/dist/web/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/web/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/web/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/web/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/web/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/web/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/web/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/web/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/web/dist/assets/hack-CaT9iCJl.js +1 -0
- package/dist/web/dist/assets/haml-B8DHNrY2.js +1 -0
- package/dist/web/dist/assets/handlebars-BL8al0AC.js +1 -0
- package/dist/web/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/web/dist/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/web/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/web/dist/assets/highlighted-body-OFNGDK62-C8yP3qbm.js +1 -0
- package/dist/web/dist/assets/hjson-D5-asLiD.js +1 -0
- package/dist/web/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/web/dist/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/web/dist/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/dist/web/dist/assets/houston-DnULxvSX.js +1 -0
- package/dist/web/dist/assets/html-GMplVEZG.js +1 -0
- package/dist/web/dist/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/dist/web/dist/assets/http-jrhK8wxY.js +1 -0
- package/dist/web/dist/assets/hurl-irOxFIW8.js +1 -0
- package/dist/web/dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/web/dist/assets/hy-DFXneXwc.js +1 -0
- package/dist/web/dist/assets/hyperliquid-logo-Blr66fIk.svg +9 -0
- package/dist/web/dist/assets/imba-DGztddWO.js +1 -0
- package/dist/web/dist/assets/index-3q7g734D.js +54 -0
- package/dist/web/dist/assets/index-DRvGorcf.css +1 -0
- package/dist/web/dist/assets/ini-BEwlwnbL.js +1 -0
- package/dist/web/dist/assets/java-CylS5w8V.js +1 -0
- package/dist/web/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/web/dist/assets/jinja-4LBKfQ-Z.js +1 -0
- package/dist/web/dist/assets/jison-wvAkD_A8.js +1 -0
- package/dist/web/dist/assets/json-Cp-IABpG.js +1 -0
- package/dist/web/dist/assets/json5-C9tS-k6U.js +1 -0
- package/dist/web/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/web/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/web/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/web/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/web/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/web/dist/assets/julia-CxzCAyBv.js +1 -0
- package/dist/web/dist/assets/just-Cw27pwNe.js +1 -0
- package/dist/web/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/web/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/web/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/web/dist/assets/kdl-DV7GczEv.js +1 -0
- package/dist/web/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/web/dist/assets/kusto-DZf3V79B.js +1 -0
- package/dist/web/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/web/dist/assets/latex-CWtU0Tv5.js +1 -0
- package/dist/web/dist/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/web/dist/assets/less-B1dDrJ26.js +1 -0
- package/dist/web/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/web/dist/assets/liquid-DYVedYrR.js +1 -0
- package/dist/web/dist/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/web/dist/assets/log-2UxHyX5q.js +1 -0
- package/dist/web/dist/assets/logo-BtOb2qkB.js +1 -0
- package/dist/web/dist/assets/lua-BaeVxFsk.js +1 -0
- package/dist/web/dist/assets/luau-C-HG3fhB.js +1 -0
- package/dist/web/dist/assets/make-CHLpvVh8.js +1 -0
- package/dist/web/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/web/dist/assets/marko-CnJfTvn9.js +1 -0
- package/dist/web/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/web/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/web/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/web/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/web/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/web/dist/assets/matlab-D7o27uSR.js +1 -0
- package/dist/web/dist/assets/mdc-BMNejdWA.js +1 -0
- package/dist/web/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/web/dist/assets/mermaid-GHXKKRXX-CbzD1Jp7.js +282 -0
- package/dist/web/dist/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/web/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/web/dist/assets/min-light-CTRr51gU.js +1 -0
- package/dist/web/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/web/dist/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/web/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/web/dist/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/web/dist/assets/move-IF9eRakj.js +1 -0
- package/dist/web/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/web/dist/assets/nextflow-Zz6hmt5N.js +1 -0
- package/dist/web/dist/assets/nextflow-groovy-BeH2EWoN.js +1 -0
- package/dist/web/dist/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/web/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/web/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/web/dist/assets/nim-CVrawwO9.js +1 -0
- package/dist/web/dist/assets/nix-CwoSXNpI.js +1 -0
- package/dist/web/dist/assets/nord-Ddv68eIx.js +1 -0
- package/dist/web/dist/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/web/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/web/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/web/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/web/dist/assets/odin-BBf5iR-q.js +1 -0
- package/dist/web/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/web/dist/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/web/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/web/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/web/dist/assets/perl-C0TMdlhV.js +1 -0
- package/dist/web/dist/assets/php-Dhbhpdrm.js +1 -0
- package/dist/web/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/web/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/web/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/web/dist/assets/po-BTJTHyun.js +1 -0
- package/dist/web/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/web/dist/assets/polar-C0HS_06l.js +1 -0
- package/dist/web/dist/assets/postcss-CXtECtnM.js +1 -0
- package/dist/web/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/web/dist/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/web/dist/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/web/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/web/dist/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/web/dist/assets/pug-CGlum2m_.js +1 -0
- package/dist/web/dist/assets/puppet-BMWR74SV.js +1 -0
- package/dist/web/dist/assets/purescript-CklMAg4u.js +1 -0
- package/dist/web/dist/assets/python-B6aJPvgy.js +1 -0
- package/dist/web/dist/assets/qml-3beO22l8.js +1 -0
- package/dist/web/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/web/dist/assets/qss-IeuSbFQv.js +1 -0
- package/dist/web/dist/assets/r-Dspwwk_N.js +1 -0
- package/dist/web/dist/assets/racket-BqYA7rlc.js +1 -0
- package/dist/web/dist/assets/raku-DXvB9xmW.js +1 -0
- package/dist/web/dist/assets/razor-Uh8Bk_45.js +1 -0
- package/dist/web/dist/assets/red-bN70gL4F.js +1 -0
- package/dist/web/dist/assets/refresh-cw-B9ZNJZIb.js +6 -0
- package/dist/web/dist/assets/reg-C-SQnVFl.js +1 -0
- package/dist/web/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/web/dist/assets/rel-C3B-1QV4.js +1 -0
- package/dist/web/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/web/dist/assets/ron-D8l8udqQ.js +1 -0
- package/dist/web/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/web/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/web/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/web/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/web/dist/assets/rst-BrH8l1NY.js +1 -0
- package/dist/web/dist/assets/ruby-Dw2BHqvy.js +1 -0
- package/dist/web/dist/assets/rust-B1yitclQ.js +1 -0
- package/dist/web/dist/assets/sas-cz2c8ADy.js +1 -0
- package/dist/web/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/web/dist/assets/scala-C151Ov-r.js +1 -0
- package/dist/web/dist/assets/scheme-C98Dy4si.js +1 -0
- package/dist/web/dist/assets/scss-OYdSNvt2.js +1 -0
- package/dist/web/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/web/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/web/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/web/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/web/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/web/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/web/dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/web/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/web/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/web/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/web/dist/assets/solidity-rGO070M0.js +1 -0
- package/dist/web/dist/assets/soy-Brmx7dQM.js +1 -0
- package/dist/web/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/web/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/web/dist/assets/sql-BLtJtn59.js +1 -0
- package/dist/web/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/web/dist/assets/stata-BH5u7GGu.js +1 -0
- package/dist/web/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/web/dist/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/web/dist/assets/svelte-C_ipcX3V.js +1 -0
- package/dist/web/dist/assets/swift-D82vCrfD.js +1 -0
- package/dist/web/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/web/dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/web/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/web/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/web/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/web/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/web/dist/assets/templ-P3uqSqPl.js +1 -0
- package/dist/web/dist/assets/terraform-BETggiCN.js +1 -0
- package/dist/web/dist/assets/tex-idrVyKtj.js +1 -0
- package/dist/web/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/web/dist/assets/toml-vGWfd6FD.js +1 -0
- package/dist/web/dist/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/dist/web/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/web/dist/assets/tsx-COt5Ahok.js +1 -0
- package/dist/web/dist/assets/turtle-BsS91CYL.js +1 -0
- package/dist/web/dist/assets/twig-DNn4PbVi.js +1 -0
- package/dist/web/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/web/dist/assets/typespec-BGHnOYBU.js +1 -0
- package/dist/web/dist/assets/typst-DHCkPAjA.js +1 -0
- package/dist/web/dist/assets/v-BcVCzyr7.js +1 -0
- package/dist/web/dist/assets/vala-CsfeWuGM.js +1 -0
- package/dist/web/dist/assets/vb-D17OF-Vu.js +1 -0
- package/dist/web/dist/assets/vendor-charts-CfOL2F-E.js +6 -0
- package/dist/web/dist/assets/vendor-react-B0mWfPOm.js +60 -0
- package/dist/web/dist/assets/vendor-viem-wp7lz4Hc.js +22 -0
- package/dist/web/dist/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/web/dist/assets/vesper-DU1UobuO.js +1 -0
- package/dist/web/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/web/dist/assets/viml-CJc9bBzg.js +1 -0
- package/dist/web/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/web/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/web/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/web/dist/assets/vue-DN_0RTcg.js +1 -0
- package/dist/web/dist/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/web/dist/assets/vue-vine-CQOfvN7w.js +1 -0
- package/dist/web/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/web/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/web/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/web/dist/assets/welcome-illustration-B8_SJ7In.svg +319 -0
- package/dist/web/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/web/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/web/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/web/dist/assets/wit-5i3qLPDT.js +1 -0
- package/dist/web/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/web/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/web/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/web/dist/assets/yaml-Buea-lGh.js +1 -0
- package/dist/web/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/web/dist/assets/zig-VOosw3JB.js +1 -0
- package/dist/web/dist/favicon.svg +4 -0
- package/dist/web/dist/index.html +18 -0
- package/package.json +73 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const us="modulepreload",ds=function(e){return"/_app/"+e},ur={},fs=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=i(n.map(u=>{if(u=ds(u),u in ur)return;ur[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":us,d||(h.as="script"),h.crossOrigin="",h.href=u,c&&h.setAttribute("nonce",c),document.head.appendChild(h),d)return new Promise((l,p)=>{h.addEventListener("load",l),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};function ls(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const dr=/^tuple(?<array>(\[(\d*)\])*)$/;function En(e){let t=e.type;if(dr.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++){const s=e.components[o];t+=En(s),o<n-1&&(t+=", ")}const r=ls(dr,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,En({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function et(e){let t="";const n=e.length;for(let r=0;r<n;r++){const o=e[r];t+=En(o),r!==n-1&&(t+=", ")}return t}function hs(e){var t;return e.type==="function"?`function ${e.name}(${et(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${et(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${et(e.inputs)})`:e.type==="error"?`error ${e.name}(${et(e.inputs)})`:e.type==="constructor"?`constructor(${et(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function U(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:s=>t(e,s)}function je(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new As(e.type);return`${e.name}(${Gn(e.inputs,{includeName:t})})`}function Gn(e,{includeName:t=!1}={}){return e?e.map(n=>ps(n,{includeName:t})).join(t?", ":","):""}function ps(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Gn(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function xe(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function _(e){return xe(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Lr="2.47.10";let tt={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Lr}`};class v extends Error{constructor(t,n={}){var a;const r=(()=>{var c;return n.cause instanceof v?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),o=n.cause instanceof v&&n.cause.docsPath||n.docsPath,s=(a=tt.getDocsUrl)==null?void 0:a.call(tt,{...n,docsPath:o}),i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...tt.version?[`Version: ${tt.version}`]:[]].join(`
|
|
2
|
+
`);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Lr}walk(t){return Ur(this,t)}}function Ur(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Ur(e.cause,t):t?null:e}class ys extends v{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
3
|
+
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class fr extends v{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
4
|
+
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class ms extends v{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
|
|
5
|
+
`),{metaMessages:[`Params: (${Gn(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class _n extends v{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t})}}class gs extends v{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
|
|
6
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class bs extends v{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${_(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class ws extends v{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
|
|
7
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}class jr extends v{constructor(t,{docsPath:n,cause:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
8
|
+
`),{docsPath:n,name:"AbiErrorSignatureNotFoundError",cause:r}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class lr extends v{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
9
|
+
`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class xs extends v{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${je(t.abiItem)}\`, and`,`\`${n.type}\` in \`${je(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class vs extends v{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class Es extends v{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
10
|
+
`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Ps extends v{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
11
|
+
`),{docsPath:n,name:"InvalidAbiDecodingType"})}}class Bs extends v{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
12
|
+
`),{name:"InvalidArrayError"})}}class As extends v{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
13
|
+
`),{name:"InvalidDefinitionTypeError"})}}class Gr extends v{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class _r extends v{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}class hr extends v{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function Ze(e,{dir:t,size:n=32}={}){return typeof e=="string"?we(e,{dir:t,size:n}):Ts(e,{dir:t,size:n})}function we(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new _r({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Ts(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new _r({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const s=t==="right";r[s?o:n-o-1]=e[s?o:e.length-o-1]}return r}class Hn extends v{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number "${s}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Is extends v{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class Ss extends v{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function qt(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function ae(e,{size:t}){if(_(e)>t)throw new Ss({givenSize:_(e),maxSize:t})}function he(e,t={}){const{signed:n}=t;t.size&&ae(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function pe(e,t={}){const n=he(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Hn({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}const $s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Rt(e,t={}){return typeof e=="number"||typeof e=="bigint"?M(e,t):typeof e=="string"?Dt(e,t):typeof e=="boolean"?Hr(e,t):Y(e,t)}function Hr(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ae(n,{size:t.size}),Ze(n,{size:t.size})):n}function Y(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=$s[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(ae(r,{size:t.size}),Ze(r,{dir:"right",size:t.size})):r}function M(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const c=typeof e=="bigint"?"n":"";throw new Hn({max:s?`${s}${c}`:void 0,min:`${i}${c}`,signed:n,size:r,value:`${e}${c}`})}const a=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?Ze(a,{size:r}):a}const Cs=new TextEncoder;function Dt(e,t={}){const n=Cs.encode(e);return Y(n,t)}const Ns=new TextEncoder;function qn(e,t={}){return typeof e=="number"||typeof e=="bigint"?Fs(e,t):typeof e=="boolean"?Os(e,t):xe(e)?ye(e,t):qr(e,t)}function Os(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(ae(n,{size:t.size}),Ze(n,{size:t.size})):n}const ce={zero:48,nine:57,A:65,F:70,a:97,f:102};function pr(e){if(e>=ce.zero&&e<=ce.nine)return e-ce.zero;if(e>=ce.A&&e<=ce.F)return e-(ce.A-10);if(e>=ce.a&&e<=ce.f)return e-(ce.a-10)}function ye(e,t={}){let n=e;t.size&&(ae(n,{size:t.size}),n=Ze(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,s=new Uint8Array(o);for(let i=0,a=0;i<o;i++){const c=pr(r.charCodeAt(a++)),u=pr(r.charCodeAt(a++));if(c===void 0||u===void 0)throw new v(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);s[i]=c*16+u}return s}function Fs(e,t){const n=M(e,t);return ye(n)}function qr(e,t={}){const n=Ns.encode(e);return typeof t.size=="number"?(ae(n,{size:t.size}),Ze(n,{dir:"right",size:t.size})):n}const Nt=BigInt(2**32-1),yr=BigInt(32);function ks(e,t=!1){return t?{h:Number(e&Nt),l:Number(e>>yr&Nt)}:{h:Number(e>>yr&Nt)|0,l:Number(e&Nt)|0}}function zs(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=ks(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const Rs=(e,t,n)=>e<<n|t>>>32-n,Ms=(e,t,n)=>t<<n|e>>>32-n,Ls=(e,t,n)=>t<<n-32|e>>>64-n,Us=(e,t,n)=>e<<n-32|t>>>64-n,ze=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function js(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function rt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $e(e,...t){if(!js(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Gs(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");rt(e.outputLen),rt(e.blockLen)}function Ge(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Dr(e,t){$e(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function _s(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function _e(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function on(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function se(e,t){return e<<32-t|e>>>t}const Hs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function qs(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Ds(e){for(let t=0;t<e.length;t++)e[t]=qs(e[t]);return e}const mr=Hs?e=>e:Ds;function Vs(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Vt(e){return typeof e=="string"&&(e=Vs(e)),$e(e),e}function Ws(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];$e(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}class Dn{}function Vr(e){const t=r=>e().update(Vt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Zs(e=32){if(ze&&typeof ze.getRandomValues=="function")return ze.getRandomValues(new Uint8Array(e));if(ze&&typeof ze.randomBytes=="function")return Uint8Array.from(ze.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Ks=BigInt(0),nt=BigInt(1),Ys=BigInt(2),Xs=BigInt(7),Js=BigInt(256),Qs=BigInt(113),Wr=[],Zr=[],Kr=[];for(let e=0,t=nt,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Wr.push(2*(5*r+n)),Zr.push((e+1)*(e+2)/2%64);let o=Ks;for(let s=0;s<7;s++)t=(t<<nt^(t>>Xs)*Qs)%Js,t&Ys&&(o^=nt<<(nt<<BigInt(s))-nt);Kr.push(o)}const Yr=zs(Kr,!0),ei=Yr[0],ti=Yr[1],gr=(e,t,n)=>n>32?Ls(e,t,n):Rs(e,t,n),br=(e,t,n)=>n>32?Us(e,t,n):Ms(e,t,n);function ni(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,u=n[c],d=n[c+1],f=gr(u,d,1)^n[a],h=br(u,d,1)^n[a+1];for(let l=0;l<50;l+=10)e[i+l]^=f,e[i+l+1]^=h}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=Zr[i],c=gr(o,s,a),u=br(o,s,a),d=Wr[i];o=e[d],s=e[d+1],e[d]=c,e[d+1]=u}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=ei[r],e[1]^=ti[r]}_e(n)}class Vn extends Dn{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,rt(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=_s(this.state)}clone(){return this._cloneInto()}keccak(){mr(this.state32),ni(this.state32,this.rounds),mr(this.state32),this.posOut=0,this.pos=0}update(t){Ge(this),t=Vt(t),$e(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,(n&128)!==0&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Ge(this,!1),$e(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return rt(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Dr(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,_e(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new Vn(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}}const ri=(e,t,n)=>Vr(()=>new Vn(t,e,n)),oi=ri(1,136,256/8);function Wt(e,t){const n=t||"hex",r=oi(xe(e,{strict:!1})?qn(e):e);return n==="bytes"?r:Rt(r)}const si=e=>Wt(qn(e));function ii(e){return si(e)}function ai(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new v("Unable to normalize signature.");return o}const ci=e=>{const t=typeof e=="string"?e:hs(e);return ai(t)};function Xr(e){return ii(ci(e))}const ui=Xr;class ve extends v{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Ke extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,n)),n}set(t,n){if(super.has(t)&&super.delete(t),super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=super.keys().next().value;r!==void 0&&super.delete(r)}return this}}const sn=new Ke(8192);function It(e,t){if(sn.has(`${e}.${t}`))return sn.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=Wt(qr(n),"bytes"),o=n.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());const s=`0x${o.join("")}`;return sn.set(`${e}.${t}`,s),s}function di(e,t){if(!oe(e,{strict:!1}))throw new ve({address:e});return It(e,t)}const fi=/^0x[a-fA-F0-9]{40}$/,an=new Ke(8192);function oe(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(an.has(r))return an.get(r);const o=fi.test(e)?e.toLowerCase()===e?!0:n?It(e)===e:!0:!1;return an.set(r,o),o}function ne(e){return typeof e[0]=="string"?Zt(e):li(e)}function li(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Zt(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Mt(e,t,n,{strict:r}={}){return xe(e,{strict:!1})?Pn(e,t,n,{strict:r}):eo(e,t,n,{strict:r})}function Jr(e,t){if(typeof t=="number"&&t>0&&t>_(e)-1)throw new Gr({offset:t,position:"start",size:_(e)})}function Qr(e,t,n){if(typeof t=="number"&&typeof n=="number"&&_(e)!==n-t)throw new Gr({offset:n,position:"end",size:_(e)})}function eo(e,t,n,{strict:r}={}){Jr(e,t);const o=e.slice(t,n);return r&&Qr(o,t,n),o}function Pn(e,t,n,{strict:r}={}){Jr(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&Qr(o,t,n),o}const hi=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,to=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function no(e,t){if(e.length!==t.length)throw new ws({expectedLength:e.length,givenLength:t.length});const n=pi({params:e,values:t}),r=Zn(n);return r.length===0?"0x":r}function pi({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(Wn({param:e[r],value:t[r]}));return n}function Wn({param:e,value:t}){const n=Kn(e.type);if(n){const[r,o]=n;return mi(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return vi(t,{param:e});if(e.type==="address")return yi(t);if(e.type==="bool")return bi(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,o="256"]=to.exec(e.type)??[];return wi(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return gi(t,{param:e});if(e.type==="string")return xi(t);throw new Es(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Zn(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=_(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(M(t+o,{size:32})),r.push(a),o+=_(a)):n.push(a)}return ne([...n,...r])}function yi(e){if(!oe(e))throw new ve({address:e});return{dynamic:!1,encoded:we(e.toLowerCase())}}function mi(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new Bs(e);if(!r&&e.length!==t)throw new gs({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const s=[];for(let i=0;i<e.length;i++){const a=Wn({param:n,value:e[i]});a.dynamic&&(o=!0),s.push(a)}if(r||o){const i=Zn(s);if(r){const a=M(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?ne([a,i]):a}}if(o)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:ne(s.map(({encoded:i})=>i))}}function gi(e,{param:t}){const[,n]=t.type.split("bytes"),r=_(e);if(!n){let o=e;return r%32!==0&&(o=we(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:ne([we(M(r,{size:32})),o])}}if(r!==Number.parseInt(n,10))throw new bs({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:we(e,{dir:"right"})}}function bi(e){if(typeof e!="boolean")throw new v(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:we(Hr(e))}}function wi(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Hn({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:M(e,{size:32,signed:t})}}function xi(e){const t=Dt(e),n=Math.ceil(_(t)/32),r=[];for(let o=0;o<n;o++)r.push(we(Mt(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:ne([we(M(_(t),{size:32})),...r])}}function vi(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const s=t.components[o],i=Array.isArray(e)?o:s.name,a=Wn({param:s,value:e[i]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?Zn(r):ne(r.map(({encoded:o})=>o))}}function Kn(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Yn=e=>Mt(Xr(e),0,4);function ro(e){const{abi:t,args:n=[],name:r}=e,o=xe(r,{strict:!1}),s=t.filter(a=>o?a.type==="function"?Yn(a)===r:a.type==="event"?ui(a)===r:!1:"name"in a&&a.name===r);if(s.length===0)return;if(s.length===1)return s[0];let i;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((u,d)=>{const f="inputs"in a&&a.inputs[d];return f?Bn(u,f):!1})){if(i&&"inputs"in i&&i.inputs){const u=oo(a.inputs,i.inputs,n);if(u)throw new xs({abiItem:a,type:u[0]},{abiItem:i,type:u[1]})}i=a}}return i||s[0]}function Bn(e,t){const n=typeof e,r=t.type;switch(r){case"address":return oe(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>n==="object"&&Bn(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Bn(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function oo(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return oo(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?oe(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?oe(n[r],{strict:!1}):!1)return i}}function q(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const wr="/docs/contract/encodeFunctionData";function Ei(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const s=ro({abi:t,args:n,name:r});if(!s)throw new lr(r,{docsPath:wr});o=s}if(o.type!=="function")throw new lr(void 0,{docsPath:wr});return{abi:[o],functionName:Yn(je(o))}}function so(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:Ei(e)})(),o=n[0],s=r,i="inputs"in o&&o.inputs?no(o.inputs,t??[]):void 0;return Zt([s,i??"0x"])}const Pi={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Bi={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Ai={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};class xr extends v{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Ti extends v{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class Ii extends v{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Si={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Ii({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Ti({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new xr({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new xr({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Xn(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Si);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function $i(e,t={}){typeof t.size<"u"&&ae(e,{size:t.size});const n=Y(e,t);return he(n,t)}function Ci(e,t={}){let n=e;if(typeof t.size<"u"&&(ae(n,{size:t.size}),n=qt(n)),n.length>1||n[0]>1)throw new Is(n);return!!n[0]}function le(e,t={}){typeof t.size<"u"&&ae(e,{size:t.size});const n=Y(e,t);return pe(n,t)}function Ni(e,t={}){let n=e;return typeof t.size<"u"&&(ae(n,{size:t.size}),n=qt(n,{dir:"right"})),new TextDecoder().decode(n)}function Oi(e,t){const n=typeof t=="string"?ye(t):t,r=Xn(n);if(_(n)===0&&e.length>0)throw new _n;if(_(t)&&_(t)<32)throw new ms({data:typeof t=="string"?t:Y(t),params:e,size:_(t)});let o=0;const s=[];for(let i=0;i<e.length;++i){const a=e[i];r.setPosition(o);const[c,u]=Me(r,a,{staticPosition:0});o+=u,s.push(c)}return s}function Me(e,t,{staticPosition:n}){const r=Kn(t.type);if(r){const[o,s]=r;return ki(e,{...t,type:s},{length:o,staticPosition:n})}if(t.type==="tuple")return Li(e,t,{staticPosition:n});if(t.type==="address")return Fi(e);if(t.type==="bool")return zi(e);if(t.type.startsWith("bytes"))return Ri(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return Mi(e,t);if(t.type==="string")return Ui(e,{staticPosition:n});throw new Ps(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const vr=32,An=32;function Fi(e){const t=e.readBytes(32);return[It(Y(eo(t,-20))),32]}function ki(e,t,{length:n,staticPosition:r}){if(!n){const i=le(e.readBytes(An)),a=r+i,c=a+vr;e.setPosition(a);const u=le(e.readBytes(vr)),d=ot(t);let f=0;const h=[];for(let l=0;l<u;++l){e.setPosition(c+(d?l*32:f));const[p,y]=Me(e,t,{staticPosition:c});f+=y,h.push(p)}return e.setPosition(r+32),[h,32]}if(ot(t)){const i=le(e.readBytes(An)),a=r+i,c=[];for(let u=0;u<n;++u){e.setPosition(a+u*32);const[d]=Me(e,t,{staticPosition:a});c.push(d)}return e.setPosition(r+32),[c,32]}let o=0;const s=[];for(let i=0;i<n;++i){const[a,c]=Me(e,t,{staticPosition:r+o});o+=c,s.push(a)}return[s,o]}function zi(e){return[Ci(e.readBytes(32),{size:32}),32]}function Ri(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=le(e.readBytes(32));e.setPosition(n+i);const a=le(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[Y(c),32]}return[Y(e.readBytes(Number.parseInt(o,10),32)),32]}function Mi(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?$i(o,{signed:n}):le(o,{signed:n}),32]}function Li(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:i})=>!i),o=r?[]:{};let s=0;if(ot(t)){const i=le(e.readBytes(An)),a=n+i;for(let c=0;c<t.components.length;++c){const u=t.components[c];e.setPosition(a+s);const[d,f]=Me(e,u,{staticPosition:a});s+=f,o[r?c:u==null?void 0:u.name]=d}return e.setPosition(n+32),[o,32]}for(let i=0;i<t.components.length;++i){const a=t.components[i],[c,u]=Me(e,a,{staticPosition:n});o[r?i:a==null?void 0:a.name]=c,s+=u}return[o,s]}function Ui(e,{staticPosition:t}){const n=le(e.readBytes(32)),r=t+n;e.setPosition(r);const o=le(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=Ni(qt(s));return e.setPosition(t+32),[i,32]}function ot(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(ot);const n=Kn(e.type);return!!(n&&ot({...e,type:n[1]}))}function ji(e){const{abi:t,data:n,cause:r}=e,o=Mt(n,0,4);if(o==="0x")throw new _n({cause:r});const i=[...t||[],Bi,Ai].find(a=>a.type==="error"&&o===Yn(je(a)));if(!i)throw new jr(o,{docsPath:"/docs/contract/decodeErrorResult",cause:r});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?Oi(i.inputs,Mt(n,4)):void 0,errorName:i.name}}const ie=(e,t,n)=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o,n);function io({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((o,s)=>`${r&&o.name?`${o.name}: `:""}${typeof t[s]=="object"?ie(t[s]):t[s]}`).join(", ")})`}const Gi={gwei:9,wei:18},_i={ether:-9,wei:9};function ao(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,s]=[n.slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${s?`.${s}`:""}`}function co(e,t="wei"){return ao(e,Gi[t])}function re(e,t="wei"){return ao(e,_i[t])}class Hi extends v{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class qi extends v{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Kt(e){const t=Object.entries(e).map(([r,o])=>o===void 0||o===!1?null:[r,o]).filter(Boolean),n=t.reduce((r,[o])=>Math.max(r,o.length),0);return t.map(([r,o])=>` ${`${r}:`.padEnd(n+1)} ${o}`).join(`
|
|
14
|
+
`)}class Di extends v{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Kt(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class Vi extends v{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:f,value:h}){var p;const l=Kt({chain:o&&`${o==null?void 0:o.name} (id: ${o==null?void 0:o.id})`,from:n==null?void 0:n.address,to:f,value:typeof h<"u"&&`${co(h)} ${((p=o==null?void 0:o.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${re(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${re(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${re(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",l].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class uo extends v{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s}){let i="Transaction";r&&s!==void 0&&(i=`Transaction at block time "${r}" at index "${s}"`),t&&s!==void 0&&(i=`Transaction at block hash "${t}" at index "${s}"`),n&&s!==void 0&&(i=`Transaction at block number "${n}" at index "${s}"`),o&&(i=`Transaction with hash "${o}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class fo extends v{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class lo extends v{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class Wi extends v{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const Zi=e=>e,ho=e=>e;class Ki extends v{constructor(t,{abi:n,args:r,contractAddress:o,docsPath:s,functionName:i,sender:a}){const c=ro({abi:n,args:r,name:i}),u=c?io({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=c?je(c,{includeName:!0}):void 0,f=Kt({address:o&&Zi(o),function:d,args:u&&u!=="()"&&`${[...Array((i==null?void 0:i.length)??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=o,this.functionName=i,this.sender=a}}class Yi extends v{constructor({abi:t,data:n,functionName:r,message:o,cause:s}){let i,a,c,u;if(n&&n!=="0x")try{a=ji({abi:t,data:n,cause:s});const{abiItem:f,errorName:h,args:l}=a;if(h==="Error")u=l[0];else if(h==="Panic"){const[p]=l;u=Pi[p]}else{const p=f?je(f,{includeName:!0}):void 0,y=f&&l?io({abiItem:f,args:l,includeFunctionName:!1,includeName:!1}):void 0;c=[p?`Error: ${p}`:"",y&&y!=="()"?` ${[...Array((h==null?void 0:h.length)??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(f){i=f}else o&&(u=o);let d;i instanceof jr&&(d=i.signature,c=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${d}.`]),super(u&&u!=="execution reverted"||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,u||d].join(`
|
|
15
|
+
`):`The contract function "${r}" reverted.`,{cause:i??s,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a,this.raw=n,this.reason=u,this.signature=d}}class Xi extends v{constructor({functionName:t,cause:n}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:n})}}class Ji extends v{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class po extends v{constructor({body:t,cause:n,details:r,headers:o,status:s,url:i}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${ho(i)}`,t&&`Request body: ${ie(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=s,this.url=i}}class yo extends v{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${ho(r)}`,`Request body: ${ie(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}const Qi=-1;class X extends v{constructor(t,{code:n,docsPath:r,metaMessages:o,name:s,shortMessage:i}){super(i,{cause:t,docsPath:r,metaMessages:o||(t==null?void 0:t.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof yo?t.code:n??Qi}}class J extends X{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class st extends X{constructor(t){super(t,{code:st.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(st,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class it extends X{constructor(t){super(t,{code:it.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(it,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class at extends X{constructor(t,{method:n}={}){super(t,{code:at.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(at,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class ct extends X{constructor(t){super(t,{code:ct.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
16
|
+
`)})}}Object.defineProperty(ct,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ce extends X{constructor(t){super(t,{code:Ce.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Ce,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class He extends X{constructor(t){super(t,{code:He.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
17
|
+
`)})}}Object.defineProperty(He,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class ut extends X{constructor(t){super(t,{code:ut.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(ut,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class dt extends X{constructor(t){super(t,{code:dt.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(dt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class ft extends X{constructor(t){super(t,{code:ft.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(ft,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Ae extends X{constructor(t,{method:n}={}){super(t,{code:Ae.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Ae,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class qe extends X{constructor(t){super(t,{code:qe.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(qe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class lt extends X{constructor(t){super(t,{code:lt.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(lt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Le extends J{constructor(t){super(t,{code:Le.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Le,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class ht extends J{constructor(t){super(t,{code:ht.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(ht,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class pt extends J{constructor(t,{method:n}={}){super(t,{code:pt.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(pt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class yt extends J{constructor(t){super(t,{code:yt.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(yt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class mt extends J{constructor(t){super(t,{code:mt.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(mt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class gt extends J{constructor(t){super(t,{code:gt.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(gt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class De extends J{constructor(t){super(t,{code:De.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(De,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class bt extends J{constructor(t){super(t,{code:bt.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(bt,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class wt extends J{constructor(t){super(t,{code:wt.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class xt extends J{constructor(t){super(t,{code:xt.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(xt,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class vt extends J{constructor(t){super(t,{code:vt.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(vt,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Et extends J{constructor(t){super(t,{code:Et.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Et,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Ve extends J{constructor(t){super(t,{code:Ve.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Ve,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Pt extends J{constructor(t){super(t,{code:Pt.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(Pt,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class ea extends X{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const ta=3;function na(e,{abi:t,address:n,args:r,docsPath:o,functionName:s,sender:i}){const a=e instanceof Ji?e:e instanceof v?e.walk(p=>"data"in p)||e.walk():{},{code:c,data:u,details:d,message:f,shortMessage:h}=a,l=e instanceof _n?new Xi({functionName:s,cause:e}):[ta,Ce.code].includes(c)&&(u||d||f||h)||c===He.code&&d==="execution reverted"&&u?new Yi({abi:t,data:typeof u=="object"?u.data:u,functionName:s,message:a instanceof yo?d:h??f,cause:e}):e;return new Ki(l,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:s,sender:i})}function ra(e){const t=Wt(`0x${e.substring(4)}`).substring(26);return It(`0x${t}`)}async function oa({hash:e,signature:t}){const n=xe(e)?e:Rt(e),{secp256k1:r}=await fs(async()=>{const{secp256k1:i}=await Promise.resolve().then(()=>Rc);return{secp256k1:i}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:f,yParity:h}=t,l=Number(h??f),p=Er(l);return new r.Signature(he(u),he(d)).addRecoveryBit(p)}const i=xe(t)?t:Rt(t);if(_(i)!==65)throw new Error("invalid signature length");const a=pe(`0x${i.slice(130)}`),c=Er(a);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Er(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function sa({hash:e,signature:t}){return ra(await oa({hash:e,signature:t}))}function ia(e,t="hex"){const n=mo(e),r=Xn(new Uint8Array(n.length));return n.encode(r),t==="hex"?Y(r.bytes):r.bytes}function mo(e){return Array.isArray(e)?aa(e.map(t=>mo(t))):ca(e)}function aa(e){const t=e.reduce((o,s)=>o+s.length,0),n=go(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:s}of e)s(o)}}}function ca(e){const t=typeof e=="string"?ye(e):e,n=go(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function go(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new v("Length is too large.")}function ua(e){const{chainId:t,nonce:n,to:r}=e,o=e.contractAddress??e.address,s=Wt(Zt(["0x05",ia([t?M(t):"0x",o,n?M(n):"0x"])]));return r==="bytes"?ye(s):s}async function Jn(e){const{authorization:t,signature:n}=e;return sa({hash:ua(t),signature:n??t})}class da extends v{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:f,value:h}){var p;const l=Kt({from:n==null?void 0:n.address,to:f,value:typeof h<"u"&&`${co(h)} ${((p=o==null?void 0:o.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${re(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${re(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${re(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",l].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Re extends v{constructor({cause:t,message:n}={}){var o;const r=(o=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Re,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Re,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Lt extends v{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${re(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Lt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Tn extends v{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${re(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Tn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class In extends v{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(In,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Sn extends v{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
18
|
+
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Sn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class $n extends v{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty($n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Cn extends v{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
19
|
+
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Cn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Nn extends v{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Nn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class On extends v{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(On,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Fn extends v{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Fn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ut extends v{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${re(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${re(r)} gwei`:""}).`].join(`
|
|
20
|
+
`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ut,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Qn extends v{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function bo(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof v?e.walk(o=>(o==null?void 0:o.code)===Re.code):e;return r instanceof v?new Re({cause:e,message:r.details}):Re.nodeMessage.test(n)?new Re({cause:e,message:e.details}):Lt.nodeMessage.test(n)?new Lt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Tn.nodeMessage.test(n)?new Tn({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):In.nodeMessage.test(n)?new In({cause:e,nonce:t==null?void 0:t.nonce}):Sn.nodeMessage.test(n)?new Sn({cause:e,nonce:t==null?void 0:t.nonce}):$n.nodeMessage.test(n)?new $n({cause:e,nonce:t==null?void 0:t.nonce}):Cn.nodeMessage.test(n)?new Cn({cause:e}):Nn.nodeMessage.test(n)?new Nn({cause:e,gas:t==null?void 0:t.gas}):On.nodeMessage.test(n)?new On({cause:e,gas:t==null?void 0:t.gas}):Fn.nodeMessage.test(n)?new Fn({cause:e}):Ut.nodeMessage.test(n)?new Ut({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Qn({cause:e})}function fa(e,{docsPath:t,...n}){const r=(()=>{const o=bo(e,n);return o instanceof Qn?e:o})();return new da(r,{docsPath:t,...n})}function Yt(e,{format:t}){if(!t)return{};const n={};function r(s){const i=Object.keys(s);for(const a of i)a in e&&(n[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&r(s[a])}const o=t(e||{});return r(o),n}const la={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function St(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=ha(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>Y(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=M(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=M(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=M(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=M(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=M(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=M(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=la[e.type]),typeof e.value<"u"&&(n.value=M(e.value)),n}function ha(e){return e.map(t=>({address:t.address,r:t.r?M(BigInt(t.r)):t.r,s:t.s?M(BigInt(t.s)):t.s,chainId:M(t.chainId),nonce:M(t.nonce),...typeof t.yParity<"u"?{yParity:M(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:M(t.v)}:{}}))}function Pr(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new hr({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new hr({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function pa(e){const{balance:t,nonce:n,state:r,stateDiff:o,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=M(t)),n!==void 0&&(i.nonce=M(n)),r!==void 0&&(i.state=Pr(r)),o!==void 0){if(i.state)throw new qi;i.stateDiff=Pr(o)}return i}function ya(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!oe(n,{strict:!1}))throw new ve({address:n});if(t[n])throw new Hi({address:n});t[n]=pa(r)}return t}const ma=2n**256n-1n;function Ye(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,s=t?q(t):void 0;if(s&&!oe(s.address))throw new ve({address:s.address});if(o&&!oe(o))throw new ve({address:o});if(n&&n>ma)throw new Lt({maxFeePerGas:n});if(r&&n&&r>n)throw new Ut({maxFeePerGas:n,maxPriorityFeePerGas:r})}class wo extends v{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class er extends v{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class ga extends v{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${re(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class xo extends v{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const vo={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function tr(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?pe(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?pe(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?vo[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=ba(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function ba(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function wa(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:tr(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function We(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:o}={}){var u,d,f;const s=o??!1,i=n!==void 0?M(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[i||r,s]},{dedupe:!!i}),!a)throw new xo({blockHash:t,blockNumber:n});return(((f=(d=(u=e.chain)==null?void 0:u.formatters)==null?void 0:d.block)==null?void 0:f.format)||wa)(a,"getBlock")}async function Eo(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function xa(e,t){var s,i;const{block:n,chain:r=e.chain,request:o}=t||{};try{const a=((s=r==null?void 0:r.fees)==null?void 0:s.maxPriorityFeePerGas)??((i=r==null?void 0:r.fees)==null?void 0:i.defaultPriorityFee);if(typeof a=="function"){const u=n||await U(e,We,"getBlock")({}),d=await a({block:u,client:e,request:o});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return he(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):U(e,We,"getBlock")({}),U(e,Eo,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new er;const u=c-a.baseFeePerGas;return u<0n?0n:u}}async function Br(e,t){var h,l;const{block:n,chain:r=e.chain,request:o,type:s="eip1559"}=t||{},i=await(async()=>{var p,y;return typeof((p=r==null?void 0:r.fees)==null?void 0:p.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:o}):((y=r==null?void 0:r.fees)==null?void 0:y.baseFeeMultiplier)??1.2})();if(i<1)throw new wo;const c=10**(((h=i.toString().split(".")[1])==null?void 0:h.length)??0),u=p=>p*BigInt(Math.ceil(i*c))/BigInt(c),d=n||await U(e,We,"getBlock")({});if(typeof((l=r==null?void 0:r.fees)==null?void 0:l.estimateFeesPerGas)=="function"){const p=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:u,request:o,type:s});if(p!==null)return p}if(s==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new er;const p=typeof(o==null?void 0:o.maxPriorityFeePerGas)=="bigint"?o.maxPriorityFeePerGas:await xa(e,{block:d,chain:r,request:o}),y=u(d.baseFeePerGas);return{maxFeePerGas:(o==null?void 0:o.maxFeePerGas)??y+p,maxPriorityFeePerGas:p}}return{gasPrice:(o==null?void 0:o.gasPrice)??u(await U(e,Eo,"getGasPrice")({}))}}async function Po(e,{address:t,blockTag:n="latest",blockNumber:r}){const o=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?M(r):n]},{dedupe:!!r});return pe(o)}function Bo(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>ye(s)):e.blobs,o=[];for(const s of r)o.push(Uint8Array.from(t.blobToKzgCommitment(s)));return n==="bytes"?o:o.map(s=>Y(s))}function Ao(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>ye(i)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(i=>ye(i)):e.commitments,s=[];for(let i=0;i<r.length;i++){const a=r[i],c=o[i];s.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?s:s.map(i=>Y(i))}function va(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+u,a,r)}function Ea(e,t,n){return e&t^~e&n}function Pa(e,t,n){return e&t^e&n^t&n}class Ba extends Dn{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=on(this.buffer)}update(t){Ge(this),t=Vt(t),$e(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const c=on(t);for(;o<=s-i;i+=o)this.process(c,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ge(this),Dr(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,_e(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;va(r,o-8,BigInt(this.length*8),s),this.process(r,0);const a=on(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)a.setUint32(4*f,d[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=a,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ge=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Aa=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),be=new Uint32Array(64);class Ta extends Ba{constructor(t=32){super(64,t,8,!1),this.A=ge[0]|0,this.B=ge[1]|0,this.C=ge[2]|0,this.D=ge[3]|0,this.E=ge[4]|0,this.F=ge[5]|0,this.G=ge[6]|0,this.H=ge[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)be[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=be[f-15],l=be[f-2],p=se(h,7)^se(h,18)^h>>>3,y=se(l,17)^se(l,19)^l>>>10;be[f]=y+be[f-7]+p+be[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:u,H:d}=this;for(let f=0;f<64;f++){const h=se(a,6)^se(a,11)^se(a,25),l=d+h+Ea(a,c,u)+Aa[f]+be[f]|0,y=(se(r,2)^se(r,13)^se(r,22))+Pa(r,o,s)|0;d=u,u=c,c=a,a=i+l|0,i=s,s=o,o=r,r=l+y|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,o,s,i,a,c,u,d)}roundClean(){_e(be)}destroy(){this.set(0,0,0,0,0,0,0,0),_e(this.buffer)}}const To=Vr(()=>new Ta),Ia=To;function Sa(e,t){return Ia(xe(e,{strict:!1})?qn(e):e)}function $a(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),o=Sa(t);return o.set([n],0),r==="bytes"?o:Y(o)}function Ca(e){const{commitments:t,version:n}=e,r=e.to,o=[];for(const s of t)o.push($a({commitment:s,to:r,version:n}));return o}const Ar=6,Io=32,nr=4096,So=Io*nr,Tr=So*Ar-1-1*nr*Ar;class Na extends v{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Oa extends v{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function Fa(e){const t=typeof e.data=="string"?ye(e.data):e.data,n=_(t);if(!n)throw new Oa;if(n>Tr)throw new Na({maxSize:Tr,size:n});const r=[];let o=!0,s=0;for(;o;){const i=Xn(new Uint8Array(So));let a=0;for(;a<nr;){const c=t.slice(s,s+(Io-1));if(i.pushByte(0),i.pushBytes(c),c.length<31){i.pushByte(128),o=!1;break}a++,s+=31}r.push(i)}return r.map(i=>Y(i.bytes))}function ka(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??Fa({data:t}),s=e.commitments??Bo({blobs:o,kzg:n,to:r}),i=e.proofs??Ao({blobs:o,commitments:s,kzg:n,to:r}),a=[];for(let c=0;c<o.length;c++)a.push({blob:o[c],commitment:s[c],proof:i[c]});return a}function za(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Di({transaction:e})}function Xt(e,{docsPath:t,...n}){const r=(()=>{const o=bo(e,n);return o instanceof Qn?e:o})();return new Vi(r,{docsPath:t,...n})}async function Ne(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return pe(t)}async function $o(e,t){var B,N,F,A,C;const{account:n=e.account,accessList:r,authorizationList:o,chain:s=e.chain,blobVersionedHashes:i,blobs:a,data:c,gas:u,gasPrice:d,maxFeePerBlobGas:f,maxFeePerGas:h,maxPriorityFeePerGas:l,nonce:p,nonceManager:y,to:S,type:O,value:$,...x}=t,g=await(async()=>{if(!n||!y||typeof p<"u")return p;const T=q(n),L=s?s.id:await U(e,Ne,"getChainId")({});return await y.consume({address:T.address,chainId:L,client:e})})();Ye(t);const w=(N=(B=s==null?void 0:s.formatters)==null?void 0:B.transactionRequest)==null?void 0:N.format,E=(w||St)({...Yt(x,{format:w}),account:n?q(n):void 0,accessList:r,authorizationList:o,blobs:a,blobVersionedHashes:i,data:c,gas:u,gasPrice:d,maxFeePerBlobGas:f,maxFeePerGas:h,maxPriorityFeePerGas:l,nonce:g,to:S,type:O,value:$},"fillTransaction");try{const T=await e.request({method:"eth_fillTransaction",params:[E]}),m=(((A=(F=s==null?void 0:s.formatters)==null?void 0:F.transaction)==null?void 0:A.format)||tr)(T.tx);delete m.blockHash,delete m.blockNumber,delete m.r,delete m.s,delete m.transactionIndex,delete m.v,delete m.yParity,m.data=m.input,m.gas&&(m.gas=t.gas??m.gas),m.gasPrice&&(m.gasPrice=t.gasPrice??m.gasPrice),m.maxFeePerBlobGas&&(m.maxFeePerBlobGas=t.maxFeePerBlobGas??m.maxFeePerBlobGas),m.maxFeePerGas&&(m.maxFeePerGas=t.maxFeePerGas??m.maxFeePerGas),m.maxPriorityFeePerGas&&(m.maxPriorityFeePerGas=t.maxPriorityFeePerGas??m.maxPriorityFeePerGas),m.nonce&&(m.nonce=t.nonce??m.nonce);const b=await(async()=>{var z,j;if(typeof((z=s==null?void 0:s.fees)==null?void 0:z.baseFeeMultiplier)=="function"){const G=await U(e,We,"getBlock")({});return s.fees.baseFeeMultiplier({block:G,client:e,request:t})}return((j=s==null?void 0:s.fees)==null?void 0:j.baseFeeMultiplier)??1.2})();if(b<1)throw new wo;const R=10**(((C=b.toString().split(".")[1])==null?void 0:C.length)??0),k=z=>z*BigInt(Math.ceil(b*R))/BigInt(R);return m.maxFeePerGas&&!t.maxFeePerGas&&(m.maxFeePerGas=k(m.maxFeePerGas)),m.gasPrice&&!t.gasPrice&&(m.gasPrice=k(m.gasPrice)),{raw:T.raw,transaction:{from:E.from,...m}}}catch(T){throw Xt(T,{...t,chain:e.chain})}}const rr=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Ir=new Map,cn=new Ke(128);async function Jt(e,t){var g,w,P;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=rr);const{account:r,chain:o=e.chain,nonceManager:s,parameters:i}=n,a=(()=>{if(typeof(o==null?void 0:o.prepareTransactionRequest)=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o==null?void 0:o.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})();let c;async function u(){return c||(typeof n.chainId<"u"?n.chainId:o?o.id:(c=await U(e,Ne,"getChainId")({}),c))}const d=r&&q(r);let f=n.nonce;if(i.includes("nonce")&&typeof f>"u"&&d&&s){const E=await u();f=await s.consume({address:d.address,chainId:E,client:e})}a!=null&&a.fn&&((g=a.runAt)!=null&&g.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillTransaction"}),f??(f=n.nonce));const l=((i.includes("blobVersionedHashes")||i.includes("sidecars"))&&n.kzg&&n.blobs||cn.get(e.uid)===!1||!["fees","gas"].some(B=>i.includes(B))?!1:!!(i.includes("chainId")&&typeof n.chainId!="number"||i.includes("nonce")&&typeof f!="number"||i.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||i.includes("gas")&&typeof n.gas!="bigint"))?await U(e,$o,"fillTransaction")({...n,nonce:f}).then(E=>{const{chainId:B,from:N,gas:F,gasPrice:A,nonce:C,maxFeePerBlobGas:T,maxFeePerGas:L,maxPriorityFeePerGas:m,type:b,...I}=E.transaction;return cn.set(e.uid,!0),{...n,...N?{from:N}:{},...b&&!n.type?{type:b}:{},...typeof B<"u"?{chainId:B}:{},...typeof F<"u"?{gas:F}:{},...typeof A<"u"?{gasPrice:A}:{},...typeof C<"u"?{nonce:C}:{},...typeof T<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:T}:{},...typeof L<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:L}:{},...typeof m<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:m}:{},..."nonceKey"in I&&typeof I.nonceKey<"u"?{nonceKey:I.nonceKey}:{},..."keyAuthorization"in I&&typeof I.keyAuthorization<"u"&&I.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:I.keyAuthorization}:{}}}).catch(E=>{var A,C;const B=E;if(B.name!=="TransactionExecutionError")return n;if((A=B.walk)==null?void 0:A.call(B,T=>T.name==="ExecutionRevertedError"))throw E;return((C=B.walk)==null?void 0:C.call(B,T=>{var m;const L=T;return L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError"||((m=L.message)==null?void 0:m.includes("eth_fillTransaction is not available"))}))&&cn.set(e.uid,!1),n}):n;f??(f=l.nonce),n={...l,...d?{from:d==null?void 0:d.address}:{},...f?{nonce:f}:{}};const{blobs:p,gas:y,kzg:S,type:O}=n;a!=null&&a.fn&&((w=a.runAt)!=null&&w.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillParameters"}));let $;async function x(){return $||($=await U(e,We,"getBlock")({blockTag:"latest"}),$)}if(i.includes("nonce")&&typeof f>"u"&&d&&!s&&(n.nonce=await U(e,Po,"getTransactionCount")({address:d.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&p&&S){const E=Bo({blobs:p,kzg:S});if(i.includes("blobVersionedHashes")){const B=Ca({commitments:E,to:"hex"});n.blobVersionedHashes=B}if(i.includes("sidecars")){const B=Ao({blobs:p,commitments:E,kzg:S}),N=ka({blobs:p,commitments:E,proofs:B,to:"hex"});n.sidecars=N}}if(i.includes("chainId")&&(n.chainId=await u()),(i.includes("fees")||i.includes("type"))&&typeof O>"u")try{n.type=za(n)}catch{let E=Ir.get(e.uid);if(typeof E>"u"){const B=await x();E=typeof(B==null?void 0:B.baseFeePerGas)=="bigint",Ir.set(e.uid,E)}n.type=E?"eip1559":"legacy"}if(i.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const E=await x(),{maxFeePerGas:B,maxPriorityFeePerGas:N}=await Br(e,{block:E,chain:o,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<N)throw new ga({maxPriorityFeePerGas:N});n.maxPriorityFeePerGas=N,n.maxFeePerGas=B}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new er;if(typeof n.gasPrice>"u"){const E=await x(),{gasPrice:B}=await Br(e,{block:E,chain:o,request:n,type:"legacy"});n.gasPrice=B}}return i.includes("gas")&&typeof y>"u"&&(n.gas=await U(e,Ra,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((P=a.runAt)!=null&&P.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"afterFillParameters"})),Ye(n),delete n.parameters,n}async function Ra(e,t){var i,a,c;const{account:n=e.account,prepare:r=!0}=t,o=n?q(n):void 0,s=(()=>{if(Array.isArray(r))return r;if((o==null?void 0:o.type)!=="local")return["blobVersionedHashes"]})();try{const u=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Jn({authorization:t.authorizationList[0]}).catch(()=>{throw new v("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:f,blobs:h,blobVersionedHashes:l,blockNumber:p,blockTag:y,data:S,gas:O,gasPrice:$,maxFeePerBlobGas:x,maxFeePerGas:g,maxPriorityFeePerGas:w,nonce:P,value:E,stateOverride:B,...N}=r?await Jt(e,{...t,parameters:s,to:u}):t;if(O&&t.gas!==O)return O;const A=(typeof p=="bigint"?M(p):void 0)||y,C=ya(B);Ye(t);const T=(c=(a=(i=e.chain)==null?void 0:i.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,m=(T||St)({...Yt(N,{format:T}),account:o,accessList:d,authorizationList:f,blobs:h,blobVersionedHashes:l,data:S,gasPrice:$,maxFeePerBlobGas:x,maxFeePerGas:g,maxPriorityFeePerGas:w,nonce:P,to:u,value:E},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:C?[m,A??e.experimental_blockTag??"latest",C]:A?[m,A]:[m]}))}catch(u){throw fa(u,{...t,account:o,chain:e.chain})}}function Ma(e,t){if(!oe(e,{strict:!1}))throw new ve({address:e});if(!oe(t,{strict:!1}))throw new ve({address:t});return e.toLowerCase()===t.toLowerCase()}function La(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const or=BigInt(0),kn=BigInt(1);function $t(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function sr(e){if(!$t(e))throw new Error("Uint8Array expected")}function Bt(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Ot(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Co(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?or:BigInt("0x"+e)}const No=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Ua=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function At(e){if(sr(e),No)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Ua[e[n]];return t}const ue={_0:48,_9:57,A:65,F:70,a:97,f:102};function Sr(e){if(e>=ue._0&&e<=ue._9)return e-ue._0;if(e>=ue.A&&e<=ue.F)return e-(ue.A-10);if(e>=ue.a&&e<=ue.f)return e-(ue.a-10)}function jt(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(No)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=Sr(e.charCodeAt(s)),a=Sr(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function Ie(e){return Co(At(e))}function Oo(e){return sr(e),Co(At(Uint8Array.from(e).reverse()))}function Ct(e,t){return jt(e.toString(16).padStart(t*2,"0"))}function Fo(e,t){return Ct(e,t).reverse()}function te(e,t,n){let r;if(typeof t=="string")try{r=jt(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if($t(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function Gt(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];sr(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}const un=e=>typeof e=="bigint"&&or<=e;function ir(e,t,n){return un(e)&&un(t)&&un(n)&&t<=e&&e<n}function Ue(e,t,n,r){if(!ir(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function ja(e){let t;for(t=0;e>or;e>>=kn,t+=1);return t}const Qt=e=>(kn<<BigInt(e))-kn,dn=e=>new Uint8Array(e),$r=e=>Uint8Array.from(e);function Ga(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=dn(e),o=dn(e),s=0;const i=()=>{r.fill(1),o.fill(0),s=0},a=(...f)=>n(o,r,...f),c=(f=dn(0))=>{o=a($r([0]),f),r=a(),f.length!==0&&(o=a($r([1]),f),r=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const h=[];for(;f<t;){r=a();const l=r.slice();h.push(l),f+=r.length}return Gt(...h)};return(f,h)=>{i(),c(f);let l;for(;!(l=h(u()));)c();return i(),l}}const _a={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||$t(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function en(e,t,n={}){const r=(o,s,i)=>{const a=_a[s];if(typeof a!="function")throw new Error("invalid validator function");const c=e[o];if(!(i&&c===void 0)&&!a(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+c)};for(const[o,s]of Object.entries(t))r(o,s,!1);for(const[o,s]of Object.entries(n))r(o,s,!0);return e}function Cr(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e(n,...r);return t.set(n,s),s}}class Ha extends v{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class qa extends v{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
21
|
+
`),{name:"ChainNotFoundError"})}}const fn="/docs/contract/encodeDeployData";function Da(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const o=t.find(i=>"type"in i&&i.type==="constructor");if(!o)throw new ys({docsPath:fn});if(!("inputs"in o))throw new fr({docsPath:fn});if(!o.inputs||o.inputs.length===0)throw new fr({docsPath:fn});const s=no(o.inputs,n);return Zt([r,s])}function ko(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const ln=new Map,Nr=new Map;let Va=0;function _t(e,t,n){const r=++Va,o=()=>ln.get(e)||[],s=()=>{const d=o();ln.set(e,d.filter(f=>f.id!==r))},i=()=>{const d=o();if(!d.some(h=>h.id===r))return;const f=Nr.get(e);if(d.length===1&&f){const h=f();h instanceof Promise&&h.catch(()=>{})}s()},a=o();if(ln.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return i;const c={};for(const d in t)c[d]=((...f)=>{var l,p;const h=o();if(h.length!==0)for(const y of h)(p=(l=y.fns)[d])==null||p.call(l,...f)});const u=n(c);return typeof u=="function"&&Nr.set(e,u),i}async function zn(e){return new Promise(t=>setTimeout(t,e))}function zo(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));const c=await(n==null?void 0:n(a))??r;await zn(c);const u=async()=>{o&&(await e({unpoll:s}),await zn(r),u())};u()})(),s}const Wa=new Map,Za=new Map;function Ka(e){const t=(o,s)=>({clear:()=>s.delete(o),get:()=>s.get(o),set:i=>s.set(o,i)}),n=t(e,Wa),r=t(e,Za);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function Ya(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=Ka(t),o=r.response.get();if(o&&n>0&&Date.now()-o.created.getTime()<n)return o.data;let s=r.promise.get();s||(s=e(),r.promise.set(s));try{const i=await s;return r.response.set({created:new Date,data:i}),i}finally{r.promise.clear()}}const Xa=e=>`blockNumber.${e}`;async function Ja(e,{cacheTime:t=e.cacheTime}={}){const n=await Ya(()=>e.request({method:"eth_blockNumber"}),{cacheKey:Xa(e.uid),cacheTime:t});return BigInt(n)}class Ee extends v{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
22
|
+
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Se extends v{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function ar({chain:e,currentChainId:t}){if(!e)throw new qa;if(t!==e.id)throw new Ha({chain:e,currentChainId:t})}async function Ro(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const hn=new Ke(128);async function tn(e,t){var g,w,P,E,B;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:s,authorizationList:i,blobs:a,data:c,dataSuffix:u=typeof e.dataSuffix=="string"?e.dataSuffix:(g=e.dataSuffix)==null?void 0:g.value,gas:d,gasPrice:f,maxFeePerBlobGas:h,maxFeePerGas:l,maxPriorityFeePerGas:p,nonce:y,type:S,value:O,...$}=t;if(typeof n>"u")throw new Ee({docsPath:"/docs/actions/wallet/sendTransaction"});const x=n?q(n):null;try{Ye(t);const N=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await Jn({authorization:i[0]}).catch(()=>{throw new v("`to` is required. Could not infer from `authorizationList`.")})})();if((x==null?void 0:x.type)==="json-rpc"||x===null){let F;o!==null&&(F=await U(e,Ne,"getChainId")({}),r&&ar({currentChainId:F,chain:o}));const A=(E=(P=(w=e.chain)==null?void 0:w.formatters)==null?void 0:P.transactionRequest)==null?void 0:E.format,T=(A||St)({...Yt($,{format:A}),accessList:s,account:x,authorizationList:i,blobs:a,chainId:F,data:u?ne([c??"0x",u]):c,gas:d,gasPrice:f,maxFeePerBlobGas:h,maxFeePerGas:l,maxPriorityFeePerGas:p,nonce:y,to:N,type:S,value:O},"sendTransaction"),L=hn.get(e.uid),m=L?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:m,params:[T]},{retryCount:0})}catch(b){if(L===!1)throw b;const I=b;if(I.name==="InvalidInputRpcError"||I.name==="InvalidParamsRpcError"||I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[T]},{retryCount:0}).then(R=>(hn.set(e.uid,!0),R)).catch(R=>{const k=R;throw k.name==="MethodNotFoundRpcError"||k.name==="MethodNotSupportedRpcError"?(hn.set(e.uid,!1),I):k});throw I}}if((x==null?void 0:x.type)==="local"){const F=await U(e,Jt,"prepareTransactionRequest")({account:x,accessList:s,authorizationList:i,blobs:a,chain:o,data:u?ne([c??"0x",u]):c,gas:d,gasPrice:f,maxFeePerBlobGas:h,maxFeePerGas:l,maxPriorityFeePerGas:p,nonce:y,nonceManager:x.nonceManager,parameters:[...rr,"sidecars"],type:S,value:O,...$,to:N}),A=(B=o==null?void 0:o.serializers)==null?void 0:B.transaction,C=await x.signTransaction(F,{serializer:A});return await U(e,Ro,"sendRawTransaction")({serializedTransaction:C})}throw(x==null?void 0:x.type)==="smart"?new Se({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Se({docsPath:"/docs/actions/wallet/sendTransaction",type:x==null?void 0:x.type})}catch(N){throw N instanceof Se?N:Xt(N,{...t,account:x,chain:t.chain||void 0})}}async function Tt(e,t){return Tt.internal(e,tn,"sendTransaction",t)}(function(e){async function t(n,r,o,s){const{abi:i,account:a=n.account,address:c,args:u,functionName:d,...f}=s;if(typeof a>"u")throw new Ee({docsPath:"/docs/contract/writeContract"});const h=a?q(a):null,l=so({abi:i,args:u,functionName:d});try{return await U(n,r,o)({data:l,to:c,account:h,...f})}catch(p){throw na(p,{abi:i,address:c,args:u,docsPath:"/docs/contract/writeContract",functionName:d,sender:h==null?void 0:h.address})}}e.internal=t})(Tt||(Tt={}));class Qa extends v{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function Ht(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((o,s)=>{const i=async({count:a=0}={})=>{const c=async({error:u})=>{const d=typeof t=="function"?t({count:a,error:u}):t;d&&await zn(d),i({count:a+1})};try{const u=await e();o(u)}catch(u){if(a<n&&await r({count:a,error:u}))return c({error:u});s(u)}};i()})}const Mo={"0x0":"reverted","0x1":"success"};function Lo(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>La(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?pe(e.transactionIndex):null,status:e.status?Mo[e.status]:null,type:e.type?vo[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const Uo="0x5792579257925792579257925792579257925792579257925792579257925792",jo=M(0,{size:32});async function Go(e,t){var h;const{account:n=e.account,chain:r=e.chain,experimental_fallback:o,experimental_fallbackDelay:s=32,forceAtomic:i=!1,id:a,version:c="2.0.0"}=t,u=n?q(n):null;let d=t.capabilities;e.dataSuffix&&!((h=t.capabilities)!=null&&h.dataSuffix)&&(typeof e.dataSuffix=="string"?d={...t.capabilities,dataSuffix:{value:e.dataSuffix,optional:!0}}:d={...t.capabilities,dataSuffix:{value:e.dataSuffix.value,...e.dataSuffix.required?{}:{optional:!0}}});const f=t.calls.map(l=>{const p=l,y=p.abi?so({abi:p.abi,functionName:p.functionName,args:p.args}):p.data;return{data:p.dataSuffix&&y?ne([y,p.dataSuffix]):y,to:p.to,value:p.value?M(p.value):void 0}});try{const l=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:f,capabilities:d,chainId:M(r.id),from:u==null?void 0:u.address,id:a,version:c}]},{retryCount:0});return typeof l=="string"?{id:l}:l}catch(l){const p=l;if(o&&(p.name==="MethodNotFoundRpcError"||p.name==="MethodNotSupportedRpcError"||p.name==="UnknownRpcError"||p.details.toLowerCase().includes("does not exist / is not available")||p.details.toLowerCase().includes("missing or invalid. request()")||p.details.toLowerCase().includes("did not match any variant of untagged enum")||p.details.toLowerCase().includes("account upgraded to unsupported contract")||p.details.toLowerCase().includes("eip-7702 not supported")||p.details.toLowerCase().includes("unsupported wc_ method")||p.details.toLowerCase().includes("feature toggled misconfigured")||p.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(d&&Object.values(d).some(x=>!x.optional)){const x="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new De(new v(x,{details:x}))}if(i&&f.length>1){const $="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Ve(new v($,{details:$}))}const y=[];for(const $ of f){const x=tn(e,{account:u,chain:r,data:$.data,to:$.to,value:$.value?he($.value):void 0});y.push(x),s>0&&await new Promise(g=>setTimeout(g,s))}const S=await Promise.allSettled(y);if(S.every($=>$.status==="rejected"))throw S[0].reason;const O=S.map($=>$.status==="fulfilled"?$.value:jo);return{id:ne([...O,M(r.id,{size:32}),Uo])}}throw Xt(l,{...t,account:u,chain:t.chain})}}async function _o(e,t){async function n(d){if(d.endsWith(Uo.slice(2))){const h=qt(Pn(d,-64,-32)),l=Pn(d,0,-64).slice(2).match(/.{1,64}/g),p=await Promise.all(l.map(S=>jo.slice(2)!==S?e.request({method:"eth_getTransactionReceipt",params:[`0x${S}`]},{dedupe:!0}):void 0)),y=p.some(S=>S===null)?100:p.every(S=>(S==null?void 0:S.status)==="0x1")?200:p.every(S=>(S==null?void 0:S.status)==="0x0")?500:600;return{atomic:!1,chainId:pe(h),receipts:p.filter(Boolean),status:y,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[d]})}const{atomic:r=!1,chainId:o,receipts:s,version:i="2.0.0",...a}=await n(t.id),[c,u]=(()=>{const d=a.status;return d>=100&&d<200?["pending",d]:d>=200&&d<300?["success",d]:d>=300&&d<700?["failure",d]:d==="CONFIRMED"?["success",200]:d==="PENDING"?["pending",100]:[void 0,d]})();return{...a,atomic:r,chainId:o?pe(o):void 0,receipts:(s==null?void 0:s.map(d=>({...d,blockNumber:he(d.blockNumber),gasUsed:he(d.gasUsed),status:Mo[d.status]})))??[],statusCode:u,status:c,version:i}}async function Ho(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:o=({statusCode:y})=>y===200||y>=300,retryCount:s=4,retryDelay:i=({count:y})=>~~(1<<y)*200,timeout:a=6e4,throwOnFailure:c=!1}=t,u=ie(["waitForCallsStatus",e.uid,n]),{promise:d,resolve:f,reject:h}=ko();let l;const p=_t(u,{resolve:f,reject:h},y=>{const S=zo(async()=>{const O=$=>{clearTimeout(l),S(),$(),p()};try{const $=await Ht(async()=>{const x=await U(e,_o,"getCallsStatus")({id:n});if(c&&x.status==="failure")throw new Qa(x);return x},{retryCount:s,delay:i});if(!o($))return;O(()=>y.resolve($))}catch($){O(()=>y.reject($))}},{interval:r,emitOnBegin:!0});return S});return l=a?setTimeout(()=>{p(),clearTimeout(l),h(new ec({id:n}))},a):void 0,await d}class ec extends v{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Rn=256;let Ft=Rn,kt;function qo(e=11){if(!kt||Ft+e>Rn*2){kt="",Ft=0;for(let t=0;t<Rn;t++)kt+=(256+Math.random()*256|0).toString(16).substring(1)}return kt.substring(Ft,Ft+++e)}function tc(e){const{batch:t,chain:n,ccipRead:r,dataSuffix:o,key:s="base",name:i="Base Client",type:a="base"}=e,c=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),u=(n==null?void 0:n.blockTime)??12e3,d=Math.min(Math.max(Math.floor(u/2),500),4e3),f=e.pollingInterval??d,h=e.cacheTime??f,l=e.account?q(e.account):void 0,{config:p,request:y,value:S}=e.transport({account:l,chain:n,pollingInterval:f}),O={...p,...S},$={account:l,batch:t,cacheTime:h,ccipRead:r,chain:n,dataSuffix:o,key:s,name:i,pollingInterval:f,request:y,transport:O,type:a,uid:qo(),...c?{experimental_blockTag:c}:{}};function x(g){return w=>{const P=w(g);for(const B in $)delete P[B];const E={...g,...P};return Object.assign(E,{extend:x(E)})}}return Object.assign($,{extend:x($)})}const zt=new Ke(8192);function nc(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(zt.get(n))return zt.get(n);const r=e().finally(()=>zt.delete(n));return zt.set(n,r),r}function rc(e,t={}){return async(n,r={})=>{var f;const{dedupe:o=!1,methods:s,retryDelay:i=150,retryCount:a=3,uid:c}={...t,...r},{method:u}=n;if((f=s==null?void 0:s.exclude)!=null&&f.includes(u))throw new Ae(new Error("method not supported"),{method:u});if(s!=null&&s.include&&!s.include.includes(u))throw new Ae(new Error("method not supported"),{method:u});const d=o?Dt(`${c}.${ie(n)}`):void 0;return nc(()=>Ht(async()=>{try{return await e(n)}catch(h){const l=h;switch(l.code){case st.code:throw new st(l);case it.code:throw new it(l);case at.code:throw new at(l,{method:n.method});case ct.code:throw new ct(l);case Ce.code:throw new Ce(l);case He.code:throw new He(l);case ut.code:throw new ut(l);case dt.code:throw new dt(l);case ft.code:throw new ft(l);case Ae.code:throw new Ae(l,{method:n.method});case qe.code:throw new qe(l);case lt.code:throw new lt(l);case Le.code:throw new Le(l);case ht.code:throw new ht(l);case pt.code:throw new pt(l);case yt.code:throw new yt(l);case mt.code:throw new mt(l);case gt.code:throw new gt(l);case De.code:throw new De(l);case bt.code:throw new bt(l);case wt.code:throw new wt(l);case xt.code:throw new xt(l);case vt.code:throw new vt(l);case Et.code:throw new Et(l);case Ve.code:throw new Ve(l);case 5e3:throw new Le(l);case Pt.code:throw new Pt(l);default:throw h instanceof v?h:new ea(l)}}},{delay:({count:h,error:l})=>{var p;if(l&&l instanceof po){const y=(p=l==null?void 0:l.headers)==null?void 0:p.get("Retry-After");if(y!=null&&y.match(/\d/))return Number.parseInt(y,10)*1e3}return~~(1<<h)*i},retryCount:a,shouldRetry:({error:h})=>oc(h)}),{enabled:o,id:d})}}function oc(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===qe.code||e.code===Ce.code:e instanceof po&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function sc(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return o=>{const s=typeof o=="function"?o(r):o,i={...r,...s};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}class ic extends v{constructor({domain:t}){super(`Invalid domain "${ie(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class ac extends v{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class cc extends v{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function uc(e){const{domain:t,message:n,primaryType:r,types:o}=e,s=(c,u)=>{const d={...u};for(const f of c){const{name:h,type:l}=f;l==="address"&&(d[h]=d[h].toLowerCase())}return d},i=o.EIP712Domain?t?s(o.EIP712Domain,t):{}:{},a=(()=>{if(r!=="EIP712Domain")return s(o[r],n)})();return ie({domain:i,message:a,primaryType:r,types:o})}function dc(e){const{domain:t,message:n,primaryType:r,types:o}=e,s=(i,a)=>{for(const c of i){const{name:u,type:d}=c,f=a[u],h=d.match(to);if(h&&(typeof f=="number"||typeof f=="bigint")){const[y,S,O]=h;M(f,{signed:S==="int",size:Number.parseInt(O,10)/8})}if(d==="address"&&typeof f=="string"&&!oe(f))throw new ve({address:f});const l=d.match(hi);if(l){const[y,S]=l;if(S&&_(f)!==Number.parseInt(S,10))throw new vs({expectedSize:Number.parseInt(S,10),givenSize:_(f)})}const p=o[d];p&&(lc(d),s(p,f))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new ic({domain:t});s(o.EIP712Domain,t)}if(r!=="EIP712Domain")if(o[r])s(o[r],n);else throw new ac({primaryType:r,types:o})}function fc({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function lc(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new cc({type:e})}class Do extends Dn{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Gs(t);const r=Vt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),_e(s)}update(t){return Ge(this),this.iHash.update(t),this}digestInto(t){Ge(this),$e(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Vo=(e,t,n)=>new Do(e,t).update(n).digest();Vo.create=(e,t)=>new Do(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const K=BigInt(0),V=BigInt(1),Te=BigInt(2),hc=BigInt(3),Wo=BigInt(4),Zo=BigInt(5),Ko=BigInt(8);function Z(e,t){const n=e%t;return n>=K?n:t+n}function ee(e,t,n){let r=e;for(;t-- >K;)r*=r,r%=n;return r}function Mn(e,t){if(e===K)throw new Error("invert: expected non-zero number");if(t<=K)throw new Error("invert: expected positive modulus, got "+t);let n=Z(e,t),r=t,o=K,s=V;for(;n!==K;){const a=r/n,c=r%n,u=o-s*a;r=n,n=c,o=s,s=u}if(r!==V)throw new Error("invert: does not exist");return Z(o,t)}function Yo(e,t){const n=(e.ORDER+V)/Wo,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function pc(e,t){const n=(e.ORDER-Zo)/Ko,r=e.mul(t,Te),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,Te),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function yc(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-V,n=0;for(;t%Te===K;)t/=Te,n++;let r=Te;const o=cr(e);for(;Or(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Yo;let s=o.pow(r,t);const i=(t+V)/Te;return function(c,u){if(c.is0(u))return u;if(Or(c,u)!==1)throw new Error("Cannot find square root");let d=n,f=c.mul(c.ONE,s),h=c.pow(u,t),l=c.pow(u,i);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let p=1,y=c.sqr(h);for(;!c.eql(y,c.ONE);)if(p++,y=c.sqr(y),p===d)throw new Error("Cannot find square root");const S=V<<BigInt(d-p-1),O=c.pow(f,S);d=p,f=c.sqr(O),h=c.mul(h,f),l=c.mul(l,O)}return l}}function mc(e){return e%Wo===hc?Yo:e%Ko===Zo?pc:yc(e)}const gc=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function bc(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=gc.reduce((r,o)=>(r[o]="function",r),t);return en(e,n)}function wc(e,t,n){if(n<K)throw new Error("invalid exponent, negatives unsupported");if(n===K)return e.ONE;if(n===V)return t;let r=e.ONE,o=t;for(;n>K;)n&V&&(r=e.mul(r,o)),o=e.sqr(o),n>>=V;return r}function Xo(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((i,a,c)=>e.is0(a)?i:(r[c]=i,e.mul(i,a)),e.ONE),s=e.inv(o);return t.reduceRight((i,a,c)=>e.is0(a)?i:(r[c]=e.mul(i,r[c]),e.mul(i,a)),s),r}function Or(e,t){const n=(e.ORDER-V)/Te,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),i=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function Jo(e,t){t!==void 0&&rt(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function cr(e,t,n=!1,r={}){if(e<=K)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:s}=Jo(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let i;const a=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:s,MASK:Qt(o),ZERO:K,ONE:V,create:c=>Z(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return K<=c&&c<e},is0:c=>c===K,isOdd:c=>(c&V)===V,neg:c=>Z(-c,e),eql:(c,u)=>c===u,sqr:c=>Z(c*c,e),add:(c,u)=>Z(c+u,e),sub:(c,u)=>Z(c-u,e),mul:(c,u)=>Z(c*u,e),pow:(c,u)=>wc(a,c,u),div:(c,u)=>Z(c*Mn(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>Mn(c,e),sqrt:r.sqrt||(c=>(i||(i=mc(e)),i(a,c))),toBytes:c=>n?Fo(c,s):Ct(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return n?Oo(c):Ie(c)},invertBatch:c=>Xo(a,c),cmov:(c,u,d)=>d?u:c});return Object.freeze(a)}function Qo(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function es(e){const t=Qo(e);return t+Math.ceil(t/2)}function xc(e,t,n=!1){const r=e.length,o=Qo(t),s=es(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?Oo(e):Ie(e),a=Z(i,t-V)+V;return n?Fo(a,o):Ct(a,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fr=BigInt(0),Ln=BigInt(1);function pn(e,t){const n=t.negate();return e?n:t}function ts(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function yn(e,t){ts(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=Qt(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function kr(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:i}=n;let a=Number(e&o),c=e>>i;a>r&&(a-=s,c+=Ln);const u=t*r,d=u+Math.abs(a)-1,f=a===0,h=a<0,l=t%2!==0;return{nextN:c,offset:d,isZero:f,isNeg:h,isNegF:l,offsetF:u}}function vc(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function Ec(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const mn=new WeakMap,ns=new WeakMap;function gn(e){return ns.get(e)||1}function Pc(e,t){return{constTimeNegate:pn,hasPrecomputes(n){return gn(n)!==1},unsafeLadder(n,r,o=e.ZERO){let s=n;for(;r>Fr;)r&Ln&&(o=o.add(s)),s=s.double(),r>>=Ln;return o},precomputeWindow(n,r){const{windows:o,windowSize:s}=yn(r,t),i=[];let a=n,c=a;for(let u=0;u<o;u++){c=a,i.push(c);for(let d=1;d<s;d++)c=c.add(a),i.push(c);a=c.double()}return i},wNAF(n,r,o){let s=e.ZERO,i=e.BASE;const a=yn(n,t);for(let c=0;c<a.windows;c++){const{nextN:u,offset:d,isZero:f,isNeg:h,isNegF:l,offsetF:p}=kr(o,c,a);o=u,f?i=i.add(pn(l,r[p])):s=s.add(pn(h,r[d]))}return{p:s,f:i}},wNAFUnsafe(n,r,o,s=e.ZERO){const i=yn(n,t);for(let a=0;a<i.windows&&o!==Fr;a++){const{nextN:c,offset:u,isZero:d,isNeg:f}=kr(o,a,i);if(o=c,!d){const h=r[u];s=s.add(f?h.negate():h)}}return s},getPrecomputes(n,r,o){let s=mn.get(r);return s||(s=this.precomputeWindow(r,n),n!==1&&mn.set(r,o(s))),s},wNAFCached(n,r,o){const s=gn(n);return this.wNAF(s,this.getPrecomputes(s,n,o),r)},wNAFCachedUnsafe(n,r,o,s){const i=gn(n);return i===1?this.unsafeLadder(n,r,s):this.wNAFUnsafe(i,this.getPrecomputes(i,n,o),r,s)},setWindowSize(n,r){ts(r,t),ns.set(n,r),mn.delete(n)}}}function Bc(e,t,n,r){vc(n,e),Ec(r,t);const o=n.length,s=r.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,a=ja(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const u=Qt(c),d=new Array(Number(u)+1).fill(i),f=Math.floor((t.BITS-1)/c)*c;let h=i;for(let l=f;l>=0;l-=c){d.fill(i);for(let y=0;y<s;y++){const S=r[y],O=Number(S>>BigInt(l)&u);d[O]=d[O].add(n[y])}let p=i;for(let y=d.length-1,S=i;y>0;y--)S=S.add(d[y]),p=p.add(S);if(h=h.add(p),l!==0)for(let y=0;y<c;y++)h=h.double()}return h}function rs(e){return bc(e.Fp),en(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Jo(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function zr(e){e.lowS!==void 0&&Bt("lowS",e.lowS),e.prehash!==void 0&&Bt("prehash",e.prehash)}function Ac(e){const t=rs(e);en(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class Tc extends Error{constructor(t=""){super(t)}}const de={Err:Tc,_tlv:{encode:(e,t)=>{const{Err:n}=de;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Ot(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?Ot(o.length/2|128):"";return Ot(e)+s+o+t},decode(e,t){const{Err:n}=de;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],s=!!(o&128);let i=0;if(!s)i=o;else{const c=o&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const u=t.subarray(r,r+c);if(u.length!==c)throw new n("tlv.decode: length bytes not complete");if(u[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const d of u)i=i<<8|d;if(r+=c,i<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=de;if(e<fe)throw new t("integer: negative integers are not allowed");let n=Ot(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=de;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Ie(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=de,o=te("signature",e),{v:s,l:i}=r.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:u,l:d}=r.decode(2,c);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(u)}},hexFromSig(e){const{_tlv:t,_int:n}=de,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}};function bn(e,t){return At(Ct(e,t))}const fe=BigInt(0),H=BigInt(1);BigInt(2);const wn=BigInt(3),Ic=BigInt(4);function Sc(e){const t=Ac(e),{Fp:n}=t,r=cr(t.n,t.nBitLength),o=t.toBytes||((x,g,w)=>{const P=g.toAffine();return Gt(Uint8Array.from([4]),n.toBytes(P.x),n.toBytes(P.y))}),s=t.fromBytes||(x=>{const g=x.subarray(1),w=n.fromBytes(g.subarray(0,n.BYTES)),P=n.fromBytes(g.subarray(n.BYTES,2*n.BYTES));return{x:w,y:P}});function i(x){const{a:g,b:w}=t,P=n.sqr(x),E=n.mul(P,x);return n.add(n.add(E,n.mul(x,g)),w)}function a(x,g){const w=n.sqr(g),P=i(x);return n.eql(w,P)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,wn),Ic),u=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,u)))throw new Error("bad curve params: a or b");function d(x){return ir(x,H,t.n)}function f(x){const{allowedPrivateKeyLengths:g,nByteLength:w,wrapPrivateKey:P,n:E}=t;if(g&&typeof x!="bigint"){if($t(x)&&(x=At(x)),typeof x!="string"||!g.includes(x.length))throw new Error("invalid private key");x=x.padStart(w*2,"0")}let B;try{B=typeof x=="bigint"?x:Ie(te("private key",x,w))}catch{throw new Error("invalid private key, expected hex or "+w+" bytes, got "+typeof x)}return P&&(B=Z(B,E)),Ue("private key",B,H,E),B}function h(x){if(!(x instanceof y))throw new Error("ProjectivePoint expected")}const l=Cr((x,g)=>{const{px:w,py:P,pz:E}=x;if(n.eql(E,n.ONE))return{x:w,y:P};const B=x.is0();g==null&&(g=B?n.ONE:n.inv(E));const N=n.mul(w,g),F=n.mul(P,g),A=n.mul(E,g);if(B)return{x:n.ZERO,y:n.ZERO};if(!n.eql(A,n.ONE))throw new Error("invZ was invalid");return{x:N,y:F}}),p=Cr(x=>{if(x.is0()){if(t.allowInfinityPoint&&!n.is0(x.py))return;throw new Error("bad point: ZERO")}const{x:g,y:w}=x.toAffine();if(!n.isValid(g)||!n.isValid(w))throw new Error("bad point: x or y not FE");if(!a(g,w))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class y{constructor(g,w,P){if(g==null||!n.isValid(g))throw new Error("x required");if(w==null||!n.isValid(w)||n.is0(w))throw new Error("y required");if(P==null||!n.isValid(P))throw new Error("z required");this.px=g,this.py=w,this.pz=P,Object.freeze(this)}static fromAffine(g){const{x:w,y:P}=g||{};if(!g||!n.isValid(w)||!n.isValid(P))throw new Error("invalid affine point");if(g instanceof y)throw new Error("projective point not allowed");const E=B=>n.eql(B,n.ZERO);return E(w)&&E(P)?y.ZERO:new y(w,P,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(g){const w=Xo(n,g.map(P=>P.pz));return g.map((P,E)=>P.toAffine(w[E])).map(y.fromAffine)}static fromHex(g){const w=y.fromAffine(s(te("pointHex",g)));return w.assertValidity(),w}static fromPrivateKey(g){return y.BASE.multiply(f(g))}static msm(g,w){return Bc(y,r,g,w)}_setWindowSize(g){$.setWindowSize(this,g)}assertValidity(){p(this)}hasEvenY(){const{y:g}=this.toAffine();if(n.isOdd)return!n.isOdd(g);throw new Error("Field doesn't support isOdd")}equals(g){h(g);const{px:w,py:P,pz:E}=this,{px:B,py:N,pz:F}=g,A=n.eql(n.mul(w,F),n.mul(B,E)),C=n.eql(n.mul(P,F),n.mul(N,E));return A&&C}negate(){return new y(this.px,n.neg(this.py),this.pz)}double(){const{a:g,b:w}=t,P=n.mul(w,wn),{px:E,py:B,pz:N}=this;let F=n.ZERO,A=n.ZERO,C=n.ZERO,T=n.mul(E,E),L=n.mul(B,B),m=n.mul(N,N),b=n.mul(E,B);return b=n.add(b,b),C=n.mul(E,N),C=n.add(C,C),F=n.mul(g,C),A=n.mul(P,m),A=n.add(F,A),F=n.sub(L,A),A=n.add(L,A),A=n.mul(F,A),F=n.mul(b,F),C=n.mul(P,C),m=n.mul(g,m),b=n.sub(T,m),b=n.mul(g,b),b=n.add(b,C),C=n.add(T,T),T=n.add(C,T),T=n.add(T,m),T=n.mul(T,b),A=n.add(A,T),m=n.mul(B,N),m=n.add(m,m),T=n.mul(m,b),F=n.sub(F,T),C=n.mul(m,L),C=n.add(C,C),C=n.add(C,C),new y(F,A,C)}add(g){h(g);const{px:w,py:P,pz:E}=this,{px:B,py:N,pz:F}=g;let A=n.ZERO,C=n.ZERO,T=n.ZERO;const L=t.a,m=n.mul(t.b,wn);let b=n.mul(w,B),I=n.mul(P,N),R=n.mul(E,F),k=n.add(w,P),z=n.add(B,N);k=n.mul(k,z),z=n.add(b,I),k=n.sub(k,z),z=n.add(w,E);let j=n.add(B,F);return z=n.mul(z,j),j=n.add(b,R),z=n.sub(z,j),j=n.add(P,E),A=n.add(N,F),j=n.mul(j,A),A=n.add(I,R),j=n.sub(j,A),T=n.mul(L,z),A=n.mul(m,R),T=n.add(A,T),A=n.sub(I,T),T=n.add(I,T),C=n.mul(A,T),I=n.add(b,b),I=n.add(I,b),R=n.mul(L,R),z=n.mul(m,z),I=n.add(I,R),R=n.sub(b,R),R=n.mul(L,R),z=n.add(z,R),b=n.mul(I,z),C=n.add(C,b),b=n.mul(j,z),A=n.mul(k,A),A=n.sub(A,b),b=n.mul(k,I),T=n.mul(j,T),T=n.add(T,b),new y(A,C,T)}subtract(g){return this.add(g.negate())}is0(){return this.equals(y.ZERO)}wNAF(g){return $.wNAFCached(this,g,y.normalizeZ)}multiplyUnsafe(g){const{endo:w,n:P}=t;Ue("scalar",g,fe,P);const E=y.ZERO;if(g===fe)return E;if(this.is0()||g===H)return this;if(!w||$.hasPrecomputes(this))return $.wNAFCachedUnsafe(this,g,y.normalizeZ);let{k1neg:B,k1:N,k2neg:F,k2:A}=w.splitScalar(g),C=E,T=E,L=this;for(;N>fe||A>fe;)N&H&&(C=C.add(L)),A&H&&(T=T.add(L)),L=L.double(),N>>=H,A>>=H;return B&&(C=C.negate()),F&&(T=T.negate()),T=new y(n.mul(T.px,w.beta),T.py,T.pz),C.add(T)}multiply(g){const{endo:w,n:P}=t;Ue("scalar",g,H,P);let E,B;if(w){const{k1neg:N,k1:F,k2neg:A,k2:C}=w.splitScalar(g);let{p:T,f:L}=this.wNAF(F),{p:m,f:b}=this.wNAF(C);T=$.constTimeNegate(N,T),m=$.constTimeNegate(A,m),m=new y(n.mul(m.px,w.beta),m.py,m.pz),E=T.add(m),B=L.add(b)}else{const{p:N,f:F}=this.wNAF(g);E=N,B=F}return y.normalizeZ([E,B])[0]}multiplyAndAddUnsafe(g,w,P){const E=y.BASE,B=(F,A)=>A===fe||A===H||!F.equals(E)?F.multiplyUnsafe(A):F.multiply(A),N=B(this,w).add(B(g,P));return N.is0()?void 0:N}toAffine(g){return l(this,g)}isTorsionFree(){const{h:g,isTorsionFree:w}=t;if(g===H)return!0;if(w)return w(y,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:g,clearCofactor:w}=t;return g===H?this:w?w(y,this):this.multiplyUnsafe(t.h)}toRawBytes(g=!0){return Bt("isCompressed",g),this.assertValidity(),o(y,this,g)}toHex(g=!0){return Bt("isCompressed",g),At(this.toRawBytes(g))}}y.BASE=new y(t.Gx,t.Gy,n.ONE),y.ZERO=new y(n.ZERO,n.ONE,n.ZERO);const{endo:S,nBitLength:O}=t,$=Pc(y,S?Math.ceil(O/2):O);return{CURVE:t,ProjectivePoint:y,normPrivateKeyToScalar:f,weierstrassEquation:i,isWithinCurveOrder:d}}function $c(e){const t=rs(e);return en(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Cc(e){const t=$c(e),{Fp:n,n:r,nByteLength:o,nBitLength:s}=t,i=n.BYTES+1,a=2*n.BYTES+1;function c(m){return Z(m,r)}function u(m){return Mn(m,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:f,weierstrassEquation:h,isWithinCurveOrder:l}=Sc({...t,toBytes(m,b,I){const R=b.toAffine(),k=n.toBytes(R.x),z=Gt;return Bt("isCompressed",I),I?z(Uint8Array.from([b.hasEvenY()?2:3]),k):z(Uint8Array.from([4]),k,n.toBytes(R.y))},fromBytes(m){const b=m.length,I=m[0],R=m.subarray(1);if(b===i&&(I===2||I===3)){const k=Ie(R);if(!ir(k,H,n.ORDER))throw new Error("Point is not on curve");const z=h(k);let j;try{j=n.sqrt(z)}catch(D){const W=D instanceof Error?": "+D.message:"";throw new Error("Point is not on curve"+W)}const G=(j&H)===H;return(I&1)===1!==G&&(j=n.neg(j)),{x:k,y:j}}else if(b===a&&I===4){const k=n.fromBytes(R.subarray(0,n.BYTES)),z=n.fromBytes(R.subarray(n.BYTES,2*n.BYTES));return{x:k,y:z}}else{const k=i,z=a;throw new Error("invalid Point, expected length of "+k+", or uncompressed "+z+", got "+b)}}});function p(m){const b=r>>H;return m>b}function y(m){return p(m)?c(-m):m}const S=(m,b,I)=>Ie(m.slice(b,I));class O{constructor(b,I,R){Ue("r",b,H,r),Ue("s",I,H,r),this.r=b,this.s=I,R!=null&&(this.recovery=R),Object.freeze(this)}static fromCompact(b){const I=o;return b=te("compactSignature",b,I*2),new O(S(b,0,I),S(b,I,2*I))}static fromDER(b){const{r:I,s:R}=de.toSig(te("DER",b));return new O(I,R)}assertValidity(){}addRecoveryBit(b){return new O(this.r,this.s,b)}recoverPublicKey(b){const{r:I,s:R,recovery:k}=this,z=E(te("msgHash",b));if(k==null||![0,1,2,3].includes(k))throw new Error("recovery id invalid");const j=k===2||k===3?I+t.n:I;if(j>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const G=(k&1)===0?"02":"03",Q=d.fromHex(G+bn(j,n.BYTES)),D=u(j),W=c(-z*D),Oe=c(R*D),me=d.BASE.multiplyAndAddUnsafe(Q,W,Oe);if(!me)throw new Error("point at infinify");return me.assertValidity(),me}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new O(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return jt(this.toDERHex())}toDERHex(){return de.hexFromSig(this)}toCompactRawBytes(){return jt(this.toCompactHex())}toCompactHex(){const b=o;return bn(this.r,b)+bn(this.s,b)}}const $={isValidPrivateKey(m){try{return f(m),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const m=es(t.n);return xc(t.randomBytes(m),t.n)},precompute(m=8,b=d.BASE){return b._setWindowSize(m),b.multiply(BigInt(3)),b}};function x(m,b=!0){return d.fromPrivateKey(m).toRawBytes(b)}function g(m){if(typeof m=="bigint")return!1;if(m instanceof d)return!0;const I=te("key",m).length,R=n.BYTES,k=R+1,z=2*R+1;if(!(t.allowedPrivateKeyLengths||o===k))return I===k||I===z}function w(m,b,I=!0){if(g(m)===!0)throw new Error("first arg must be private key");if(g(b)===!1)throw new Error("second arg must be public key");return d.fromHex(b).multiply(f(m)).toRawBytes(I)}const P=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");const b=Ie(m),I=m.length*8-s;return I>0?b>>BigInt(I):b},E=t.bits2int_modN||function(m){return c(P(m))},B=Qt(s);function N(m){return Ue("num < 2^"+s,m,fe,B),Ct(m,o)}function F(m,b,I=A){if(["recovered","canonical"].some(Pe=>Pe in I))throw new Error("sign() legacy options not supported");const{hash:R,randomBytes:k}=t;let{lowS:z,prehash:j,extraEntropy:G}=I;z==null&&(z=!0),m=te("msgHash",m),zr(I),j&&(m=te("prehashed msgHash",R(m)));const Q=E(m),D=f(b),W=[N(D),N(Q)];if(G!=null&&G!==!1){const Pe=G===!0?k(n.BYTES):G;W.push(te("extraEntropy",Pe))}const Oe=Gt(...W),me=Q;function nn(Pe){const Fe=P(Pe);if(!l(Fe))return;const rn=u(Fe),Xe=d.BASE.multiply(Fe).toAffine(),Be=c(Xe.x);if(Be===fe)return;const Je=c(rn*c(me+Be*D));if(Je===fe)return;let Qe=(Xe.x===Be?0:2)|Number(Xe.y&H),ke=Je;return z&&p(Je)&&(ke=y(Je),Qe^=1),new O(Be,ke,Qe)}return{seed:Oe,k2sig:nn}}const A={lowS:t.lowS,prehash:!1},C={lowS:t.lowS,prehash:!1};function T(m,b,I=A){const{seed:R,k2sig:k}=F(m,b,I),z=t;return Ga(z.hash.outputLen,z.nByteLength,z.hmac)(R,k)}d.BASE._setWindowSize(8);function L(m,b,I,R=C){var Qe;const k=m;b=te("msgHash",b),I=te("publicKey",I);const{lowS:z,prehash:j,format:G}=R;if(zr(R),"strict"in R)throw new Error("options.strict was renamed to lowS");if(G!==void 0&&G!=="compact"&&G!=="der")throw new Error("format must be compact or der");const Q=typeof k=="string"||$t(k),D=!Q&&!G&&typeof k=="object"&&k!==null&&typeof k.r=="bigint"&&typeof k.s=="bigint";if(!Q&&!D)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let W,Oe;try{if(D&&(W=new O(k.r,k.s)),Q){try{G!=="compact"&&(W=O.fromDER(k))}catch(ke){if(!(ke instanceof de.Err))throw ke}!W&&G!=="der"&&(W=O.fromCompact(k))}Oe=d.fromHex(I)}catch{return!1}if(!W||z&&W.hasHighS())return!1;j&&(b=t.hash(b));const{r:me,s:nn}=W,Pe=E(b),Fe=u(nn),rn=c(Pe*Fe),Xe=c(me*Fe),Be=(Qe=d.BASE.multiplyAndAddUnsafe(Oe,rn,Xe))==null?void 0:Qe.toAffine();return Be?c(Be.x)===me:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:w,sign:T,verify:L,ProjectivePoint:d,Signature:O,utils:$}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Nc(e){return{hash:e,hmac:(t,...n)=>Vo(e,t,Ws(...n)),randomBytes:Zs}}function Oc(e,t){const n=r=>Cc({...e,...Nc(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const os=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Rr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Fc=BigInt(0),kc=BigInt(1),Un=BigInt(2),Mr=(e,t)=>(e+t/Un)/t;function zc(e){const t=os,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,d=u*u*e%t,f=ee(d,n,t)*d%t,h=ee(f,n,t)*d%t,l=ee(h,Un,t)*u%t,p=ee(l,o,t)*l%t,y=ee(p,s,t)*p%t,S=ee(y,a,t)*y%t,O=ee(S,c,t)*S%t,$=ee(O,a,t)*y%t,x=ee($,n,t)*d%t,g=ee(x,i,t)*p%t,w=ee(g,r,t)*u%t,P=ee(w,Un,t);if(!jn.eql(jn.sqr(P),e))throw new Error("Cannot find square root");return P}const jn=cr(os,void 0,void 0,{sqrt:zc}),ss=Oc({a:Fc,b:BigInt(7),Fp:jn,n:Rr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Rr,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-kc*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,i=BigInt("0x100000000000000000000000000000000"),a=Mr(s*e,t),c=Mr(-r*e,t);let u=Z(e-a*n-c*o,t),d=Z(-a*r-c*s,t);const f=u>i,h=d>i;if(f&&(u=t-u),h&&(d=t-d),u>i||d>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:h,k2:d}}}},To),Rc=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:ss},Symbol.toStringTag,{value:"Module"}));async function Mc(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s,sender:i,nonce:a}){var h,l,p;const c=r||"latest",u=n!==void 0?M(n):void 0;let d=null;if(o?d=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,M(s)]},{dedupe:!0}):typeof s=="number"?d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,M(s)]},{dedupe:!!u}):i&&typeof a=="number"&&(d=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[i,M(a)]},{dedupe:!0})),!d)throw new uo({blockHash:t,blockNumber:n,blockTag:c,hash:o,index:s});return(((p=(l=(h=e.chain)==null?void 0:h.formatters)==null?void 0:l.transaction)==null?void 0:p.format)||tr)(d,"getTransaction")}async function xn(e,{hash:t}){var o,s,i;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new fo({hash:t});return(((i=(s=(o=e.chain)==null?void 0:o.formatters)==null?void 0:s.transactionReceipt)==null?void 0:i.format)||Lo)(n,"getTransactionReceipt")}function Lc(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:s,pollingInterval:i=e.pollingInterval}){const a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return a?(()=>{const f=ie(["watchBlockNumber",e.uid,t,n,i]);return _t(f,{onBlockNumber:r,onError:o},h=>zo(async()=>{var l;try{const p=await U(e,Ja,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(p===c)return;if(p-c>1&&n)for(let y=c+1n;y<p;y++)h.onBlockNumber(y,c),c=y}(c===void 0||p>c)&&(h.onBlockNumber(p,c),c=p)}catch(p){(l=h.onError)==null||l.call(h,p)}},{emitOnBegin:t,interval:i}))})():(()=>{const f=ie(["watchBlockNumber",e.uid,t,n]);return _t(f,{onBlockNumber:r,onError:o},h=>{let l=!0,p=()=>l=!1;return(async()=>{try{const y=(()=>{if(e.transport.type==="fallback"){const O=e.transport.transports.find($=>$.config.type==="webSocket"||$.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:S}=await y.subscribe({params:["newHeads"],onData(O){var x;if(!l)return;const $=he((x=O.result)==null?void 0:x.number);h.onBlockNumber($,c),c=$},onError(O){var $;($=h.onError)==null||$.call(h,O)}});p=S,l||p()}catch(y){o==null||o(y)}})(),()=>p()})})()}async function Uc(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:o,onReplaced:s,retryCount:i=6,retryDelay:a=({count:w})=>~~(1<<w)*200,timeout:c=18e4}=t,u=ie(["waitForTransactionReceipt",e.uid,o]),d=(()=>{var w;return t.pollingInterval?t.pollingInterval:(w=e.chain)!=null&&w.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let f,h,l,p=!1,y,S;const{promise:O,resolve:$,reject:x}=ko(),g=c?setTimeout(()=>{S==null||S(),y==null||y(),x(new Wi({hash:o}))},c):void 0;return y=_t(u,{onReplaced:s,resolve:$,reject:x},async w=>{if(l=await U(e,xn,"getTransactionReceipt")({hash:o}).catch(()=>{}),l&&r<=1){clearTimeout(g),w.resolve(l),y==null||y();return}S=U(e,Lc,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:d,async onBlockNumber(P){const E=N=>{clearTimeout(g),S==null||S(),N(),y==null||y()};let B=P;if(!p)try{if(l){if(r>1&&(!l.blockNumber||B-l.blockNumber+1n<r))return;E(()=>w.resolve(l));return}if(n&&!f&&(p=!0,await Ht(async()=>{f=await U(e,Mc,"getTransaction")({hash:o}),f.blockNumber&&(B=f.blockNumber)},{delay:a,retryCount:i}),p=!1),l=await U(e,xn,"getTransactionReceipt")({hash:o}),r>1&&(!l.blockNumber||B-l.blockNumber+1n<r))return;E(()=>w.resolve(l))}catch(N){if(N instanceof uo||N instanceof fo){if(!f){p=!1;return}try{h=f,p=!0;const F=await Ht(()=>U(e,We,"getBlock")({blockNumber:B,includeTransactions:!0}),{delay:a,retryCount:i,shouldRetry:({error:T})=>T instanceof xo});p=!1;const A=F.transactions.find(({from:T,nonce:L})=>T===h.from&&L===h.nonce);if(!A||(l=await U(e,xn,"getTransactionReceipt")({hash:A.hash}),r>1&&(!l.blockNumber||B-l.blockNumber+1n<r)))return;let C="replaced";A.to===h.to&&A.value===h.value&&A.input===h.input?C="repriced":A.from===A.to&&A.value===0n&&(C="cancelled"),E(()=>{var T;(T=w.onReplaced)==null||T.call(w,{reason:C,replacedTransaction:h,transaction:A,transactionReceipt:l}),w.resolve(l)})}catch(F){E(()=>w.reject(F))}}else E(()=>w.reject(N))}}})}),O}async function is(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var a,c,u;const o=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,r]:[t]},{retryCount:0}),i=(((u=(c=(a=e.chain)==null?void 0:a.formatters)==null?void 0:c.transactionReceipt)==null?void 0:u.format)||Lo)(o);if(i.status==="reverted"&&n)throw new lo({receipt:i});return i}async function jc(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:s,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:M(n),chainName:r,nativeCurrency:o,rpcUrls:s.default.http,blockExplorerUrls:i?Object.values(i).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}function Gc(e,t){const{abi:n,args:r,bytecode:o,...s}=t,i=Da({abi:n,args:r,bytecode:o});return tn(e,{...s,...s.authorizationList?{to:null}:{},data:i})}async function _c(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>It(r))}async function Hc(e,t={}){const{account:n=e.account,chainId:r}=t,o=n?q(n):void 0,s=r?[o==null?void 0:o.address,[M(r)]]:[o==null?void 0:o.address],i=await e.request({method:"wallet_getCapabilities",params:s}),a={};for(const[c,u]of Object.entries(i)){a[Number(c)]={};for(let[d,f]of Object.entries(u))d==="addSubAccount"&&(d="unstable_addSubAccount"),a[Number(c)][d]=f}return typeof r=="number"?a[r]:a}async function qc(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function as(e,t){var c;const{account:n=e.account,chainId:r,nonce:o}=t;if(!n)throw new Ee({docsPath:"/docs/eip7702/prepareAuthorization"});const s=q(n),i=(()=>{if(t.executor)return t.executor==="self"?t.executor:q(t.executor)})(),a={address:t.contractAddress??t.address,chainId:r,nonce:o};return typeof a.chainId>"u"&&(a.chainId=((c=e.chain)==null?void 0:c.id)??await U(e,Ne,"getChainId")({})),typeof a.nonce>"u"&&(a.nonce=await U(e,Po,"getTransactionCount")({address:s.address,blockTag:"pending"}),(i==="self"||i!=null&&i.address&&Ma(i.address,s.address))&&(a.nonce+=1)),a}async function Dc(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>di(n))}async function Vc(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function Wc(e,t){const{chain:n=e.chain}=t,r=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),o=await U(e,Go,"sendCalls")(t);return await U(e,Ho,"waitForCallsStatus")({...t,id:o.id,timeout:r})}const vn=new Ke(128);async function cs(e,t){var E,B,N,F,A;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:s,authorizationList:i,blobs:a,data:c,dataSuffix:u=typeof e.dataSuffix=="string"?e.dataSuffix:(E=e.dataSuffix)==null?void 0:E.value,gas:d,gasPrice:f,maxFeePerBlobGas:h,maxFeePerGas:l,maxPriorityFeePerGas:p,nonce:y,pollingInterval:S,throwOnReceiptRevert:O,type:$,value:x,...g}=t,w=t.timeout??Math.max(((o==null?void 0:o.blockTime)??0)*3,5e3);if(typeof n>"u")throw new Ee({docsPath:"/docs/actions/wallet/sendTransactionSync"});const P=n?q(n):null;try{Ye(t);const C=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await Jn({authorization:i[0]}).catch(()=>{throw new v("`to` is required. Could not infer from `authorizationList`.")})})();if((P==null?void 0:P.type)==="json-rpc"||P===null){let T;o!==null&&(T=await U(e,Ne,"getChainId")({}),r&&ar({currentChainId:T,chain:o}));const L=(F=(N=(B=e.chain)==null?void 0:B.formatters)==null?void 0:N.transactionRequest)==null?void 0:F.format,b=(L||St)({...Yt(g,{format:L}),accessList:s,account:P,authorizationList:i,blobs:a,chainId:T,data:c&&ne([c,u??"0x"]),gas:d,gasPrice:f,maxFeePerBlobGas:h,maxFeePerGas:l,maxPriorityFeePerGas:p,nonce:y,to:C,type:$,value:x},"sendTransaction"),I=vn.get(e.uid),R=I?"wallet_sendTransaction":"eth_sendTransaction",k=await(async()=>{try{return await e.request({method:R,params:[b]},{retryCount:0})}catch(j){if(I===!1)throw j;const G=j;if(G.name==="InvalidInputRpcError"||G.name==="InvalidParamsRpcError"||G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[b]},{retryCount:0}).then(Q=>(vn.set(e.uid,!0),Q)).catch(Q=>{const D=Q;throw D.name==="MethodNotFoundRpcError"||D.name==="MethodNotSupportedRpcError"?(vn.set(e.uid,!1),G):D});throw G}})(),z=await U(e,Uc,"waitForTransactionReceipt")({checkReplacement:!1,hash:k,pollingInterval:S,timeout:w});if(O&&z.status==="reverted")throw new lo({receipt:z});return z}if((P==null?void 0:P.type)==="local"){const T=await U(e,Jt,"prepareTransactionRequest")({account:P,accessList:s,authorizationList:i,blobs:a,chain:o,data:c&&ne([c,u??"0x"]),gas:d,gasPrice:f,maxFeePerBlobGas:h,maxFeePerGas:l,maxPriorityFeePerGas:p,nonce:y,nonceManager:P.nonceManager,parameters:[...rr,"sidecars"],type:$,value:x,...g,to:C}),L=(A=o==null?void 0:o.serializers)==null?void 0:A.transaction,m=await P.signTransaction(T,{serializer:L});return await U(e,is,"sendRawTransactionSync")({serializedTransaction:m,throwOnReceiptRevert:O,timeout:t.timeout})}throw(P==null?void 0:P.type)==="smart"?new Se({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Se({docsPath:"/docs/actions/wallet/sendTransactionSync",type:P==null?void 0:P.type})}catch(C){throw C instanceof Se?C:Xt(C,{...t,account:P,chain:t.chain||void 0})}}async function Zc(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function Kc(e,t){const{account:n=e.account}=t;if(!n)throw new Ee({docsPath:"/docs/eip7702/signAuthorization"});const r=q(n);if(!r.signAuthorization)throw new Se({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});const o=await as(e,t);return r.signAuthorization(o)}async function Yc(e,{account:t=e.account,message:n}){if(!t)throw new Ee({docsPath:"/docs/actions/wallet/signMessage"});const r=q(t);if(r.signMessage)return r.signMessage({message:n});const o=typeof n=="string"?Dt(n):n.raw instanceof Uint8Array?Rt(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]},{retryCount:0})}async function Xc(e,t){var u,d,f,h;const{account:n=e.account,chain:r=e.chain,...o}=t;if(!n)throw new Ee({docsPath:"/docs/actions/wallet/signTransaction"});const s=q(n);Ye({account:s,...t});const i=await U(e,Ne,"getChainId")({});r!==null&&ar({currentChainId:i,chain:r});const a=(r==null?void 0:r.formatters)||((u=e.chain)==null?void 0:u.formatters),c=((d=a==null?void 0:a.transactionRequest)==null?void 0:d.format)||St;return s.signTransaction?s.signTransaction({...o,chainId:i},{serializer:(h=(f=e.chain)==null?void 0:f.serializers)==null?void 0:h.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...o,account:s},"signTransaction"),chainId:M(i),from:s.address}]},{retryCount:0})}async function Jc(e,t){const{account:n=e.account,domain:r,message:o,primaryType:s}=t;if(!n)throw new Ee({docsPath:"/docs/actions/wallet/signTypedData"});const i=q(n),a={EIP712Domain:fc({domain:r}),...t.types};if(dc({domain:r,message:o,primaryType:s,types:a}),i.signTypedData)return i.signTypedData({domain:r,message:o,primaryType:s,types:a});const c=uc({domain:r,message:o,primaryType:s,types:a});return e.request({method:"eth_signTypedData_v4",params:[i.address,c]},{retryCount:0})}async function Qc(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:M(t)}]},{retryCount:0})}async function eu(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function tu(e,t){return Tt.internal(e,cs,"sendTransactionSync",t)}function nu(e){return{addChain:t=>jc(e,t),deployContract:t=>Gc(e,t),fillTransaction:t=>$o(e,t),getAddresses:()=>_c(e),getCallsStatus:t=>_o(e,t),getCapabilities:t=>Hc(e,t),getChainId:()=>Ne(e),getPermissions:()=>qc(e),prepareAuthorization:t=>as(e,t),prepareTransactionRequest:t=>Jt(e,t),requestAddresses:()=>Dc(e),requestPermissions:t=>Vc(e,t),sendCalls:t=>Go(e,t),sendCallsSync:t=>Wc(e,t),sendRawTransaction:t=>Ro(e,t),sendRawTransactionSync:t=>is(e,t),sendTransaction:t=>tn(e,t),sendTransactionSync:t=>cs(e,t),showCallsStatus:t=>Zc(e,t),signAuthorization:t=>Kc(e,t),signMessage:t=>Yc(e,t),signTransaction:t=>Xc(e,t),signTypedData:t=>Jc(e,t),switchChain:t=>Qc(e,t),waitForCallsStatus:t=>Ho(e,t),watchAsset:t=>eu(e,t),writeContract:t=>Tt(e,t),writeContractSync:t=>tu(e,t)}}function ou(e){const{key:t="wallet",name:n="Wallet Client",transport:r}=e;return tc({...e,key:t,name:n,transport:r,type:"walletClient"}).extend(nu)}function ru({key:e,methods:t,name:n,request:r,retryCount:o=3,retryDelay:s=150,timeout:i,type:a},c){const u=qo();return{config:{key:e,methods:t,name:n,request:r,retryCount:o,retryDelay:s,timeout:i,type:a},request:rc(r,{methods:t,retryCount:o,retryDelay:s,uid:u}),value:c}}function su(e,t={}){const{key:n="custom",methods:r,name:o="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>ru({key:n,methods:r,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}function iu(e){const{r:t,s:n}=ss.Signature.fromCompact(e.slice(2,130)),r=+`0x${e.slice(130)}`,[o,s]=(()=>{if(r===0||r===1)return[void 0,r];if(r===27)return[BigInt(r),0];if(r===28)return[BigInt(r),1];throw new Error("Invalid yParityOrV value")})();return typeof o<"u"?{r:M(t,{size:32}),s:M(n,{size:32}),v:o,yParity:s}:{r:M(t,{size:32}),s:M(n,{size:32}),yParity:s}}const au=sc({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}});export{fs as _,su as a,au as b,ou as c,iu as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse('{"displayName":"Verilog","fileTypes":["v","vh"],"name":"verilog","patterns":[{"include":"#comments"},{"include":"#module_pattern"},{"include":"#keywords"},{"include":"#constants"},{"include":"#strings"},{"include":"#operators"}],"repository":{"comments":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.verilog"}},"end":"(?!\\\\G)","patterns":[{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.verilog"}},"end":"\\\\n","name":"comment.line.double-slash.verilog"}]},{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.c-style.verilog"}]},"constants":{"patterns":[{"match":"`(?!(celldefine|endcelldefine|default_nettype|define|undef|ifdef|ifndef|else|endif|include|resetall|timescale|unconnected_drive|nounconnected_drive))[A-Z_a-z][$0-9A-Z_a-z]*","name":"variable.other.constant.verilog"},{"match":"[0-9]*\'[BDHObdho][XZ_xz\\\\h]+\\\\b","name":"constant.numeric.sized_integer.verilog"},{"captures":{"1":{"name":"constant.numeric.integer.verilog"},"2":{"name":"punctuation.separator.range.verilog"},"3":{"name":"constant.numeric.integer.verilog"}},"match":"\\\\b(\\\\d+)(:)(\\\\d+)\\\\b","name":"meta.block.numeric.range.verilog"},{"match":"\\\\b\\\\d[_\\\\d]*(?i:e\\\\d+)?\\\\b","name":"constant.numeric.integer.verilog"},{"match":"\\\\b\\\\d+\\\\.\\\\d+(?i:e\\\\d+)?\\\\b","name":"constant.numeric.real.verilog"},{"match":"#\\\\d+","name":"constant.numeric.delay.verilog"},{"match":"\\\\b[01XZxz]+\\\\b","name":"constant.numeric.logic.verilog"}]},"instantiation_patterns":{"patterns":[{"include":"#keywords"},{"begin":"^\\\\s*(?!always|and|assign|output|input|inout|wire|module)([A-Za-z][0-9A-Z_a-z]*)\\\\s+([A-Za-z][0-9A-Z_a-z]*)(?<!begin|if)\\\\s*(?=\\\\(|$)","beginCaptures":{"1":{"name":"entity.name.tag.module.reference.verilog"},"2":{"name":"entity.name.tag.module.identifier.verilog"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.expression.verilog"}},"name":"meta.block.instantiation.parameterless.verilog","patterns":[{"include":"#comments"},{"include":"#constants"},{"include":"#strings"}]},{"begin":"^\\\\s*([A-Za-z][0-9A-Z_a-z]*)\\\\s*(#)(?=\\\\s*\\\\()","beginCaptures":{"1":{"name":"entity.name.tag.module.reference.verilog"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.expression.verilog"}},"name":"meta.block.instantiation.with.parameters.verilog","patterns":[{"include":"#parenthetical_list"},{"match":"[A-Za-z][0-9A-Z_a-z]*","name":"entity.name.tag.module.identifier.verilog"}]}]},"keywords":{"patterns":[{"match":"\\\\b(always|and|assign|attribute|begin|buf|bufif0|bufif1|case[xz]?|cmos|deassign|default|defparam|disable|edge|else|end(attribute|case|function|generate|module|primitive|specify|table|task)?|event|for|force|forever|fork|function|generate|genvar|highz(01)|if(none)?|initial|inout|input|integer|join|localparam|medium|module|large|macromodule|nand|negedge|nmos|nor|not|notif(01)|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|rcmos|real|realtime|reg|release|repeat|rnmos|rpmos|rtran|rtranif(01)|scalared|signed|small|specify|specparam|strength|strong0|strong1|supply0|supply1|table|task|time|tran|tranif(01)|tri(01)?|tri(and|or|reg)|unsigned|vectored|wait|wand|weak(01)|while|wire|wor|xnor|xor)\\\\b","name":"keyword.other.verilog"},{"match":"^\\\\s*`((cell)?define|default_(decay_time|nettype|trireg_strength)|delay_mode_(path|unit|zero)|ifdef|ifndef|include|end(if|celldefine)|else|(no)?unconnected_drive|resetall|timescale|undef)\\\\b","name":"keyword.other.compiler.directive.verilog"},{"match":"\\\\$(f(open|close)|readmem([bh])|timeformat|printtimescale|stop|finish|(s|real)?time|realtobits|bitstoreal|rtoi|itor|(f)?(display|write([bh])))\\\\b","name":"support.function.system.console.tasks.verilog"},{"match":"\\\\$(random|dist_(chi_square|erlang|exponential|normal|poisson|t|uniform))\\\\b","name":"support.function.system.random_number.tasks.verilog"},{"match":"\\\\$((a)?sync\\\\$((n)?and|(n)or)\\\\$(array|plane))\\\\b","name":"support.function.system.pld_modeling.tasks.verilog"},{"match":"\\\\$(q_(initialize|add|remove|full|exam))\\\\b","name":"support.function.system.stochastic.tasks.verilog"},{"match":"\\\\$(hold|nochange|period|recovery|setup(hold)?|skew|width)\\\\b","name":"support.function.system.timing.tasks.verilog"},{"match":"\\\\$(dump(file|vars|off|on|all|limit|flush))\\\\b","name":"support.function.system.vcd.tasks.verilog"},{"match":"\\\\$(countdrivers|list|input|scope|showscopes|(no)?(key|log)|reset(_(?:count|value))?|(inc)?save|restart|showvars|getpattern|sreadmem([bh])|scale)","name":"support.function.non-standard.tasks.verilog"}]},"module_pattern":{"patterns":[{"begin":"\\\\b(module)\\\\s+([A-Za-z][0-9A-Z_a-z]*)","beginCaptures":{"1":{"name":"storage.type.module.verilog"},"2":{"name":"entity.name.type.module.verilog"}},"end":"\\\\bendmodule\\\\b","endCaptures":{"0":{"name":"storage.type.module.verilog"}},"name":"meta.block.module.verilog","patterns":[{"include":"#comments"},{"include":"#keywords"},{"include":"#constants"},{"include":"#strings"},{"include":"#instantiation_patterns"},{"include":"#operators"}]}]},"operators":{"patterns":[{"match":"[-%*+/]|([<>])=?|([!=])?==?|!|&&?|\\\\|\\\\|?|\\\\^?~|~\\\\^?","name":"keyword.operator.verilog"}]},"parenthetical_list":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.list.verilog"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.list.verilog"}},"name":"meta.block.parenthetical_list.verilog","patterns":[{"include":"#parenthetical_list"},{"include":"#comments"},{"include":"#keywords"},{"include":"#constants"},{"include":"#strings"}]}]},"strings":{"patterns":[{"begin":"\\"","end":"\\"","name":"string.quoted.double.verilog","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.verilog"}]}]}},"scopeName":"source.verilog"}')),n=[e];export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=Object.freeze(JSON.parse('{"colors":{"activityBar.background":"#101010","activityBar.foreground":"#A0A0A0","activityBarBadge.background":"#FFC799","activityBarBadge.foreground":"#000","badge.background":"#FFC799","badge.foreground":"#000","button.background":"#FFC799","button.foreground":"#000","button.hoverBackground":"#FFCFA8","diffEditor.insertedLineBackground":"#99FFE415","diffEditor.insertedTextBackground":"#99FFE415","diffEditor.removedLineBackground":"#FF808015","diffEditor.removedTextBackground":"#FF808015","editor.background":"#101010","editor.foreground":"#FFF","editor.selectionBackground":"#FFFFFF25","editor.selectionHighlightBackground":"#FFFFFF25","editorBracketHighlight.foreground1":"#A0A0A0","editorBracketHighlight.foreground2":"#A0A0A0","editorBracketHighlight.foreground3":"#A0A0A0","editorBracketHighlight.foreground4":"#A0A0A0","editorBracketHighlight.foreground5":"#A0A0A0","editorBracketHighlight.foreground6":"#A0A0A0","editorBracketHighlight.unexpectedBracket.foreground":"#FF8080","editorError.foreground":"#FF8080","editorGroupHeader.tabsBackground":"#101010","editorGutter.addedBackground":"#99FFE4","editorGutter.deletedBackground":"#FF8080","editorGutter.modifiedBackground":"#FFC799","editorHoverWidget.background":"#161616","editorHoverWidget.border":"#282828","editorInlayHint.background":"#1C1C1C","editorInlayHint.foreground":"#A0A0A0","editorLineNumber.foreground":"#505050","editorOverviewRuler.border":"#101010","editorWarning.foreground":"#FFC799","editorWidget.background":"#101010","focusBorder":"#FFC799","icon.foreground":"#A0A0A0","input.background":"#1C1C1C","list.activeSelectionBackground":"#232323","list.activeSelectionForeground":"#FFC799","list.errorForeground":"#FF8080","list.highlightForeground":"#FFC799","list.hoverBackground":"#282828","list.inactiveSelectionBackground":"#232323","scrollbarSlider.background":"#34343480","scrollbarSlider.hoverBackground":"#343434","selection.background":"#666","settings.modifiedItemIndicator":"#FFC799","sideBar.background":"#101010","sideBarSectionHeader.background":"#101010","sideBarSectionHeader.foreground":"#A0A0A0","sideBarTitle.foreground":"#A0A0A0","statusBar.background":"#101010","statusBar.debuggingBackground":"#FF7300","statusBar.debuggingForeground":"#FFF","statusBar.foreground":"#A0A0A0","statusBarItem.remoteBackground":"#FFC799","statusBarItem.remoteForeground":"#000","tab.activeBackground":"#161616","tab.activeBorder":"#FFC799","tab.border":"#101010","tab.inactiveBackground":"#101010","textLink.activeForeground":"#FFCFA8","textLink.foreground":"#FFC799","titleBar.activeBackground":"#101010","titleBar.activeForeground":"#7E7E7E","titleBar.inactiveBackground":"#101010","titleBar.inactiveForeground":"#707070"},"displayName":"Vesper","name":"vesper","tokenColors":[{"scope":["comment","punctuation.definition.comment"],"settings":{"foreground":"#8b8b8b94"}},{"scope":["variable","string constant.other.placeholder","entity.name.tag"],"settings":{"foreground":"#FFF"}},{"scope":["constant.other.color"],"settings":{"foreground":"#FFF"}},{"scope":["invalid","invalid.illegal"],"settings":{"foreground":"#FF8080"}},{"scope":["keyword","storage.type","storage.modifier"],"settings":{"foreground":"#A0A0A0"}},{"scope":["keyword.control","constant.other.color","punctuation.definition.tag","punctuation.separator.inheritance.php","punctuation.definition.tag.html","punctuation.definition.tag.begin.html","punctuation.definition.tag.end.html","punctuation.section.embedded","keyword.other.template","keyword.other.substitution"],"settings":{"foreground":"#A0A0A0"}},{"scope":["entity.name.tag","meta.tag.sgml","markup.deleted.git_gutter"],"settings":{"foreground":"#FFC799"}},{"scope":["entity.name.function","variable.function","support.function","keyword.other.special-method"],"settings":{"foreground":"#FFC799"}},{"scope":["meta.block variable.other"],"settings":{"foreground":"#FFF"}},{"scope":["support.other.variable","string.other.link"],"settings":{"foreground":"#FFF"}},{"scope":["constant.numeric","support.constant","constant.character","constant.escape","keyword.other.unit","keyword.other","constant.language.boolean"],"settings":{"foreground":"#FFC799"}},{"scope":["string","constant.other.symbol","constant.other.key","meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js"],"settings":{"foreground":"#99FFE4"}},{"scope":["entity.name","support.type","support.class","support.other.namespace.use.php","meta.use.php","support.other.namespace.php","markup.changed.git_gutter","support.type.sys-types"],"settings":{"foreground":"#FFC799"}},{"scope":["source.css support.type.property-name","source.sass support.type.property-name","source.scss support.type.property-name","source.less support.type.property-name","source.stylus support.type.property-name","source.postcss support.type.property-name","source.postcss support.type.property-name","support.type.vendored.property-name.css","source.css.scss entity.name.tag","variable.parameter.keyframe-list.css","meta.property-name.css","variable.parameter.url.scss","meta.property-value.scss","meta.property-value.css"],"settings":{"foreground":"#FFF"}},{"scope":["entity.name.module.js","variable.import.parameter.js","variable.other.class.js"],"settings":{"foreground":"#FF8080"}},{"scope":["variable.language"],"settings":{"foreground":"#A0A0A0"}},{"scope":["entity.name.method.js"],"settings":{"foreground":"#FFFF"}},{"scope":["meta.class-method.js entity.name.function.js","variable.function.constructor"],"settings":{"foreground":"#FFFF"}},{"scope":["entity.other.attribute-name","meta.property-list.scss","meta.attribute-selector.scss","meta.property-value.css","entity.other.keyframe-offset.css","meta.selector.css","entity.name.tag.reference.scss","entity.name.tag.nesting.css","punctuation.separator.key-value.css"],"settings":{"foreground":"#A0A0A0"}},{"scope":["text.html.basic entity.other.attribute-name.html","text.html.basic entity.other.attribute-name"],"settings":{"foreground":"#FFC799"}},{"scope":["entity.other.attribute-name.class","entity.other.attribute-name.id","meta.attribute-selector.scss","variable.parameter.misc.css"],"settings":{"foreground":"#FFC799"}},{"scope":["source.sass keyword.control","meta.attribute-selector.scss"],"settings":{"foreground":"#99FFE4"}},{"scope":["markup.inserted"],"settings":{"foreground":"#99FFE4"}},{"scope":["markup.deleted"],"settings":{"foreground":"#FF8080"}},{"scope":["markup.changed"],"settings":{"foreground":"#A0A0A0"}},{"scope":["string.regexp"],"settings":{"foreground":"#A0A0A0"}},{"scope":["constant.character.escape"],"settings":{"foreground":"#A0A0A0"}},{"scope":["*url*","*link*","*uri*"],"settings":{"fontStyle":"underline"}},{"scope":["tag.decorator.js entity.name.tag.js","tag.decorator.js punctuation.definition.tag.js"],"settings":{"foreground":"#FFFF"}},{"scope":["source.js constant.other.object.key.js string.unquoted.label.js"],"settings":{"fontStyle":"italic","foreground":"#FF8080"}},{"scope":["source.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"],"settings":{"foreground":"#FFC799"}},{"scope":["text.html.markdown","punctuation.definition.list_item.markdown"],"settings":{"foreground":"#FFF"}},{"scope":["text.html.markdown markup.inline.raw.markdown"],"settings":{"foreground":"#A0A0A0"}},{"scope":["text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown"],"settings":{"foreground":"#FFF"}},{"scope":["markdown.heading","markup.heading | markup.heading entity.name","markup.heading.markdown punctuation.definition.heading.markdown","markup.heading","markup.inserted.git_gutter"],"settings":{"foreground":"#FFC799"}},{"scope":["markup.italic"],"settings":{"fontStyle":"italic","foreground":"#FFF"}},{"scope":["markup.bold","markup.bold string"],"settings":{"fontStyle":"bold","foreground":"#FFF"}},{"scope":["markup.bold markup.italic","markup.italic markup.bold","markup.quote markup.bold","markup.bold markup.italic string","markup.italic markup.bold string","markup.quote markup.bold string"],"settings":{"fontStyle":"bold","foreground":"#FFF"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline","foreground":"#FFC799"}},{"scope":["markup.quote punctuation.definition.blockquote.markdown"],"settings":{"foreground":"#FFF"}},{"scope":["markup.quote"]},{"scope":["string.other.link.title.markdown"],"settings":{"foreground":"#FFFF"}},{"scope":["string.other.link.description.title.markdown"],"settings":{"foreground":"#A0A0A0"}},{"scope":["constant.other.reference.link.markdown"],"settings":{"foreground":"#FFC799"}},{"scope":["markup.raw.block"],"settings":{"foreground":"#A0A0A0"}},{"scope":["markup.raw.block.fenced.markdown"],"settings":{"foreground":"#00000050"}},{"scope":["punctuation.definition.fenced.markdown"],"settings":{"foreground":"#00000050"}},{"scope":["markup.raw.block.fenced.markdown","variable.language.fenced.markdown","punctuation.section.class.end"],"settings":{"foreground":"#FFF"}},{"scope":["variable.language.fenced.markdown"],"settings":{"foreground":"#FFF"}},{"scope":["meta.separator"],"settings":{"fontStyle":"bold","foreground":"#65737E"}},{"scope":["markup.table"],"settings":{"foreground":"#FFF"}}],"type":"dark"}'));export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse(`{"displayName":"VHDL","fileTypes":["vhd","vhdl","vho","vht"],"name":"vhdl","patterns":[{"include":"#block_processing"},{"include":"#cleanup"}],"repository":{"architecture_pattern":{"patterns":[{"begin":"\\\\b((?i:architecture))\\\\s+(([A-z][0-9A-z]*)|(.+))(?=\\\\s)\\\\s+((?i:of))\\\\s+(([A-Za-z][0-9A-Z_a-z]*)|(.+?))(?=\\\\s*(?i:is))\\\\b","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.type.architecture.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"5":{"name":"keyword.language.vhdl"},"7":{"name":"entity.name.type.entity.reference.vhdl"},"8":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"end":"\\\\b((?i:end))(\\\\s+((?i:architecture)))?(\\\\s+((\\\\3)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"6":{"name":"entity.name.type.architecture.end.vhdl"},"7":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"name":"support.block.architecture","patterns":[{"include":"#block_pattern"},{"include":"#function_definition_pattern"},{"include":"#procedure_definition_pattern"},{"include":"#component_pattern"},{"include":"#if_pattern"},{"include":"#process_pattern"},{"include":"#type_pattern"},{"include":"#record_pattern"},{"include":"#for_pattern"},{"include":"#entity_instantiation_pattern"},{"include":"#component_instantiation_pattern"},{"include":"#cleanup"}]}]},"attribute_list":{"patterns":[{"begin":"'\\\\(","beginCaptures":{"0":{"name":"punctuation.vhdl"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#parenthetical_list"},{"include":"#cleanup"}]}]},"block_pattern":{"patterns":[{"begin":"^\\\\s*(([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*)?(\\\\s*(?i:block))","beginCaptures":{"2":{"name":"meta.block.block.name"},"3":{"name":"keyword.language.vhdl"},"4":{"name":"keyword.language.vhdl"}},"end":"((?i:end\\\\s+block))(\\\\s+((\\\\2)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"2":{"name":"meta.block.block.end"},"5":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"name":"meta.block.block","patterns":[{"include":"#control_patterns"},{"include":"#cleanup"}]}]},"block_processing":{"patterns":[{"include":"#package_pattern"},{"include":"#package_body_pattern"},{"include":"#entity_pattern"},{"include":"#architecture_pattern"}]},"case_pattern":{"patterns":[{"begin":"^\\\\s*((([A-Za-z][0-9A-Z_a-z]*)|(.+?))\\\\s*:\\\\s*)?\\\\b((?i:case))\\\\b","beginCaptures":{"3":{"name":"entity.name.tag.case.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"5":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s*(\\\\s+(((?i:case))|(.*?)))(\\\\s+((\\\\2)|(.*?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"4":{"name":"keyword.language.vhdl"},"5":{"name":"invalid.illegal.case.required.vhdl"},"8":{"name":"entity.name.tag.case.end.vhdl"},"9":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#control_patterns"},{"include":"#cleanup"}]}]},"cleanup":{"patterns":[{"include":"#comments"},{"include":"#constants_numeric"},{"include":"#strings"},{"include":"#attribute_list"},{"include":"#syntax_highlighting"}]},"comments":{"patterns":[{"match":"--.*$\\\\n?","name":"comment.line.double-dash.vhdl"}]},"component_instantiation_pattern":{"patterns":[{"begin":"^\\\\s*([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*([A-Za-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*($|generic|port))","beginCaptures":{"1":{"name":"entity.name.section.component_instantiation.vhdl"},"2":{"name":"punctuation.vhdl"},"3":{"name":"entity.name.tag.component.reference.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#parenthetical_list"},{"include":"#cleanup"}]}]},"component_pattern":{"patterns":[{"begin":"^\\\\s*\\\\b((?i:component))\\\\s+(([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*|(.+?))(?=\\\\b(?i:is|port)\\\\b|$|--)(\\\\b((?i:is\\\\b)))?","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.type.component.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"6":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s+(((?i:component\\\\b))|(.+?))(?=\\\\s*|;)(\\\\s+((\\\\3)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"4":{"name":"invalid.illegal.component.keyword.required.vhdl"},"7":{"name":"entity.name.type.component.end.vhdl"},"8":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#generic_list_pattern"},{"include":"#port_list_pattern"},{"include":"#comments"}]}]},"constants_numeric":{"patterns":[{"match":"\\\\b([-+]?[_\\\\d]+\\\\.[_\\\\d]+([Ee][-+]?[_\\\\d]+)?)\\\\b","name":"constant.numeric.floating_point.vhdl"},{"match":"\\\\b\\\\d+#[_\\\\h]+#\\\\b","name":"constant.numeric.base_pound_number_pound.vhdl"},{"match":"\\\\b[_\\\\d]+([Ee][_\\\\d]+)?\\\\b","name":"constant.numeric.integer.vhdl"},{"match":"[Xx]\\"[-HLUWXZ_hluwxz\\\\h]+\\"","name":"constant.numeric.quoted.double.string.hex.vhdl"},{"match":"[Oo]\\"[-0-7HLUWXZ_hluwxz]+\\"","name":"constant.numeric.quoted.double.string.octal.vhdl"},{"match":"[Bb]?\\"[-01HLUWXZ_hluwxz]+\\"","name":"constant.numeric.quoted.double.string.binary.vhdl"},{"captures":{"1":{"name":"invalid.illegal.quoted.double.string.vhdl"}},"match":"([BOXbox]\\".+?\\")","name":"constant.numeric.quoted.double.string.illegal.vhdl"},{"match":"'[-01HLUWXZhluwxz]'","name":"constant.numeric.quoted.single.std_logic"}]},"control_patterns":{"patterns":[{"include":"#case_pattern"},{"include":"#if_pattern"},{"include":"#for_pattern"},{"include":"#while_pattern"},{"include":"#loop_pattern"}]},"entity_instantiation_pattern":{"patterns":[{"begin":"^\\\\s*([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*(((?i:use))\\\\s+)?((?i:entity))\\\\s+((([A-Za-z][0-9A-Z_a-z]*)|(.+?))(\\\\.))?(([A-Za-z][0-9A-Z_a-z]*)|(.+?))(?=\\\\s*(\\\\(|$|(?i:port|generic)))(\\\\s*(\\\\()\\\\s*(([A-Za-z][0-9A-Z_a-z]*)|(.+?))(?=\\\\s*\\\\))\\\\s*(\\\\)))?","beginCaptures":{"1":{"name":"entity.name.section.entity_instantiation.vhdl"},"2":{"name":"punctuation.vhdl"},"4":{"name":"keyword.language.vhdl"},"5":{"name":"keyword.language.vhdl"},"8":{"name":"entity.name.tag.library.reference.vhdl"},"9":{"name":"invalid.illegal.invalid.identifier.vhdl"},"10":{"name":"punctuation.vhdl"},"12":{"name":"entity.name.tag.entity.reference.vhdl"},"13":{"name":"invalid.illegal.invalid.identifier.vhdl"},"16":{"name":"punctuation.vhdl"},"18":{"name":"entity.name.tag.architecture.reference.vhdl"},"19":{"name":"invalid.illegal.invalid.identifier.vhdl"},"21":{"name":"punctuation.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#parenthetical_list"},{"include":"#cleanup"}]}]},"entity_pattern":{"patterns":[{"begin":"^\\\\s*((?i:entity\\\\b))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(.+?))(?=\\\\s)","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.type.entity.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"end":"\\\\b((?i:end\\\\b))(\\\\s+((?i:entity)))?(\\\\s+((\\\\3)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"6":{"name":"entity.name.type.entity.end.vhdl"},"7":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#comments"},{"include":"#generic_list_pattern"},{"include":"#port_list_pattern"},{"include":"#cleanup"}]}]},"for_pattern":{"patterns":[{"begin":"^\\\\s*(([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*)?(?!(?i:wait\\\\s*))\\\\b((?i:for))\\\\b(?!\\\\s*(?i:all))","beginCaptures":{"2":{"name":"entity.name.tag.for.generate.begin.vhdl"},"3":{"name":"punctuation.vhdl"},"4":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s+(((?i:generate|loop))|(\\\\S+))\\\\b(\\\\s+((\\\\2)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"4":{"name":"invalid.illegal.loop.or.generate.required.vhdl"},"7":{"name":"entity.name.tag.for.generate.end.vhdl"},"8":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#control_patterns"},{"include":"#entity_instantiation_pattern"},{"include":"#component_pattern"},{"include":"#component_instantiation_pattern"},{"include":"#process_pattern"},{"include":"#cleanup"}]}]},"function_definition_pattern":{"patterns":[{"begin":"^\\\\s*((?i:impure)?\\\\s*(?i:function))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(\\"\\\\S+\\")|(\\\\\\\\.+\\\\\\\\)|(.+?))(?=\\\\s*(\\\\(|(?i:\\\\breturn\\\\b)))","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.function.function.begin.vhdl"},"4":{"name":"entity.name.function.function.begin.vhdl"},"5":{"name":"entity.name.function.function.begin.vhdl"},"6":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"end":"^\\\\s*((?i:end))(\\\\s+((?i:function)))?(\\\\s+((\\\\3|\\\\4|\\\\5)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"6":{"name":"entity.name.function.function.end.vhdl"},"7":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#control_patterns"},{"include":"#parenthetical_list"},{"include":"#type_pattern"},{"include":"#record_pattern"},{"include":"#cleanup"}]}]},"function_prototype_pattern":{"patterns":[{"begin":"^\\\\s*((?i:impure)?\\\\s*(?i:function))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(\\"\\\\S+\\")|(\\\\\\\\.+\\\\\\\\)|(.+?))(?=\\\\s*(\\\\(|(?i:\\\\breturn\\\\b)))","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.function.function.prototype.vhdl"},"4":{"name":"entity.name.function.function.prototype.vhdl"},"5":{"name":"entity.name.function.function.prototype.vhdl"},"6":{"name":"invalid.illegal.function.name.vhdl"}},"end":"(?<=;)","patterns":[{"begin":"\\\\b(?i:return)(?=\\\\s+[^;]+\\\\s*;)","beginCaptures":{"0":{"name":"keyword.language.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.function_prototype.vhdl"}},"patterns":[{"include":"#parenthetical_list"},{"include":"#cleanup"}]},{"include":"#parenthetical_list"},{"include":"#cleanup"}]}]},"generic_list_pattern":{"patterns":[{"begin":"\\\\b(?i:generic)\\\\b","beginCaptures":{"0":{"name":"keyword.language.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#parenthetical_list"}]}]},"if_pattern":{"patterns":[{"begin":"(([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*)?\\\\b((?i:if))\\\\b","beginCaptures":{"2":{"name":"entity.name.tag.if.generate.begin.vhdl"},"3":{"name":"punctuation.vhdl"},"4":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s+((((?i:generate|if))|(\\\\S+))\\\\b(\\\\s+((\\\\2)|(.+?)))?)?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"4":{"name":"keyword.language.vhdl"},"5":{"name":"invalid.illegal.if.or.generate.required.vhdl"},"8":{"name":"entity.name.tag.if.generate.end.vhdl"},"9":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#control_patterns"},{"include":"#process_pattern"},{"include":"#entity_instantiation_pattern"},{"include":"#component_pattern"},{"include":"#component_instantiation_pattern"},{"include":"#cleanup"}]}]},"keywords":{"patterns":[{"match":"'(?i:active|ascending|base|delayed|driving|driving_value|event|high|image|instance|instance_name|last|last_value|left|leftof|length|low|path|path_name|pos|pred|quiet|range|reverse|reverse_range|right|rightof|simple|simple_name|stable|succ|transaction|val|value)\\\\b","name":"keyword.attributes.vhdl"},{"match":"\\\\b(?i:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|context|deallocate|disconnect|downto|else|elsif|end|entity|exit|file|for|force|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|protected|pure|range|record|register|reject|release|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)\\\\b","name":"keyword.language.vhdl"},{"match":"\\\\b(?i:std|ieee|work|standard|textio|std_logic_1164|std_logic_arith|std_logic_misc|std_logic_signed|std_logic_textio|std_logic_unsigned|numeric_bit|numeric_std|math_complex|math_real|vital_primitives|vital_timing)\\\\b","name":"standard.library.language.vhdl"},{"match":"([-+]|<=|=>??|:=|>=|[\\\\&/<>|]|(\\\\*{1,2}))","name":"keyword.operator.vhdl"}]},"loop_pattern":{"patterns":[{"begin":"^\\\\s*(([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*)?\\\\b((?i:loop))\\\\b","beginCaptures":{"2":{"name":"entity.name.tag.loop.begin.vhdl"},"3":{"name":"punctuation.vhdl"},"4":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s+(((?i:loop))|(\\\\S+))\\\\b(\\\\s+((\\\\2)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"4":{"name":"invalid.illegal.loop.keyword.required.vhdl"},"7":{"name":"entity.name.tag.loop.end.vhdl"},"8":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#control_patterns"},{"include":"#cleanup"}]}]},"package_body_pattern":{"patterns":[{"begin":"\\\\b((?i:package))\\\\s+((?i:body))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(.+?))\\\\s+((?i:is))\\\\b","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"2":{"name":"keyword.language.vhdl"},"4":{"name":"entity.name.section.package_body.begin.vhdl"},"5":{"name":"invalid.illegal.invalid.identifier.vhdl"},"6":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end\\\\b))(\\\\s+((?i:package))\\\\s+((?i:body)))?(\\\\s+((\\\\4)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"4":{"name":"keyword.language.vhdl"},"7":{"name":"entity.name.section.package_body.end.vhdl"},"8":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#protected_body_pattern"},{"include":"#function_definition_pattern"},{"include":"#procedure_definition_pattern"},{"include":"#type_pattern"},{"include":"#subtype_pattern"},{"include":"#record_pattern"},{"include":"#cleanup"}]}]},"package_pattern":{"patterns":[{"begin":"\\\\b((?i:package))\\\\s+(?!(?i:body))(([A-Za-z][A-Z_a-z\\\\d]*)|(.+?))\\\\s+((?i:is))\\\\b","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.section.package.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"5":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end\\\\b))(\\\\s+((?i:package)))?(\\\\s+((\\\\2)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"6":{"name":"entity.name.section.package.end.vhdl"},"7":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#protected_pattern"},{"include":"#function_prototype_pattern"},{"include":"#procedure_prototype_pattern"},{"include":"#type_pattern"},{"include":"#subtype_pattern"},{"include":"#record_pattern"},{"include":"#component_pattern"},{"include":"#cleanup"}]}]},"parenthetical_list":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.vhdl"}},"end":"(?<=\\\\))","patterns":[{"begin":"(?=[\\"'0-9A-Za-z])","end":"([),;])","endCaptures":{"0":{"name":"punctuation.vhdl"}},"name":"source.vhdl","patterns":[{"include":"#comments"},{"include":"#parenthetical_pair"},{"include":"#cleanup"}]},{"match":"\\\\)","name":"invalid.illegal.unexpected.parenthesis.vhdl"},{"include":"#cleanup"}]}]},"parenthetical_pair":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.vhdl"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#parenthetical_pair"},{"include":"#cleanup"}]}]},"port_list_pattern":{"patterns":[{"begin":"\\\\b(?i:port)\\\\b","beginCaptures":{"0":{"name":"keyword.language.vhdl"}},"end":"(?<=\\\\))\\\\s*;","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#parenthetical_list"}]}]},"procedure_definition_pattern":{"patterns":[{"begin":"^\\\\s*((?i:procedure))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(\\"\\\\S+\\")|(.+?))(?=\\\\s*(\\\\(|(?i:is)))","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.function.procedure.begin.vhdl"},"4":{"name":"entity.name.function.procedure.begin.vhdl"},"5":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"end":"^\\\\s*((?i:end))(\\\\s+((?i:procedure)))?(\\\\s+((\\\\3|\\\\4)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"6":{"name":"entity.name.function.procedure.end.vhdl"},"7":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#parenthetical_list"},{"include":"#control_patterns"},{"include":"#type_pattern"},{"include":"#record_pattern"},{"include":"#cleanup"}]}]},"procedure_prototype_pattern":{"patterns":[{"begin":"\\\\b((?i:procedure))\\\\s+(([A-Za-z][0-9A-Z_a-z]*)|(.+?))(?=\\\\s*([(;]))","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.function.procedure.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctual.vhdl"}},"patterns":[{"include":"#parenthetical_list"}]}]},"process_pattern":{"patterns":[{"begin":"^\\\\s*(([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*)?((?:postponed\\\\s+)?(?i:process\\\\b))","beginCaptures":{"2":{"name":"entity.name.section.process.begin.vhdl"},"3":{"name":"punctuation.vhdl"},"4":{"name":"keyword.language.vhdl"}},"end":"((?i:end))(\\\\s+((?:postponed\\\\s+)?(?i:process)))(\\\\s+((\\\\2)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"6":{"name":"entity.name.section.process.end.vhdl"},"7":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"patterns":[{"include":"#control_patterns"},{"include":"#cleanup"}]}]},"protected_body_pattern":{"patterns":[{"begin":"\\\\b((?i:type))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(.+?))\\\\s+\\\\b((?i:is\\\\s+protected\\\\s+body))\\\\s+","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.section.protected_body.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"5":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end\\\\s+protected\\\\s+body))(\\\\s+((\\\\3)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"4":{"name":"entity.name.section.protected_body.end.vhdl"},"5":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#function_definition_pattern"},{"include":"#procedure_definition_pattern"},{"include":"#type_pattern"},{"include":"#subtype_pattern"},{"include":"#record_pattern"},{"include":"#cleanup"}]}]},"protected_pattern":{"patterns":[{"begin":"\\\\b((?i:type))\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(.+?))\\\\s+\\\\b((?i:is\\\\s+protected))\\\\s+(?!(?i:body))","beginCaptures":{"1":{"name":"keyword.language.vhdls"},"3":{"name":"entity.name.section.protected.begin.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"5":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end\\\\s+protected))(\\\\s+((\\\\3)|(.+?)))?(?!(?i:body))(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"4":{"name":"entity.name.section.protected.end.vhdl"},"5":{"name":"invalid.illegal.mismatched.identifier.vhdl"}},"patterns":[{"include":"#function_prototype_pattern"},{"include":"#procedure_prototype_pattern"},{"include":"#type_pattern"},{"include":"#subtype_pattern"},{"include":"#record_pattern"},{"include":"#component_pattern"},{"include":"#cleanup"}]}]},"punctuation":{"patterns":[{"match":"([(),.:;])","name":"punctuation.vhdl"}]},"record_pattern":{"patterns":[{"begin":"\\\\b(?i:record)\\\\b","beginCaptures":{"0":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s+((?i:record))(\\\\s+(([A-Za-z][A-Z_a-z\\\\d]*)|(.*?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"2":{"name":"keyword.language.vhdl"},"5":{"name":"entity.name.type.record.vhdl"},"6":{"name":"invalid.illegal.invalid.identifier.vhdl"}},"patterns":[{"include":"#cleanup"}]},{"include":"#cleanup"}]},"strings":{"patterns":[{"match":"'.'","name":"string.quoted.single.vhdl"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.vhdl","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.vhdl"}]},{"begin":"\\\\\\\\","end":"\\\\\\\\","name":"string.other.backslash.vhdl"}]},"subtype_pattern":{"patterns":[{"begin":"\\\\b((?i:subtype))\\\\s+(([A-Za-z][0-9A-Z_a-z]*)|(.+?))\\\\s+((?i:is))\\\\b","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.type.subtype.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"5":{"name":"keyword.language.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#cleanup"}]}]},"support_constants":{"patterns":[{"match":"\\\\b(?i:math_(?:1_over_e|1_over_pi|1_over_sqrt_2|2_pi|3_pi_over_2|deg_to_rad|e|log10_of_e|log2_of_e|log_of_10|log_of_2|pi|pi_over_2|pi_over_3|pi_over_4|rad_to_deg|sqrt_2|sqrt_pi))\\\\b","name":"support.constant.ieee.math_real.vhdl"},{"match":"\\\\b(?i:math_cbase_1|math_cbase_j|math_czero|positive_real|principal_value)\\\\b","name":"support.constant.ieee.math_complex.vhdl"},{"match":"\\\\b(?i:true|false)\\\\b","name":"support.constant.std.standard.vhdl"}]},"support_functions":{"patterns":[{"match":"\\\\b(?i:finish|stop|resolution_limit)\\\\b","name":"support.function.std.env.vhdl"},{"match":"\\\\b(?i:readline|read|writeline|write|endfile|endline)\\\\b","name":"support.function.std.textio.vhdl"},{"match":"\\\\b(?i:rising_edge|falling_edge|to_bit|to_bitvector|to_stdulogic|to_stdlogicvector|to_stdulogicvector|is_x)\\\\b","name":"support.function.ieee.std_logic_1164.vhdl"},{"match":"\\\\b(?i:shift_left|shift_right|rotate_left|rotate_right|resize|to_integer|to_unsigned|to_signed)\\\\b","name":"support.function.ieee.numeric_std.vhdl"},{"match":"\\\\b(?i:arccos(h?)|arcsin(h?)|arctanh??|cbrt|ceil|cosh??|exp|floor|log10|log2?|realmax|realmin|round|sign|sinh??|sqrt|tanh??|trunc)\\\\b","name":"support.function.ieee.math_real.vhdl"},{"match":"\\\\b(?i:arg|cmplx|complex_to_polar|conj|get_principal_value|polar_to_complex)\\\\b","name":"support.function.ieee.math_complex.vhdl"}]},"support_types":{"patterns":[{"match":"\\\\b(?i:boolean|bit|character|severity_level|integer|real|time|delay_length|now|natural|positive|string|bit_vector|file_open_kind|file_open_status|fs|ps|ns|us|ms|sec|min|hr|severity_level|note|warning|error|failure)\\\\b","name":"support.type.std.standard.vhdl"},{"match":"\\\\b(?i:line|text|side|width|input|output)\\\\b","name":"support.type.std.textio.vhdl"},{"match":"\\\\b(?i:std_u??logic(?:|_vector))\\\\b","name":"support.type.ieee.std_logic_1164.vhdl"},{"match":"\\\\b(?i:(?:|un)signed)\\\\b","name":"support.type.ieee.numeric_std.vhdl"},{"match":"\\\\b(?i:complex(?:|_polar))\\\\b","name":"support.type.ieee.math_complex.vhdl"}]},"syntax_highlighting":{"patterns":[{"include":"#keywords"},{"include":"#punctuation"},{"include":"#support_constants"},{"include":"#support_types"},{"include":"#support_functions"}]},"type_pattern":{"patterns":[{"begin":"\\\\b((?i:type))\\\\s+(([A-Za-z][0-9A-Z_a-z]*)|(.+?))((?=\\\\s*;)|(\\\\s+((?i:is))))\\\\b","beginCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"entity.name.type.type.vhdl"},"4":{"name":"invalid.illegal.invalid.identifier.vhdl"},"7":{"name":"keyword.language.vhdl"}},"end":";","endCaptures":{"0":{"name":"punctuation.vhdl"}},"patterns":[{"include":"#record_pattern"},{"include":"#cleanup"}]}]},"while_pattern":{"patterns":[{"begin":"^\\\\s*(([A-Za-z][0-9A-Z_a-z]*)\\\\s*(:)\\\\s*)?\\\\b((?i:while))\\\\b","beginCaptures":{"2":{"name":""},"3":{"name":"punctuation.vhdl"},"4":{"name":"keyword.language.vhdl"}},"end":"\\\\b((?i:end))\\\\s+(((?i:loop))|(\\\\S+))\\\\b(\\\\s+((\\\\2)|(.+?)))?(?=\\\\s*;)","endCaptures":{"1":{"name":"keyword.language.vhdl"},"3":{"name":"keyword.language.vhdl"},"4":{"name":"invalid.illegal.loop.keyword.required.vhdl"},"7":{"name":"entity.name.tag.while.loop.vhdl"},"8":{"name":"invalid.illegal.mismatched.identifier"}},"patterns":[{"include":"#control_patterns"},{"include":"#cleanup"}]}]}},"scopeName":"source.vhdl"}`)),n=[e];export{n as default};
|